Possible to get files back from an encrypted i9100 partition? - Galaxy S II Q&A, Help & Troubleshooting

I made a bit of a rookie oversight when flashing a ROM today, the device was encrypted and I forgot to grab the files off the device first.
Unfortunately, the MD5sum for the backup I made gave me a mismatch, and once I got around that issue I found that, for some reason, my old password couldn't be used to unlock the device any more.
Here's what I know so far:
The device was fine when I rooted it, as I loaded it up to backup some other data some backups.
I installed CWM, made a backup, and flashed Paranoid Android 4.4 RC2, where I then noticed that the internal memory couldn't be located properly by apps, as it was still encrypted. So this is the stage that something went wrong, perhaps when making the backup?
After spending many hours attempting to go back to my backup (sorting out the MD5 problem), I can't get back past the encryption login to grab my files. I haven't been able to find a way to mount the partition (SDCard0) either.
So, after all the reading I've done, it appears I'm stuck with reinstalling the stock ROM for the device through Odin, and losing the encrypted data in the process.
Before I do that, does anyone know of a way to access these files on a I9100 (as I know what the password should be), perhaps through ADB, or attempting to install part of the stock firmware and decrypting the drive again? It's 3am and I'm all out of ideas.

Related

[Q] NV Flash not remove apps?

I have become pretty comfortable with NVFlash, but notice that it didn't remove any of the apps or user settings (e.g. my wifi network name and password). I found that pretty strange. To get back to a true stock, I had to NVFlash to stock, so I could install CWM, and then use CWM to partition, which finally removed everything, and then NVFlash again to go back to stock, and then the OTA update to 3588.
Am I missing something? Shouldn't NVFlash remove everything, including all the amazon apps that weren't behaving nicely after some permissions got messed up somewhere along the line?
p.s. I did notice when I ran NVFlash that it started at part4.img, and not sure what happened to any prior .img files.
NVFLASH does not touch SDCARD memory. It only flashes other "boot" partitions. To format SDCARD memory, use CWM and format SDCARD through that program. I have also noticed that nvflash starts at part4 and I have no idea why. Whatever...it works

[Q] Ice Cream Sandwich Full Device Encryption and Flashing

