Note: This is probably only helpful for people with a computer science or linux hacking background!
We all know the single biggest issue with this phone is the lack of internal memory for apps and app data. The internal partitioning looks like this:
persona78 provided an excellent mod of the (most recent) stock ROM that gives you root and a working init.d:
https://forum.xda-developers.com/ascend-g6/general/root-upadtekinguser-zip-modded-extras-t3349679
This mod also enables to move apps to a new ext4 partition on the external SD card. My experience however is:
So I propose the following solution, successfully tested on my phone, that will use just short of 6 GB on the internal SD card for dalvik cache, apps and their data!
This is how to do it:
Now in mass storage mode do the following:
On the phone you can now change back the USB mode to MTP (but not to charge only -- a data mode is needed for adb to work).
Now run adb shell and obtain root in the shell via 'su'. In the adb root shell:
Content of /etc/init.d/01AOBoot:
Explanation: Apps and their data need to reside on an ext4 partition. sdcard0 however has to be vfat, otherwise the phone will always complain and ask to format it. We can also not change the internal storage partitioning. Therefore we simply hide a large ext4 filesystem behind a small vfat filesystem on the same partition. Apps will startup fast and run fast, and all media files can be put on the external sd card.
I know this is very exotic to most, but maybe there are a few people like me with the necessary background who would like to follow my example. Happy hacking!
We all know the single biggest issue with this phone is the lack of internal memory for apps and app data. The internal partitioning looks like this:
- /system 1 GB
- /data 2 GB
- sdcard0 4 GB -- lots of space that competes with external SD! Let's use it!
- other stuff (tmp, boot, etc.) 1 GB
persona78 provided an excellent mod of the (most recent) stock ROM that gives you root and a working init.d:
https://forum.xda-developers.com/ascend-g6/general/root-upadtekinguser-zip-modded-extras-t3349679
This mod also enables to move apps to a new ext4 partition on the external SD card. My experience however is:
- dalvik cache and app data (e.g. some social media apps caching videos etc.) will still fill up the /data partition
- access to external SD, even a fast one, is much slower
- if you also move app data to external SD, the phone becomes unusable (slow)
So I propose the following solution, successfully tested on my phone, that will use just short of 6 GB on the internal SD card for dalvik cache, apps and their data!
This is how to do it:
- backup everything important from the phone
- unlock bootloader and install the ROM from persona78, linked above. Make sure root works, adb works.
- connect to a Linux machine via USB that has adb installed
- select mass storage mode on the phone in the USB settings
Now in mass storage mode do the following:
- the phone exposes a block device without partitioning (e.g. /dev/sdb) and a block device with partitioning (e.g. /dev/sdc, /dev/sdc1). the former is the internal storage (sdcard0), the latter external storage (sdcard1).
- mount /dev/sdb to /mnt/internal and /dev/sdc1 to /mnt/external
- rsync -a /mnt/internal/ /mnt/external/
- umount /dev/sdb
- mkfs.vfat -C /var/tmp/vfat 256000
- dd if=/var/tmp/vfat of=/dev/sdb bs=1M (you can delete /var/tmp/vfat after this)
- losetup /dev/loop0 /dev/sdb -o 262144000
- mkfs.ext4 /dev/loop0
On the phone you can now change back the USB mode to MTP (but not to charge only -- a data mode is needed for adb to work).
Now run adb shell and obtain root in the shell via 'su'. In the adb root shell:
- mkdir -p /data/sdext4
- losetup -o 262144000 /dev/block/loop7 /dev/block/mmcblk0p25
- mount -t ext4 /dev/block/loop7 /data/sdext4
- in /data/sdext4, create two directories called 'data-app' and 'data-data'. Give them the respective permissions and group,ownership as with the current /data/app and /data/data directories.
- cp -a /data/app/* /data/sdext4/data-app
- cp -a /data/data/* /data/sdext4/data-data
- rm -r /data/app/* /data/data/*
- mount -o remount,rw /system
- edit /etc/init.d/01AOBoot as follows
Content of /etc/init.d/01AOBoot:
Now run adb reboot. It is done.#!/system/bin/sh
CONCURRENCY=makefile
# mount sdext4
losetup -o 262144000 /dev/block/loop7 /dev/block/mmcblk0p25
mount -t ext4 /dev/block/loop7 /data/sdext4
mount -o bind /data/sdext4/data-app /data/app
mount -o bind /data/sdext4/data-data /data/data
# change dalvik permissions
chmod 773 /data/dalvik-cache
# change scaling_min_freq to 300000
echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
Explanation: Apps and their data need to reside on an ext4 partition. sdcard0 however has to be vfat, otherwise the phone will always complain and ask to format it. We can also not change the internal storage partitioning. Therefore we simply hide a large ext4 filesystem behind a small vfat filesystem on the same partition. Apps will startup fast and run fast, and all media files can be put on the external sd card.
I know this is very exotic to most, but maybe there are a few people like me with the necessary background who would like to follow my example. Happy hacking!
Last edited: