0

I used a micro SD card in a Nokia Smartphone for years as internal storage. I ejected it to test if another phone detects this type of SD card. Although we planned to just see if it is detected, certain off-topic factors led to the acceptance of Google's suggestion to 'format it as internal storage'.

As long as my phone still remembers the decryption, is there a way to recover my Photos, GPS-tracks, Text-Notes and other data, despite being encrypted with the known key and formatted by another phone?


My assumptions:

  • data from a non-encrypted card can often be retrieved mainly because the raw data still 'looks like' photos, mp3 etc;

  • encrypted data doesn't 'look like' anything, so recovery tools won't find anything;

  • Even if my phone doesn't care about data parts but about some 'yes I am your encrypted storage do not format me' file, a recovery tool would need the decryption information to look for the original content (i.e. how to extract it from the phone plus tell the tool?)


Side note/non-duplicate: Similar questions that I found always have somebody loosing the decryption key and I agree that recovery should be impossible in those cases.

6
  • What Android version do you use? Anyway encryption usually incorporates a hardware security element which allows to use the keys on-device but the keys can't be extracted. Last but not least you did overwrite the sd-card partially by formatting it which complicates the whole thing. My guess is that there is next to no hope. Next time: if you test something with an SD-card make a full backup of it block by block on a PC and shut down the device before ejecting the sd-card.
    – Robert
    Sep 29, 2019 at 13:31
  • Thanks. Both phones run Android 9. If extraction is impossible, my recovery effort would have to be done on my phone. If I let my phone format a new card as internal memory, in principle, I could 1. take note of the involved changes on the new card (compare image before/after), 2. overwrite the old card only with the changes made to a new one and 3. tell my phone that the previous card is back. 4. Afterwards the phone could serve as a card reader doing the decryption (guess it's too smart for that) and 5. the computer does the recovery. in practice, 2., 3., and 4. are beyond my skill... Sep 29, 2019 at 14:14
  • Is your original device rooted already and have you inserted the card into any other Android device, reinserted it into the original phone, or written any data to it at all in the other phone, other than the "format"?
    – acejavelin
    Sep 29, 2019 at 14:19
  • The original device is not rooted. I inserted it only in the one which formatted it as internal memory and did not perform subsequent formats. It is now in the original phone, which reports (as expected): 'unsupported sd card -> please format' and 'sd card missing' Sep 29, 2019 at 14:24
  • 1
    Then your data is lost and unrecoverable... Without root you cannot access the original encryption key, and rooting at this time will wipe the encryption key, if it still exists at all. I could go into all the details of how/why the data is now unrecoverable, but it won't make any difference. There was a remote chance it could be recovered if you had root on the original device (by remote I mean your more likely to be hit by lightning than recovery the data, but a chance), but without root the encryption key is inaccessible, if it still exists, and rooting now would wipe the key. Sorry.
    – acejavelin
    Sep 29, 2019 at 14:31

1 Answer 1

1

Accessibility of the data on a storage volume that has been adopted by Android Marshmallow or higher as "internal storage" is well documented and has requirements of root at an absolute minimum... So I won't go into that in my answer, the details are here: https://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html

You stated you do not have root on your device so the encryption key is not accessible, and rooting the device at this time will wipe the encryption key. So it is not recoverable.

Unfortunately, when the card was inserted into the other device, it was "formatted" as internal storage on the that device, not only erasing the existing data making it virtually impossible to recover even without taking encryption into account, but also changed it's identity to Android and setup a new encryption key pair between the new device and the storage card. This last step also made the card unrecognizable in the previous device as the other "half" of the key on the device no longer matches the storage volumes key.

Sadly, the end result here is that any data on the card initially is now lost permanently and is not recoverable. It is best at this time just to allow the device to format the card again, and consider that formatting the card as "external" or removable storage may be a more appropriate use of the storage card.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .