Some folders/partitions are not encrypted - Xiaomi Mi 9 Questions & Answers

Hi, I have a problem. Some of my folders are not encrypted in twrp file manager. Inside folder /sdcard and /data/data are displaying folder name correctly, which that is the sign of unencrypted folder. But anything inside the folder /data/app are encrypted. I dont know why the my phone only encrypt some part of data. I have previous xiaomi phone that fully encrypted everything in /data and /sdcard partition.
I was unlocking my device, i installed twrp and formatted /data there, then installed only miui global beta rom, no magisk, encryption disabler, or etc. After finished everything and put my data to phone storage, and also set lockscreen pattern, i rebooted the phone once so it will encrypt my data at first reboot. After that I installed twrp again via fastboot because it has been replaced by stock recovery. Went to twrp file manager, and these problem happened.
Do anyone experience this? I need full encryption for my phone privacy and safety.
Note: any current twrp version no one has support encryption, so normally it wont able to read anything inside /data partition.

Related

[Q] Removing encryption

I am thinking of encrypting my HD+ (Settings>Security>Encrypt Tablet). As far as I can see this means simply that the /data partition will be encrypted and that CWM is afterwards not able to access this anymore (ie for backups or restores). I can do a complete backup by other means, but how would I be able to restore that?
Will the recovery still boot and will I then be able to format/wipe /data? Probably not because /data is not mounted!?
Also, what happens if I want to update the system, say to a newer version of CM?
So no one's ever tried to encrypt their HD/HD+?
I am still investigating this "problem" and it seems that quite a few people have run into trouble after encrypting their tablet (TWRP Recovery seems to support an encrypted /data partition but CWM doesn't... correct me if I'm wrong).
So here's a question for the Linux gurus: if I have booted an encrypted tablet and have opened a terminal window with full root access, will I be able to unmount and reformat the /data partition? After that I should be able to reboot into recovery and restore a backup.

Updated to OOS 9.0.4 from Oreo on Encrypted Rooted 3T :| , hoping to save SD Data

Hello guys,
I did a foolish update today without reading the forums first and updated to OOS 9.0.4 (Pie) from my previous stable OOS Oreo without removing encryption and backing up the Internal Storage data. I did take a backup of Boot, Data(excl storage) and System Image using TWRP 3.3.1 and copied it to my computer.
After the update, the OS refuses to decrypt the partition (Error: Decryption unsuccessful. The password you entered is correct, but unfortunately your data is corrupt. To resume, you need to factory reset the phone.) and TWRP fails to decrypt (Error: Decrypt took too long. Killing process, failed to decrypt data).
What else I tried:
1.) ADB restore the backup from the PC (as I can't transfer anything to the phones encrypted storage), but the TWRP backup is a bunch of files in a folder and ADB expects a single file in its command.
2.) Flash an older version of TWRP (3.2.3) and try decrypting (Error: Failed to decrypt data)
Is there any way I can restore the backed up files to get the phone back before the update and save my internal storage? (without a time stone or a quantum jump). I am thinking along the lines that I can somehow restore the backed up files into the respective partitions and make the decryption work, is it possible?
Worst case is there some way for me to backup the internal storage data with the encryption then go about downgrading the phone and restoring it and decrypting it back?
Any pointers would be helpful and appreciated. Thanks.
Gi__an said:
The password you entered is correct, but unfortunately your data is corrupt.
[...]
Is there any way I can restore the backed up files to get the phone back before the update and save my internal storage?
Click to expand...
Click to collapse
The only thing you might try is to flash OOS 9.0.4 firmware with 5.0.8 bootloader + keymaster.
If it still says the same, then sorry, but your data got corrupted and it's gone.

After wiping data, TWRP no longer asks to descypt storage. Cant access files.

I switched over from xiaomi.eu to MI Room. Seemed to work fine until a magisk module uninstall screwed up my ROM and caused a bootloop.
Figured I would do a factory reset, however now Orangefox recovery no longer asks for a decryption password. I know the password, so how do I decrypt my storage?
Thanks
It doesn't ask for a password because the encryption files were deleted so twrp would not know what the encryption data is. But miui encrypts your data when you set your pin/pattern and the userdata remains encrypted when the encryption keys get deleted. The only way is to format userdata.
I also want to know a workaround for this. If you format userdata and flash recovery version of your rom, will your data get encrypted again when you set a password? Because then, any backup made with your data encrypted is unusable. Is data encrypted only on official roms but not for lineageOS etc?
editheraven said:
It doesn't ask for a password because the encryption files were deleted so twrp would not know what the encryption data is. But miui encrypts your data when you set your pin/pattern and the userdata remains encrypted when the encryption keys get deleted. The only way is to format userdata.
I also want to know a workaround for this. If you format userdata and flash recovery version of your rom, will your data get encrypted again when you set a password? Because then, any backup made with your data encrypted is unusable. Is data encrypted only on official roms but not for lineageOS etc?
Click to expand...
Click to collapse
My encryption files actually weren't deleted. I did a factory reset and reinstalled the previous ROM I was encrypted on a few times and somehow it decided to allow me to decrypt my storage again... So I managed to back things up, then format and wipe all storage and flash the new ROM. Working fine since.
Thanks for the help though.

Soft bricked phone after trying to restore backup after LineageOS flash

I flashed the lineageOS 17 roms that is available and it worked but then i realized that gapps was not complete so i went into TWRP to restore my old Backup of ColorOS 6.1 (A.08 version), also it had magisk installed, but it then would show the first boot logo then restart and go into the recovery. I then tried formating everything except internal storage and also factory wipe and now my backup is gone and everything else on my phone. I can still boot into recovery and such but now it wont even ask me for the decryption password. File manager in TWRP shows 3 folders in the internal storage (in sdcard 0, obb and TWRP).
Any help? i dont wont to break things even more.
Edit: I just noticed that in the 0 folder in sdcard there is 65 gb of folders and files. Im assuming that are my old files but they are encrypted. Any way to undo that?
I guess you have to install a rom and set everything up from scratch. You lost all your files when you formated data, including backups, etc.
If you want to update or change your recovery, now it's the time - since there's no rom or files to lost.
johnnyjoe said:
I guess you have to install a rom and set everything up from scratch. You lost all your files when you formated data, including backups, etc.
If you want to update or change your recovery, now it's the time - since there's no rom or files to lost.
Click to expand...
Click to collapse
I didnt format the internal storage only data and i edited the post saying that i think i found all the data but still encrypted. Im guessing TWRP wont automatically decrypt it.
For anyone with a similar problem. I reinstalled LineageOS and it decrypted all the files.

TWRP install and rebooting to system succesful, but twrp can't read internal storage

Device: SM-A305N KOO (Korea)
I successfully installed twrp via odin on my A30, flashed magisk.zip, and rebooted to system successfully. After that, I flashed an optimization file and rebooted to system (also successful). But I found that the internal storage was encrypted, so I went straight back to TWRP and did Advanced Wipe - change file system to ext2, then ext4. Now My 'Files' app in the system can read the files correctly like in the pic.
But in the TWRP, the file names in the internal storage is still in random characters. How can I fix this?
If twrp only shows "random characters" that's because the internal storage hasn't been decrypted. Twrp should ask for your user password to decrpyt it. Alternatively you could also do
Code:
adb shell
twrp decrypt MyLovelyPassword
EDIT: You need to be booted into twrp to use this. You could also use the terminal which comes within twrp; just leave the `adb shell' part then.

Categories

Resources