[SCRIPT] Move dalvik-cache to /cache - Nexus S Android Development

THANKS TO CALKULIN
Stock and aosp roms don't hold the dalvik-cache in /cache, only cm does (but only system apps).
Putting dalvik on /cache is better for me because it is yaffs2. /data is ext4.
The script in the linked zip will move your dalvik-cache to /cache, where i think it belongs anyway.
WHAT THE SCRIPT DOES:
This symlinks your /data/dalvik-cache to /cache. Basically writes the dalvik-cache to the cache partition, as opposed to having it be on the userdata partition(where your apps and the data for them are stored). So after this script, you will free up 40 + megabytes of data.
Now our Nexus S cache size is 417 mb so we have plenty of room for our dalvik to live there. Plus your dalvik is wiped upon reboot. The cache is so big primarily because Over-the-Air updates will download to it.
Works on Stock and AOSP roms that have /etc/init.d support.
------------------------------------------------
(Flashing a different kernel other than secure Stock will do this. This option is set in the ramdisk)
Ramdisk + zImage = boot.img
------------------------------------------------
*busybox is needed
**your wipe dalvik-cache function in recovery will stay intact as recovery already wipes the /cache/dalvik-cache directory by default.
INSTALL:
1. Extract and put in /etc/init.d with correct permissions--->750
2. Boot to recovery, wipe dalvik-cache, then reboot
http://db.tt/n2hwyBj

Uncle Jimmy says Hello

the dalvik cache already partially exists in /cache/dalvik-cache/ and in /data/dalcik-cache/. if you move the whole thing there, you wont be able to use the wipe dalvik option in recovery, because it wont look for it there. you will have to wipe it manually every time. also, whats the point of moving it there? you wont gain anything from it.

simms22 said:
the dalvik cache already partially exists in /cache/dalvik-cache/ and in /data/dalcik-cache/. if you move the whole thing there, you wont be able to use the wipe dalvik option in recovery, because it wont look for it there. you will have to wipe it manually every time. also, whats the point of moving it there? you wont gain anything from it.
Click to expand...
Click to collapse
Yaffs2 is my friend

snandlal said:
Yaffs2 is my friend
Click to expand...
Click to collapse
aha! you edited your first post
for those people that dont know what Yaffs2 is http://en.wikipedia.org/wiki/YAFFS

Ya had to add it in

simms22 said:
aha! you edited your first post
for those people that dont know what Yaffs2 is http://en.wikipedia.org/wiki/YAFFS
Click to expand...
Click to collapse
Okay, read some of that but I am not savvy enough to know how that helps us. Could you explain a little more about the application of yaffs2 to our phones?
Sent from my Nexus S 4G using xda premium

Could you make a list describing what it does, it would be easier for the end users.

It moves dalvik to a more reliable faster filesystem.
It keeps the dalvik clean by having it on /cache. Reboots are considered cleaning cache.
It puts a "cache"(dalvik) to an actual cache

rebooting now, lets see how she runs
Edit: digging it so far. Thanks

So this will work on nexus s4g right?
Sent from my CM7 powered Nexus S 4g using XDA Premium App

If I got it right, this scripts is suppose to move the dalvik cache from /data/dalvik-cache to cache/dalvik-cache.
I wanted to test this, so I followed the instructions from the OP. But the problem is, now I have it in /cache/dalvik-cache and still in the /data/dalvik-cache.
If I delete the files manually from the /data/dalvik-cache, they are recreated on reboot. It doesn't make sense for me to have the double dalvik - or am I missing something?

brainmaster said:
If I got it right, this scripts is suppose to move the dalvik cache from /data/dalvik-cache to cache/dalvik-cache.
I wanted to test this, so I followed the instructions from the OP. But the problem is, now I have it in /cache/dalvik-cache and still in the /data/dalvik-cache.
If I delete the files manually from the /data/dalvik-cache, they are recreated on reboot. It doesn't make sense for me to have the double dalvik - or am I missing something?
Click to expand...
Click to collapse
Exactly what i was thinking, any thoughts op?

As I know, not the complete dalvik can moved. Thats the same as it on the Nexus One was.
I've been trying this now out. Hoping that the Nexus S doesn't become sluggish after using some apps.
For now it looks good, but we need more testings.

brainmaster said:
If I got it right, this scripts is suppose to move the dalvik cache from /data/dalvik-cache to cache/dalvik-cache.
I wanted to test this, so I followed the instructions from the OP. But the problem is, now I have it in /cache/dalvik-cache and still in the /data/dalvik-cache.
If I delete the files manually from the /data/dalvik-cache, they are recreated on reboot. It doesn't make sense for me to have the double dalvik - or am I missing something?
Click to expand...
Click to collapse
What a dumb conclusion! It is definitely still to early for me.
Of course - when you simlink the /data/dalvik-cache to /cache/dalvik-cache, the files are moved to the /cache/dalvik-cache, but as they are symlinked, the file system shows them as present on /data/dalvik-cache.
Dalvik is not double presented on the Phone.
Run the command in Terminal or adb:
Code:
adb shell
df -h
This is the result:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you can see on the screenshot, the Dalvik cache is bounded to /cache partition, and it shows identical values for the /cache and /data/dalvik-cache partitions.
The /data partition itself has completely different values.
@ OP - this can also be achieved with the far simpler script, that I'm using:
Code:
#!/system/bin/sh
#
# relocate dalvik-cache to /cache/dalvik-cache
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# create symlink
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
I'm gonna include this in my next MIUI ROM.

Very nice!

Well done, BrainMaster
Thanks snandlal for bringing this into Nexus S community

Calkulin's the man

brainmaster said:
What a dumb conclusion! It is definitely still to early for me.
Of course - when you simlink the /data/dalvik-cache to /cache/dalvik-cache, the files are moved to the /cache/dalvik-cache, but as they are symlinked, the file system shows them as present on /data/dalvik-cache.
Dalvik is not double presented on the Phone.
Run the command in Terminal or adb:
Code:
adb shell
df -h
This is the result:
As you can see on the screenshot, the Dalvik cache is bounded to /cache partition, and it shows identical values for the /cache and /data/dalvik-cache partitions.
The /data partition itself has completely different values.
@ OP - this can also be achieved with the far simpler script, that I'm using:
Code:
#!/system/bin/sh
#
# relocate dalvik-cache to /cache/dalvik-cache
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# create symlink
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
I'm gonna include this in my next MIUI ROM.
Click to expand...
Click to collapse
Man your really the **** lol. Can u please make your rom ns4g compatible
Sent from my CM7 powered Nexus S 4g using XDA Premium App

Esteway.619 said:
Man your really the **** lol. Can u please make your rom ns4g compatible
Sent from my CM7 powered Nexus S 4g using XDA Premium App
Click to expand...
Click to collapse
Working on it.

Related

How do I completly clear out my ext2 partition through Terminal emulator

I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
well you can try flashing LucidREM mod that has the files for mounting it located here and instead of using the copy.sh app first try this.
$su
# cd /system/sd
# ls -la
check if the app folder is there if it is than
# cd app
#ls
check if the files are there.. and if they exist than try this
# rm -rf /data/app
# ln -S /system/sd/app /data/app
# reboot
hope that helps and it u still want to wipe the ext2 parttition than jut
# rm -rf /system/sd/*
or
# rm -a /system/sd/*
Nitro212 said:
well you can try flashing LucidREM mod that has the files for mounting it located here and instead of using the copy.sh app first try this.
$su
# cd /system/sd
# ls -la
check if the app folder is there if it is than
# cd app
#ls
check if the files are there.. and if they exist than try this
# rm -rf /data/app
# ln -S /system/sd/app /data/app
# reboot
hope that helps and it u still want to wipe the ext2 parttition than jut
# rm -rf /system/sd/*
or
# rm -a /system/sd/*
Click to expand...
Click to collapse
I have problems when I get to ln -S /system/sd/app /data/app
it says link failed no such file exists
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
I kinda had the same question but was wondering if there was an easier way of wiping the ext2 partition? I'm kinda new at all this and am now starting to get the hang of flashing different roms onto my phone but I realized that doing an Alt+W before flashing new roms does not wipe the ext2 partition. (At least I'm pretty sure it doesn't.)
I'm not too savvy on using terminal yet..I've heard of using adb but I don't even know where to begin with that..so I was wondering if going into Paragon Partition Manager and just formatting the ext2 partition will work? Any info will be greatly appreciated.
Ok i finally have it working. I keep getting a social network force close.
wiping an ext2/ext3 partition
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
there is an app on the market called lucid REM that runs his script via terminal emulator. after getting it and running it you can go to terminal and type
su
lucid -c (this wipes ext2/3 partition)
hopefully this helps you. if you are on a rom that uses auto a2sd then you will most likely getting force closes all over until you flash your new rom.
I posted a thread with steps to do it http://forum.xda-developers.com/showthread.php?t=533731
Code:
Open console and enter the following commands. Press "Enter" after each line. This wipes the ext partition.
mount -o rw /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/
[code]
Glad this wasnt deleted right away, maybe it can just be moved?
It helped because I also was wondering the best way of doing this, and now I know.
Thanks .
Odd, double post for no reason. Sorry delete this post?

