Older Android phones lacks good support for expanding internal storage
when connecting a
microSD external memory card.
This is a guide to make Android aware of you
microSD and have it
used as internal storage by default using an Ubuntu Linux computer.
This guide makes sense when the Android phone doesn’t gives the option to use a microSD external storage card as an internal storage when you just connect it.
adb is the Android’s debugging tool that runs on Linux, to install
sudo apt-get install adb.
Activate developer mode
In your Android phone enable the Developers menu.
- Open the Settings app.
- Scroll to the bottom and select About phone.
- Scroll to the bottom and tap Build section 7 times.
- Return to the previous screen to find Developer options near the bottom.
Enter the new Developer menu item and enable debugging through USB cable.
Connect phone to PC
After having the
adb tool installed, we connect the phone through an
USB cable and check it is being detected by
adb with adb
$ adb devices -l List of devices attached A6R9XXXX27905XXX unauthorized usb:1-2 transport_id:1
If it says
unathorized like above, then trying to access the phone
will fail with the following message.
$ adb shell error: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device.
So you should check phone’s screen and accept to handle the smartphone through the computer.
$ adb devices -l List of devices attached A6R9XXXX27905XXX device usb:1-2 product:CRO-L03 model:CRO_L03 device:HWCRO-XXXXX transport_id:1
Now we log into the phone through adb shell and execute the following commands.
shell@HWCRO-XXXXX:/ $ adb shell shell@HWCRO-XXXXX:/ $ sm set-force-adoptable true shell@HWCRO-XXXXX:/ $ sm partition disk:179,128 mixed 60 shell@HWCRO-XXXXX:/ $ sm set-force-adoptable false shell@HWCRO-XXXXX:/ $ ^D
We can choose to use 60% of the microSD memory as internal storage
with the above command sm partition disk:179,128 mixed 60
or make Android use all the available external storage as internal
private like sm partition disk:179,128 private.
Move data to internal storage
- Go to Settings and then Storage.
- Select the microSD card listed at the internal storage section and tap to enter it.
- Inside the above menu browse to the bottom and choose to move all the data to the new card.
Remove all the data from previously stored apps, and manually check they are located in the new position.
Also check that Camera default storage is the newly chosen internal or external storage as you prefer.
- How to turn a portable SD card into internal storage via ADB command?
- How to use microSD as internal storage in an Android phone