[SCRIPT][DALVIK] System Dalvik Cache Mover V0.5 (25122012)

Status
Not open for further replies.

Alberto96

Recognized Developer
Feb 24, 2010
8,291
17,326
263
24
Modugno (BA)
This script moves System Dalvik Cache in /cache partition (useful for Phones that saves system dalvik in /data partition and have a little /data partition, ex. Huawei U81xx)

You need a rooted phone and init.d support (if you want to use this as init.d script), otherwise you can run this via Script Manager.

Code:
#!/system/bin/sh
#Dalvik Cache Saver by Alberto96

if [ -d /cache/dalvik-cache ]; 
	then
	cd /data/dalvik-cache
	busybox find /data/dalvik-cache -type l -exec rm -f {} \;
	cp -a [email protected]* /cache/dalvik-cache
	rm -r -f [email protected]*
	busybox find /cache/dalvik-cache/* -type f -exec cp -f -s {} /data/dalvik-cache/ \;
else
	mkdir /cache/dalvik-cache
	cd /data/dalvik-cache
	busybox find /data/dalvik-cache -type l -exec rm -f {} \;
	cp -a [email protected]* /cache/dalvik-cache
	rm -r -f [email protected]*
	busybox find /cache/dalvik-cache/* -type f -exec cp -f -s {} /data/dalvik-cache/ \;
fi
 
Last edited:

Alberto96

Recognized Developer
Feb 24, 2010
8,291
17,326
263
24
Modugno (BA)
New version is out V0.5 ! Now is compatible with all Busybox versions and works better then previous version that causes bootloop at third boot :eek: (too many symlinks)
 
Last edited:

Sahaab

Senior Member
May 14, 2013
3,722
3,496
0
24
London ON
This script moves System Dalvik Cache in /cache partition (useful for Phones that saves system dalvik in /data partition and have a little /data partition, ex. Huawei U81xx)

You need a rooted phone and init.d support (if you want to use this as init.d script), otherwise you can run this via Script Manager.

Code:
#!/system/bin/sh
#Dalvik Cache Saver by Alberto96

if [ -d /cache/dalvik-cache ]; 
	then
	cd /data/dalvik-cache
	busybox find /data/dalvik-cache -type l -exec rm -f {} \;
	cp -a [email protected]* /cache/dalvik-cache
	rm -r -f [email protected]*
	busybox find /cache/dalvik-cache/* -type f -exec cp -f -s {} /data/dalvik-cache/ \;
else
	mkdir /cache/dalvik-cache
	cd /data/dalvik-cache
	busybox find /data/dalvik-cache -type l -exec rm -f {} \;
	cp -a [email protected]* /cache/dalvik-cache
	rm -r -f [email protected]*
	busybox find /cache/dalvik-cache/* -type f -exec cp -f -s {} /data/dalvik-cache/ \;
fi
Do i have to wipe dalvik cache?
Also could u post it in a file? i have made a file, im not sure if it is working right
And if this works i would like to post this in ARC section, will give u full credit, i just think this script will be awesum
 

Alberto96

Recognized Developer
Feb 24, 2010
8,291
17,326
263
24
Modugno (BA)
Do i have to wipe dalvik cache?
Also could u post it in a file? i have made a file, im not sure if it is working right
And if this works i would like to post this in ARC section, will give u full credit, i just think this script will be awesum
No, no need to wipe. This script is useful for stock roms. For CyanogenMod you can use directly "dalvik.vm.dexopt-data-only=0" in build.prop.
 

Sahaab

Senior Member
May 14, 2013
3,722
3,496
0
24
London ON
No, no need to wipe. This script is useful for stock roms. For CyanogenMod you can use directly "dalvik.vm.dexopt-data-only=0" in build.prop.
I am using stock
It doesnt seem to work
Could u change it to dev partition?
And also edit it sum what to make it work on my arc s plz
I will help u with the testing
Thankks for all ur help
 

Alberto96

Recognized Developer
Feb 24, 2010
8,291
17,326
263
24
Modugno (BA)
I am using stock
It doesnt seem to work
Could u change it to dev partition?
And also edit it sum what to make it work on my arc s plz
I will help u with the testing
Thankks for all ur help
This is only working with MTD Partition Table. Your ARC is newer and this script is useless for it. Cache in newer phones is really small and is only enough for really cache use as browsing, gallery...
 

Sahaab

Senior Member
May 14, 2013
3,722
3,496
0
24
London ON
This is only working with MTD Partition Table. Your ARC is newer and this script is useless for it. Cache in newer phones is really small and is only enough for really cache use as browsing, gallery...
My browser cache and stuff is stored in internal :-/
And my cache partition is 102mb big and always only max of 2mb is used
And dev is 170mb and hardly 0.5mb is used
That is y i need a script :-/
My data partition is basically full

Sent from my LT18i
 

Alberto96

Recognized Developer
Feb 24, 2010
8,291
17,326
263
24
Modugno (BA)
I dont know the use of dev partition (maybe is erased at every reboot). Can you run the script via script manager and give me the output?

Sent from my GT-I9500 using Tapatalk 4 Beta
 

Alberto96

Recognized Developer
Feb 24, 2010
8,291
17,326
263
24
Modugno (BA)
Old busybox. I will update the script for older busybox. For be sure download busybox installer and install busybox 1.21.0 with all symlinks

Sent from my GT-I9500 using Tapatalk 4 Beta
 

Sahaab

Senior Member
May 14, 2013
3,722
3,496
0
24
London ON
Tried a lot but it isnt working in cache
It does get transfered to cache partition but all the system app FC meaning that the dalvik cache arent being read

Sent from my LT18i

---------- Post added at 11:41 AM ---------- Previous post was at 11:38 AM ----------

I will test it with bew busybox and eventually fix it soon.

Sent from my GT-I9500 using Tapatalk 4 Beta
Is there any fix for the cache prob?
Bcuz i think /dev is formatted at boot
It works fine in /dev but at each boot i have to wipe dalvik or else it bootloops :-/

Sent from my LT18i
 
Status
Not open for further replies.