Marshmallow, LG and Adoptable Storage

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.

ADB CMD prompt

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”:

Marshmallow Migrate Data 01
(click to embiggen)

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”:

Marshmallow Migrate Data 02
(click to embiggen)

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:

Marshmallow Migrate Data 04
(click to embiggen)

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:

Marshmallow Migrate Data 03
(click to embiggen)

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:

Marshmallow Migrate Data 05
(click to embiggen)

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”:

Marshmallow Migrate Data 06
(click to embiggen)

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!

38 Replies to “Marshmallow, LG and Adoptable Storage”

  1. Thank you so much for your step by step instructions. I am not a techy, but I think I can follow these steps. Thanks again!

    1. No idea. Like I said, I’ve only tried this, once, on an LG G Stylo. I can’t imagine it WOULDN’T work on a similar LG, though.

  2. Yes. You can convert an existing SD card back to Portable Storage by tappping Settings > Storage > [your SD card} > three dots > Format as Portable. You may (or may not) be prompted to move the data back to internal storage (reversing step 12 above).

    But yes, if you swap SD cards, you’d need to repeat the entire procedure.

  3. After “adb shell sm list-disks” command gets “java.lang.illegalargumentexception” error. How can i fix it?

  4. Tried on a Sony Z3, Seemed to work, but the camera app could not save to internal storage. So reverted back to the portable mode for now. Any thoughts on that?

  5. Thanks, it worked with my LG K8.
    Although I had to use a Windows 7 PC as my Win10 laptop didn’t support the adb software.

  6. Jim, in regards to your important update. As far as I know, all of the payment apps require screen lock of some sort. So, if you are using Android Pay or an individual cards android payment app those choice will be greyed out per the apps security features.

    Just my two cents.

    1. Thanks, but I didn’t have Android Pay or PayPal (or any other type of banking software) on the phone.

      Just as a note to everyone: the phone on my Stylo started acting “wonky” (the screen started appearing “wavy”, like an LCD with a bad capacitor). I bought an LG Stylo 2 to replace it. Since the Stylo 2 has 16GB of storage space, I don’t have a need for adoptable storage any more. So I’m not going to put any more work into researching this issue. Thanks for stopping by! 🙂

  7. it doesn’t work when i tape adb shell sm partition disk:179,4 private , that show : error : java.lang.illegal etc …

    have you an idea ?

    thanks and sorry for my awfull english

  8. Responding to David:

    David says:
    November 8, 2016 at 11:38
    Is there a way of doing this from a Mac? I use an Apple for computer work, but prefer the LG for my phone.

    I got this to work on my Mac by doing the following (I’m simplifying to keep this short. Make sure you research each step and read thoroughly):

    1. Installing the Android Studio thus adding ADB onto my Mac
    https://developer.android.com/studio/index.html

    2. Launching terminal from the folder in which ADB is installed
    http://lifehacker.com/launch-an-os-x-terminal-window-from-a-specific-folder-1466745514

    3. Following all the commands above but just adding a “./” before each command
    WINDOWS: adb shell sm list-disks
    MAC: ./adb shell sm list-disks

    So far, everything seems to be working for me. Hope that helps!

  9. Hi, thank’s a lot, it Worked on my LGK8 !! But Once my internal memory (8Gb) is almost full, it won’t let me install more apps and tells me to make room on me internal storage, even tho i migrated all my apps on the “new interal storage SDcard”, some files stay in the internal memory and can’t be moved. I’m at 7Gb and it won’t let my instal a big app…. Anyone else has that? Can anyone help me, my LGK8 says i used 7Gb out of 37ish but i can’t instal more apps !!

  10. Okay, now to clarify a few points in this tutorial:
    First, if your phone refuses to be shown in adb devices in Windows 10 (a known issue with LG K8 and others) change USB connection type to MTP to PTP to force it to read your computer’s RSA key. It’s useful if you have Windows 10.
    Second, the fourth command will likely fail if you follow the tutorial. Get the value of your storage given in the first command, substract one, and then put it into the fourth command for it to work.

  11. I’m t tho dio this but when i get tho the 3rd out 4th step i get an error something tho do with the code or something…. I’m not on my computer right now but I’ll post the exact error later… Another blog said that you needed tho download a c++ library… Do i ave where ave what exactly do i need.. Ion running Windows 10

  12. I’m getting a java error on the 4th command… anyone else have that problem or know what I need to do to get around it?

    Error: java.lang.IllegalstateException; command ‘1105 volume partition disk; 179,64 private’ failed with ‘400 1105 command failed’

  13. Ugh. So, I’ve obviously gone wrong somewhere. I got through all of the steps without issue, but after I rebooted my phone (an LG Stylo 2), the SD card displayed as corrupted and I was given the option to reformat it. Reformatted, but it’s displaying that there’s only 15.97MB on my SD card – it’s a 32GB SD card. Is it a lost cause, or can my SD be saved? Any ideas?

  14. Hi Jim,

    Thanks or this! I’m not all that tech savvy with cell phones but you have done an awesome job showing screenshots and providing detailed instructions so much so that I believe you’ve helped me to be on my way to resolving my storage issues IF I become confident enough to do this, I will follow your directions to the letter. Yours are the best I’ve found online so far. I used to work with computers some, not an expert but above average knowledge, so with your help I should be able to do this. I just want to know that everything will function properly when I’m done as long as I follow your steps. I need this adoptable storage on my LG Stylo 2 Plus so badly because 16gb is not enough for my apps and my phone began to malfunction. I have spent many hours trying to figure this out so thank you again soooooo much for making this seem like a task I can successfully complete!

    Have a great day!

    Tammy. ?

  15. My adoptable storage went away and tablet(LG) now shows internal and sd card and most of my apps are greyed out… if i try one, it says “App isn’t available”. Help!!

  16. Thanks it works perfectly on G4 Beat. Only a few app (like twitter) causes issues when moved to adopted storage. Adams?n Jim reis!

  17. Thanks I got my LG class(LG-F620) to recognize the card as internal. migration is still ongoing and it seems to take bit too long but so far it seems to work. such a savior for phones with tiny internal memory!

  18. I know this is an old article. Though the reason you lost the ability to have no password or swipe is because the SD was encrypted. On every Android version that I have tested if you encrypt the SD in anyway you will be forced to use authentication.

  19. worked fine on an LG rebel-2 which came from SimpleMobile with Marshmallow
    Its a life-saver as phone only has 8Gb, 65% used out of the box
    No significant slowdown as far as I can tell (yet), I used a 32G PNY speed=85M/s
    but its a simple slow phone anyway.
    Most apps would not migrate, bun uninstall & reinstall works

  20. Thanks, this has worked a treat on LG K8 & LK K3, I even have a 64gb card as adopted in my K8 when the specification says 32gb max. I actually left adoptable storage TRUE on & have had no issues.

  21. This worked for me today on my LG X Charge running Nougat 7.0. I had to install drivers from the LG Website in order to obtain adb driver. In addition to turning on USB debugging, you must also turn Oem unlocking on. THANK YOU for this awesome tutorial!

  22. Hey there! I have an LG K10 running Android 7.0. Since it appears that the manufacturers disabled the ability to do this with just a few buttons, I want to try this workaround using a 32 GB SD card. But before I do, I could use some help! My phone’s Internal Storage has quickly filled up because I have some pretty big apps installed, but attempting to move them to my SD card, when formatted as Portable Storage, does not fully move all of the data over. It says it works, showing my SD card as the location for the app, but my Internal Storage usage decreases just barely or not at all, and I can tell only part of it has been moved. I have read that this is because, as you said, some apps don’t support being moved to the SD card, and the developers limit them to Internal Storage only. To my understanding, the Adoptable Storage feature (the one that can be activated by following the steps above) is supposed to fix this by essentially formatting the SD card as part of the Internal Storage so that any and all apps can be stored there. Physically, the SD card and the Internal Storage disc will still be separate, but your phone will treat them as the same, showing that you have a total of 48 GB (16 from Internal + 32 from SD card now formatted as Internal) available in your Internal Storage. Is that understanding correct? Or is this not a fix for my problem? Ah, I hope my question made sense. I’d appreciate any help. Thank you in advance. 🙂

    1. That’s correct. I’ve moved on from my LG phones, but my new ZTE phone won’t even show “Move to SD card” as an option unless and until you format the SD card as adaptable storage.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.