How to prevent data/internal storage encryption after ROM switch? - Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe

Yesterday i flashed xiome eu stable ROM from weekly beta but couldn't boot as all my data was encrypted with strange random folder name. I had to format data to boot into ROM. I am using orange fox kwrnel 11.0. How can i prevent this from happen in future when flashing other ROM?

shoeseat said:
Yesterday i flashed xiome eu stable ROM from weekly beta but couldn't boot as all my data was encrypted with strange random folder name. I had to format data to boot into ROM. I am using orange fox kwrnel 11.0. How can i prevent this from happen in future when flashing other ROM?
Click to expand...
Click to collapse
When switching ROM you have to Format Data in TWRP. Not just because of strange folder names but to avoid all kinds of troubles. New ROM will encrypt Data and Internal storage, you will have protection and everything will properly work as originally
New TWRP versions know how to read encryption, when booting to TWRP you will have to enter your Android Pin/Pattern (same as when you boot to Android or you use to unlock the screem in Android) and TWRP will then also work properly
That's the price of switching ROMs. Backup your Data to PC, backup things (WA and so) to Google and cloud, etc, and restore upon installing the new ROM (btw, I use also Mi Cloud and it restores automatically my apps and other things)
Otherwise, you had to Forrmat Data originally and flash DFE = Disable Forced Encryption (I never used, old school from the times when TWRP did not know to work with encrypted Data and Internal storage) with all your ROMs to prevent them to encrypt. However, you would have no protection then (in Android and TWRP).
Furthermore, after switching the ROM, you could expect then various troubles since new ROM trying to work with settings saved by the old ROM.
Hence, you would still have to Wipe Data upon that ROM switch - therefore, what do you get then by avoiding formatting and proper encryption to automatically happen when booting to the newly installed ROM

Thanks for the explanation but this encryption of data and formatting data partition was never the problem in my past devicea like nexus 5 and oneplus 3 roms. I freely flashed many roms in those devices without formatting my internal storage. Wiping data and system were the only thing i did in past to flash new rom. Is this the xiome phones only restriction?
Also if i have to backup all my data in PC Everytime i want to switch to new rom then it's very troublesome and time consuming aa i have 200GB of data in my internal storage. Isn't their any easy way to flash ROMS without entirely formatting my personal data?

shoeseat said:
Thanks for the explanation but this encryption of data and formatting data partition was never the problem in my past devicea like nexus 5 and oneplus 3 roms. I freely flashed many roms in those devices without formatting my internal storage. Wiping data and system were the only thing i did in past to flash new rom. Is this the xiome phones only restriction?
Also if i have to backup all my data in PC Everytime i want to switch to new rom then it's very troublesome and time consuming aa i have 200GB of data in my internal storage. Isn't their any easy way to flash ROMS without entirely formatting my personal data?
Click to expand...
Click to collapse
Things change with the evolution of Android. In the old times rooting was simple, just run King(o) root and then flash CM recovery by flashify, and flash the ROM you wanted - but it doesn't apply anymore

zgfg said:
When switching ROM you have to Format Data in TWRP. Not just because of strange folder names but to avoid all kinds of troubles. New ROM will encrypt Data and Internal storage, you will have protection and everything will properly work as originally
New TWRP versions know how to read encryption, when booting to TWRP you will have to enter your Android Pin/Pattern (same as when you boot to Android or you use to unlock the screem in Android) and TWRP will then also work properly
That's the price of switching ROMs. Backup your Data to PC, backup things (WA and so) to Google and cloud, etc, and restore upon installing the new ROM (btw, I use also Mi Cloud and it restores automatically my apps and other things)
Otherwise, you had to Forrmat Data originally and flash DFE = Disable Forced Encryption (I never used, old school from the times when TWRP did not know to work with encrypted Data and Internal storage) with all your ROMs to prevent them to encrypt. However, you would have no protection then (in Android and TWRP).
Furthermore, after switching the ROM, you could expect then various troubles since new ROM trying to work with settings saved by the old ROM.
Hence, you would still have to Wipe Data upon that ROM switch - therefore, what do you get then by avoiding formatting and proper encryption to automatically happen when booting to the newly installed ROM
Click to expand...
Click to collapse
I agree with you point here but i have been using decrypted storage since i go this phone..Mostly i delete my android folder and other folder which might be created by rom itself after flashing any rom with dfe and never had any issue on new roms.

Related

How to decrypt 7.1.2

