Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,779,915 Members 37,389 Now Online
XDA Developers Android and Mobile Development Forum

Use internal sdcard as dalvik-cache

Tip us?
 
1N4148
Old
#1  
Senior Member - OP
Thanks Meter 90
Posts: 285
Join Date: Dec 2012
Location: Trust me, I'm an engineer ;)
Default Use internal sdcard as dalvik-cache

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;
 
Lt1streconbn
Old
#2  
Member
Thanks Meter 14
Posts: 38
Join Date: Nov 2013
Location: St. Thomas, Virgin Islands
Awesome... I just needed it for assigning block on dalvik in my beta app. Works great!
Devices
Samsung Galaxy S5 (SM-G900A)
Samsung Galaxy S4 (SGH-I337)
Samsung Galaxy S3 (SGH-I747)
Samsung Galaxy Tab 2 WiFi (GT-P5110)
Samsung Galaxy Tab 2 (SGH-I497)
Samsung Galaxy Tab 3 8.0 WiFi (SM-T310)
Samsung Galaxy Note 10.1 WiFI (GT-N8013)
Samsung Galaxy Note (SGH-I717)
Samsung Infuse 4G (Retired)
You get the idea... several of each... too many
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes