2

My phone (Moto X Pure 2015, a.k.a. Clark) hates me. It's a refurb that I doubt was properly fixed, which was a replacement for my last one that had a bad USB port, but the issues didn't start until post-warranty (both original and 90 day for refurb). My wife decided to get an iPhone, so now I have hers, which is also a refurb, but it still works correctly for the most part. I would like to migrate everything from my phone to hers...including the 64GB Micro SD card formatted as adopted storage...without formatting the card.

Is this possible? Are there any options that don't include extra memory cards, usb sticks, or computers? I know I can move everything to an intermediary storage device, or to a new card in the new phone, but if there's a way to do it without that extra step, that would be nice to know. I'm rooted and running nearly the latest Lineage OS nightly (4/3), if that makes a difference, and I'm open to things like key extraction if I can get a good guide on what I actually need to do.

  • Are both devices rooted? – Izzy Apr 14 '17 at 15:37
  • 1
    @beeshyams See my answer. As I wrote, it might have a missing step: I've never tried that, as I don't use adoptable storage (and don't plan to). – Izzy Apr 14 '17 at 17:01
  • @Izzy yes, both devices are rooted – ND Geek Apr 16 '17 at 13:20
3

Though you did not (yet) confirm both devices are rooted, this solution might be of interest for those where they are:

Following up to our adoptable-storage tag-wiki, you will find a link to How to decrypt adopted storage? Based on that, the following approach seems feasible:

  1. From the original device, extract the encryption key file located in /data/misc/vold
  2. Copy this file to the new device

There's a missing step, though: As the file has no fixed name, I assume this must be stored in some settings database. So that database entry must be found and added to the new device. On the other hand, the name might as well be derived from the label of the SD card it belongs to.

So basically, this answer might be incomplete – but the approach worth a try. If someone can provide the missing step, please do so in the comments and I'll integrate it here (with credits given, of course).

  • 2
    But even if the encryption key is somehow moved from one device to another, wouldn't this be similar to moving a hard drive from one computer to another? Meaning the files will likely be there but the device probably doesn't know how to use the files or what they are for. – acejavelin Apr 14 '17 at 20:26
  • 2
    That's especially correct for apps installed on the device and their data, @acejavelin – good points. OP didn't ask for that aspect, and so – shame on me – I didn't think of this. In other words: It might be technically feasible to move the card including its encryption to a different device, but it would be absolutely useless to do so, LOL – Izzy Apr 14 '17 at 20:31
  • 1
    @NDGeek I can confirm TiBu – but that's nothing to do with "adoptable storage". Don't mix that with "portable storage" (SD cards): once adopted, it's rather internal storage, i.e. /data/data & Co. Which is why acejavelin is absolutely correct: even if the card is "successfully transferred", there's rather not much benefit from that. – Izzy Apr 16 '17 at 13:26
  • 1
    @NDGeek you confuse some storage locations. Please check with our storage tag-wiki. The "internal SD card" is only linked below /data, so wiping that partition only removes the link which then is recreated at the next startup. And adoptable storage is not the "internal SD card", though it adopts the "external SD card" as "internal storage". Still I'm confused on how the encryption key file survives that wipe… – Izzy Apr 16 '17 at 16:04
  • 1
    @NDGeek a magic key then :) – Izzy Apr 16 '17 at 21:06
1

Tag wiki of the which you used is a good start point :

  • When you adopted the external SD card, it is encrypted with a key that is unique - hardware key that is specific to your device ( not common to model). This means you cannot read the SD card on another device, even if same model.According to the [Android documentation][1] :

.. Keys are associated with adopted devices based on the adopted partition GUID.
..
Because the contents of an adopted storage device are strongly tied to the Android device that adopted it, the encryption keys should not be extractable from the parent device, and therefore the storage device can't be mounted elsewhere.

  • In other words, you cannot separate the device and external SD card as separate entities to access memory - ( except when device is connected to a laptop )

  • Technically, it is possible to retrieve the information contained in the card by recovering the key , in the absence of device. Foot note in the wiki offers a couple of methods but you would need access to a computer , which you do not wish to use

  • There may be another catch - Samsung encryption may be proprietary and details are not made public

To sum it up, your best bet would be to transfer contents to a laptop, and transfer them to the external SD on your new device

Edit: If both devices are rooted there may be a way, which I am not aware of ( seeing Izzy's comment)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.