Post Reply

Use internal sdcard as dalvik-cache

8th February 2014, 06:01 PM   |  #1  
OP Senior Member
Flag Trust me, I'm an engineer ;)
Thanks Meter: 91
 
287 posts
Join Date:Joined: Dec 2012
More
As I cannot use the internal sdcard with CM11, I've made a small script which mounts the internal sdcard as /data/dalik-cache to get more free space for apps & app-data.

WARNING: Only for users who are familiar with adb as you can probably brick your device!

Installation is a bit tricky, maybe someone makes an installer. All steps are done over adb

First format the internal sdcard with ext4: mke2fs -t ext4 /dev/block/mmcblk0p23
Copy script below to /data/local/userinit.sh (e.g. adb push userinit.sh /data/local/userinit.sh)
chmod 755 /data/local/userinit.sh

Reboot and let dalvik cache recreate. After this happend, reboot into recovery, wipe dalvik-cache and enjoy the 200MB more free space in data for apps.

Code:
#!/system/bin/sh
busybox mount -t ext4 -o noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p23 /data/dalvik-cache;
mountext=`busybox mount | egrep 'ext2|ext3|ext4'`;
if [ -n "$mountext" ]; 
then
busybox chown 1000:1000 /data/dalvik-cache;
busybox chmod 771 /data/dalvik-cache;
fi;
sync;
15th February 2014, 08:42 PM   |  #2  
Member
Flag St. Thomas, Virgin Islands
Thanks Meter: 15
 
60 posts
Join Date:Joined: Nov 2013
More
Thumbs up
Awesome... I just needed it for assigning block on dalvik in my beta app. Works great!
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Galaxy Mini II Android Development by ThreadRank