Sudden Power off during decrypt, Card Replaced - How to continue decrypt on new Card? - Galaxy Note 4 Q&A, Help & Troubleshooting

Hi,
So I actually think this issue may be two fold. But first, I must say that to date, the GN4 had been the best handset I've had to date hands down.
Ever since I've updated to Marshmallow however, on occasion the handset will suddenly shutdown due to reported battery drain. This typically occurs around 30% mark. I've seen on some forums that by doing a factory reset could resolve this.
In preparation to do this reset, I decided to decrypt my handset including card so that I could back up my data. However, during the decryption process the handset shutdown. In restarting the GN4 (N910c) the card is now no longer able to mount (getting card not inserted).
If I connect the card to my pc/mac I can see my data filenames but unable to open some of them presumably due to encryption from the GN4. I have managed to create a backup of the card, with what looks like partially encrypted and decrypted files (looks like it was cut off 50% of the way) so i guess what i want to do now is copy those files to a new card and then decrypt the remainder somehow.
I haven't performed a factory reset yet, and I really don't want to lose that data so I've bought a new card. Does anyone have an idea on what I can do to decrypt the data on the new card? I do have the initial GN4 password used to encrypt.
Thanks!

Cheeky bump.. Anyone have a clue?

Related

SD card not mounting

I was playing Let's Golf 2 yesterday, and I ended it improperly by pushing the Home button. Since I rebooted from that incident, the SD card is not mounting anymore, and the system is telling me that it is damaged or its filesystem is not accepted. Since it's the very same stock card which comes with the phone and has worked properly since it came (and of course works in other phones and computers), I am quite puzzled. Any other card I mount receives the same treatment, so it's something on the phone. I have my bootloaders unlocked and I have flashed the 2.3.3 rooted version per Flashtool and Fastboot.
I guess it's time for reflashing, or do you folks have any idea I could use?
I had a similar problem. Turned out my SD card was cracked. This brings me to my problem. After loosing my SD card Crash won’t run anymore. Does anyone know how I can restore it? I really liked that game.
Edit: Never mind. I opened it again and now it gives me an option to download the game again. I need to do it over wifi when I get home.

[Q] Encrypted i9500 -> self factory reset -> can't access my data

Hello every one,
I have galaxy s4 gt-i9500 with android 4.3 and I encrypted my phone some time ago.
What happened yesterday is my BIG problem. Because of an app my phone was frozen and then it made factory reset by itself. After I turned it on and got into the phone I was not able to see any previous data (which is normal after factory reset) everything was deleted, but... not exactly.
I checked the storage and now I have the same free space which I had before the reset. So basically my encrypted data is on my phone, but there is no way to access it or at least I don't have the skills.
The device showed me that my phone is still encrypted, but it did not make sense, because everything disappeared and I did not have my data.
What I did last night is to decrypt the phone, but it was strange, because I had to make new password in order to continue the process, instead of typing my old one. So I made the new password, which is my old one, and I decrypted the device. Still I could not access any previous data.
I don't have a SD card, the internal memory is encrypted only. So I am missing around 5.2gb of more free storage, which is the exact amount of my data - photos, docs, etc. These 5.2 gbs are shown as "Miscellaneous files", but of course when I open the ""m. files" the biggest thing in the list is the cloudagent with only 4.86mb
So as far as I can understand my files are still on the phone (hopefully) and the android shows so, but I cannot recover them.
Is there any way to recover these files or at least to delete (if there is no hope of recovering) the 5.2gb on my phone.
Thank you for your time!

Need to decrypt micro SDXC that was formatted as internal storage on my Moto X Pure

