[HELP] Data recovery - General Questions and Answers

Hi everyone,
So I know I probably ****ed up but I had to ask.
Recently the touchscreen on my OnePlus 5 stopped working out of nowhere.
Now I bought a new phone but I still wanted to try to recover some data.
I had to disable my lockscreen because I was unable to unlock the phone, which I managed to do by deleting some files with TWRP.
Now here is where I think I messed up. Without knowing what it was for I deleted locksettings.db which I later found out stores the keys needed to decrypt the data partition.
Is there anything I can do to recover some data?
I know I should have made a backup, or instead of delete the file rename the file but I am past that point now.
Things I have acces to:
adb
Touch screen by mirroring to pc with vysor
TWRP
Edit: phone is rooted with magisk
If there is anything I can do any help would be greatly appreciated.
If not, so be it.
Regards,
Bart

If phone's bootloader is already unlocked, crypto-footer is present in EFS/metadata and userdata is encrypted with "default_password", so it is possible to decrypt from custom recovery TWRP without locksettings.db at all (except Samsung)

xXx yYy said:
If phone's bootloader is already unlocked, crypto-footer is present in EFS/metadata and userdata is encrypted with "default_password", so it is possible to decrypt from custom recovery TWRP without locksettings.db at all (except Samsung)
Click to expand...
Click to collapse
Hey, thanks for the reply!
My bootloader is unlocked, however default_password does not work as far as I've tried. I was able to unlock my data before I deleted locksettings.db with my screen pin. I know what the pin is still but it also does not work anymore. Also I do not know how to check if the crypto-footer is present in EFS/metadata.
I forgot to mention also that the phone is rooted with magisk, if that makes any difference. What should I do/try?
Regards,
Bart

Related

Lost root and TWRP recovery doesn't recognize my encryption PIN

While attempting to flash the latest unofficial MIUI build yesterday, I got stuck at the animation logo, so I gave up. Instead, I flashed the Android L developer build, which did boot up completely for me. However, when I attempted to boot back into recovery, I got prompted to enter my encryption passcode, which I did. However, TWRP keeps telling me that decryption failed and to try again. The issue isn't an incorrect passcode, so I'm at a loss to try to figure out what's going on. Also, because TWRP won't decrypt my storage, I can't flash anything (despite the fact that I'm able to access SD card files from a file manager app when the phone is on). Any way I can get TWRP to decrypt my storage without having to wipe everything completely? Has anyone else experienced this?
tattedupboy said:
While attempting to flash the latest unofficial MIUI build yesterday, I got stuck at the animation logo, so I gave up. Instead, I flashed the Android L developer build, which did boot up completely for me. However, when I attempted to boot back into recovery, I got prompted to enter my encryption passcode, which I did. However, TWRP keeps telling me that decryption failed and to try again. The issue isn't an incorrect passcode, so I'm at a loss to try to figure out what's going on. Also, because TWRP won't decrypt my storage, I can't flash anything (despite the fact that I'm able to access SD card files from a file manager app when the phone is on). Any way I can get TWRP to decrypt my storage without having to wipe everything completely? Has anyone else experienced this?
Click to expand...
Click to collapse
Reflash recovery
Lethargy said:
Reflash recovery
Click to expand...
Click to collapse
I can't without root access.
tattedupboy said:
I can't without root access.
Click to expand...
Click to collapse
Recovery is flashed in fastboot/bootloader...
Unless you used Towelroot, then you'll have to unlock the bootloader, which will wipe.
Really what I need is to figure out why TWRP isn't recognizing my encryption PIN. My storage is encrypted, but whenever I input my encryption PIN, I get an error message. How do I get it TWROP to recognize my encryption PIN?
Doesn't flashing L mess with your sdcard anyway?
Sent from my Nexus 5 using Tapatalk
tattedupboy said:
Really what I need is to figure out why TWRP isn't recognizing my encryption PIN. My storage is encrypted, but whenever I input my encryption PIN, I get an error message. How do I get it TWROP to recognize my encryption PIN?
Click to expand...
Click to collapse
Encryption always causes issues. I suggested to reflash TWRP with fastboot to rule out TWRP itself being the issue.
This is why I never encrypt. I just don't trust it.
Sent from my Nexus 5 using Tapatalk
rootSU said:
This is why I never encrypt. I just don't trust it.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
slightly running off topic but .. i have the same issues ... so i pushed twrp 2711 via adb .. now I did a factory reset .. still the request for the encryption password, and i cant seem to get rid of it.
Really frustrating, to the point where i want to smash my phone on the wall.
How can i get rid of it? im just confused,
Onecton said:
slightly running off topic but .. i have the same issues ... so i pushed twrp 2711 via adb .. now I did a factory reset .. still the request for the encryption password, and i cant seem to get rid of it.
Really frustrating, to the point where i want to smash my phone on the wall.
How can i get rid of it? im just confused,
Click to expand...
Click to collapse
Flash factory images lol
Lethargy said:
Flash factory images lol
Click to expand...
Click to collapse
hahaha, i nearly went ballistic on that thing yesterday ... i have no idea how i managed to get rid of it .. first i updated to 2.7.1.1. Twrp... Then i reflashed the Rom ...
Then i did a factory reset .. then i whiped data .. and reflashed rom .. anyways encryption is gone .. but i cant copy stuff from my pc to the handset well ... not that i care .. but kind of inconvenient
Was this resolved?
I am facing the same issue with the AOSP builds of L. I wanted to take new Nandroid backups and realized that TWRP cannot decrypt the partition.
tattedupboy said:
While attempting to flash the latest unofficial MIUI build yesterday, I got stuck at the animation logo, so I gave up. Instead, I flashed the Android L developer build, which did boot up completely for me. However, when I attempted to boot back into recovery, I got prompted to enter my encryption passcode, which I did. However, TWRP keeps telling me that decryption failed and to try again. The issue isn't an incorrect passcode, so I'm at a loss to try to figure out what's going on. Also, because TWRP won't decrypt my storage, I can't flash anything (despite the fact that I'm able to access SD card files from a file manager app when the phone is on). Any way I can get TWRP to decrypt my storage without having to wipe everything completely? Has anyone else experienced this?
Click to expand...
Click to collapse
nirudha said:
I am facing the same issue with the AOSP builds of L. I wanted to take new Nandroid backups and realized that TWRP cannot decrypt the partition.
Click to expand...
Click to collapse
No it cannot.

Encrypted MI 4C, Weekly Rom, TWRP 3.0.3.0 encryption password not accepted

Hi folks,
My MI4C is on the weekly MIUI 7.4.x, I am now looking to upgrade, hence as usual I rebooted in recovery.
The phone has obviously root and unlocked bootloader.
TWRP is asking for my encryption password, which I know, but no matter what, TWRP does not flipping accept the password!
What can I do?
Do you know if you have the Nougat bootloader or the old one?
I have not found a TWRP that can successfully decrypt it Nougat bootloader ROMs. If you are not on the Nougat Bootloader then I recommend trying Team Superluminal's TWRP, since that is the only one that worked with encryption enabled for me I think.
Have you got a working rom/os on the phone ?, If you do have try to add a password on the rom, hope the twrp has a new working crypto after that and ask you for a new password. If it didnt work try to reinstall the twrp by erasing it first.
Hi, I am on the Nougat bootloader, I tried to change the encryption password, tried to remove the encryption, but nothing worked, TWRP is still asking me the password to access the data partition.
What can I do?
I cannot wipe the phone, as I use it for my work,how can I upgrade TWRP when encryption is on?
Hi folks, anybody in my situation? I would like to avoid wiping the entire phone just because of the TWRP password bug.
I changed to a PIN password, but nothing works.

Restoring Backup (Android P) with TWRP - possible solution found (updated)

Edit: Since I am the impatient guy of course I still meddled with the backup after posting this thread. By chance I found a solution that finally worked for me. Latest Oxygen Os 9.0.2 stable without root.
Note that I will list every step even it may be that it hasn't contributed anything to the solution:
1. From fastboot I booted into latest blu_sparc TWRP.
2. I plugged the phone into USB and copied all files from my backup into the usual TWRP folder.
3. I flashed only DATA, nothing else.
4. From TWRP I rebooted directly into bootloader/fastboot.
5. Then I ram the flash-all-partitions.bat from Mauronofrio provided by this thread https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 .
6. Crucial step: At the beginning, it asks "Wipe all data?". SELECT NO. It will start "restoring" all other partitions.
7. Reboot the phone and it should work as you left it before creating the backup.
Note that this method worked the restoration of backup data from the same OS and same version. Feel free to try it out on other system images. It's ugly and inconvenient, but it seems to work.
Hey guys,
is there a fail safe way to restore data from a clean twrp backup without soft bricks or PIN error?
I tried to restore a very recent TWRP backup but had serious trouble. At first, it rebooted just fine but upon trying to unlock the device with 4-digit pin it suddenly told me that my usual pin isn't working.
Then I tried deleting the lockscreen.db and other related files. Rebooted and got into the OS, but it got stuck at "starting up device".
The I did a complete wipe without internal storage and tried it again. Then it wouldn't even boot and I had to use the flash-all.bat to flash all partitions "manually" to get it working again.
Now I am afraid of using Oneplus 6 if it's impossible to make a seamless backup/recovery. Is there a guide on how to do this?
Thank you in advance!
This is a known issue though. If you want to make a usable backup in TWRP: Remove the PIN (screen lock), do the backup, and then activate the screen lock again.
efex said:
This is a known issue though. If you want to make a usable backup in TWRP: Remove the PIN (screen lock), do the backup, and then activate the screen lock again.
Click to expand...
Click to collapse
I remember having read a thread with this hint too and disabled my security pin in a temporary working OS. Then I did the flashing stuff and I just noticed that my now working restored phone doesn't have a pin anymore. So basically removing this pin on a data backup will make things go smooth? I will keep this in mind, thank you

