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

Root [Merit] [MOD] Relocate dalvik-cache to /dev partition [WORKS]

stayboogy

Android Expert
relocate dalvik-cache to /dev partition


new script, simplified by me



**no support for link2sd / apps2sd in this release**


requirements:


a) rooted phone
b) cwm recovery
c) file explorer with root privileges
d) init.d scripting enabled [MOD] Add init.d Scripting Function to your Device


***download files using a pc--i do not support / suggest using your phone***


dalvik2devfinal2


1) download script above

2) copy script to your "system/etc/init.d/" directory

3) set permissions to 777

4)
reboot to cwm recovery

5) select "advanced"

6)
select "wipe dalvik-cache"

7) select "yes"

8)
when finished, reboot phone
--will take a couple of minutes to boot, this is normal

9)
verify that dalvik-cache was moved to /dev



[NOTE: /data/dalvik-cache will still exist, but /dev/dalvik-cache is bound to it, and it's not actually taking up any space]

**if not moved, check the "scriptlog.txt" in "/data/local/tmp/" for errors**


you should now have dalvik-cache in /dev--will survive subsequent reboots without wiping from cwm


**to move dalvik-cache back to original location, delete "dalvik2devfinal2" from "/system/etc/init.d/" and reboot phone**



HIT THE THANKS BUTTON





SPECIAL THANKS


**thanks to DeeJayAhmed @ XDA for his base script
http://forum.xda-developers.com/showthread.php?t=1638962**

*thanks to Motorhead1991 and valueforvalue for the inspiration*
 
Unfortunately it didn't work for me Stayboogy. Infact.. It completely messed up Link2SD from mounting my /sdext2 partition. Not sure if the script crashed which caused the Link2SD mount lines to be skipped or what.
 
Unfortunately it didn't work for me Stayboogy. Infact.. It completely messed up Link2SD from mounting my /sdext2 partition. Not sure if the script crashed which caused the Link2SD mount lines to be skipped or what.

i can't figure out why that would happen. the script doesn't touch anything but /data/davlik-cache and makes a new directory in /dev/davlik-cache

it might have crashed and that's what caused your problem. i'll have to look at it and see why it would crash. which i can't say with full confidence i can figure it out. scripting is not my strong point at all.

i'm sorry that i suggested this to you and it messed up your apps.

link2sd is just a problem for this stuff LOL :p
 
i can't figure out why that would happen. the script doesn't touch anything but /data/davlik-cache and makes a new directory in /dev/davlik-cache

it might have crashed and that's what caused your problem. i'll have to look at it and see why it would crash. which i can't say with full confidence i can figure it out. scripting is not my strong point at all.

i'm sorry that i suggested this to you and it messed up your apps.

link2sd is just a problem for this stuff LOL :p

Haha it's fine. I wipe my apps and stuff on a weekly basis as it seems anyways. I'm constantly trying new things, which a side affect of that is constantly boot looping my own device :P.
 
This method is definitely not link2sd friendly, it makes sense that it isn't though because the individual dalvik cache files themselves are linked to the sd. So with a whole new script trying to move the dalvik cache, I guess it's just too many levels of indirection.

I still want to attempt moving /data/data to dev since we now know it's usable thanks to boogy.
 
The original script relocated the dalvik to /cache, but since the Merit's cache is only 50mb, I needed to tweak it. /dev was the second largest partition and had nothing in it, so here we are now :). DJAhmed wrote the script, I made it Merit compatible.
 
The original script relocated the dalvik to /cache, but since the Merit's cache is only 50mb, I needed to tweak it. /dev was the second largest partition and had nothing in it, so here we are now :). DJAhmed wrote the script, I made it Merit compatible.

you were my inspiration because you suggested this months back.

but, this isn't your script at all. your script didn't work (for me). it also had incorrect mtd points. "system" is not mtd3 it's mtd5 on our phones. and even changing that didn't make it work. i tried editing your script several ways and it never moved dalvik on my device. so i scrapped it.

this is DeeJayAhmed's script, and i added one line to it so that dalvik in /dev gets wiped every boot so that it doesn't have to be done manually, and so that it will survive further reboots.
 
I managed to get stayboogys move dalvik to dev script to work perfectly with link2sd, finally! No adjustments were needed in regards to link2sd. All of the dalvik files that are linked to sdext remain in perfect working order the links are simply moved to /dev and all the files in dalvik-cache that are not linked are moved to /dev so there is a very nice space gain with no loss in performance!

Thanks to stayboogy for making this possible. I have submitted my findings to him and the scripts to make it work properly. I assume he will post the method when he has time.
 
I managed to get stayboogys move dalvik to dev script to work perfectly with link2sd, finally! No adjustments were needed in regards to link2sd. All of the dalvik files that are linked to sdext remain in perfect working order the links are simply moved to /dev and all the files in dalvik-cache that are not linked are moved to /dev so there is a very nice space gain with no loss in performance!

Thanks to stayboogy for making this possible. I have submitted my findings to him and the scripts to make it work properly. I assume he will post the method when he has time.
Stayboogy pm'd me your method, the first time I tried it didn't work. I had to flash my stock slimmed down rom, add init.d support, install stayboogy's davlik cache script, then start installing my applications and linking them witb link2sd.

Not sure why I had to do things in this order, but it was the only way I could get it to play well with link2sd.

Anyways onto some stats. 108 applications installed, only 15mb of internal uses. ;)
 
