Tutorial: How to enable adoptable storage on an MIUI phone with Android 6

jonaskor

Member
Dec 22, 2017
14
10
3
The Xiaomi Redmi Note 3 is still a very good device and many of us use MIUI as it comes preinstalled and has many advantages. One major disadvantage for many of us is, that it does not support adoptable storage out-of-the-box. This means, that if you have a device with limited storage (e.g. 16GB), you have a problem once you run out of space. Fortunately there is a solution! With these few commands we can activate the adoptable storage feature so we can move apps to SD card and we are back in the game!
This should also work for other phones with Android 6 e.g. Samsung and Sony, that do no support this feature out-of-the-box.

NO ROOT NEEDED! NO FLASHING NEEDED!

Screenshots in the first comment!

What you need
  • a computer
  • a phone running Android 6 (or above)
  • a fast microSD card (at least UHS class 1 recommended)
  • a backup of all important files (especially from SD card - it’s going to be formatted during the process!)

Step-by-step guide
--- Warning: You are proceeding at your own risk! ---

  • Enable developer options on your phone (in settings -> about phone -> tap “MIUI Version” 7 times)
    • Enable „Stay awake“
    • Enable „USB debugging“
    • Disable „MIUI optimization“
  • Download and install „ADB and fastboot“ on your computer
  • Connect your phone via USB
  • Run a command window (as administrator) and use the following commands
    • adb shell
    • sm set-force-adoptable true
    • sm list-disks
      • you are going to see a result like disk:179,64
    • sm partition disk:xxx,xx private/mixed xx
      • this is reformating your SD card, change xxx,xx according to prior result e.g. 179,64
      • use private if you want to use the whole SD card as adoptable storage
      • use mixed xx if you still want a specific percentage of the SD card formatted as “portable” storage e.g. mixed 60 (-> 40 percent adoptable storage)
      • check success on your phone (setting -> storage)
    • sm list-volumes
      • you are going to see a result like private:179,67 mounted fb705131-c6a0-4e3a-959b-605a65334c8c
    • pm move-primary-storage xxxxxxxxxx-xxxx-xxxxx-xxxxx-xxxxxxxxxx
      • migrate data to adoptable storage, change xxxxxxxxxx-xxxx-xxxxx-xxxxx-xxxxxxxxxx according to prior result e.g. fb705131-c6a0-4e3a-959b-605a65334c8c
      • check process on your phone („Moving data“ in the status bar)
  • Install „QuickShortcutMaker“ from the Play Store.
    • Find „com.android.settings“ in Activity-tab
    • Find „com.android.settings.Applications.ManageApplications“
    • Create a shortcut for it on your home screen
  • Reboot!
  • Use the shortcut to manage apps and move them to the adoptable storage (marked as “external storage”)
  • Enjoy!

Note:
  • Not all apps support to be moved!
  • The system settings won't show the correct storage sizes. Use “Mi File Manager” instead.
  • All icons of applications stored in the adoptable storage are going to be moved to your home screen after every reboot. You will have to move them back to their folders manually.
  • In order to install new updates you will have to move the downloaded update file (from downloadad_rom) to your SD card manually and choose it as a source file in the Updater app.


Sources:
http://en.miui.com/forum.php?mod=viewthread&tid=820440
https://forum.xda-developers.com/android/software/auto-formatting-sdcard-to-internal-t3583875

Search: adoptable storage, shared storage, adaptable storage, app2sd, move app to sd card
 
Last edited:

jonaskor

Member
Dec 22, 2017
14
10
3
Screenshots
Computer:


Migrating data:




Storage after procedure:

  • SD card (“external storage” / portable storage):
38,4 GB (60% of 64 GB SD card)​
  • Storage (adoptable storage):
25,1 GB (40% of 64 GB SD card)​
  • Internal (without system):
11 GB (of 16 GB internal memory)​
  • System:
5 GB (of 16 GB internal memory)​



Managing apps via shortcut:

 
Last edited:

jonaskor

Member
Dec 22, 2017
14
10
3
Other devices...

