Home » , » HOWTO - remount /data and /cache with discard and (optionally) noauto_da_alloc

HOWTO - remount /data and /cache with discard and (optionally) noauto_da_alloc

Im using this tweak on my nexus7 and works ok on Cherry Mobile flare too. 

Requirements - rooted, working busybox (see howto regarding busybox), init.d support (see tutorial regarding init.d support)
on your PC create a file called 85SecretSauce (or anyfilename that suits your taste, must contain two digit numbers first as it is used by the init.d)
contents of the file should be this -
#re-mount /data and /cache with discard and (optionally) noauto_da_alloc
#(does give a slight performance increase, especially when working with
mount -o remount,discard,noauto_da_alloc /data /data
mount -o remount,discard,noauto_da_alloc /cache /cache
transfer it to /system/etc/init.d and with permissions 755, reboot and enjoy!
how to check if it works -
C:\\Users\\ryanrudolf\\Downloads>adb shellshell@android:/ $ mount | grep discard
mount | grep discard
/dev/block/mmcblk0p13 on /data type ext4 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered,noauto_da_alloc,discard,noinit_itable)
/dev/block/mmcblk0p15 on /cache type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered,noauto_da_alloc,discard)shell@android:/ $
Thank you for viewing! Please share this post to your friends.