Encryption and Kernel flash fails - Xiaomi Mi 5 Questions & Answers

Hi guys,
Forgive me If this is a repetitive post, i promise i tried searching.
When i installed nougat i accidentally encrypted the phone, and it asks me for an encryption pin whenever I boot in. I don't mind this but flashing a new kernel always puts the phone into an infinite boot. I have to dirty flash the installed rom in order to restore the kernel without losing my data. Is there any way to decrypt the device so i can flash a custom kernel? Or have i got the entire thing wrong? I can't seem to find a decrypt option and i don't want to flash MIUI so to remove encryption. I don't mind losing all the data but flashing a new rom doesn't seem to remove the encryption.
Thank you so much for reading this.

Kernel bootloop because you wipe dalvik and chace, whan you install the kernel just flash it without wipe anything.
if you want to remove encryption just backup your things on pc.
than go to TWRP wipe section:
FORMAT DATA and write "yes".... now you wont have encryption problems never again (NOTE: this wipes your internal storage)
AFTER:
go back to TWRP wipe section:
ADVANCED WIPE
select:
DALVIK
CACHE
DATA
SYSTEM
INTERNAL STORAGE
swipe to confirm!!! NOW YOU HAVE A CLEAN AND FRESH PHONE
while you still are in twrp connect your phone to pc and put in to it, rom and gapps.... flash those.
FINISHED

Related

[Q] Problem with flashing roms and partitions/mounting...

After I flash a rom, when i try boot into TWRP it asks for a password and refuses to mount any partitions unless i wipe data in there, and then wipe the other partitions in CWM... I have no idea what to do as this is pretty much stuffing everything up.
Edit: It's always the /data partition that need to be wiped...

How to know if encrypted or not?

I flashed a file that was supposed to disable encryption but it still shows as "encrypted" in Security settings. How can I tell if encryption is actually enabled or not?
If not encrypted you will have option "Encrypt phone" in security settings. After flashing kernel that does not enforce encryption you need to format userdata.
The Resurrection Remix ROM I'm using gave a zip to flash that was supposed to disable encryption but all I did after flashing the ROM, Gapps, and then that file was wipe the cache and then the dalvik cache. What is formatting the userdata?
enginuity2 said:
I flashed a file that was supposed to disable encryption but it still shows as "encrypted" in Security settings. How can I tell if encryption is actually enabled or not?
Click to expand...
Click to collapse
flashing a file wont decrypt you. you have to decrpt yourself after flashing that file or a kernel that allows decrypting. you have to format your user data/storage, this will delete everything in your storage. only then will you be decrypted after booting up.
enginuity2 said:
The Resurrection Remix ROM I'm using gave a zip to flash that was supposed to disable encryption but all I did after flashing the ROM, Gapps, and then that file was wipe the cache and then the dalvik cache. What is formatting the userdata?
Click to expand...
Click to collapse
Connect device to a PC and use command "fastboot format userdata". This will wipe all your private stuff so backup before proceeding.
Can I do that through my TWRP recovery?
enginuity2 said:
Can I do that through my TWRP recovery?
Click to expand...
Click to collapse
You can. It is in Wipe>Format Data section. You will have to type "yes" to confirm.
Is that all I need to do to decrypt now? Just wipe the user/data? Can I install a new kernel and not have to wipe everything?
enginuity2 said:
Is that all I need to do to decrypt now? Just wipe the user/data? Can I install a new kernel and not have to wipe everything?
Click to expand...
Click to collapse
not wipe. format. they are two differing things. and yes, as long as it allows decryption.
That worked surprisingly well. Since I've already lost all of my data, what can I wipe in order to do a full clean install of my rom? TWRP gives me the option to wipe Dalvik Cache, System, Data, Internal Storage, and Cache. Your help is greatly appreciated.
enginuity2 said:
That worked surprisingly well. Since I've already lost all of my data, what can I wipe in order to do a full clean install of my rom? TWRP gives me the option to wipe Dalvik Cache, System, Data, Internal Storage, and Cache. Your help is greatly appreciated.
Click to expand...
Click to collapse
to get a full real wipe.. you should wipe system and data, then reflash your rom. because when you wipe system, you wipe your rom off your phone.
enginuity2 said:
That worked surprisingly well. Since I've already lost all of my data, what can I wipe in order to do a full clean install of my rom? TWRP gives me the option to wipe Dalvik Cache, System, Data, Internal Storage, and Cache. Your help is greatly appreciated.
Click to expand...
Click to collapse
Before you do that make sure that you can connect your device to PC in bootloader mode and in recovery mode (TWRP). If you wipe everything you will cut the branch you are sitting on.
Witek_M, you beat me to it. Thank you.
Witek_M said:
Before you do that make sure that you can connect your device to PC in bootloader mode and in recovery mode (TWRP). If you wipe everything you will cut the branch you are sitting on.
Click to expand...
Click to collapse
to be safe, ok. thats a great idea for newer folk.
but ill be honest, there are a few differing ways to get a rom onto your device from twrp. but you should downliad the rom beforehand, it wont get deleted. anyways, now you can use adb to transfer files, two differing ways. and you can just simply transfer a rom to your phone using twrp, not adb, as well.
What commands do I need to use to push the rom onto the phone?
enginuity2 said:
What commands do I need to use to push the rom onto the phone?
Click to expand...
Click to collapse
if anything, i use adb push. but twrp has an option now to tranfer roms over to your phone as well, without using adb.
So if I put the rom's zip, gapps, etc on the phone's storage and wipe system, the rom zip file and twrp will still be usable on the phone after that?
enginuity2 said:
So if I put the rom's zip, gapps, etc on the phone's storage and wipe system, the rom zip file and twrp will still be usable on the phone after that?
Click to expand...
Click to collapse
yes. wiping system will get rid of the rom, wiping data will get rid of all your apps and data, but none of them will wipe your storage. thats in advanced wipe settings.

Questions on how to do a complete, 100% wipe

There have been several threads about this in the past, but I couldn't find one which is actually up-to-date.
I have been flashing my N7000 for years now. I've been using several custom recovery menu's and ROMS and re-partitioned my internal storage as suggested here. I currently have the following installed on my phone:
NightOwl 20151030
PhilZ Touch 6.59.0
ClockworkMod v6.0.5.1 (as shown in PhilZ)
What I would like to do is perform a full, 100% wipe of my phone before re-flashing the same ROM I currently have installed, perhaps even update my recovery or whatnot in case my phone would benefit from it (suggestions are welcome).
The original instructions from the NightOwl thread mention the following when you want to manually update:
1. Copy Rom to your sdcard.
2. Boot into recovery
3. Flash the Rom (in current versions you dont need to reflash the gapps)
4. Wipe dalvik-cache and format the /cache partition (This will not delete your apps or data)
5. Reboot
Click to expand...
Click to collapse
As mentioned these steps will not remove your apps or data. I understand that a "factory reset" does. However, I still wonder if this (including a factory reset) will actually wipe my phone 100% clean before flashing a new ROM.
That would be the following options in recovery
Factory reset to wipe data and cache
Format system
And if you want to wipe internal memory then format sdcard0.
Be careful of where you have the zip file of rom to flash again.
In CWM, go to "Mounts and Storage" section and there you'll find options to wipe totally everything.

I think I lost all my data

Hi, I want to install custom rom but I think because of encryption I lost my all internal storage :/
Before mi 9t pro, I used an old android phone. Because of that I didn't know too much about encrption.
When I open OrangeFox it asks my password. So I thought remove my password before any rom installation should be enough.
I remove my password. After dirty rom flash my phone didn't boot to system but did boot to recovery.
Guess what? All my file names are random
Before anyone say, I have a backup. But where Yesss it is in internal storage with encryption :angel:
I tried to wipe data, didn't work. I flash my rom mi flash with keeping data, didn't work.
Now my phone boot up, I can see my files with random names.
Why I didn't backup to computer? Because I was lazy.
My big question;
Can I recover my files (~70 gb), I know my old password.
It's a good thing your data wasn't important then, if it was you would have a backup stored on a PC or cloud. First rule of flashing, have a backup. You can't recover it's gone, format data In twrp to remove encryption and wipe your internal storage then flash your rom.
hoopsnake said:
It's a good thing your data wasn't important then, if it was you would have a backup stored on a PC or cloud. First rule of flashing, have a backup. You can't recover it's gone, format data In twrp to remove encryption and wipe your internal storage then flash your rom.
Click to expand...
Click to collapse
Yes, it isn't too much important but I'm a little sad. I just lost few whatsapp message.
I will delete everything now. After that, I will disable this encryption.
Thanks
P.S: Whoever read this don't be lazy like me

twrp 0 mb

hello.my phone is n950F i have problem. my problem is
when i flash stock rom w/odin
then set up twrp this app cant see my internal storage without apply format data or tap change file system ex4 exfat etc.
but i choose format data or repair file system button, mine system is formatting. so i must have flash stock rom odin again.
if i flash stock rom again, twrp cant see my interal storage, 0mb error. again again again. how i flash kernel in twrp on stock rom?
n0te8user said:
hello.my phone is n950F i have problem. my problem is
when i flash stock rom w/odin
then set up twrp this app cant see my internal storage without apply format data or tap change file system ex4 exfat etc.
but i choose format data or repair file system button, mine system is formatting. so i must have flash stock rom odin again.
if i flash stock rom again, twrp cant see my interal storage, 0mb error. again again again. how i flash kernel in twrp on stock rom?
Click to expand...
Click to collapse
If you are using twrp from this thread, it's mentioned on the 3rd post
corsicanu said:
FAQ / Further reading
Q: TWRP can't mount data partition, what to do?
A: Make sure you formatted data partition.
Q: Why do i need to format data partition?
A: Because old rom encrypted your data partition and new rom can't decrypt and use that content / root needs access to data partition to place misc files / phone not booting after flashing root until data partition gets formatted.
Click to expand...
Click to collapse
or maybe try to disable data encryption which is mentioned on the 1st post
corsicanu said:
After booting in TWRP download and flash no-verity-opt-encrypt-6.1 zip to disable data partition encryption
If for any reason you fail to install TWRP multiple times/different methods, make sure you check this thread
Click to expand...
Click to collapse
You need to format /data with the "yes" confirmation.
The stock ROM will survive, because it's on /system and /preload.
After that you need to flash a fully patched kernel with removed forced encryption (like a2n kernel) before you reboot to the system. Otherwise the stock kernel will encrypt the /data partition once again.
ace2nutzer said:
You need to format /data with the "yes" confirmation.
The stock ROM will survive, because it's on /system and /preload.
After that you need to flash a fully patched kernel with removed forced encryption (like a2n kernel) before you reboot to the system. Otherwise the stock kernel will encrypt the /data partition once again.
Click to expand...
Click to collapse
i know i tried this but mine stock rom installed after flashing with odin (turkey) and after apply twrp format data stock rom are very different. the second i said seems like global rom. it contains weird settings and apps I will do what you say and take a screenshot,1 2 hours later you will understand me better.

Categories

Resources