After many trials and tribulations, I successfully rooted a Kyocera Milano (Android 2.3.4 GINGERBREAD) using break_setresuid from github. I installed su and Superuser.apk and that works great. I can run programs like SSHDroid and Android Terminal Emulator with full root access.
My problem is that dalvik-cache is eating up my phone's internal memory. I tried to install Link2SD, but it just hangs after I tell it to work with the second FAT16 partition on my SD card. Using top, I can see that Link2SD spawns an "sh" process which is using 80 to 100% CPU. I let it go for about 30 minutes, but it's clearly in some sort of infinite loop. I also notice that when I type su from Android Terminal Emulator, I get the "#" prompt and when I type my first command (such as "id" which shows root or "ls"), it prints the output but then also just hangs, and top shows the same thing - a 100% CPU "sh" command.
So something seems to be borked, although there's no strace or pstack command, so I don't know how to diagnose the "sh" hang.
So then I tried to just manually deal with these huge files in dalvik-cache. I focused on a single Solitaire app at first. I have a /cache partition with about 100MB, so I first tried creating a dalvik-cache folder there, copying over one of the dex files and then making a symbolic link to it in /cache/dalvik-cache. I made sure to match permissions exactly to what it was before I moved it (system:app_53 and chmod). I even chmod'd the symbolic link itself (using -h). But I would reboot and fire up Solitaire and it would crash. When I do logcat, it says:
E/dalvikvm( 696): Can't open dex cache '/data/dalvik-cache/data@app@com.softick.android.solitaire.klondike-1.apk@classes.dex': Permission denied
Next, I tried doing the same thing on my SD card, creating a dalvik-cache folder and symbolically linking over there. Interestingly, even though I did everything exactly the same, this time I could launch Solitaire without problems through the symlink! Yay.... or not. When I reboot, Android deletes the /data/dalvik-cache/...dex symlink and replaces it with a new dex file.
How can I make Android use the existing symbolically linked dex file after reboot?
I'm so close! All of this because of the rubbish tiny internal drive! And why in the world did they give so much to /cache when only 2MB are used!
Any help would be greatly appreciated.
My problem is that dalvik-cache is eating up my phone's internal memory. I tried to install Link2SD, but it just hangs after I tell it to work with the second FAT16 partition on my SD card. Using top, I can see that Link2SD spawns an "sh" process which is using 80 to 100% CPU. I let it go for about 30 minutes, but it's clearly in some sort of infinite loop. I also notice that when I type su from Android Terminal Emulator, I get the "#" prompt and when I type my first command (such as "id" which shows root or "ls"), it prints the output but then also just hangs, and top shows the same thing - a 100% CPU "sh" command.
So something seems to be borked, although there's no strace or pstack command, so I don't know how to diagnose the "sh" hang.
So then I tried to just manually deal with these huge files in dalvik-cache. I focused on a single Solitaire app at first. I have a /cache partition with about 100MB, so I first tried creating a dalvik-cache folder there, copying over one of the dex files and then making a symbolic link to it in /cache/dalvik-cache. I made sure to match permissions exactly to what it was before I moved it (system:app_53 and chmod). I even chmod'd the symbolic link itself (using -h). But I would reboot and fire up Solitaire and it would crash. When I do logcat, it says:
E/dalvikvm( 696): Can't open dex cache '/data/dalvik-cache/data@app@com.softick.android.solitaire.klondike-1.apk@classes.dex': Permission denied
Next, I tried doing the same thing on my SD card, creating a dalvik-cache folder and symbolically linking over there. Interestingly, even though I did everything exactly the same, this time I could launch Solitaire without problems through the symlink! Yay.... or not. When I reboot, Android deletes the /data/dalvik-cache/...dex symlink and replaces it with a new dex file.
How can I make Android use the existing symbolically linked dex file after reboot?
I'm so close! All of this because of the rubbish tiny internal drive! And why in the world did they give so much to /cache when only 2MB are used!
Any help would be greatly appreciated.