Stayboogy pm'd me your method, the first time I tried it didn't work. I had to flash my stock slimmed down rom, add init.d support, install stayboogy's davlik cache script, then start installing my applications and linking them witb link2sd.

Not sure why I had to do things in this order, but it was the only way I could get it to play well with link2sd.

Anyways onto some stats. 108 applications installed, only 15mb of internal uses. ;)

I modified the method after boogy sent it to you. The way it is now there shouldn't be any extra steps involved for those who already have link2sd configured.

I didn't get the all the kinks worked out until about 1am by that time I think boogy had retired for the night. I don't have this method in update.zip form yet. It's really easy to add it manually though.
 
I modified the method after boogy sent it to you. The way it is now there shouldn't be any extra steps involved for those who already have link2sd configured.

I didn't get the all the kinks worked out until about 1am by that time I think boogy had retired for the night. I don't have this method in update.zip form yet. It's really easy to add it manually though.
Yeah after screwing up a few times. I found it was easier to just manually create the /system/etc/init.d folder and add /system/etc/init.d/* to the end of install-rexovery.sh. I stopped using the update.zip method for init.d support once I figured out how easy it was to do so manually.

What other steps did you take value? I'm sort interested since These are the only steps I had to take to get the dalvik cache to play well with link2sd.
 
Yeah after screwing up a few times. I found it was easier to just manually create the /system/etc/init.d folder and add /system/etc/init.d/* to the end of install-rexovery.sh. I stopped using the update.zip method for init.d support once I figured out how easy it was to do so manually.

What other steps did you take value? I'm sort interested since These are the only steps I had to take to get the dalvik cache to play well with link2sd.

Well I modified the scripts a little bit and added a secondary script to the init.d processing. I ran into issues cause I copied and pasted the move script instead of downloading it so it had windows newlines in it. Which won't work at all lol. But it took me forever to figure out what the problem was. By that time I had already modified my method slightly. The line that you used in the install-recovery.sh is what I started with I figured it would work just fine. But I had already changed my approach when I figured out the actual problem. Here is a link to all the files as they are on my system its pretty self explanatory. http://www.sendspace.com/file/gxz23b


Note that I didn't have to relink or reinstall anything in link2sd. It all worked perfectly with this method the first time once I fixed the Windows newlines errors.
 
Well I modified the scripts a little bit and added a secondary script to the init.d processing. I ran into issues cause I copied and pasted the move script instead of downloading it so it had windows newlines in it. Which won't work at all lol. But it took me forever to figure out what the problem was. By that time I had already modified my method slightly. The line that you used in the install-recovery.sh is what I started with I figured it would work just fine. But I had already changed my approach when I figured out the actual problem. Here is a link to all the files as they are on my system its pretty self explanatory. Download link2sdinit.zip from Sendspace.com - send big files the easy way


Note that I didn't have to relink or reinstall anything in link2sd. It all worked perfectly with this method the first time once I fixed the Windows newlines errors.

That explains why doing a flash of a stock kernel and installing init.d and davlik2dev then installing apps works. Because the moving of the davlik cache to /dev happens before any linking takes place, thus skipping the need to re-install the links.

Anyways, a side-note. Can't open your file you uploaded, seems to be compressed with something 7zip can't open.
 
That explains why doing a flash of a stock kernel and installing init.d and davlik2dev then installing apps works. Because the moving of the davlik cache to /dev happens before any linking takes place, thus skipping the need to re-install the links.

Anyways, a side-note. Can't open your file you uploaded, seems to be compressed with something 7zip can't open.

Wow that is very odd I just used the zip feature in rom toolbox. I'll zip it again using another method. Give me a couple of minutes.

EDIT: Ok here is the new link try it. http://www.sendspace.com/file/ilokcv
 
am i missing something. none of the links here work, all are expired or give some error. Just completed rooting and this looks like the next thing to try before link2sd.
 
Back
Top Bottom