Write on the Android Read-only file system

Most of Android partitions are mounted as read only.
For eg. /system where most of the libs and other system components are stored, including the permissions.xml file.

You can temporary re-mount the /system partition to read write and load your new files to that partition!

using adb shell or the android terminal with root privileges, do the following:

See the currently mounted partitions:

# mount

Then re-mount to read-write the partition you are interested in , eg. /system:

# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3
# chmod 777 /system

Check the result with mount.

You can also:

mount -o rw,remount -t rootfs /

Now you can write on the Android read-only file system. Sweet!

This article has 29 Comments

  1. Ну наконецто, нашел полезную информацию без всякой хрени в виде вымысла и кражи мыслей других людей

  2. Not sure what you mean, but thanks for taking the time to read this article.

  3. Поздравте меня я нашел то что искал, спасибо автору топика за доступное изложения материала.Жаль что в интернете всю труднее откопать что либо стоящее, правду говорят интернет большая помойка

  4. English comment!

    Thanks! This comes in handy for me a lot, and I use this page as a reference.
    This has helped me push many updates to my system folder.

  5. Привет, вы должны, вероятно, использовать инструменты Google языке, чтобы попытаться выяснить, что они говорят

  6. I don’t understand why you would want to chmod the /system directory – you are granting everybody write access to the directory with the chmod 777. I would advise that you omit that step. If you want to restore the default access permisions of the /system directory – use chmod 755 /system to restore it to default. Unless I am missing something and the permissions get reset anyways…

    By default the root user is already granted write access – no need to give group and others write access as well. So as long as you have a rooted phone that step is unnecessary.

  7. Thanks. I did as instructed i.e. mounted to /system. chmod to 777. Came out of adb shell and tried to push a file to /system/xbin. I keep on getting “failed to copy busybox file to /system/xbin/busybx : Out Of Memory”. Why do I get this error ? How much heap & RAM should be set in the Emulator ?

  8. Dear All,

    First thankyou so much for the great forum we have here, I am using Huawei Ideos u8150, the fone is network locked so I played around, being a total noob I started with installing sdk, and rooted my fone using z4root, rooting was successful

    No when I try to copy a modified build.prop to the systems folder in root explorer, the file is copies but is not visible, also I have deleted the original build.prop & I am afraid to reboot the fone,

    can restoring the fone to factory settings solve this ? also how come I copy the file to system folder, it gets copied and I still cant see it ?

    I have tried pushing the file using ADB command line but the device refuses to mount (persmission denied)

    I would really be thankful to anyone who can guide a noob like me, if you dont this forum has enough reasons to love it already,

    cheers !

  9. Hi,
    Thanx for posting.But i want it to be Programatically.

    How to set the permission through Programming?

  10. @jetti, you can put the commands in a script, and execute the script programatically.

  11. hi,
    When i type the #mount and then type this next # mount -o rw,remount -t yaffs2 /dev/block/mtdblock3

    and then this # chmod 777 /system and check results with mount.

    I still can’t copy exploid to /sqlite_stmt_journals because it still says it is Read-Only file system. Can somebody help me so that i can root this phone – myTouch 3g slide and take off the bloatware of the phone. Any help will be appreciated!

  12. I used # mount -o remount,rw -t cramfs /dev/block/mtdblock4 /system and then used # chmod 0777 /system got reply as Unable to chmod /system :Read only file system so I could not able to push the file into /system/media.So please help me

  13. Hi, the true command line is:
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock?? /system (?? refer the directory of system with the command # mount)
    chmod 777 /system

    and yehhh

  14. In Android terminal when I give command “mount -o rw,remount -t rootfs /” android terminal says mount : you must be root.

    I am already root.
    When I give connand “mount” I get following output (only 2 lines i entered here)
    # mount
    rootfs / rootfs rw 0 0

Leave a Reply