If one enables full device encryption in Ice Cream Sandwich, am I correct in assuming that that the internal SD of that device is now not going to be available in the CWM recovery mode? And even if it was, the root fs would not be available? If so, this pretty much would make CWM flashing your device near impossible?
Does CWM even work if you use FDE? Or is it planned/
The question I guess is, when do you input your encryption password? Is it some pre-boot step?
I really want to enable device encryption but I can't find enugh details on how it works.
I did read this post on it., but it doesn't really answer my questions. And it is unclear if it encrypts the internal SD, or just the root FS?
http://source.android.com/tech/encryption/android_crypto_implementation.html
No one knows anything about this?
I got a Gnex today from Verizon in the US and I encrypted my phone after I unlocked the bootloader but before rooting. As a result I don't think I will be able to root because it doesn't seem that the modified boot.img that the instructions tell me to use can mount the encrypted system (it sat at the Google logo w/ the unlocked icon for 10 minutes before I pulled the battery and let it boot the stock boot.img) which came up fine.
It seems the only way to decrypt the phone is by doing a factory reset.
That's all I know. That being said, while a custom recovery may work for wiping partitions (such as cache), it would probably be mostly useless until the custom recovery is updated to support the encrypted file systems. I'm a *NIX user and an engineer, but don't have a lot of experience with Android's internals, so take all that with the appropriate sized grain of salt.
Regards,
Chris
Bump.
Anyone experimented with full device encryption / ROM flashing / SD Card? I'm curious about this as well, but not curious enough to experiment.
I dident try it myself, so i dont exactly know, how this works. But i think device encryption shouldent completly block clockworkmod recovery.
I think it could be a problem to make a backup while your device is encrypted. But i think it shouldent be a problem to recover a old system over an encrypted one. Encryption keeps people without the key away from reading data. This dosent mean you cant wright something over it and replace the locked data with some new one. But then you defenitly loose the old data. I dont think you can flash a new ROM or a recovery without a full wipe. You probably gona loose all the data you had on the old system.
But i general i think this is anyway a good think to do when you flash a new ROM.
I think you could give it a try, without briking your phone. But i dident try it, so i cant take any responsibility.
Would any of you happen to know how to get to the diagnostic mode?
ryfly65 said:
Would any of you happen to know how to get to the diagnostic mode?
Click to expand...
Click to collapse
I sonst exactly know hat diagnostic Mode you mean. Depends hat Diagnose you want to run. Do you want to read the logfiles in your phone, wher you can see what ist doing? You could use the app alogcat. An other way would be to run logcat over Eclipse.
Sent from my HTC Desire HD using XDA App
Hilmy said:
I sonst exactly know hat diagnostic Mode you mean. Depends hat Diagnose you want to run. Do you want to read the logfiles in your phone, wher you can see what ist doing? You could use the app alogcat. An other way would be to run logcat over Eclipse.
Click to expand...
Click to collapse
I need to edit modem information and enable a diag port for QPST, essentially allowing me to flash it to another carrier.
Is there any new information on this? Any help would be very appreciated!
Sent from my Galaxy Nexus using XDA App
I encrypted mine after flashing the stock ICS 4.0.3 image and rooting. CWM still loads, but when I try to use USB mass storage, windows tells me it needs to be formatted before the SD card can be used.
You can use titanium backup to make backups of your stuff, and restore them to a non-encrypted phone. I have found no other way to unencrypt the phone than factory reset either. When you encrypt, then go to settings > security > encryption, it just has a greyed out area saying "Phone is encrypted", which is stupid and needs to be fixed.
nevarDeath said:
I encrypted mine after flashing the stock ICS 4.0.3 image and rooting. CWM still loads, but when I try to use USB mass storage, windows tells me it needs to be formatted before the SD card can be used.
You can use titanium backup to make backups of your stuff, and restore them to a non-encrypted phone. I have found no other way to unencrypt the phone than factory reset either. When you encrypt, then go to settings > security > encryption, it just has a greyed out area saying "Phone is encrypted", which is stupid and needs to be fixed.
Click to expand...
Click to collapse
So if I factory reset the device from CMW I will not loose my pictures or TB in the internal SD?
What about flashing a new ROM?
Thanks!
I have been playing with ICS + FDE for several days doing different things. First off this is:
Nexus S 4G, running Pete's crespo4g OTA ROM
I flashed with CWM which is still on there and runs fine.
However: /data and /sdcard and /system (?) are encrypted and CANNOT be mounted.
To restore you have to 1) make a full backup over USB to a PC of the whole SDcard (or at least the important folders).
2) wipe and reformat everything. This isn't just a factory reset, this kills the sdcard as well.
3) mount (hopefully) the newly reformatted /sdcard and blow your backup from the PC onto the /sdcard
4) use CWM to restore a previous ROM.
That's pretty much it, give or take. Not for the faint of heart. However, if you are concerned enough to want encryption, you don't want to just say reboot recovery and voila all your files are belong to us, right?
---------- Post added at 03:58 PM ---------- Previous post was at 03:34 PM ----------
Also, the backup to PC part is just your sdcard. It doesn't back up the whole system. There might be a way to do that via adb, I don't know.
So i am running rooted runnig miui.us rom. I just tried to encrypt phone.. It ran for 2 and a half hours and I got impatient. thinking maybe i shouldnt have done it... Then after a little bit of panic i said **** it if i lose data i lose data... so i powered off and back on hoping i didnt and the rom booted back up with all my data intact..... •••••• Wish I had more to report but im not doing that again until someone can confirm that it works fine...... I have tried booting into cwm yet.. If i have an issue when i need to boot illl report back but if you dont hear from me here then assume I was able too.
Pete's to CM9 - still encrypted
IT does indeed take a fairly long time to encrypt. If I understand correctly it will build the encrypted partition on a loopback (or something like) before erasing the original (by overwriting?).
I've got more to report. I followed my plan (couple posts back) for unencrypting and reflashing my phone. (Nexus S 4g).
The first bits of this worked fine. I was able to flash CM9 onto my phone (works like a champ btw). While the phone was in recovery I mounted the SD and copied my backup back onto it.
However...
When CM9 booted I STILL got the "unlock your device" screen, still the same password, and it decrypted and booted. That was surprising, but not as much as when I looked for the SD card, it said it was incorrectly formatted! The only thing to do was reformat and copy with the phone on and unlocked.
So lessons learned: 1) a factory reset from _inside_the_ROM_ doesn't remove the encrypted partition at all and
2) As far as I can tell, the SD card _is_ encrypted along with /data
I'd be very interested to hear other's experiences, especially someone who can remove their SD storage.
Undoing FDE
First off - Lacking a device with removable storage to test with all I can tell you is that the sdcard is not accessible by any normal means after FDE is enabled without booting into the encrypted system.
"Removing" FDE required three steps beyond normal:
-Factory reset from within the ROM
-factory reset/wipe at recovery and/or format /data
-once into a running ROM, reformat the sdcard
Once all that is done (in addition to normal setup for ROM) you should be able to operate normally again.
problem with encryption on sgs2 with android 4.0.3
I really want to enable my device encryption too, but I can't !!!
the phone start encrypting after he ask me for a new secure password, rebooting and asking again for my password and surprise!!!.... the password is not match ?!?!
I repetead these steps for 3 times but the same result...the password does not match!!! ?
Please, if someone found a trick to repair this inconvenient, tell us in this post steps to be followed.
Regards!
SGS2, Android Icecream 4.0.3
leech2082 said:
So i am running rooted runnig miui.us rom. I just tried to encrypt phone.. It ran for 2 and a half hours and I got impatient. thinking maybe i shouldnt have done it... Then after a little bit of panic i said **** it if i lose data i lose data... so i powered off and back on hoping i didnt and the rom booted back up with all my data intact..... •••••• Wish I had more to report but im not doing that again until someone can confirm that it works fine...... I have tried booting into cwm yet.. If i have an issue when i need to boot illl report back but if you dont hear from me here then assume I was able too.
Click to expand...
Click to collapse
I did exactly what you did, and so far everything seems to be intact Thanks!

[Q]Boot problem after recovery - ICS & CWM

I've encountered weird problem: The phone doesn't boot (got stuck on bootanimation) after nandroid recovery from CWM. I've tried recoverying it over fresh install of same ROM or over formated partitions, but neither of it works. I'm using CWM v5.0.2.0 and trying to recover hephappys PRE4.
Is this caused by some incompatibility of CWM and ICS?
No, cwm 5.0.2.0 is working with ICS, using it currently (haven't tried using backup/restore, but it shouldn't cause any problems imo).
So, what exactly are you doing? Trying to restore an earlier cm9 backup? Try wiping all, including system and boot, before restoring.
Sent from my LG-P500 using XDA
Yes, I've made backup before messing with my ROM and it just fails to recover. I've already tried to wipe everything.
Is there any tool for viewing backup files on Windows? I guess that the file is somehow broken.
Is there any way how to get calls and sms from this raw data?
Here is boot logcat: https://gist.github.com/2603614
Jirrick said:
I've encountered weird problem: The phone doesn't boot (got stuck on bootanimation) after nandroid recovery from CWM. I've tried recoverying it over fresh install of same ROM or over formated partitions, but neither of it works. I'm using CWM v5.0.2.0 and trying to recover hephappys PRE4.
Is this caused by some incompatibility of CWM and ICS?
Click to expand...
Click to collapse
have the same issue with cwm...
recommand u to use amonra...gwtting best with it
When I was on cm9 and restored my cm7 backup=same thing(yes, I wiped everything)
Well, that backup image is somehow corrupted as it cant be correctly deployed. At least I've managed to extract SMS, the rest is not so important for me.
CWM is pretty much useless when it creates backups which can't be used for recovery...
I don't think that there is a specific problem with CWM and ICS- I have been making backups and recovering quite often ICS builds (including hephappy's pre4) in the last weeks, no problems so far (knock on wood ).
Do you have other/older backups that you can try to recover and see if you get stuck at bootloop?
What about reinstalling the build from scratch- just to see that everything boots? You can later try either restoring your original backup (the one causing you problems), or using TiB or similar applications that can extract applications+data from nand backups.
Could the backup file got corrupted somehow? I don't remember CWM having some inherent checking of md5 before restoring backups (I could be mistaken, as I have never had a bad nandbackup with the P500 phone so never noticed anything weird). For example, I used to have an HTC MT4G with 4ext touch recovery which would always check md5sum and let the user know if backup was corrupted, and I did got a corrupted backup file once.
Back to topic- If anything else fails and you can't recover, maybe try to copy the backup to a different sdcard? Perhaps it's a shot in the dark but worth trying, just in case the problem is in sdcard?
Older backups are only CM7 and they are working flawlessly. I don't know what happened, but it wasn't byte-level error as MD5 check passed on that image. It's more likely the recovery "forgot"/wasn't able to recover some files in /data partition.
Later I've tried to install some fresh ICS, did some changes (configuration + apps), backuped, wiped partitions, then restored and everything worked , so it's definitely not a general CWM problem. It's probably a bad luck, when you really need the backup, it just corrupt itself to annoy you...
As I wrote, I've managed to retrive my SMS and that's enough for me. I don't trust that image so I will install fresh apps via Appbrain and do the new setting by myself (I wanted to make some chcnges to phone configuration, this is just the right moment) .
I have never had much luck with the CWM recovery system. It's really buggy and sometimes only restores select partitions. Or if it couldn't mount the drive at the time of backing up, sometimes it just refuses to tell you or tells you but you have to start the backup over..
Like said above, I would try Amonra. It's a far better recovery and it has almost no bugs to speak of
Cheers mate.

