[Q] Can You Wipe Dalvik Cache via command in update-script?

Search This thread

tehseano

Senior Member
Jan 23, 2009
829
16
I've searched, but most of the posts are either asking "how to wipe it via adb" and then the thread gets sent into a different direction, and isn't directly answering my question.

I have an update.zip that just does all my wipes in one click, rather than having to wipe data/cache, then system, boot, and dalvik. Instead, I just run the update, it formats them all, makes life easier for me.

anyways I want to know if I can add a command in to wipe dalvik cache? Thanks in advance for any replies!
 

funkeee

Senior Member
May 25, 2010
292
13
I don't see why not; Titanium Backup has a function that can do it for you.

I don't know the partition block for dalvik cache on the g2. But the command would look something like:

su
mount -o rw /dev/block/mmcblk[xxx] /sdcard/
rm -r /sdcard/dalvik-cache/*
 

KCRic

Senior Member
Aug 4, 2010
1,230
268
Overland Park
CWM has an option under advanced that clears the dalvik cache - if you're using an update script then you must already be using CWM, seems pointless to me but I can see not wanting to have the extra steps.

Anyway, if you really want to know what script to use then just break apart CWM and the scripts should be in there. I have one from my MT3GS (pre s-off, so it's an update.zip not an image) which should be easier to tear apart but I don't know if the partitions are the same as the G2.

You can either write this into the update-script or tell the update-script to execute a .sh file which is written with linux commands so it easier to do if you're not familiar with update scripting. Just an fyi.
 

matteof93

Senior Member
Aug 26, 2011
660
248
Bagnolo Piemonte, ITA
i am trying to make a script for optimus one to wipe dalvik cache and cache at boot.
the dalvik is on the ext4 partition on the sd.
how can i write a working script?
 

Zilliman

Senior Member
Sep 12, 2013
196
18
He asked to clear his Dalvik cache but you are showing how to delete system, and data ? What happens if you delete "system" ? Will the phone even boot afterwards?
 

fndpena

Senior Member
Nov 11, 2012
780
207
Montréal
This is what I use for the wipes in updater-script:
Code:
delete_recursive("/cache");
delete_recursive("/data");
delete_recursive("/system");
delete_recursive("/data/dalvik-cache");

This is a dumb question and I probably know the answer, but I'll ask anyway...

"delete_recursive("/data/dalvik-cache");" will only delete the content inside dalvik-cache folder, right?
 

Top Liked Posts