I came across the need to mount /system as read-write, and an on an online forum I found:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
which worked perfectly.. But I'm not totally understanding where /system is being mounted to. What is /dev/block/mtdblock*? How do I know if it's safe to use? And does the -o remount option mess anything up for the rest of the system by chance? And why does mounting to a semi-random location allow me rw access on /system without having to navigate to the /dev/block/mtdblock?
I'm a new to android root, and only have limited linux knowledge.
The device
/dev/block/mtdblock2
is a special type of memory storage on your android that can be read and written. In this case it looks like it has been formatted with the "yaffs2" file system, a type of file system that works particularly well with that type of memory storage technology. Hard drives, SD cards, NAND memory, etc., all have different characteristics and some file systems work better than others on a particular type of physical storage.
The command
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
makes the content of that partition "mtdblock2" available under a directory off the root called "/system". You should be able to
cd /system; ls
to see the top level contents of that partition.
The remount operation simply changes what was probably only a read-only filesystem into a read/write filesystem.
The only danger in doing that is you might change some critical files contained in mtdblock2 if you're not careful (maybe boot files or critical system files). Just reading them or copying them elsewhere is 100% safe.
If you need to add some file to /system you can as long as there is space. When you reboot your android it will most likely return to a read-only state.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With