It would be interesting to know on which other devices this works! So please comment!
Can anyone confirm this method for Xiaomi Redmi Note 4, Redmi 4X, Redmi 4A or Redmi 5?
Any other phones you tried?

Confirmed:
  • Xiaomi
    • Redmi Note 3
    • Redmi 5A
 
Last edited:
  • Like
Reactions: ibal97

bernalaurelio

New member
May 1, 2013
3
0
0
It would be interesting to know on which other devices this works! So please comment!
Can anyone confirm this method for Xiaomi Redmi Note 4, Redmi 4X, Redmi 4A or Redmi 5?
Any other phones you tried?

Confirmed:
  • Xiaomi
    • Redmi Note 3
    • Redmi 5A


Hello

I have tried this method in redmi 4a and it works without problems.

Excellent
 

alwayssummer

Member
Dec 4, 2008
24
1
0
Singapore
T
Install „QuickShortcutMaker“ from the Play Store.
  • Find „com.android.settings“ in Activity-tab
  • Find „com.android.settings.Applications.ManageApplications“
  • Create a shortcut for it on your home screen
Thanks for the howto! I have a Redmi5a and things look a little different on my phones after the procedure. I'm not sure I've done everything right. In storage management I don't get "Unmount shared storage", but instead I see "Unmount SD card". More importantly, for the shortcuts, I'm not finding „com.android.settings“ in Activity-tab. Did I miss a step? Anyone else have this issue?

EDIT: It's in there, just doesn't show up when you search.

EDIT2: Can reconfirm the instructions work on Redmi 5a.
 
Last edited:

alwayssummer

Member
Dec 4, 2008
24
1
0
Singapore
is it permanent or can it be changed back?
Depends what you mean by your question... Once you've formatted an SD card as adoptable storage there's no automated way in Android to migrate all the data back to internal storage, so you tend to lose any app data that was stored on the SD card. Sometimes that means apps will need to be reinstalled after removing the SD card. However, you can always reformat your SD card and use it in another device.
 
  • Like
Reactions: ibal97

ibal97

Senior Member
Jan 1, 2016
82
12
38
Depends what you mean by your question... Once you've formatted an SD card as adoptable storage there's no automated way in Android to migrate all the data back to internal storage, so you tend to lose any app data that was stored on the SD card. Sometimes that means apps will need to be reinstalled after removing the SD card. However, you can always reformat your SD card and use it in another device.
thanks brother :good:
 

ibal97

Senior Member
Jan 1, 2016
82
12
38
guys help.... it says
Failure [-6]
when i try this command
pm move-primary-storage 86fa15bc-76c7-4006-946a-7f002e3c91e3
:( :( :(

edit: solve the problem...thanks bro
 

Attachments

Last edited:

heroboy107

Senior Member
May 17, 2018
58
12
0
Problem with internal storage

Hi man, 1st i wanna thank you for this tutorial.
I did everything just like u said but now the file manger seems to have ignored the original internal storage completely and thinks that the sd is the only storage. So i can't update and cant use my internal al at all screens attached

 
Oct 9, 2015
16
1
0
Rize
what if i want to go back to using all my SD card as an external storage? i have installed a new rom yet the storage is still the same, i want to go back as using 100% of my sd card as external storage, i have tried formatting it but it doesn't format
 

sohail_23

Member
Dec 15, 2016
41
3
8
Mumbai
HEY i found your guide very helpful and sucessfully adopted and migrated data to sd card but now i want to go back as it is showing some kind of problems so plz reply me the method to migrate the data back to internel storage.
 

Rahulraj2012

Member
Jan 10, 2017
8
2
0
got failure'-6' error at last step on cmd (on device stated 'unable to move data it will remain in origial place').....plz help

---------- Post added at 07:08 AM ---------- Previous post was at 07:05 AM ----------

:crying:
guys help.... it says
Failure [-6]
when i try this command
pm move-primary-storage 86fa15bc-76c7-4006-946a-7f002e3c91e3
:( :( :(

edit: solve the problem...thanks bro