So recently my device stopped recognizing the SanDisk 64gb micro-SDXC I had formatted as internal storage. As far as I am aware when you format a SD this way the phone turns it into an encrypted volume and stores the key on internal storage, presumably somewhere the user cannot normally access it. The card itself is not dead, plugging it into my computer verifies this, but I cannot access it. I think some write operation failed and made it invisible to the phone. the phone did the same thing to a 128gb PNY card, but I reformatted it on PC, then reformatted it again on the phone and now the PNY is working fine. my question is, is there any way to extract the encryption key for my 64gb card(Root based tool or otherwise) from the card profile on my phone and decrypt it on a PC so I can reclaim my data? The phone still has a profile for the card, so presumably the key is still in internal storage somewhere. I had about 40gb of media on that card that I had not backed up (photos, videos, music and such). My ohone is not currently rooted but i wouldnt mind rooting it if someone has a root only solution.
I would wipe cache, then data then try another ROM.
sciencetor2 said:
So recently my device stopped recognizing the SanDisk 64gb micro-SDXC I had formatted as internal storage.
Click to expand...
Click to collapse
It is possible, though I have not done it before, I avoid adoptable storage for this reason. Do NOT wipe your ROM, or you will permanently lose your encryption key to your data that you have on the card.
If you put the SD card into a Linux PC that can recognize the partitions (Windows will not show it), you will see two partitions, android_meta and android_expand. To decrypt the big one, android_expand, you will need to recover your key from the phone.
To recover the encryption key, you will need either root access or a custom recovery like TWRP, to access '/data/misc/vold' to retrieve the encryption key (aes-cbc-essiv:sha256). Save the .key file to somewhere safe.
Then something like
dmsetup create crypt1 --table "0 `blockdev --getsize /dev/sdb2` crypt \
aes-cbc-essiv:sha256 00010203040506070809010a0b0c0d0e0f 0 /dev/sdb2 0"
mount -t ext4 /dev/mapper/crypt1 /mnt/1/
More info here - http://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
Once you have recovered your data, reformat the card and use it as portable storage
SenK9 said:
More info here -nelenkovDOTblogspotDOTcom/2015/06/decrypting-android-m-adopted-storageDOThtml
Once you have recovered your data, reformat the card and use it as portable storage
Click to expand...
Click to collapse
(url edited due to new user restrictions)
Thank you! this is exactly what I was looking for, but i couldn't find anything on google about anyone figuring out all the details (encryption key location, encryption method, usable tool for decryption)
now is there any way i can root, extract the key, then unroot so that i can RMA the phone? It seems to now render any sd i put into it unreadable by itself within about 5 minutes of formatting, regardless whether i format as internal or portable. not sure if this is hardware (reader malfunction) or some software is writing to the card incorrectly, but it is now doing it consistently.
sciencetor2 said:
(url edited due to new user restrictions)
Thank you! this is exactly what I was looking for, but i couldn't find anything on google about anyone figuring out all the details (encryption key location, encryption method, usable tool for decryption)
now is there any way i can root, extract the key, then unroot so that i can RMA the phone? It seems to now render any sd i put into it unreadable by itself within about 5 minutes of formatting, regardless whether i format as internal or portable. not sure if this is hardware (reader malfunction) or some software is writing to the card incorrectly, but it is now doing it consistently.
Click to expand...
Click to collapse
I do not believe it's possible to root or change the recovery without unlocking the bootloader, unless there's some other method I'm not aware of. Even MM systemless root method - http://forum.xda-developers.com/mot...t-moto-x-style-xt1572-br-marshmallow-t3259380, requires unlocking the bootloader, which of course then technically voids the warranty.
However, in this case, it might be worth contacting Moto to inform them of what's happened, it's definitely some kind of bug in the software which has caused this, and thus you are stuck in this catch-22 situation. They might make an exception or have some other solution. Let us know how you go.
SenK9 said:
... requires unlocking the bootloader, which of course then technically voids the warranty. ...and thus you are stuck in this catch-22 situation.
Click to expand...
Click to collapse
Even more of a catch 22 situation, because if i read that correctly, the process for unlocking the bootloader also requires wiping the phone (and thus, the encryption keys) (i miss geohot with his 1 click soft roots). I will wait a little while and see if I or anyone else reading this thread can find a way around that, but it seems ill have to contact Moto support either way, since my 16gb model is barely usable without an SD card.
This is another example of why taking control of your phone before something goes wrong is so important.
Did you try wiping cache yet?
lafester said:
This is another example of why taking control of your phone before something goes wrong is so important.
Did you try wiping cache yet?
Click to expand...
Click to collapse
I checked the recovery menu but there didn't seem to be an option for wiping cache on this device (recovery menu was a little different than I am used to, only had option for factory reset) Also, while wiping cache might conceivably prevent it from screwing up future cards, I don't know if it will fix this one, and i'm not sure if i wanna risk wiping anything without getting my hands on the encryption keys first. if it becomes apparent that i'm just not getting root without wiping, then I'll try playing around with recovery options to at least get back SD slot usage.
You can erase cache in fastboot. If you are locked there is no way to root without wiping data.
lafester said:
You can erase cache in fastboot. If you are locked there is no way to root without wiping data.
Click to expand...
Click to collapse
Isn't that what the setting "OEM Unlocking" under "Developer Options" is for? I thought I read that, if you enable this option before you unlock the bootloader, it allows you to unlock without the wipe/factory reset?
YITBOS said:
Isn't that what the setting "OEM Unlocking" under "Developer Options" is for? I thought I read that, if you enable this option before you unlock the bootloader, it allows you to unlock without the wipe/factory reset?
Click to expand...
Click to collapse
I hadn't heard that... Got a source?
YITBOS said:
Isn't that what the setting "OEM Unlocking" under "Developer Options" is for? I thought I read that, if you enable this option before you unlock the bootloader, it allows you to unlock without the wipe/factory reset?
Click to expand...
Click to collapse
No all that does is allow you to unlock (providing you have a key of course).
well it looks like nobody has found a non wiping solution to root my phone, so I'm going to have to give up on the data and see if I can get back SD functionality, or just RMA the phone. I think i will also publish a script that allows you to plug in your phone and the SD at the same time and allow you to decrypt an internal formatted card by pulling the keys and using them to mount the drive to help people who are in similar situations, but have root. Thanks anyway for the help.
Hi Everyone, I'm stuck in the same catch 22 situation. Device is not rooted or bootloader unlocked, so can't access the key, and trying to root/unlock bootloader will wipe the keys. Any updates, @sciencetor2??
Have you written to Motorola/google about this?
I'm still not ready to give up on the data... hundreds of vacation pictures, that couldn't get backed up.
I'm in the same boat any good news on this?
As long as the phone can see the card, you can change it to portable storage. However, if something goes wrong and phone can not see the card anymore, it's nearly impossible to access the volume without the retrieving the key from the phone, and you must root the phone in order to get the key, as I understand.
I have another similar problem, SD card becomes locked writing and disappears from phone, even I used it as portable storage. And the card can't be formatted at all. So I believe the phone somehow does something and change the state of SD card!
Did anyone find a solution yet. Stuck with same problem. Will loose very important data.
Same here.
I adopted my sdcard as internal storage in CM13.
It was constantly in bootloop, so I formatted the internal memory of the phone to install a new rom ...
But now I can not recover the data within the sd because I can not access it nor with the new rom (I can not even mount it from TWRP) nor from a linux PC (the filesystem is unknown).
Pretty much ... I did not know that the sdcard adopted were encrypted!
Any solution? :\
Hello everybody!
Is there any way to recover the deleted ".key" file?
so i havent gotten back on this thread in a while but i think i at least figured out the "why" on why the card was no longer being recognized. it seems to come down to read/write speed. my 64GB and 128GB cards that i was having the issue with were both U1 cards, which means their read/write is only sitting around 10Mbps, and both of those had issues being detected by the phone after a little bit of time in use. I replaced the card in the same phone a few months back with a high throughput U3 card, and it has been running smoothly ever since. this leads me to the hypothesis that if the card is not fast enough for the phone's taste, it will just ignore it (or timeout on reads, not sure which is actually happening) which is leading to the issues we are experiencing. unfortunately this doesnt lead us to a solution for recovering from the existing cards, but hopefully it will help avoid making the mistake of using a slow card in the future.

Decrypt internal sd after wipe

Short question here.
- I took the, as internal storage formatted, sd out of my Moto X Play
- Wiped to solve Marshmallow battery drain bug
- Put the sd back in
- aaand the phone doesn't recognize the card anymore.
Apparently an sd formatted as internal storage is encrypted to prevent data theft in case the phone is stolen. The key was apparently stored in '/data/misc/vold' and is therefore lost after the wipe.
I found a similar question here: http://forum.xda-developers.com/moto-x-style/help/to-decrypt-micro-sdxc-formatted-t3360169
Except of a few images from last week in vsco, everything on the card was either google photos or spotify data. So I have a backup of 95% of the stuff.
Is there a way to retrieve the key? Does Google back it up? NSA? Or to brute force? The encryption caught me really off guard so I wanted to shoot a last attempt before I format the card.
Thank you for your help guys. :good:
As far as I know, formatting the card is your only option.
Brute force
Thank you lenny, first of all.
I made a full image of the mentioned sd card using the default mac os x disk utility tool.
I hope to be able to brute force my encrypted sd card in the far far future. Is the mentioned system image the way to go? Having 64 gb of an unreadable encrypted sd card image on one of my external hds doesn't hurt, however im obviously a noob. Therefore i am not sure if the system image will be sufficient to brute force it one day.

Retrieve data from unreadable adopted storage card

I am not the author of this, it is from https://android.stackexchange.com/q/174799/146132 but it has some great info I thought I would share... My thanks to the author.
About a month ago the Moto G (3rdGen) of my wife was not able to recognize the SD-card 32GB Trancend premium 400x (which was formatted as adoptable storage) anymore. On this card were very important pictures and movies for us (of our new born baby). As of a certain Android version the adoptable storage is also encrypted and reading it on a PC or other phone is not possible without the encryption key. Since the phone was also not rooted it was also not possible to get the encryption key from the /data/...something directory... (see https://nelenkov.blogspot.ch/2015/06/decrypting-android-m-adopted-storage.html) So I almost gave up hope...
I bought the exact same type SD-card, also 32GB, only about a year later. Hoping that I would be able to make an exact clone of the card and I would be able to start some experiments with it without the risk of destroying something on the original card and losing all the data. When I mounted the original card under Linux it shows two partitions 17MB and about 31GB. Cloning the card with some Linux command line tools didn't gave me the same result. Next thing I tried was cloning it using HDDrawCopy, first write the entire card to an image on my harddrive. When I copied the data to my new 32GB card I noticed that the new card did not have the same capacity of the image file (image was 32.22GB, new card shows capacity of 31.11GB) so hmmmm that trick doesn't work... Luckily I also happen to have a 64GB SDcard (same type) which should have enough space for this test. So using HDDrawCopy I wrote the image to this card. Checked under Linux if I see the same partition as with the original card and this happens to be (of course it also shows about 32GB of free space not partitioned).
So I thought lets see if the Moto shows the same error with my new card in the phone and that I made an image on which I can start to try to hack the encryption off(now or in the future). To my surprise the Moto shows immediately that the transcend 32GB volume is mounted! I went to the gallery of the phone and IT SHOWS OUR PICTURES AND MOVIES again!!!
So in short when this happens buy a larger volume SD-Card (to make sure that there are enough data-block available). Use HDDrawCopy to make a bit-wise clone/image of the original card. Write the image to your new card and check if it can be read by your phone.
Never do the following or your data will be lost:
Format the cardSet your phone back to factory default (destroys your encryption key)Make the phone to forget/unmount the storage location (also destroys encryption key)upgrade to a newer version of Android (or any other major system update).
(of course make sure to make backups or cloud syncs to prevent this situation at all)
I hope this can help someone out there who might ended up in the same situation.
Unfortunately I have clicked on forget the card. Can anything be done?
Unfortunately I have clicked on forget the card. Can anything be done?
ajparag said:
Unfortunately I have clicked on forget the card. Can anything be done?
Click to expand...
Click to collapse
Unfortunately, no... When you click "Forget" the unlock token is erased and not recoverable by normal means. The daya stored on an internal SD csrd is now lost forever.
Hi, I am in a similar situation. I have a marshmellow phone with an sd card set up as adopted storage, but the phone stopped working and I needed the memory card somewhere else so I took an image backup of the SD card Partition. This is the mistake I did, should have taken the entire disk image backup. So now when I restored the image and the phone is fixed, the phone doesn't recognizes the memory card even though it still has the encryption key.
Any ideas?
The partition table is correct, the first partition "android_meta" probably has the wrong info

Resources