I used ADB.exe to get access to my System partition, I linked the dalvik-cache folder there to save space on my data partition, but the problem is I need to convert it read/write everytime I want to install a new app (or even if the old app wants to update), is there a way to make the partition always read/write instead read-only? Thanks!
You don't need to make
/system permanently R/W. You just need to mount it as R/W at every boot. So I'm providing you with a few options to mount
/system as R/W at boot automatically, but do note that these methods mount
/system as R/W in master mount namespace, which means ALL programs can write to it as long as file permission is right. This creates a severely huge security flaw. Do it at your own risk.
The following options are not steps of a single method, but different approaches.
- If you can modify your boot image, then editing
/init.rcis the best and easiest way.
- If you can't modify
init.dis availble, you can write a simple script to mount
/systemas R/W. As is mentioned in comments, it may not go right through if you try to call
- If both 1 and 2 is unavailable and you have root (I suppose you do by asking this question), replace a system service (
debuggerdis the best choice) binary with a custom shell script. Then run
start debuggerdto activate it (effective from next boot).
The script required by method 2 and 3 is very simple, like below.
#!/system/bin/sh /system/bin/mount -o rw,remount /system
You probably would like to add a sleep loop after it if you use method 3, as whenever
debuggerd exits, it will be restarted.
BTW, you can easily add
init.d support by yourself with method 3. Just take a glance at this. However in my opinion, re-partitioning is the best way to utilize free space
/system, yet it's potentially harmful.