How to turn a portable SD card into internal storage via ADB command?

96,566

Solution 1

I managed succesfully perform this operation on my LG K8 LTE. I want to notice there are "500 xxx Unknown disk" errors problems, and give solution to avoid this. Solution is very simple. Proper steps in ADB would be:

adb shell
sm list-disks
// HERE YOU GET YOUR DISK ID, SOMETHING LIKE "disk:179,64" - REMEMBER THOSE NUMBERS
sm set-force-adoptable true
// IN NEXT LINE, SIMPLY PUT THOSE NUMBERS AFTER "disk:" AND ALSO AFTER WORD "mixed" TYPE PERCENTAGE OF SPACE LEFT AS EXTERNAL, SO IN MY CASE:
sm partition disk:179,64 mixed 60
// IT TAKES TIME. BE PATIENT. WITH THIS LINE I TRANSFORMED WHOLE EXTERNAL SD INTO 40% OF INTERNAL AND 60% OF EXTERNAL
sm set-force-adoptable false

BANG! That's it! Now go to storage and usb, there click on internal part of SD and expand options, click on "use as internal" or something like that, last option, (I cannot see what was that because I already clicked it and everything works) apps are finally going on SD with OBB files! ;)

Have a good day!

Solution 2

I have done somewhat extensive research on this question online. I can tell you the steps, and they seem to work for everyone but me. Try them and let me know if they work for you.

  1. Back Up your SD card, as it will be wiped.
  2. If you don't already have it, download and install Java SE Development kit. The website is www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. I used version 8u101 for Windows x64.
  3. If you don't already have it, download Android SDK Manager. The website is developer.android.com/studio/index.html. Scroll almost to the bottom where it has "Get just the command line tools" and select android-sdk_r24.4.1-windows.zip for Windows. When it downloads, extract all to a location where you want to keep the folder.
  4. Open the Android SDK folder and run the SDK Manager. (If it fails to run, see question 14504325 in stackoverflow). Follow the instructions on www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/ to get it up-and-running.
  5. When you have the command prompt open per the how-to-geek website instructions, enter "adb shell"
  6. Then enter "sm list-disks". This will return the name of your microSD card. The instructions I was following showed a disk labeled 179:160, but my computer showed the disks as 179,32. This is where I'm stuck.
  7. Finally, enter "sm partition disk:179:160 private", where the numbers are the name of your disk from step 6, if you want to adopt your whole SD card as internal storage. Otherwise, enter "sm partition disk:179:160 mixed 25" where the last number is the percent of the card's space used for external storage. I have not been able to get this to work.

See http://www.modaco.com/news/android/heres-how-to-configure-adoptable-storage-on-your-s7-s7-edge-r1632/ for the original instructions.

P.S. I tried this on a Samsung Galaxy On5, so that might explain why it hasn't worked.

Solution 3

This has now been disabled on (at least) some Samsung tablets.

I have a galaxy tablet that has been running with a huge sd card formatted as internal storage.

I purchased another more recently and on this adb format command did not work (it just immediately returned to the command prompt).

I have had to do a factory reset on the older machine and now find that it too will not allow the SD card to be formatted as internal memory - it behaves just as the newer one does.

My guess would be that Google have updated android to 'respect' the settings of the suppliers UI.

This has (of course) completely messed up my system, as the backup/restore was based on main memory of over 100GB, not the 16GB the device actually has.

Share:
96,566

Related videos on Youtube

cassioso
Author by

cassioso

NaN - Not a Number.

Updated on November 03, 2021

Comments

  • cassioso
    cassioso over 2 years

    Android 6.0 Marshmallow’s introduces Adoptable Storage, a feature that allows use a SD Card as internal storage.

    Is it possible to activate adoptable storage via ADB shell commands?

  • Michael Silver
    Michael Silver almost 8 years
    You should use 179,32 as your disk since that's what "sm list-disks" returned, but I also have an On5 and it doesn't work for me either. I read in another thread it is probably due to the kernel blocking such activities. Thank you, Samsung.
  • Burt_Harris
    Burt_Harris almost 7 years
    Confirmed this does not work on Samsung Galaxy On5. Samsung decided to disable it.
  • Paulo Coghi
    Paulo Coghi about 6 years
    You can use sm partition disk:179,64 private to choose 100% as internal.
  • 千木郷
    千木郷 over 5 years
    I can't understand what the command sm set-force adoptable is for. Because I have not seen any difference between true and false set.
  • Alexander Arutinyants
    Alexander Arutinyants almost 5 years
    what do you do if it says corrupted then?
  • Notre
    Notre over 3 years
    FWIW, this failed to work for me on my Moto G Power running Android 10.
  • Adam Staszak
    Adam Staszak over 3 years
    Possible - it's very old post, from 2016, I was using Android 6 that time.