Hello, I'm currently using Dirty Unicorns October build.
I want to try some Oreo ROMs, but thing is they do not work well with encrypted devices.
So, I wanna ask how do I decrypt my phone?
The guides that I have seen are very old (for Lollipop). Are these guides still applicable to 7.1.2?
Yes, the guides are still applicable. However, it also depends upon the ROM. None of the Android 8.x ROMs I tried had any issues with encrypted storage.
Backup your internal storage to another device. Using TWRP wipe everything including internal storage and format data. Install ROM that does not force encryption. Copy your data back.
This is correct as far as it goes. What is simply required is a kernel that did not force encryption, not really a full ROM. If you wipe user data before install a "no force encrypt" kernel and then reboot, the user data partition will be encrypted again. You really should flash the kernel (or ROM with a kernel that doesn't force encrypt) first, then format user data. Of course backing up every thing on the user data partition (internal storage) should be done 1st.

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

How to encrypt Nexus 6 7.1.1 Build N6F27M

I have an Nexus 6 Version 7.1.1. The complete Storage is crypted. So it is not possible to wipe the data and system by using TWRP. I did an factory reset but after that the storage also was crypted. How can I encrypt these Version of Nexus 6?
I believe that the stock rom forces encryption.
Use TWRP's format data to remove encryption if you want to install a recent custom rom. Of course, you'll lose all your files by doing that.
Hi, thank you. But if I install twrp on this N6, I need for using twrp a password. If I try to format user Data, the formatting dont work. After start android I have the same crypted data storage. I thing, android install after new starting an crypted storage! I try now to install lineage os after formatting data.
runekock said:
I believe that the stock rom forces encryption.
Use TWRP's format data to remove encryption if you want to install a recent custom rom. Of course, you'll lose all your files by doing that.
Click to expand...
Click to collapse
Hi runcock,
thank you for your help. I installed twrp, formatted all data removed encryption and installed lineageos 17.1 and gaps by using extern otg-storage. All funktions on the nexus 6 works normally. Update to the last version of shamu also worked. Thank you till the next question!

Question UNABLE TO BACK UP ANY ANDROID 12 MIUI OR CUSTOM ROM (internal storage 0mb) in TWRP

I'm able to use backup & restore in Android 11 custom or miui rom. but unable to use it when i flashed android 12 roms.
Can anyone walk me through how to fix this.
Did the ff workaround in youtube as well in any similar post but still not working.
1. Advance wipe > click data >Repair or Change File System > Change File System to EXT2 & EXT4
2. Format data
This process is temporarily working the internal storage is visible, but after booting to system and go back to twrp recovery, the internal storage appears 0mb again.
I flashed stock rom/ eu rom as well in TWRP as i read this is worked with them. but not on my end.
Kindly help me to solve this issue please.
TWRP is not yet compatible with Android 12, it can't decrypt the internal storage. You can't fix it until TWRP (or some other recovery) solves Android 12 support.
I think in theory you might be able to back up the ROM to an unencrypted storage like an SD Card or OTG USB drive, but I'm not sure (and I'm even less sure if such backup could even be successfully restored if you back the partition up without decrypting).
Use otg usb
rufio85 said:
I'm able to use backup & restore in Android 11 custom or miui rom. but unable to use it when i flashed android 12 roms.
Can anyone walk me through how to fix this.
Did the ff workaround in youtube as well in any similar post but still not working.
1. Advance wipe > click data >Repair or Change File System > Change File System to EXT2 & EXT4
2. Format data
This process is temporarily working the internal storage is visible, but after booting to system and go back to twrp recovery, the internal storage appears 0mb again.
I flashed stock rom/ eu rom as well in TWRP as i read this is worked with them. but not on my end.
Kindly help me to solve this issue please.
Click to expand...
Click to collapse
Case_ said:
TWRP is not yet compatible with Android 12, it can't decrypt the internal storage. You can't fix it until TWRP (or some other recovery) solves Android 12 support.
I think in theory you might be able to back up the ROM to an unencrypted storage like an SD Card or OTG USB drive, but I'm not sure (and I'm even less sure if such backup could even be successfully restored if you back the partition up without decrypting).
Click to expand...
Click to collapse
Cisuwek said:
Use otg usb
Click to expand...
Click to collapse
In my opinion it's only possible to backup encrypted storage as in A12 if you flash DfE but then you'll have to format and later you're decrypted and in future you can backup via TWRP.
But you can copy actual personal files with a file manager, if android is booted up, to external storages or internal micro SD. android internal app data can't copied.
Laptapper said:
In my opinion it's only possible to backup encrypted storage as in A12 if you flash DfE but then you'll have to format and later you're decrypted and in future you can backup via TWRP.
But you can copy actual personal files with a file manager, if android is booted up, to external storages or internal micro SD. android internal app data can't copied.
Click to expand...
Click to collapse
You can install cutom roms, flash magisk, kernel and other stuff. The memory is only encrypted, the rest works perfectly fine. Have you checked on the latest recovery?
A new kernel was flashed an hour ago. I have made a backup of the boot and dtbo images. It really works
Not checked to backup complete rom, but suppose it's possible with otg
Cisuwek said:
You can install cutom roms, flash magisk, kernel and other stuff. The memory is only encrypted, the rest works perfectly fine. Have you checked on the latest recovery?
A new kernel was flashed an hour ago. I have made a backup of the boot and dtbo images. It really works
Not checked to backup complete rom, but suppose it's possible with otg
Click to expand...
Click to collapse
.....Not checked to backup complete rom, but suppose it's possible with otg....?
But this is what he wants to do, or not?
Cisuwek said:
You can install cutom roms, flash magisk, kernel and other stuff.
Click to expand...
Click to collapse
I guess (I was in fact asking about exactly this in another thread recently), but then if the install script tries to modify the data partition in any way (which remains encrypted with current recoveries under Android 12), you're almost certainly screwed and at best the installation will fail, at worst you'll have to reinstall everything.
Thanks for the reply guys..this already solved..with the help of @Laptapper in other thread. Using orangefox, dfe,
How to flash a Android 12 ROM without decryption problem?
I've been struggling to flash Android 12 without my internal storage to be unaccessible by TWRP... I simply can't decrypt my data and the only way to fix it is to format data and revert back to a Android 11 ROM. Did anyone manage to flash Android...
forum.xda-developers.com
here's the thread.
Case_ said:
I guess (I was in fact asking about exactly this in another thread recently), but then if the install script tries to modify the data partition in any way (which remains encrypted with current recoveries under Android 12), you're almost certainly screwed and at best the installation will fail, at worst you'll have to reinstall everything.
Click to expand...
Click to collapse
Previously I had a Redmi note 7. On the encrypted partition, I could also install everything in the same way. I am not a specialist, my knowledge has ended here.