[Q] New CWM can't restore backup of older CWM

Hey guys,
I have a little problem I can't find a solution to by searching.
I have a GS3 i9300 rooted with CF-Root-SGS3-v6.4.
When rooting, a version of CWM was installed (5.something).
Later, when installing af custom rom, I followed instructions and updated to a newer CWM (6.0.1.2):
http://forum.xda-developers.com/showthread.php?t=1719744
Later, I was thinking about restoring my original system backup, which I had made with the older CWM version right after rooting.
The new CWM can't restore my older backup. It can't recognize the file, not even when I copy it manually to the new CWM folder.
How can I solve this problem?
Do I need to install an older CWM again?
If yes, then one more question: As I said, my original CWM was installed when rooting. Can someone give me a download just for the CWM tar file included in the mentioned CF-Root?
Thanks a lot in advanced,
Agoston
Replace with older CWM root .
From Original Development section .
jje
still not recognizing + weird directory tree
After trying out three custom ROMs and after updating CWM, my system directory is rather weird. Besides the usual system folders, there is a "0" folder, that contains another set of system folders, and another "0" folder, containing the same. Also, my free internal storage as good as disappeared, from 8 GB to 1 GB. So, it looks like I have several systems on each other?!
How can I reduce this weird directory tree to just one? Do I need to wipe the SD-card?!
And by the way, I rooted the device again through Odin, and the old CWM is now installed again. Still though, it can't recognize the old backup.
As you probably imagine, I am hesitating to format SD-card, especially if CWM can't restore my factory ROM.
Can anyone help?
Thanks!
szaboagoston said:
Still though, it can't recognize the old backup.
Click to expand...
Click to collapse
I copied the backup directory manually to the "most superficial" CWM folder, and now trying system restore. I'ts not easy with four (!) different CWM directories.
Unfortunately I got an "error restoring data" message, and the phone is stuck in Samsung logo when booting.
Also, when trying to do a factory reset, I get the message: "error mounting /sd-card/.android_secure!"
Could this be because there is not enough space or something?!
If someone could help me with how to proceed, I would appreciate it!
Thanks.
Okay, the issue is solved. I admit, I might have been a little inpatient. Despite the "error restoring data" message, the stock factory system booted after a few tries - I might not have waited long enough. It seems that these "Folder 0"s were all just security copies of the old systems, and of course consumed a lot of hard disc space, so I just deleted them. Haven't met any negative consequences so far. I just got scared because of the error message and the too long boot time. Also this phenomenon with "Folder 0"s is not something I met before on other devices.

[Q] CWM error while making backup image of /data

