Encryption... Again... - OnePlus 3T Questions & Answers

Here is a story: I'm not a fan of jumping through hoops to access my own damn phone. I wiped my internal memory TWICE to remove the encryption. And I removed it successfully. I was not encrypted.
Today I made a backup, flashed another ROM, didn't like it, restored my backup. And then I went to TWRP to flash another ROM. It wasn't a stock ROM. It didn't have forced encryption on the kernel. And it asked for my encryption password. Again, the phone was unencrypted. So I booted into my system, went to settings, security, and sure enough, I was encrypted.
I did not tell it to encrypt itself. And I do not know the password. And I'm pissed to be locked out of my own internal storage for no ****ing reason.
So the question: How the **** am I supposed to tell the phone to unencrypt the internal storage that it had no business encrypting in the first place? Because I'm sure as hell not wiping my internal storage AGAIN unless there is absolutely no other alternative.
And how the **** do I tell the phone that I DO NOT WANT encryption EVER on this phone?
default_password doesn't work. I cannot flash anything. If I boot up, set a password and tell the phone to ask for it when booting, it doesn't stick. I reboot and no password is asked, the set password still doesn't work in TWRP. So what do I do now?

There's no way to decrypt the phone completely without wiping. However, you can save most of your data.
If you take a nandroid of your phone while it's encrypted, decrypt it, then restore that nanroid afterwards, the data is restored decrypted. Unfortunately, TWRP will not be able to save anything in your /data/media folder, so you'll have to manually backup that folder yourself. You can pull it using adb. Just remember that when you put the /data/media folder back on your phone after wiping, you have to give it the correct r/w permissions (I don't know them off my mind, but I'm sure you can find them somewhere online).
I'm not sure which ROM/kernels forces encryption, but I usually root immediately after flashing a ROM, which generally prevents encryption
Edit: I may have misread your post. If you can't access TWRP, you're rather out of luck. Maybe try pulling all the data you want to keep using adb while your phone is on? You could also try sideloading the ROM that you flashed before it got encrypted. It may restore the libraries required for TWRP to decrypt.
---------- Post added at 05:47 PM ---------- Previous post was at 05:41 PM ----------
Also, what version of TWRP are you using?

Anova's Origin said:
There's no way to decrypt the phone completely without wiping. However, you can save most of your data.
If you take a nandroid of your phone while it's encrypted, decrypt it, then restore that nanroid afterwards, the data is restored decrypted. Unfortunately, TWRP will not be able to save anything in your /data/media folder, so you'll have to manually backup that folder yourself. You can pull it using adb. Just remember that when you put the /data/media folder back on your phone after wiping, you have to give it the correct r/w permissions (I don't know them off my mind, but I'm sure you can find them somewhere online).
I'm not sure which ROM/kernels forces encryption, but I usually root immediately after flashing a ROM, which generally prevents encryption
Edit: I may have misread your post. If you can't access TWRP, you're rather out of luck. Maybe try pulling all the data you want to keep using adb while your phone is on? You could also try sideloading the ROM that you flashed before it got encrypted. It may restore the libraries required for TWRP to decrypt.
---------- Post added at 05:47 PM ---------- Previous post was at 05:41 PM ----------
Also, what version of TWRP are you using?
Click to expand...
Click to collapse
I ended up using adb pull then wiped. I lost nothing, but I'm no longer encrypted. For a while at least...
I'm using 3.0.4-1 from the thread, not the one from the TWRP website.

Related

TWRP error "E:Unable to mount '/data'"

I have a new LG Optimus L90 (D415) with stock 4.4 ROM, and TWRP 2.8.0.0 (and previously, Philz 6.58.7) for recovery. Obviously, the phone is rooted and now has an unlocked bootloader....
My problem is that neither recovery will back up (or even mount) "/data". Note that I put that in quotes because, without having "/storage/sdcard" or something in front of it, I presume that it's an internal folder and not something to do with the external SDcard.
My first guess would be a problem with encryption, because both the phone and the external SD are using it -- and I never get asked for the password. Either way, the actual error in TWRP says "E: Unable to mount 'data'", while Philz says it can't access /data/philz-touch for the .ini file.
I've made several Google expeditions to find the answer, and have come up empty-handed with all of them. I've seen all kinds of fixes, from claims that I have to run chkdsk against the SDcard, to backing up the entire /data partition with a tar file and reformatting it with command line nightmares.
I'll do what I have to in order to fix this, but I'd rather not embark on an experimental goose chase. Any ideas?
I have this same problem. But only for wiping and flashing.
I have no idea for fix if backup also not working !! (Noob)
1.TWRP click backup. Select all except SDcard.
Finish backup.
2.go to Wipe menu.>advanced wipe>select all except System and Sdcard.
Wipe.
(It will skip the error files)
3.Install menu. Select ROM to flash.
Was what I did.
fear2433 said:
I have this same problem. But only for wiping and flashing.
Click to expand...
Click to collapse
I'm not flashing anything, yet. First I need to make a backup of the entire phone (not including the SDcard). That way, if something goes wrong, I can just restore my old, working configuration -- all at once -- and start over.
I can back up and restore apps individually, using Titanium Backup. But what I need here is a Nandroid-type backup... and that generally has to be done from the recovery partition. There is one other way to backup everything, using a laptop/PC and ADB. But I've never tried it, and it wouldn't protect against a ROM meltdown.
Solved, somewhat...
So I did some further experimentation concerning this error. I did a test run to install CyanogenMod, and I found that I couldn't even factory reset certain partitions because of these "Unable to mount /data/" type errors.
What was ultimately the problem? The encryption. Once I decrypted everything, TWRP was able to see, mount, and backup, those partitions.
But I was under the impression that TWRP handles encryption, e.g. asking for the password, or some such. I mean, how can you do a Nandroid-type backup on a phone, if no recovery can mount those kinds of partitions?
So, for the record: "E:Unable to mount" was definitely due to the encryption being turned on for my internal storage. Thus the solution (so far) is to decrypt storage. A wretched solution, but at least it works for the time being.
BTW, In furtherance of this research, I formatted my internal SDcard to NTFS, just to make sure it wasn't misaligned or whatever when it was just FAT32. And I discovered that NTFS takes forever to format (32GB on the order of a couple hours)., FWIW.
The plot thickens. It may not be sufficient just to undo encryption, there may be something wrong with the way that partition was created, or otherwise is constructed.
Even though I now am able to mount /data, I'm not able to format it.... in TWRP it says something like "unknown filesystem 'auto'".
But there is a thread here that describes using Philz recovery to unmount and then format this mess, and I'm about to try it, I just have to flash Philz in place of TWRP. Now let's hope this version works without issues, because I'd have little recourse if things go bad there.

Some folders/partitions are not encrypted

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.

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.

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

Categories

Resources