One of the coolest – if unsexy – features of Android Marshmallow is its ability to use adoptable storage. This means Android can treat an SD card as additional internal storage, rather than an external device, as it has in the past. Under the hood, Android will still see two separate devices, but it will (more or less) treat it as a single storage unit. It’s almost (but not quite like) having a 2TB drive in your desktop computer, then buying a 2TB external drive and, after installing it, Windows giving you the option of treating the drives as a single 4TB unit instead of two 2TB drives. It’s kind of like that, only better, because it’s much more difficult to expand a phone or tablet’s internal storage than to do the same on a desktop computer.
Unfortunately, two of the biggest Android device makers – Samsung and LG – have disabled this feature in their versions of Marshmallow. They claim that customers would be “disappointed” in the performance of their devices, since an SD card is likely to be slower than the internal memory. This is true, but not a dealbreaker if you know that going in. They also claim that SD card failure would cause apps to break… which is also true, but it’s not the end of the world: just buy a new SD card, repeat the procedure below, and reinstall the apps in question. As someone who played around with CyanogenMod a LOT a few years back, this is not a problem at all… especially since SD cards don’t fail that often.
So this post will show you how to enable the feature. There are a few caveats, however.
The first thing – and this should go without saying – is to make sure to back up any important files you may have on your SD card before you do this. This procedure WILL ERASE the card, so data will be lost forever. Also, read the instructions below, in full, and make sure you understand them completely before you even touch your phone or computer. The time to be confused is before you start an IT project, not during the project.
Secondly, I have only tested this – once – on a Virgin Mobile LG G Stylo. It worked for me, but it might not work on your device. It might not even work on the same phone on a different carrier. Google “[your device] adoptive storage” and see what comes up. As always, there’s the possibility of wrecking your phone, so please research this before jumping in feet-first!
Thirdly, this procedure will create an encrypted ext4 partition that will fill your entire SD card. You’ll still be able to attach your device to a computer via USB and copy files that way… but you won’t be able to take the SD card out of your phone, pop it into an SD card adapter, then put it into a laptop or desktop card reader to copy files. If you haven’t already, it’s probably a good idea to look into cloud services that offer online backups of your pictures, like Dropbox, OneDrive or Mega.
Lastly, this isn’t something you can “just try out” with a spare 8GB SD card and upgrade to a 32GB card later. If this is something that interests you, go ahead and spend the $10 on a new 32GB card and be done with it.
NOTE: PLEASE READ THE ‘IMPORTANT UPDATE’ SECTION AT THE END OF THIS POST FOR ANOTHER POSSIBLE ISSUE TO CONSIDER!
That said, here’s how to enable adoptable storage on your Marshmallow device. It’s really simple: I was able to do the entire thing in around 10 minutes… while on hold with Virgin for an unrelated billing issue.
1) On your computer, go to this page on the XDA forum and download the “15 Seconds ADB installer”. I used the current version – 1.4.3 – but it might be updated by the time you read this.
2) Once downloaded, right-click on adb-setup-1.4.3.exe and choose “Run as Administrator”. As the linked page says, press Y to “install ADB and Fastboot”, Y or N to install for all users (Y) or just the current user (N), and Y to install the necessary drivers. After the last question, you should see the standard driver install dialog. Click “Yes” (or “Allow” or “OK”, I forget which) to install the Google device driver.
3) If you haven’t already, enable “Developer Mode” on your device by going to Settings > About Phone > Software Info and tapping “Build Number” seven times. You will know you’re getting close when the phone says something like “only 3 more taps to Developer”.
4) Tap Settings > Developer Options and enable USB Debugging. Click “OK” to the warning message that will appear.
5) Connect your phone to your computer via USB. A window should pop-up on your phone asking to enable USB debugging and showing your computer’s “RSA key”. Tap “Always allow from this computer” (if desired) then tap “OK”. If you don’t see this window, drag down your notification area and look for a similar debugging message and tap that.
6) On your computer, open a command-prompt in the ADB directory (which should be c:\adb).
7) Type adb devices and press ENTER. You may see your device listed, probably with a long name, like “LGLS7709e27dc19 device”. If so, skip to the next step. If you get a message about a “service not running”, the software should say that it’s starting it, but the app won’t poll your devices again. So type adb devices and press ENTER again. You should now see your device listed.
8) Type the following commands exactly as shown, pressing the ENTER key after each one:
adb shell sm list-disks
adb shell sm list-volumes all
adb shell sm set-force-adoptable true
adb shell sm partition disk:179,64 private
adb shell sm set-force-adoptable false
adb shell sm list-volumes all
NOTE: the fourth command partitions your SD card, and may take 2-3 minutes (or longer) to complete, depending on the size of your card.
9) Disconnect your phone from the USB cable and reboot it. The reboot is crucial. Your phone may (or may not) take a bit longer to boot this time. One message board user reported that his phone appeared stuck on the Virgin boot logo for several minutes, but finally booted and has been fine ever since. My phone seemed to boot normally, maybe taking just a few extra seconds at most. Your mileage may vary.
10) Once your phone is fully booted, tap Settings > Developer Options and disable USB Debugging, clicking “OK” to any messages that may appear.
11) Go to Settings > Storage & USB and tap your SD card. Tap the three dots in the upper-right corner and choose “Migrate data”:
12) A wizard will appear, telling you that photos and media files will be moved to the SD card, and that in the future they’ll be saved there, too. Tap “Move”:
13) After the move, you’ll see that although Android reports the size of each device individually, you have a total of x space. In my case, it’s 37.33GB:
14) Go to Settings > Apps and tap on an app. Tap “Storage”. At the top of the resulting window you should see “Storage used: Internal storage”. Tap the “Change” button and choose your SD card, like so:
Not all apps support being run from the SD card. Not surprisingly, most of Google’s own apps can’t be moved. Most can though, and you’ll get a simple, two-step wizard to move the data. If you don’t see a “Storage used: Internal storage” option, the app cannot be moved. Also, if you use Spotify, you will need to tap Storage > Clear Data. This will reset the app, so you’ll need to log in and download all your offline music again. If you don’t do this, the app will open and immediately close (no matter what you do) until you clear data.
15) Repeat as necessary for other apps. Note the overall amount of space used on my phone is the same, but internal storage usage has decreased while SD storage has increased:
If this sounds a bit like my old article on expanding storage on the LG Tribute… it’s almost exactly the same thing… only this time it’s using tools built-in to Android to do so. Also, root is not needed in this case, so apps that complain about root status will stay quiet.
* * *
IMPORTANT UPDATE (03/12/2016): This may (or may not) be related to adding adoptive storage to my phone, but I just wanted to let you know about a possible issue that might happen, and offer a strange workaround if it does.
The issue is this: after adding adoptive storage, you might notice that the “None” and “Swipe” options are disabled in the Lock Screen options, with the message that it has been “disabled by administrator, encryption policy, or credential storage”:
I work from home most days, and almost always leave the lock screen on swipe, since there’s little need for security in my own home. I went out the other night, and since I was running late I quickly set the option to PIN and didn’t notice the two other options greyed out. But then I came home and tried to switch back and found that I could not.
Now, my phone might have been like this for weeks, and I only just now noticed it. My carrier upgraded the phone from Lollipop to Marshmallow early January, and it’s possible that this could have happened then. That’s the point: I just don’t know. I’ve been an IT guy long enough to know that coincidences are rare… but they do happen from time to time.
So… how do you fix it? I don’t know. I haven’t found anything that’s worked yet. One solution offered is to go to Settings > Security > Certificate Management and click “Clear Credentials”. But this has not worked for me.
I have, however, found a strange workaround that won’t let you select swipe, but will enable it anyway:
1) Go to Settings > Lock Screen and choose “Pattern”.
2) Choose a pattern, then choose a PIN if you don’t already have one.
3) Lock the phone, then enter the WRONG pattern five times. You will get a message that says something like “You have incorrectly entered your pattern 5 times. Please try again in 30 seconds”. You will also see a box in the lower right corner of the lock screen that says “Backup PIN”. Tap it, and enter your PIN.
4) Until you change it, your lock screen should now be on swipe, even though it’s not an option you can select (just like my screencap above).
As I said, my phone could have been like this for weeks, and I only just noticed it after adding the adoptive storage. I read several articles and how-tos online on the subject, and not one of them mentioned anything about the lock screen, so I’m inclined to think it’s just a coincidence.
Huge thanks to AndroidForums member stanton renna, who actually typed all this up in a handy post. He (or she) did all the real work – I just wrote it up in my own words and added a bunch of screencaps!