Hello,
My P20 lite ended up with bootloop after one of the upgrades.
I care about the /data only
I've managed to flash TWRP, I can browse the filesystem with `adb`, phone is unlocked (FRP is locked I guess).
Unfortunately the /data which I want to recover is encrypted.
I was using the pattern lock screen
Is it possible to decrypt the data (I cannot find proper manuals, I don't want to enable/disable encryption)?
I have the lock pattern, just want to restore.
kiemlicz said:
Hello,
My P20 lite ended up with bootloop after one of the upgrades.
I care about the /data only
I've managed to flash TWRP, I can browse the filesystem with `adb`, phone is unlocked (FRP is locked I guess).
Unfortunately the /data which I want to recover is encrypted.
I was using the pattern lock screen
Is it possible to decrypt the data (I cannot find proper manuals, I don't want to enable/disable encryption)?
I have the lock pattern, just want to restore.
Click to expand...
Click to collapse
Hi, if you can access eRecovery, try the following:
https://forum.xda-developers.com/t/...locked-out-of-the-phone.4141543/post-83189467
Thanks, but as I said
```
My P20 lite ended up with bootloop after one of the upgrades.
```
eRecovery performs reboot.
I have my pattern it should be possible to decrypt the partition
kiemlicz said:
I have my pattern it should be possible to decrypt the partition
Click to expand...
Click to collapse
it has nothing to do with /data decryption. Btw, decrypting the /data section won't help you save data from the internal storage.
ok
So different approach: is it possible to flash this EMUI to some previous version?
What I want to achieve is to rollback the device to some previous working state.
If so will it cause data loss (I care only about user data: documents, pics, downloads)?
Thanks
kiemlicz said:
What I want to achieve is to rollback the device to some previous working state
Click to expand...
Click to collapse
This is only possible via the dload method or via HiSuite (for a lower version of android). Unfortunately, both methods will erase the internal storage.
So I presume that the data is effectively lost?
kiemlicz said:
So I presume that the data is effectively lost?
Click to expand...
Click to collapse
I can't say for sure, I don't hold this phone in my hand, but it is probable. Even if you get the files from your phone using some program, they will have a .enc extension and you won't open them.
That's a shame, thank you
No problem.
Related
Can TWRP backup encrypted phones?
Because since it has been encrypted, it is failing. I'd like to make a backup before I try installing a new ROM.
automatism said:
Can TWRP backup encrypted phones?
Because since it has been encrypted, it is failing. I'd like to make a backup before I try installing a new ROM.
Click to expand...
Click to collapse
Same here. TWRP cannot access /data
Would it be possible with CWM recovery?
If encrypted, you need to make sure you enter your encryption password right when it asks in TW recovery. This will allow TeamWin to decrypt the drive and be able to back it up.
thehayk said:
If encrypted, you need to make sure you enter your encryption password right when it asks in TW recovery. This will allow TeamWin to decrypt the drive and be able to back it up.
Click to expand...
Click to collapse
It's never asked me for a password
automatism said:
It's never asked me for a password
Click to expand...
Click to collapse
It depends on which TWRP version you have.
Sent from my GT-I9001 Gadget of Mass Destruction with CM11 using XDA Developers App.
What version of TWRP would I need? I have v2.8.1.0 and I've never been asked for the password.
hnkotnis said:
It depends on which TWRP version you have.
Sent from my GT-I9001 Gadget of Mass Destruction with CM11 using XDA Developers App.
Click to expand...
Click to collapse
Mersine said:
What version of TWRP would I need? I have v2.8.1.0 and I've never been asked for the password.
Click to expand...
Click to collapse
At backup screen where you select the partitions (system, data etc). There is options called as encrypt backup.
This is available for TWRP v2.8.1.0 on my Samsung Galaxy S Plus GT-I9001.
Press Thanks if helped.
Since Googling "twrp backup encrypted phone" puts this thread as the number one result, I'd like to offer up that this doesn't work. The encryption password looks to me to be for encrypting the backup file itself, not for decrypting /data. As near as I can tell, the only way to back up /data is to use a tool such as Titanium Backup, although I haven't tried that yet myself, I am about to.
hnkotnis said:
At backup screen where you select the partitions (system, data etc). There is options called as encrypt backup.
This is available for TWRP v2.8.1.0 on my Samsung Galaxy S Plus GT-I9001.
Press Thanks if helped.
Click to expand...
Click to collapse
This is NOT what OP requested. He (we) want to backup an encrypted device, that is our /data is encrypted and twrp is unable to mount it (confirmed by the dev themselves.) to be clear: there is no twrp or cwm version able to mount encrypted /data so far.
Is this available?
Stopgap ways of backing up encrypted phones?
So I've been researching this problem for some time now, and I've got a couple suggestions.
CAVEAT: I haven't tried any of this yet.
First, there is Online Nandroid Backup. Since it backs up while the phone is running, the encrypted partitions should be available to it. But I suspect it restores while the system is running, which kind of defeats the purpose -- with a Nandroid backup, you can take a non-working phone and flash it back to the same condition when it did work. That's the whole point of wanting it, because testing ROMs is a lot easier.
Second, I'm experimenting with a way to do this with a dd command in an ADB shell. Basically you would execute a command like this:
dd if=/dev/block/mmcblk0p32 of=/storage/sdcard1/userdata.img
Then that could, theoretically, be flashed back using fastboot flash userdata userdata.img. This is tricky, though, because you have to manually find your partitions and their equivalent names, etc. Also, fastboot doesn't work on all phones....
The one thing that is certain: CWM/Philz/TWRP all fail at event mounting the /data partition, much less backing it up. And (I think) an ADB backup is not going to work because it only applies to apps and their data, not the system itself, or its settings.
It makes you wonder how people with encryption make whole-phone backups in case something goes wrong (or if they do it at all). Sure, there's Titanium Backup, but that's one app at a time. Anyway, if I find out anything more useful while testing these ideas, I'll post it here.
Thanks for pointing me in the right direction. I just did that in the TWRP console.
You can find out your device partitions with
Code:
cat /etc/fstab
.
Then use dd as previously specified, but use an external sd card as the target:
Code:
dd if=/dev/block/mmcblk0p36 of=/external_sd/userata.img
.
This will take a while. Depending on the size of your /data partion quite a while. And there is no progress indicator.
Edit: Actually you can monitor the progress over adb. Just open an adb shell and do a
Code:
ls -al /external_sd/userdata.img
. The current size of the file gives an indication for the progress. In the end the file will have the same size as the data partition.
You can also enter the commands through adb to begin with... makes typing much easier.
I'll get around to testing these idea at some point, but for now I've had to (re)build this phone 4 times since August... so once it started looking solid again, I decided on Online Nandroid as my solution for now. It should give a workable restoration no matter what (but it will need a full wipe to clear encryption beforehand).
I'm curious as to what will happen when you fastboot flash that image file back on to the phone, though. I wonder if it's still encrypted and works, or isn't encrypted and works, or doesn't work at all.
There's also the disparity between the state of the filesystems on /system and /data if they're backed up at times too far apart. That one won't be apparent until something breaks, I think.
via XDA Mobile (D415)
I haven't gotten around to restore the image yet. I don't know whether this will work through fastboot, but it should definitely work with dd again from the recovery, this time from the image to the /data partition.
And the file system is certainly still encrypted, it wasn't ever decrypted.
I have to go back to the stock ROM on my phone for a moment, I'll report back if I could restore the dd image file.
BubuIIC said:
I haven't gotten around to restore the image yet. I don't know whether this will work through fastboot, but it should definitely work with dd again from the recovery, this time from the image to the /data partition.
And the file system is certainly still encrypted, it wasn't ever decrypted.
I have to go back to the stock ROM on my phone for a moment, I'll report back if I could restore the dd image file.
Click to expand...
Click to collapse
Theoretically, a dd image is an exact copy of the partition, and can just be dropped right in there. So yes, it should still be encrypted... unless flashing it back somehow munges the footer on /userdata, which the phone needs for encryption (I've seen this happen, and it actually caused a bootloop; thankfully, I was able to fix it). But I am hopeful it works when you try it.
Also, I spoke to a guy today who said his phone has no problem backing up encrypted partitions. In fact, his recovery asks for a password before running. I had him specifically confirm that his whole phone is encrypted, not just the backup file. He says his version is 2.7.1.0 running on a Nexus 4 (mako).
So now I've gotta find that version, and I think it has to be customized for the L90 too. I'll post request in that thread and see if I can get ahold of it.
via XDA Mobile (D415)
Bump
Last post in here made it seem like yes for some phones, and no for others. I'd love to encrypt my phone, but not if it means I can't make a nand backup in TWRP. Anyone want to chime in and see if this answer has become more definitive in the last 9 months?
jfsat said:
Last post in here made it seem like yes for some phones, and no for others. I'd love to encrypt my phone, but not if it means I can't make a nand backup in TWRP. Anyone want to chime in and see if this answer has become more definitive in the last 9 months?
Click to expand...
Click to collapse
I have Cyanogenmod cm-12.1-20150901 and TWRP 2.8.5.0
Once I encrypted the device, TWRP prompts for a password when it starts. However, when I type the passphrase, it says:
Password Failed, Please Try Again
forrestgump2000 said:
I have Cyanogenmod cm-12.1-20150901 and TWRP 2.8.5.0
Once I encrypted the device, TWRP prompts for a password when it starts. However, when I type the passphrase, it says:
Password Failed, Please Try Again
Click to expand...
Click to collapse
Did you ever find a solution for/to this?
Nandroid backups using TWRP Works with Nexus 7
I had an issue with this, too. I'm using CM 12.1.
First, make sure that you've flashed the latest TWRP for your device.
The issue was that the whole disk encryption is tied to the lock screen password/PIN/pattern.
So, I changed my lock screen to a password ensuring that it must also be used to start up Android. This changed both the lock screen and the whole disk encryption password to the same password. Now, when I reboot into recovery, TWRP requests a password and I supply the password that I changed my lock screen to. This allows /data to be mounted. A backup can be done on the internal storage or you can mount a USB storage device backing up the Nandroid images there instead.
Hope this helps.
****Confirmed this works with Android 6.0 from Google.
cableghost said:
Did you ever find a solution for/to this?
Click to expand...
Click to collapse
Nope. But I also don't use an Android phone anymore, so I haven't been looking.
I have a OnePlus 3 and I was thinking of encrypting it for additional security & privacy reasons. But since I flash various ROM level mods / use xposed modules on my phone, I was wondering about the negative consequences I have to face after encrypting an android phone.
I have a few doubts which need to be cleared.
1) Since my android phone would be encrypted, would I absolutely not be able to flash any new files/make nandroid backup from the recovery?
2) If 1) is true, which means, let's say I install an xposed module which causes a bootloop. Now I would have no way to disable all the active xposed modules from recovery since the files are encrypted, which means I would have to restore everything from scratch?
3) Is there absolutely no known way of decrypting android/access files unencrypted from recovery if we know the master PIN/password?
Can somebody who has dealt/dealing with an encrypted android phone please answer these questions? Thanks.
Deleted
Hi, thanks for your reply.
Just Passing By said:
1. When you access recovery on an encrypted phone, you have to decrypt your phone. After that, your recovery can do anything it normally could do. This would of course include flashing ROMs, zip files, and making nandroid backups.
.
Click to expand...
Click to collapse
2 things to say about that.
1)Decrypting just to flash files is a huge problem. TWRP/CWM should have a feature when it asks for the master PIN/password on the recovery, then after I enter it, it should decrypt the data on the fly and then mount the system and data partitions unencrypted so that I can flash files without going though all the decryption process.
2)Correct me if I'm wrong, but all android decryption processes I read online require wiping all data/doing a factory reset. That's again a huge problem. Why? In case I flash a mod/install a xposed module which causes a bootloop, I would have no way to decrypt my data, even if I have my master password. Which would mean I would lose all my files which I haven't backed up.
Problems like these could be avoided if TWRP provided permanent decryption/on the fly decryption using the master PIN. Comparing this with veracrypt on windows for e.g. , let's say my windows is encrypted with veracrypt and a hardware failure occurs at some point in the future & windows refuses to boot, but I'm able to load a live ISO. In this case, veracrypt offers a rescue ISO which I could use to decrypt the data without losing all my files after I enter the master PIN. So in this case, I can have security of encryption & also the convenience of decrypting it without losing all my files with the master password in case my main OS refuses to boot.
If I can't decrypt android from the recovery using the master PIN, that would mean in any case my android refuses to boot, I have lost all my files.
3. I'm assume you meant to say "... If we don't know the master PIN/Password?" And the answer to that is yes. If you can't decrypt your phone, you'll lose everything in it, so making periodic backups is a must. Otherwise, there'd be no point if you could just decrypt things right?
Click to expand...
Click to collapse
No, I did not say that wrong, sorry if I wasn't clear enough on my first post. I just wanted to know if there was a way to permanently decrypt android from recovery using the master PIN so that i would be able to recover my files to a USB in case my android refuses to boot.
Deleted
Hello,
Since 2 months my phone (redmi note 4 with twrp and miui 9 based on android 7.0) is encrypted without any problem.
Every boot or into twrp, phone ask password and accept it and decrypt data. Into andoid, I just use fingerprint to unlock mobile.
Yesterday, I reboot my phone into twrp and he prompt for password (normal procedure for decrypt data). I enter it and twrp say : "E: Decrypt took too long, killing process Failed to decrypt data"
I try to reboot and enter into android, and same problem. The phone does not accept password in order to decrypt data.
Ok probably I don't remember my password and make a mistake. I decide to search for my password into my keepass, and it's the same !
I got a twrp full backup, and into "/data/system/device_policies.xml" I can see length, uppercase,lowercase, letters, numeric,symbols,nonletter of my stored password. And do you know what, ALL IS CORRECT !
Why did my phone does not accept password ?
What can I do ?
Thanks
sorry for my bad english, it's not my native language.
neo_mat said:
Hello,
Since 2 months my phone (redmi note 4 with twrp and miui 9 based on android 7.0) is encrypted without any problem.
Every boot or into twrp, phone ask password and accept it and decrypt data. Into andoid, I just use fingerprint to unlock mobile.
Yesterday, I reboot my phone into twrp and he prompt for password (normal procedure for decrypt data). I enter it and twrp say : "E: Decrypt took too long, killing process Failed to decrypt data"
I try to reboot and enter into android, and same problem. The phone does not accept password in order to decrypt data.
Ok probably I don't remember my password and make a mistake. I decide to search for my password into my keepass, and it's the same !
I got a twrp full backup, and into "/data/system/device_policies.xml" I can see length, uppercase,lowercase, letters, numeric,symbols,nonletter of my stored password. And do you know what, ALL IS CORRECT !
Why did my phone does not accept password ?
What can I do ?
Thanks
sorry for my bad english, it's not my native language.
Click to expand...
Click to collapse
You have to used "Format Data" option in TWRP.
You'll lose everything on your Internal storage of course (music, photos, videos etc.)
Hello, It's what I do.
I wipe /data and consequenly internal sdcard. After that, I restore my old twrp's backup of /data partition. And surprise, I use my password and it's OK !
This demonstrate that my /data suddenly broken ! (encryption, data corruption...)
Just before wipe all data I make a dd image of userdata partition in case
I don't know if crypt process were broken into android.
Is there a way to decrypt with linux PC binary of img with my password ?
neo_mat said:
Is there a way to decrypt with linux PC binary of img with my password ?
Click to expand...
Click to collapse
You mean the encrypted DD image of your data partition?
Yes, I know the password. I want to try it into linux a recover my data
neo_mat said:
Yes, I know the password. I want to try it into linux a recover my data
Click to expand...
Click to collapse
I don't think you'll have the option to provide the password you set. It's probably not like an encrypted archive.
You can just try to mount the image and see if you can access it.
You could have just extracted it with tar if the backup wasn't an image!
Yesterday I installed a ROM (Unofficial Resurrection Remix) thanks to EndLess and it seemed great, really very good work with the system. But when I went to restore the original rom of the phone "TWRP" asks me for an unlock pattern, after putting it and restoring the original system image, I am ready to boot the system. The system starts well, but asks me for the same pattern to start the boot. Then the loading process continues and I get to the part of setting the unlock pattern to start Android. Here's my problem, the pattern I used is the same one that I used the previous 2 times and it does not work.
Therefore I have 4 questions:
1- Is it possible to delete the encryption of the phone and leave it as it was before installing Android 8.1?
2- Is it possible to access my previous system?
3- I noticed that this room does not come with root activated, is it possible to root the ROOM?
4- If I put a new unlock pattern, will the current one be overwritten in the encryption or will the phone simply not find a way to boot and I will have a beautiful paperweight?
Thanks in advance.
Please forgive my English, it is not my native language
brito9112 said:
Yesterday I installed a ROM (Unofficial Resurrection Remix) thanks to EndLess and it seemed great, really very good work with the system. But when I went to restore the original rom of the phone "TWRP" asks me for an unlock pattern, after putting it and restoring the original system image, I am ready to boot the system. The system starts well, but asks me for the same pattern to start the boot. Then the loading process continues and I get to the part of setting the unlock pattern to start Android. Here's my problem, the pattern I used is the same one that I used the previous 2 times and it does not work.
Therefore I have 4 questions:
1- Is it possible to delete the encryption of the phone and leave it as it was before installing Android 8.1?
2- Is it possible to access my previous system?
3- I noticed that this room does not come with root activated, is it possible to root the ROOM?
4- If I put a new unlock pattern, will the current one be overwritten in the encryption or will the phone simply not find a way to boot and I will have a beautiful paperweight?
Thanks in advance.
Please forgive my English, it is not my native language
Click to expand...
Click to collapse
As it seems that you encrypted your device somehow by chance.
1. Before installing any rom you have to format your data First. That'll Remove the pattern.
2. Accessing the old system depends upon your access. If you are now encrypted then no actually.
3. Yea just flash magisk zip and the rom will be rooted.
4. Expect an out of the world paper weight.
MyNameIsRage said:
As it seems that you encrypted your device somehow by chance.
1. Before installing any rom you have to format your data First. That'll Remove the pattern.
2. Accessing the old system depends upon your access. If you are now encrypted then no actually.
3. Yea just flash magisk zip and the rom will be rooted.
4. Expect an out of the world paper weight.
Click to expand...
Click to collapse
Thanks for the quick response, would you be so kind as to explain to me what do you mean by "format your data first"?
You mean to delete all the partitions of the phone and install everything from 0 ??
How am I supposed to do that? I have a save from the previous system, I told "TWRP" to save all the partitions in my phone. If I restore that backup, will my device be decrypted?
brito9112 said:
Thanks for the quick response, would you be so kind as to explain to me what do you mean by "format your data first"?
Click to expand...
Click to collapse
Boot to TWRP, and select "Format data". You will lose all your data, plus the contents of your internal SD - but the encryption will be gone. You should back up your internal SD (either to an external SD drive, or your PC, etc) before trying any of this. I hope you have backups of your data.
DarthJabba9 said:
Boot to TWRP, and select "Format data". You will lose all your data, plus the contents of your internal SD - but the encryption will be gone. You should back up your internal SD (either to an external SD drive, or your PC, etc) before trying any of this. I hope you have backups of your data.
Click to expand...
Click to collapse
Thanks for answering, i will try your method in a few minutes, by the way, with format you mean wipe data partition, right?
brito9112 said:
Thanks for answering, i will try your method in a few minutes, by the way, with format you mean wipe data partition, right?
Click to expand...
Click to collapse
When you select "wipe" on main menu. There will we two options at bottom. One will say "Format data" and another will say "Partition" select format data. It will open a new screen saying that format data will delete all the data and Remove encryption. Type yes and continue. However backup your data before doing this. Better copy the files using mtp from recovery or system.
MyNameIsRage said:
When you select "wipe" on main menu. There will we two options at bottom. One will say "Format data" and another will say "Partition" select format data. It will open a new screen saying that format data will delete all the data and Remove encryption. Type yes and continue. However backup your data before doing this. Better copy the files using mtp from recovery or system.
Click to expand...
Click to collapse
I saw that option later, thanks to all who help, my system was recover. The only strange thing was the lock pattern. I delete from /data/system/ this 2 files, "gatekeeper.password.key" and "gatekeeper.pattern.key". Use TWRP as file manager and my phone good as new.
Hello All,
I deleted a zip file from my android device(not rooted)., And I need to recover the zip file which contains photos approx 150Mb.
Is there a possible way to recover it., Even paid tools/apps I am ready to try.
Just need to know a valid method to recover it. Please help
Thanks.
siadathali said:
Hello All,
I deleted a zip file from my android device(not rooted)., And I need to recover the zip file which contains photos approx 150Mb.
Is there a possible way to recover it., Even paid tools/apps I am ready to try.
Just need to know a valid method to recover it. Please help
Thanks.
Click to expand...
Click to collapse
Without root? Probably not.
Sent from my SM-S767VL using Tapatalk
Android OS doesn't have a Recycle Bin as that's the case with for example Windows OS, unless you install such an extension.
jwoegerbauer said:
Android OS doesn't have a Recycle Bin as that's the case with for example Windows OS, unless you install such an extension.
Click to expand...
Click to collapse
That is true, but, deleted data doesn't truly get wiped/removed unless the data is overwritten. When a file is deleted, it doesn't get deleted, it just gets marked by the system to be ignored until the next time the system needs to write data, at such times, it will write the new data over the data that has been marked.
Data recovery software does have the ability to find this data that has been marked for deletion and recover that data. But it requires root.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
Data recovery software does have the ability to find this data that has been marked for deletion and recover that data. But it requires root.
Click to expand...
Click to collapse
Most of the recently released higher-end Android devices running Android Lollipop or higher come with data encryption enabled out-of-the-box - in order to be more resistant to government snooping.
IMO even if it may be true that a data recovery software can find and recover deleted data, these data are encrypted and therefore without any use of all, unless you have appropriate forensic tools.
If I'm mistaken then please tell me the data recovery software that can bring back deleted data in decrypted way.
Data recovery software works for you, but all require the phone to be rooted, so you will need to do that first to your device. With root access, it can scan the files that would normally be inaccessible.
It can be recovered back with some data recovery software?If the.zip is too large,i tink it will be difficult to recover back.
Droidriven said:
That is true, but, deleted data doesn't truly get wiped/removed unless the data is overwritten. When a file is deleted, it doesn't get deleted, it just gets marked by the system to be ignored until the next time the system needs to write data, at such times, it will write the new data tover the data that has been marked.
Data recovery software does have the ability to find this data that has been marked for deletion and recover that data. But it requires root.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
I Do not mind rooting now, but !! my understanding is that if I root the device now., It will wipe off all my data in my phone, coz rooting the phone is another way of flashing?? It will be more hard to recover file if my phone is wiped out.
Saenyu67 said:
It can be recovered back with some data recovery software?If the.zip is too large,i tink it will be difficult to recover back.
Click to expand...
Click to collapse
My file is hardly 150MB zip file. Not of huge size.
siadathali said:
I Do not mind rooting now, but !! my understanding is that if I root the device now., It will wipe off all my data in my phone, coz rooting the phone is another way of flashing?? It will be more hard to recover file if my phone is wiped out.
Click to expand...
Click to collapse
Yes, but, only if the rooting method requires unlocking your bootloader because unlocking the bootloader formats the data partition. But, if you can find a way of rooting without having to unlock the bootloader or flashing a custom recovery, it won't format your data partition.
Honestly though, your chances of rooting without unlocking bootloader or flashing custom recovery , aren't very good. To do so would require finding an app or PC program that is a "universal rooting tool" and it would require the tool having an exploit that works on your device.
Or, you could do a Google search for:
"Recover data android no root"
Then try the various tools and methods that finds, if you can find videos in that search, it may help you further.
Sent from my SM-S767VL using Tapatalk