• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root DEVs Save End User Headaches Add This to update-script

punkmaxx

Android Enthusiast
Aug 23, 2011
475
291
West Virginia
DEVs Save End User Headaches Add This to the beginning of your update-script in your ROM, it clears /cache and Dalvik Cache while telling the user what is happening.

ui_print("Cleaning and /cache...");
run_program("/sbin/mount", "/dev/block/mmcblk0p11", "/cache");
format("ext3", "EMMC", "/dev/block/mmcblk0p11");
run_program("/sbin/umount", "/dev/block/mmcblk0p11", "/cache");
ui_print("Cleaning dalvik-cache on /data");
run_program("/sbin/mount", "/dev/block/mmcblk0p8", "/data");
run_program("/sbin/busybox", "rm", "-rf", "/data/dalvik-cache");
run_program("/sbin/umount", "/dev/block/mmcblk0p8", "/data");
show_progress(0.500000, 0);
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones