# Script to mount system R/W



## jsauder2 (Nov 3, 2011)

So I've been trying to find a script to mount system as R/W at boot and haven't had any luck. I don't really know how to write scripts very well, but what I'm looking for is one that I can throw into script manager and have run at boot to mount the system as R/W.

I want to do that so I can then run a script that turns off my hard key lights, but it needs to have the system as R/W first. Can anyone offer some help on this or suggest an easier way to get this done? Thanks in advance for your help.


----------



## x13thangelx (Jun 8, 2011)

```
<br />
#!/system/bin/sh<br />
busybox mount -o remount,rw /system<br />
```
You could add the 2nd line to the beginning of the other script instead of having 2 separate ones but should work just fine as a standalone.


----------



## jsauder2 (Nov 3, 2011)

x13thangelx said:


> ```
> <br />
> #!/system/bin/sh<br />
> busybox mount -o remount,rw /system<br />
> ...


that is much simpler...thanks for your help!

Sent from my Droid X using Tapatalk 2


----------



## jsauder2 (Nov 3, 2011)

x13thangelx said:


> ```
> <br />
> #!/system/bin/sh<br />
> busybox mount -o remount,rw /system<br />
> ...


I'm still getting a permission denied error. Looks like it mounts the system as R/W, but can't edit the file. Any ideas why that would be? It's the brightness file located in

sys/devices/platform/less-cpcap-adb/less/button-backlight/

Do I need to have execute permission for that file as well? Here is the light party of the script I'm using...

#!/system/bin/sh 
echo 0 > /sys/devices/platform/leds-cpcap-adb/leds/button-backlight/brightness 
chmod 444 /sys/devices/platform/leds-cpcap-adb/leds/button-backlight/brightness

Sent from my Droid X using Tapatalk 2


----------

