Many Android Devices come with Internal Storage as Primary used partition for store their DATA / OBB. This is not a problem for device has come with Huge Internal Storage, but this is a Real Pain with Devices that come with Low Internal Storage.
When you searching at google, i'm sure you found many way to change vold.fstab file. It works!, and after restart your Internal Storage /SDCARD0 has been Swapped to /SDCARD1, and when you check at Settings-Storage they will display Internal Storage space has been filled up with your SDCARD value.
At this state, it still bugging me because there is no way to Unmount SDCARD like as usual. So i'm searching a way to change this, and my assumption is framework has value about this. I know this because when i'm trying to porting my MT6572 Android 4.2.2 that come with SDCARD as Primary Storage, it got flipped/Swapped. Then i found storage_list.xml at xml folder in framework-res.apk handle the value of Storage. After that, i'm modify some value in storage_list.xml my SDCARD & Internal Storage has completely swapped and at the Setting-Storage show right value and SDCARD have Unmount SDCARD button.
So, you must Edit storage_list.xml too, not only vold.fstab file. And this is how to edit them.
*vold.fstab located at /system/etc
Replace only a word "sdcard0" with "sdcard1" and vice versa so they will look like below, and save.
dev_mount sdcard /storage/sdcard1 emmc@fat .../mtk-msdc.0/mmc_host
dev_mount sdcard2 /storage/sdcard0 auto .../mtk-msdc.1/mmc_host
*storage_list.xml located at framework-res.apk/xml
First you must decompile framework-res.apk locate and edit storage_list.xml with text editor. You can get your framework-res.apk with apps that can get root access like Root Explorer by copying framework-res.apk in /system/framework to your SDCARD. Search google for software to decompile apk that suit you, but i choose Android MultiTool with Microsoft Powerpacks installed.
default storage_list.xml look like this
<?xml version="1.0" encoding="utf-8"?> <StorageList xmlns:android="http://schemas.android.com/apk/res/android"> <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_phone" android:primary="true" android:allowMassStorage="true" /> <storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_sd_card" android:primary="false" android:removable="true" android:allowMassStorage="true" /> </StorageList>
Make a change like below and save.
<?xml version="1.0" encoding="utf-8"?> <StorageList xmlns:android="http://schemas.android.com/apk/res/android"> <storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_phone" android:primary="false" android:removable="false" android:allowMassStorage="true" /> <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:allowMassStorage="true" /> </StorageList>
Look at word android:primary value, sdcard0 must have value true, if you set this to false and sdcard1 true then you will get wrong calculating value at setting-storage, and dont forget to set android:removable="true" at sdcard0 so it have Unmount button.
After you saved your work, recompile your modiefied framework-res.apk.
Open recompiled framework-res.apk with 7zip and pull out storage_list.xml to desktop.
Open Original framework-res.apk with 7zip and drag storage_list.xml from desktop and drop at xml folder. Doing this will replace old storage_list.xml. This an old trick to modified framework-res.apk and this the file that will we used.
And now to push original modified framework-res.apk to its place
- This is easy trick to replace framework-res.xml at android /system/framework folder
- Put our modified framework-res.apk to sdcard
- Copy framework-res.apk to /system instead of /system/framework
- Change permission of our framework to rw-r-r
[R][W][ ]
[R][ ][ ]
[R][ ][ ]
- Copy framework-res.apk with chaged permission to /system/framework
- Restart device
Source:
Android MultiTool - XDA Page
Microsoft Powerpacks Download
7Zip Download