Wiping EXT3

I know I've read this somewhere but is there a cleaner & simpler way to wipe an EXT3 partition??
*Yes I have searched but the recommended way didnt work*
I wanted to install the new JAC Sense build, I thought I wiped properly, & ran wipe from console but then once the build was fully booted up, GUESS WHAT my apps & stuff were still in there! Double wether app & other stuff I ma sure was causing issues from my old build & everything...I finally just blew everything out in parted & started again...but for next time
I did follow these instructions:
mount -o rw /dev/block/mmcblk0p2 /system/sd
mount /system/
mount /data/
rm -rf /data/*
rm -rf /system/sd/*
But i did get an error about lost+found after running the rm -rf /data/*
I know I did something wrong what was it?? I dont see it...
do this in the recovery console to completely wipe your ext3 partition
Code:
mke2fs -j /dev/block/mmcblk0p2
Grab the RA recovery from my sig.
RA-dream-recovery is sooo convenient.

Dalvik-cache in /cache

I've seen in some ROMs for other phones (like Cyanogen and Enomther's ROMs) that they implement a hack that moves the dalvik-cache into the /cache partition, thus freeing up a lot of space in /data (and virtually eliminating the need for a2sd). I'm wondering if anyone has thought of or knows how to do that? I think it'd be a great addition to any ROM.
adb shell
busybox cp -a /data/dalvik-cache /cache/delvik
reboot recovery
adb shell
mount cache
rm -rf /data/dalvik-cache
ln -s /cache/dalvik/dalvik-cache /data/dalvik-cache
should work
Dont know about after reboot though.
Me personally I just moved it all to the sd ext2.
Dalvik and system apps also.
smstutler said:
adb shell
busybox cp -a /data/dalvik-cache /cache/delvik
reboot recovery
adb shell
mount cache
rm -rf /data/dalvik-cache
ln -s /cache/dalvik/dalvik-cache /data/dalvik-cache
should work
Dont know about after reboot though.
Me personally I just moved it all to the sd ext2.
Dalvik and system apps also.
Click to expand...
Click to collapse
Cool! Now to make that survive a reboot, it would have to be written into the boot.img, or in a script that is called in the boot.img correct?
That I dont know. I was wondering how to utilize all the free space I have better. Just a heads up though dalvik on my system is 60megs.
smstutler said:
That I dont know. I was wondering how to utilize all the free space I have better. Just a heads up though dalvik on my system is 60megs.
Click to expand...
Click to collapse
Exactly why moving it to cache would be ideal, as far as my limited knowledge of this understands. That frees up about 60mb of space in /data.
smstutler said:
I was wondering how to utilize all the free space I have better.
Click to expand...
Click to collapse
Honestly, the best use for the internal memory would be to leave the dalvik cache on it. It consists of files that have already been preprocessed by the VM specifically with the intention of improving performance. Moving that from the internal memory to the slower sd card.... It ain't gonna help....
If your trying to tweak performance, you're much better off looking for other things you can move to create more space for the cache....
Isn't /cache just a separate partition in the internal memory?
mrinehart93 said:
Isn't /cache just a separate partition in the internal memory?
Click to expand...
Click to collapse
I assumed he had symlinked it over to the sd card. Generally the only benefit to be gained by moving files around is by putting things on the (slow) sd card to free up the (faster) internal memory.
If that's not what we're talking about, then the end result would be exactly nill...
subliminalurge said:
I assumed he had symlinked it over to the sd card. Generally the only benefit to be gained by moving files around is by putting things on the (slow) sd card to free up the (faster) internal memory.
If that's not what we're talking about, then the end result would be exactly nill...
Click to expand...
Click to collapse
Actually I have seen no performance hit as I can tell by running it internally or on sd card.
smstutler said:
Actually I have seen no performance hit as I can tell by running it internally or on sd card.
Click to expand...
Click to collapse
That's certainly possible. Are you using the stock sd card?
I still stand behind my assertion that the dalvik cache is the wrong thing to be moving if the goal is to improve performance. (Well, unless you somehow have an sd card that operates faster than the internal memory...)
And your statement that you see no performance hit one way or the other is kind of just another way of saying what I said... The result was nill.....
subliminalurge said:
That's certainly possible. Are you using the stock sd card?
I still stand behind my assertion that the dalvik cache is the wrong thing to be moving if the goal is to improve performance. (Well, unless you somehow have an sd card that operates faster than the internal memory...)
And your statement that you see no performance hit one way or the other is kind of just another way of saying what I said... The result was nill.....
Click to expand...
Click to collapse
Right I get your point. But now on to the better thing. Possibly moving some music files to internal since I have seen complaints of hiccups when playing tunes. I cant think of any other benefits as of yet. Was just curious as to if it could be done so I did it. I am using a class 4 card I have a 6 but it is a tad bad so it is of no use. Now as for moving the dalvik to the /cache, that seems like it would be the better idea, since i have yet to see my cache used much at all.
smstutler said:
Now as for moving the dalvik to the /cache, that seems like it would be the better idea, since i have yet to see my cache used much at all.
Click to expand...
Click to collapse
I haven't really monitored the usage, although it shouldn't change much.
I'm also new to Android, but I have a good number of years under my belt both adminning Linux machines and developing Java apps (amongst other things...).
I've done a bit of reading on how the Dalvik VM works, and I can confidently tell you that you want the Dalvik cache on whatever the fastest memory in your phone is. For the vast majority of people, that will be the internal memory. If you've spent a small fortune on a super-badass sd card that is faster (like that other thread where the guy bought a class 10), then moving it would be a simple matter of symlinking that directory onto the card.
As far as your concerns with stuttering music, even the dog slow sd card that comes stock with the hero is plenty fast for playing an mp3 file. If you're having trouble there, you need to take a look at what's hogging your cpu, not what's hogging your memory....
Nah wasn't meant for me with the music on SD. I rarely use it for that. But yes I do agree with you. The SD may not be best choice but there has to be a better way to utilize some of the system memory that just sits dormant.
/dev/block/mtdblock4 130.0M 1.1M 128.9M 1% /cache
see what I mean here. 1% used.
I've tested this on my Hero, my Nexus One and on a friend's Evo.
Code:
#!/system/bin/sh
echo "++++ DALVIK 2 CACHE STARTING ++++"
if [ ! -d /cache/dalvik-cache ]
then
mkdir /cache/dalvik-cache
chown 1000:1000 /cache/dalvik-cache
chmod 775 /cache/dalvik-cache
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename
fi
done
mv /data/dalvik-cache/* /cache/dalvik-cache/
fi
mount -o bind /cache/dalvik-cache/ /data/dalvik-cache/
It's part of Darktremor A2SD 2.7 update 3r1.
Command: a2sd cachepart
Hacre said:
I've tested this on my Hero, my Nexus One and on a friend's Evo.
Code:
#!/system/bin/sh
echo "++++ DALVIK 2 CACHE STARTING ++++"
if [ ! -d /cache/dalvik-cache ]
then
mkdir /cache/dalvik-cache
chown 1000:1000 /cache/dalvik-cache
chmod 775 /cache/dalvik-cache
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename
fi
done
mv /data/dalvik-cache/* /cache/dalvik-cache/
fi
mount -o bind /cache/dalvik-cache/ /data/dalvik-cache/
Click to expand...
Click to collapse
tkirton said:
It's part of Darktremor A2SD 2.7 update 3r1.
Command: a2sd cachepart
Click to expand...
Click to collapse
Was there a reason you quoted me?
Hacre said:
Was there a reason you quoted me?
Click to expand...
Click to collapse
I believe tkirton quoted you because instead of ruunning the script you could simply use the Command: a2sd cachepart
In his latest release.
nfinitefx45 said:
I believe tkirton quoted you because instead of ruunning the script you could simply use the Command: a2sd cachepart
In his latest release.
Click to expand...
Click to collapse
Oh I see. Well the script I posted should work on ROMs that don't have such a feature.
True. Point taken.
Hacre said:
Oh I see. Well the script I posted should work on ROMs that don't have such a feature.
Click to expand...
Click to collapse
Newbie question
Hacre said:
I've tested this on my Hero, my Nexus One and on a friend's Evo.
Code:
#!/system/bin/sh
echo "++++ DALVIK 2 CACHE STARTING ++++"
if [ ! -d /cache/dalvik-cache ]
then
mkdir /cache/dalvik-cache
chown 1000:1000 /cache/dalvik-cache
chmod 775 /cache/dalvik-cache
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename
fi
done
mv /data/dalvik-cache/* /cache/dalvik-cache/
fi
mount -o bind /cache/dalvik-cache/ /data/dalvik-cache/
Click to expand...
Click to collapse
How can I run this script on my ROM? Please guide me to make this work.

Removing apps on SD Card

I originally was using apps2sd on my DC 2.09.01 hero. I have now decided not to use it. But when I go into applications it shows all the apps that I had installed as ex: "com.jrtstudio.automont" 0 kb. How can I remove these?
reboot into recovery and wipe your cache.
1 more question...
Once you use apps2sd is there a way to transfer those apps back to your device if you decide you no longer want those apps on your SD.
Kcarpenter said:
reboot into recovery and wipe your cache.
Click to expand...
Click to collapse
I rebooted into recovery and wiped my dalvik cache and they are still there...
Still trying to figure this all out...
Just go to dc config an disable a2sd and disable dalvik cache to sd (uncheck the buttons) then save. After that reboot it should move all ur apps and cache back to internal storage memory. That's it
-------------------------------------
Sent via the XDA Tapatalk App
roadster92 said:
Just go to dc config an disable a2sd and disable dalvik cache to sd (uncheck the buttons) then save. After that reboot it should move all ur apps and cache back to internal storage memory. That's it
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
I did that originally and it still shows the .com files...and my apps never got moved back to the phones memory.
Type the following in ADB shell:
/system/xbin/busybox rm /data/app
/system/xbin/busybox rm /data/app-private
/system/xbin/busybox mkdir /data/app
/system/xbin/busybox mkdir /data/app-private
/system/xbin/busybox chmod 755 /data/app
/system/xbin/busybox chmod 755 /data/app-private
/system/xbin/busybox cp /system/sd/app/* /data/app
/system/xbin/busybox cp /system/sd/app-private/* /data/app-private
Now your programs should be back on the SD card.
To move dalvik-cache, while in ADB Shell, type the following commands:
/system/xbin/busybox rm /data/dalvik-cache
/system/xbin/busybox mkdir /data/dalvik-cache
/system/xbin/busybox chmod 755 /data/dalvik-cache
/system/xbin/busybox cp -f /system/sd/dalvik-cache/* /data/dalvik-cache
Now, your phone is now using internal storage. Reboot the phone to make sure the changes stay (make sure the A2SD and Dalvik-Cache to SD is off in Dconfig).
If that doesn't work, download Darktremor A2SD 2.7 Update 3. Once that is flashed and you have your phone booted, type the following in an ADB shell:
a2sd remove
That will move everything back to internal storage and sets a flag (called .noa2sd) on your SD card to prevent the data from being moved again (until you reactivate it using a2sd install)
Hope that helps.
fifedogg said:
I did that originally and it still shows the .com files...and my apps never got moved back to the phones memory.
Click to expand...
Click to collapse

[SCRIPT][DALVIK] System Dalvik cache script 0.0.1

Hi Folks,
By request from a friend i've created a sh script to move all [email protected] dalvik cache files to /cache/dalvik-cache because some roms store [email protected] dalvik files in /data/dalvik-cache. So for those that need or wont to save some space in /system follow this steps:
1 - You need a rooted phone
2 - You need terminal emulator
3 - Download script from here
4 - Open terminal, navigate to where you downloaded the script and run sh dalvik.sh
5 - Reboot
!!Warning!!
Only run script in roms that store [email protected] dalvik files in /data/dalvik-cache otherwise you will experience some bugs in aplications.
Please post your feedback please
Thanks to HeD_pE for testing!
Cheers,
h4ck3dm1nd
Sorry I can't find the links
http://forum.xda-developers.com/showthread.php?p=32360919#post32360919
his other post...
[email protected]:/ # su
[email protected]:/ # cd /data/dalvik-cache
[email protected]:/data/dalvik-cache # mv [email protected]* /cache/dalvik-cache
failed on '[email protected]@[email protected]' - Cross-device link
255|[email protected]:/data/dalvik-cache #
I have [email protected] dalvik stuff in /data/dalvik cache and I've created folder /cache/dalvik-cache. Android: CM9.1 miroslav. Ideas?
prwnd said:
[email protected]:/ # su
[email protected]:/ # cd /data/dalvik-cache
[email protected]:/data/dalvik-cache # mv [email protected]* /cache/dalvik-cache
failed on '[email protected]@[email protected]' - Cross-device link
255|[email protected]:/data/dalvik-cache #
I have [email protected] dalvik stuff in /data/dalvik cache and I've created folder /cache/dalvik-cache. Android: CM9.1 miroslav. Ideas?
Click to expand...
Click to collapse
I'm having the same problem but with AIME.apk file. I'm using AOSP v1.2 by miroslav
prwnd said:
[email protected]:/ # su
[email protected]:/ # cd /data/dalvik-cache
[email protected]:/data/dalvik-cache # mv [email protected]* /cache/dalvik-cache
failed on '[email protected]@[email protected]' - Cross-device link
255|[email protected]:/data/dalvik-cache #
I have [email protected] dalvik stuff in /data/dalvik cache and I've created folder /cache/dalvik-cache. Android: CM9.1 miroslav. Ideas?
Click to expand...
Click to collapse
Hi,
Sorry but i do not check GT540 forum to often, I realised that if you create the /cache/dalvik-cache folder and run the script after it it will create the same folder again and in root explorer you can see the folders with the exact same name, So please backup your ROM, move all dalvik cache from /cache to its original folder, remove any symlinks and without creating the /cache/dalvik-cache folder run the script please.
In the attachment I share the scripts that Worked for me in order to move dalvik-cache to /cache (or to /dev).
Just put the one you want on /system/etc/init.d and set permissions to 777. Reboot to recovery, wipe cache and dalvik-cache and reboot to system again. Done =D
coto39 said:
In the attachment I share the scripts that Worked for me in order to move dalvik-cache to /cache (or to /dev).
Just put the one you want on /system/etc/init.d and set permissions to 777. Reboot to recovery, wipe cache and dalvik-cache and reboot to system again. Done =D
Click to expand...
Click to collapse
using your script, and it works. tq m8. using optimus 2x
The script is pretty easy to create.
# /system/bin/sh
rm /data/dalvik-cache/*
reboot
Use su binary.
Save it has a .sh file and then chmod 755 the file so you can run it via terminal.
And how do I know that?, I have experience with Linux OS.
I will upload it to my site tomorrow if I have time to also create index.php for it and update the other index.php file so it is easy to access the file to download.
EDIT: Oops, you are talking about moving, all well, this can be useful anyway.
EDIT2: Here is the link: caftp.3owl.com/Shell_Scripts/Dalvik_cache_cleaner/
andyabc said:
The script is pretty easy to create.
# /system/bin/sh
rm /data/dalvik-cache/*
reboot
Use su binary.
Save it has a .sh file and then chmod 755 the file so you can run it via terminal.
And how do I know that?, I have experience with Linux OS.
I will upload it to my site tomorrow if I have time to also create index.php for it and update the other index.php file so it is easy to access the file to download.
EDIT: Oops, you are talking about moving, all well, this can be useful anyway.
Click to expand...
Click to collapse
Oops, moderator delete this post, I accidentally ended up quoting my own post o.o
I fixed this script, but u must create before dalvik-cache folder in /cache (maybe add this to updater script) [no need anymore till V0.2 version]
Script v0.4 (can be used also as init.d script ) :
Code:
#!/system/bin/sh
#Dalvik Cache Saver by Alberto96
if [ -d /cache/dalvik-cache ];
then
cd /data/dalvik-cache
cp -a [email protected]* /cache/dalvik-cache
rm -r -f [email protected]*
find /data/dalvik-cache -type l -delete
busybox find /cache/dalvik-cache/* -type f -exec cp -f -s {} /data/dalvik-cache/ \;
else
mkdir /cache/dalvik-cache
cd /data/dalvik-cache
cp -a [email protected]* /cache/dalvik-cache
rm -r -f [email protected]*
find /data/dalvik-cache -type l -delete
busybox find /cache/dalvik-cache/* -type f -exec cp -f -s {} /data/dalvik-cache/ \;
fi
[ 0.3 version works but have a problem, im searching a fix. ]
Link for thread : http://forum.xda-developers.com/showthread.php?p=35843614
Ok , but how move ONLY SYSTEM DALVIK to cache/dalvik cache? Any ideas?
When we move ALL dalvik cache apps (some data and system) , than cache partition is fully! And we can't install any others apps !
This script moves only system dalvik cache so cache partition size is enough. Data dalvik cache will be saved in data partition with no cause of no space Tested in huawei u8160 with very little partitions
Inviato dal mio GT-I9000 con Tapatalk 2
Script working perfect , but first we must create dalvik-cache folder in cache partition (in CM9) and set permissions this folder:
[x][x][x]
[x][x][x]
[o][o][x]
Script move to etc/init.d and set perm:
[x][x][x]
[x][o][x]
[x][o][x]
reboot.

Categories

Resources