I don't want all my external SD card as adopted/internal storage, so I was wondering how I can split it into 1 part adopted storage and 1 part normal file storage (what Android calls "portable storage").
You don't need to root your device but the device i done this with is rooted
- You need to enabled Developer Options.
- Enable the USB Debugging option.
- Make sure your SD card is formatted as portable, then get the
adbexecutable (see our adb tag-wiki for details).
- Connect your device to your PC and run the
adb devicescommand. If your device is connected correctly you will see your device listed in the output.
adb shell sm list-disks adoptable. This will show you the list of disks that can be used for what we want.
- For my device it showed me
disk:179,128so i ran
adb shell sm partition disk:179,128 mixed 80on my 32 GB AS card. It gave me 5 GB as adoptable storage and the rest for other uses. (This will format your SD card.)
poqdavid's answer is correct.
In addition though, you might get the error that your SD card on your device storage is corrupted. If so, follow these steps.
After you have partitioned the disk and while your SD card is corrupted, enter the following commands in the terminal which will list your volumes, for example:
$> adb shell sm list-volumes all private mounted null public:179,1 mounted B5B1-140C private:179,3 unmountable null emulated mounted null
Then enter the following replacing
179,3 with whichever disk numbers you are given:
$> adb shell sm format private:179,3 $> adb shell sm mount private:179,3
Now your SD card in device storage should be properly mounted and your portable storage will still be there.
This worked on my LG G5 and should work on the Samsung Galaxy S7.