Question Can't mount data partition in recovery

Hi, I have a question and hoping that maybe someone here might be able to help me.
I'm not a developer or anything like that and my knowledge is rather basic.
I truly tried my best reading, tutorials, forums, etc. and trying over and over again for many hours.
So the problem is this:
After new installation of arrowsOS and orange fox recovery on redmi note 10pro, recovery can't read/mount data or internal sd card.
Formating data or changing filesystem fixes this temporarily. Data now shows a size rather than 0mb and becomes mountable.
But unless the filesystem is f2fs (like ext4 or anything else) ROM won't boot. Goes straight back into recovery.
If I choose f2fs (readable by recovery after format), arrowsOS will boot again, but also will encrypt the partition somehow and the problem persists.
Next time I boot into recovery data, storage and sdcard are empty, data can't be mounted and is shown with 0mb size.
In orange fox telegram group I was informed that Android 12 is not supported nor will be any time soonish and I should get off their chat... but I tried twrp before and that didn't work either.
I'd really love to get this fixed before installing lots of apps onto the phone again. Because afterwards having to wipe and set up everything again will be a pain.
So does anyone here have any idea for me how to solve this?
Best regards
Eric
Kilombodog said:
Hi, I have a question and hoping that maybe someone here might be able to help me.
I'm not a developer or anything like that and my knowledge is rather basic.
I truly tried my best reading, tutorials, forums, etc. and trying over and over again for many hours.
So the problem is this:
After new installation of arrowsOS and orange fox recovery on redmi note 10pro, recovery can't read/mount data or internal sd card.
Formating data or changing filesystem fixes this temporarily. Data now shows a size rather than 0mb and becomes mountable.
But unless the filesystem is f2fs (like ext4 or anything else) ROM won't boot. Goes straight back into recovery.
If I choose f2fs (readable by recovery after format), arrowsOS will boot again, but also will encrypt the partition somehow and the problem persists.
Next time I boot into recovery data, storage and sdcard are empty, data can't be mounted and is shown with 0mb size.
In orange fox telegram group I was informed that Android 12 is not supported nor will be any time soonish and I should get off their chat... but I tried twrp before and that didn't work either.
I'd really love to get this fixed before installing lots of apps onto the phone again. Because afterwards having to wipe and set up everything again will be a pain.
So does anyone here have any idea for me how to solve this?
Best regards
Eric
Click to expand...
Click to collapse
Switch to A11 ROM or wait. There's no recovery capable of decrypting anything based on Android 12 right now
Kilombodog said:
Hi, I have a question and hoping that maybe someone here might be able to help me.
I'm not a developer or anything like that and my knowledge is rather basic.
I truly tried my best reading, tutorials, forums, etc. and trying over and over again for many hours.
So the problem is this:
After new installation of arrowsOS and orange fox recovery on redmi note 10pro, recovery can't read/mount data or internal sd card.
Formating data or changing filesystem fixes this temporarily. Data now shows a size rather than 0mb and becomes mountable.
But unless the filesystem is f2fs (like ext4 or anything else) ROM won't boot. Goes straight back into recovery.
If I choose f2fs (readable by recovery after format), arrowsOS will boot again, but also will encrypt the partition somehow and the problem persists.
Next time I boot into recovery data, storage and sdcard are empty, data can't be mounted and is shown with 0mb size.
In orange fox telegram group I was informed that Android 12 is not supported nor will be any time soonish and I should get off their chat... but I tried twrp before and that didn't work either.
I'd really love to get this fixed before installing lots of apps onto the phone again. Because afterwards having to wipe and set up everything again will be a pain.
So does anyone here have any idea for me how to solve this?
Best regards
Eric
Click to expand...
Click to collapse
PoisonedLegacy said:
Switch to A11 ROM or wait. There's no recovery capable of decrypting anything based on Android 12 right now
Click to expand...
Click to collapse
If you wanna stay decrypted like me, you can flash DFE....
Then no more issues with internal memory.....
If you use orange fox, then you can set a recovery password and have a bit more security.
PoisonedLegacy said:
Switch to A11 ROM or wait. There's no recovery capable of decrypting anything based on Android 12 right now
Click to expand...
Click to collapse
OK thanx, so I see what's the problem.
If it's like this I'm thinking about just waiting it out. Cause I kinda started liking this rom
Do you recon that once an updated recovery comes out it will be able to read it just like that?
Or would I have to wipe/format data again?
Because in first case I could just consider living with the fact that my recovery doesn't work so well for now, knowing that earlier or later an updated version of recovery comes out and by flashing it my problem should be fixed.
But if I'd had to wipe/reformat or repartition /data again in order to make it work (whenever it can). it'd be a game changer.
Because the longer I use the phone the more apps and personal stuff will be on there
Laptapper said:
If you wanna stay decrypted like me, you can flash DFE....
Then no more issues with internal memory.....
If you use orange fox, then you can set a recovery password and have a bit more security.
Click to expand...
Click to collapse
What's DFE?.....sorry just a newbie
If I flash that, would my data partitionstay decrypted forever or would there be a way to encrypt it later (once recoveries evolve) without loosing the data on it?
Kilombodog said:
What's DFE?.....sorry just a newbie
If I flash that, would my data partitionstay decrypted forever or would there be a way to encrypt it later (once recoveries evolve) without loosing the data on it?
Click to expand...
Click to collapse
Post in thread 'How to flash a Android 12 ROM without decryption problem?' https://forum.xda-developers.com/t/...hout-decryption-problem.4349493/post-86336175
Kilombodog said:
Hi, I have a question and hoping that maybe someone here might be able to help me.
I'm not a developer or anything like that and my knowledge is rather basic.
I truly tried my best reading, tutorials, forums, etc. and trying over and over again for many hours.
So the problem is this:
After new installation of arrowsOS and orange fox recovery on redmi note 10pro, recovery can't read/mount data or internal sd card.
Formating data or changing filesystem fixes this temporarily. Data now shows a size rather than 0mb and becomes mountable.
But unless the filesystem is f2fs (like ext4 or anything else) ROM won't boot. Goes straight back into recovery.
If I choose f2fs (readable by recovery after format), arrowsOS will boot again, but also will encrypt the partition somehow and the problem persists.
Next time I boot into recovery data, storage and sdcard are empty, data can't be mounted and is shown with 0mb size.
In orange fox telegram group I was informed that Android 12 is not supported nor will be any time soonish and I should get off their chat... but I tried twrp before and that didn't work either.
I'd really love to get this fixed before installing lots of apps onto the phone again. Because afterwards having to wipe and set up everything again will be a pain.
So does anyone here have any idea for me how to solve this?
Best regards
Eric
Click to expand...
Click to collapse
use them after every rom install
Murad Ali said:
use them after every rom install
Click to expand...
Click to collapse
thanx
Murad Ali said:
use them after every rom install
Click to expand...
Click to collapse
for now looks good. works like a charm with this 2 extra files.
thanx a lot

Categories

Resources