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.rc
is the best and easiest way.
- If you can't modify
/boot
directly, but init.d
is availble, you can write a simple script to mount /system
as R/W. As is mentioned in comments, it may not go right through if you try to call su
from an init.d
script.
- If both 1 and 2 is unavailable and you have root (I suppose you do by asking this question), replace a system service (
debuggerd
is the best choice) binary with a custom shell script. Then run start debuggerd
to 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.