How to set PIN after unlocking bootloader?

I've just got my Realme 5i returned after repair (replacement main board) and I've unlocked the bootloader, flashed TWRP and vbmeta9, flashed Magisk and enabled MagiskHide but I can't set a PIN. Whenever I try, after confirming the PIN it returns to the settings screen and shows "Lock Screen Password - Off".
I know I managed to set a PIN before it needed repairing, as when my brother received it from me from his Birthday, he phoned me to ask for the PIN to access it but I can't remember what I did then to get it working.
I tried to install "Realme 5i Magisk Fix for ColorOS by IT&AUTOS.zip" in Magisk as I did that before but now it isn't working and the log says "copying to temp, error unzipping file". Would installing this be what got the screen lock working before?
I've got a TWRP backup of all the partitions from before it was repaired but I can't seem to access them to restore, as when I select the Storage option from Restore it shows the SD card is only 6GB, when it fact it's 128GB and the only file it shows is "257eee4a" which is actually the folder above the dated folders containing the backups.. From the Install option, I can browse the SD card normally and I flashed Magisk from a folder on the card, so I don't know why it's not accessible from the Restore option. If I could, then maybe restoring the System and Data partitions would get me back to the state where the PIN was set but I'd be a bit nervous about restoring the System partition after then main board has been replaced, in case any files are tied to the old hardware.
I thought what I might have done to get it working last time is to relock the bootloader (after flashing the stock recovery to prevent bootloop) and then unlock it again but if that is what I did before, it isn't working now.
First I updated to A.20 via the stock recovery, as the service center had flashed A.15. It kept booting to stock recovery after that until I did Format Data and then it booted OK and after locking the bootloader I was able to set a PIN.
Then I unlocked the bootloader and it automatically wiped data but I still had to Format Data to stop it booting into stock recovery and now I can't set the PIN again.
I see there's a 5i Decryption (COs).zip. What does this do? I tried flashing that via TWRP before I tried the above steps but it didn't get the PIN working.
I just flashed TWRP and then installed 5i Decryption (COs).zip and wiped Cache/Dalvik Cache and now it gets stuck on the yellow realme logo when I try and boot. Can't even power it off when it's like that but thankfully volume up and power gets me to bootloader and TWRP and doing a factory reset wipe got it booting again.
I still can't turn on the PIN/Lock Screen password though.
I tried restoring my TWRP System and Data backup from last August when the Lock Screen password was working but it still doesn't work, so it must be something in one of the other partitions that affects this and I'm reluctant to try restoring those in case it bricks the phone because the main board has been changed.
Can anyone help me please? Does anyone have the lock screen password working with unlocked bootloader, or is everyone who has installed custom recovery/rooted their 5i just using it without any password to protect it?

TWRP / Orange Fox - Decrypt Data Password Not Working

Long story short. I got in a bootloop cause I think the rom I tried to install is failing. Now I'm into the recovery and can't do nothing cause the TWRP won't let decrypt my data. I already type the password and it shows "password incorrect"
So, I can't boot my phone and am not able to decrypt the data for me to back it up.
Is there any way to bypass encryption or delete the file which saves the PIN CODE? I already tried using DFE but it stuck in the logo.
PocoF3 said:
I already tried using DFE but it stuck in the logo.
Click to expand...
Click to collapse
why DFE? that is only for one purpose - disable forced encryption. it helps to stay unencrypted after formatting.
you messed up everything so you probably already destroyed encryption. your data is lost.
encryption depends on files from /system and /vendor, you could try to restore exact ROM version from your backup like it was before. even then your encryption keys might still flagged as invalid meanwhile because of rollback protection.
learn your lesson to use TWRP for what it is intended - **BACKUP YOUR DATA**
aIecxs said:
why DFE? that is only for one purpose - disable forced encryption. it helps to stay unencrypted after formatting.
you messed up everything so you probably already destroyed encryption. your data is lost.
encryption depends on files from /system and /vendor, you could try to restore exact ROM version from your backup like it was before. even then your encryption keys might still flagged as invalid meanwhile because of rollback protection.
learn your lesson to use TWRP for what it is intended - **BACKUP YOUR DATA**
Click to expand...
Click to collapse
DFE is needed to flash after installing ANY ROM to KEEP the system "unencrypted". That's what I keep doing since many rom updates ago, and always work without any issue.
The point of the thread is strictly aimed to TWRP and its decrypting process, not "what I should have done with my data" or "asking for lessons/advices". Let's keep that false condescension away from the thread.
The problem with decrypting in TWRP is well known, had it like twice, the first solution is what you said, trying to find an exact ROM to flash it over it but the thing is there's no "exact ROM version" atm, so I need to find another solution via TWRP if possible.
your question was about "decrypt the data for me to back it up"

Categories

Resources