How to add sysrw and sysro?

drezliok

Well-known member
Mar 12, 2011
451
54
0
After some searching and no real answers. How would I add sysrw and sysro my phone. I know it's some scripting but when I Google for it I get too many howtos that use sysrw rather than how to add it.

I know there are some roms with these scripts built in but I just want to add it to my current install of Rodimus.

Thankyou in advanced.
 
You can download Super Manager from the market. It will allow you to change from system ro to system r/w. I have been using this app to delete and add ringtones to the system audio file and to delete preloaded apps that I don't use. Just open the app, click on file manager then hit menu-setup, click on enable root function. Hit the back button then menu again and you will be able to switch to system r/w.
 
For sysrw and sysro, just do this:

Step 1: Root phone
Step 2: Enable USB debugging and keep phone in charge only mode when plugged into your computer's USB port.
Step 3: Download adb (either from the Android SDK platform tools or some other method) and place it easy to remember.
Step 4: Open a command prompt and navigate to where you saved adb to.
Step 5: Run the following:

adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
cat mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system > /system/bin/sysrw
cat mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system > /system/bin/sysro
chmod 755 /system/bin/sysrw
chmod 755 /system/bin/sysro
mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
exit
exit


Or, you can pick up a rom that has it, such as MobiusROM...
 
Use echo instead of cat - otherwise it should work. Cat reads out files and outputs them, but echo reads its arguments and outputs them.

Well, actually, you might need #!/system/bin/sh at the beginning of those files.

change the cat lines to this:

echo '#!/system/bin/sh' > /system/bin/sysrw
echo mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system >> /system/bin/sysrw
echo '#!/system/bin/sh' > /system/bin/sysro
echo mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system >> /system/bin/sysro

the > redirect creates a file, and >> adds lines to it.
 
Use echo instead of cat - otherwise it should work. Cat reads out files and outputs them, but echo reads its arguments and outputs them.

Well, actually, you might need #!/system/bin/sh at the beginning of those files.

change the cat lines to this:

echo '#!/system/bin/sh' > /system/bin/sysrw
echo mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system >> /system/bin/sysrw
echo '#!/system/bin/sh' > /system/bin/sysro
echo mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system >> /system/bin/sysro

the > redirect creates a file, and >> adds lines to it.

for kitkat (maybe ics and jb too) you can leave off the device using busybox...
busybox mount -o remount,rw /system /system

that'll work with regular roms, os2sd, and the post August 2014 swapped-internal-mount roms. otherwise, if you specify mtdblock5, only pre August 2014 internal roms.
 
Last edited:
I think the pickiness of whether the device (and fs type, etc) needs to be specified on a remount is related to what busybox is present (and maybe if there is a discrete mount utility instead of part of busybox). It's not really any difference in the kernel or the rest of the OS. Also, when not specifying the device, I *think* you're supposed to just leave it out entirely instead of specifying /system twice, but maybe it allows that too.
 
I think the pickiness of whether the device (and fs type, etc) needs to be specified on a remount is related to what busybox is present (and maybe if there is a discrete mount utility instead of part of busybox). It's not really any difference in the kernel or the rest of the OS. Also, when not specifying the device, I *think* you're supposed to just leave it out entirely instead of specifying /system twice, but maybe it allows that too.

the other mount command is symlinked from toolbox, it's pickier.
don't remember trying the mount without specifying the device before in gingerbread or froyo, so not sure.
meant cm busybox, built in custom ROM or recovery.
and sometimes I get results without specifying the first mount, sometimes it fails, haven't bothered to figure out why. it has consistently worked for me specifying twice though.
 
Interesting, maybe it just checks specific parameters are present but they don't all matter on remount. Thanks!
 

Latest posts

Trending Posts

Forum statistics

Threads
956,367
Messages
6,967,835
Members
3,163,520
Latest member
kiki2025