This error is still not answered on the forums so im starting a new thread.
i get the error as the title.
sd card space is not the problem.
i tried formatting the sd card.
i have less than 50 apps installed.
wiped dalvik cache, and all other sorts people say on other posts.
(my phone is LG P936 so "fix permission" screws up the phone. all text disappears)
have latest cwm recovery.
and still get the error.
any answers please?
and please dont reply if you are going to write an opinion.
only answers please.
sorry for my rude behaviour but I'm sick and tired of reading posts full of opinions and "maybe"s.
Not sure if you ever got this fixed but I 'm suffering from the same error. I tried pretty much everything you tried (even fix permissions) and I have about 20GB free on my SD card so space shouldn't be an issue. I have not yet tried formatting the SD card since it has always worked and CWM is able to write to it because the following files are created:
- boot.img
- data.ext3.tar
- recovery.img
- system.ext3.tar
The files that are missing are (based on older backups):
- .android_secure.vfat.tar
- cache.ext3.tar (probably because I wiped it first?)
- nandroid.md5
I have attached the log from CWM in the hopes that someone can tell me what is wrong. The error occurs at the end of the progress bar of 'backing up /data'.
hey just use TWRP Recovery. It's way better than CWM. normal backup on cwm took me like an hour but twrp was never longer than 10minutes.
Today I have formatted the SD card and tried again, but as expected it did not change anything.
ceoleaders said:
hey just use TWRP Recovery. It's way better than CWM. normal backup on cwm took me like an hour but twrp was never longer than 10minutes.
Click to expand...
Click to collapse
I guess I will give this a try. Can I just install it over CWM or can they run side by side?
different reciveries cannot be run side by side as they are installed on a different partition. so it will always be installed over your current one.
ceoleaders said:
different reciveries cannot be run side by side as they are installed on a different partition. so it will always be installed over your current one.
Click to expand...
Click to collapse
Well, I tried TWRP and it also fails at backing up my data partition. The log is a bit more clear though and it seems to get stuck on "/data/data/com.android.vending/cache/images" which is the last line before it gives an error. I checked the "images" folder and it seems empty but I cannot delete it. Tried ES File Explorer and Terminal Emulator but no way to get rid of it. The folder appears to be related to Google Play, so I cleared all data and cache from Google Play, even uninstalled the updates but there 's simply no way to get rid of it. I 'm not sure if this is the reason why the backup fails, but I CAN copy the folder and even rename it.
Pff looks like I 'm going to have to do a clean install after all .
Hello, I too have this problem and unfortunately TWRP is not available for my phone.
I used to be able to do CWM backups fine on my old phone, and they work great on my tablet. But they consistently fail at "/data" on my Galaxy Ace II x. Might it be because I'm using Link2SD? I don't see why that would cause a problem, but maybe it's having trouble with the symlinks?
Hmm. Seems the issue was that, despite having only 1.28 GB total available storage space on stock, the backups wanted more than 4 GB. Cleared some room on my microSD card and suddenly backups worked fine! Of course, shortly after I installed CyanogenMod, which has much smaller backups...
Sent from my GT-S7560M using Tapatalk 4
I forgot to report back here but the only way I found to fix the problem was by doing a clean install. After that, I was able to backup my data partition again. I then restored my apps ' data with TB and was unable to backup the data partition again. I 'm guessing one of my apps had corrupt data, but never got to find out which one it was.
maybe your partition not match with recovery, like something wrong vold.fstab
Just in case anyone still wants to know how to fix this, I managed to solve it by running these commands:
1. run adb shell in recovery.
2. unmount data partition (umount /dev/block/mmcblk0p26). -> this one failed so I skipped it
3. run e2fsck /dev/block/mmcblk0p26
See http://forum.xda-developers.com/showpost.php?p=48659092&postcount=868 for original post.
I got a few HTREE errors and a bunch of duplicate names which I renamed when prompted. Booted the phone and rebooted into TWRP and now I am able to backup my data partition again. :good:
EDIT: Problem reappeared so I tried the above commands again but it said that the filesystem was clean. Ran 'e2fsck -f /dev/block/mmcblk0p26' instead and had to fix a bunch of HTREE errors from Facebook again and duplicate names from Xprivacy but now I 'm able to backup my data partition again.
Dude just selest the backup format as both zip and tar filea

Categories

Resources