PocketMagic

PocketMagic

Where Technology meets magic


Android
45 Posts
BlackBerry
4 Posts
Electronics
68 Posts
Hardware
120 Posts
High Voltage
49 Posts
iPhone
4 Posts
Linux
2 Posts
Nuclear
20 Posts
Optics
11 Posts
Photography
7 Posts
Photoshop
3 Posts
Research
19 Posts
Reviews
18 Posts
Robotics
8 Posts
Security
7 Posts
Software
73 Posts
Symbian
2 Posts
Tubes
18 Posts
Windows
3 Posts
Windows Mobile
11 Posts

Top Articles!       See PocketMagic on Facebook


uRADMonitor - Online Radiation monitoring station | 14898 Views | Rate 70.27
uRADMonitor - Online Radiation monitoring station
Bluetooth and iOS - Use Bluetooth in your iPhone apps | 18024 Views | Rate 58.33
Bluetooth and iOS - Use Bluetooth in your iPhone apps
NMEA GPS Library for AVR Microcontrollers | 4810 Views | Rate 56.59
NMEA GPS Library for AVR Microcontrollers
Programmatically Injecting Events on Android - Part 2 | 4962 Views | Rate 44.7
Programmatically Injecting Events on Android - Part 2
Building a robot – Part 2 | 4588 Views | Rate 44.54
Building a robot – Part 2
Simple Switched power Supplies | 16080 Views | Rate 41.77
Simple Switched power Supplies
Capacitor Discharge Microspot Welder / Cutter | 11297 Views | Rate 36.32
Capacitor Discharge Microspot Welder / Cutter
Developing for Blackberry 10 | 72 Views | Rate 36
Developing for Blackberry 10

 
  

Write on the Android Read-only file system


By Radu Motisan Posted on May 14th, 2009 , 7932 Views (Rate 5.4)



  




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 /

Sweet!

Radu Motisan






  

More on PocketMagic:

Programmatically Injecting Events on Android - Part 1 | 10184 Views | Rate 26.32
Programmatically Injecting Events on Android - Part 1
Atmega8 and enc28J60 for ethernet support | 7236 Views | Rate 24.53
Atmega8 and enc28J60 for ethernet support
How to set the AVR Fusebits | 1701 Views | Rate 23.96
How to set the AVR Fusebits
CDV-742 Dosimeter and CDV-750 Dosimeter Charger | 117 Views | Rate 23.4
CDV-742 Dosimeter and CDV-750 Dosimeter Charger
ATMega128 and HD44780 LCD using 3 Wires with the 74HC164 | 2043 Views | Rate 22.96
ATMega128 and HD44780 LCD using 3 Wires with the 74HC164
Victoreen CDV-717 Remote Gamma Survey dosimeter | 111 Views | Rate 22.2
Victoreen CDV-717 Remote Gamma Survey dosimeter

23 Responses to “Write on the Android Read-only file system”

  1. 1
    Mashtaginka:

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

  2. 2
    Radu Motisan:

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

  3. 3
    Gazgylagka:

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

  4. 4
    Josh C:

    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. 5
    Ataul:

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

  6. 6
    ksoze:

    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. 7
    Radu Moisan:

    Thanks a lot dude, this came very in handy.

  8. 8
    PocketMagic » Reinstalling Vending.apk (Market) on Android:

    [...] to /system/app on the device, and do a restart. Step 1. Make the /system partition writable . See this article on how to remount, or do the following: d:>adb shell # mount (note: you will see a list of [...]

  9. 9
    Ataaw:

    when i push files to the sdcard, it shows the same problem, who can give the answer?

  10. 10
    Rooted: trying to put sound file in /system/.../ folder - Droid Forum - Verizon Droid & the Motorola Droid Forum:

    [...] can be done using adb also . in that case recovery mode is not required. see Write on the Android Read-only file system « PocketMagic [...]

  11. 11
    Terry:

    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 ?

  12. 12
    Khurram:

    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 !

  13. 13
    jetti:

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

    How to set the permission through Programming?

  14. 14
    Radu Motisan:

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

  15. 15
    Luis Ramos Jr:

    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!

  16. 16
    vny:

    Thanks a lot!

  17. 17
    kokos:

    where to type #mount.. make a complete explanation..we are noobs ffs..

  18. 18
    Manojr Tiwar:

    How to use chmod to set the file mode to 06755?

  19. 19
    vin:

    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

  20. 20
    Problem with read and write permissions. - Android Forums:

    [...] this command: # mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 # chmod 777 /system from here: Write on the Android Read-only file system « PocketMagic I was forgetting other thing, the first time I used ADB was guiding myself with this guide: [...]

  21. 21
    Eddy:

    Does the Android device have to be rooted for your tutorial ?

  22. 22
    Radu Motisan:

    yes

  23. 23
    ludijor:

    The second options works for me, thanks :)

Thank you for commenting. Your comment won't show until approved, which can take some time.

Please copy the string iJOlAp to the field below: