Is it possible to migrate an SD card formatted as adopted storage to a new phone without reformatting?


Question

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.


Answer

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).


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes