A terminal command for a rooted Android to remount /System as read/write

前端 未结 9 2166
离开以前
离开以前 2020-12-04 10:16

I\'m writing an android app that needs to copy a file to the \"/system\" partition at runtime. I\'ve got the commands to run \"su\" and can successfully request SuperUser pe

相关标签:
9条回答
  • 2020-12-04 10:38

    Try

    mount -o remount,rw /system

    If no error message is printed, it works.

    Or, you should do the following.

    First, make sure the fs type.

    mount

    Issue this command to find it out.

    Then

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

    Note that the fs(yaffs2) and device(/dev/block/mtdblock3) are depend on your system.

    0 讨论(0)
  • 2020-12-04 10:41

    I use this command:

    mount -o rw,remount /system
    
    0 讨论(0)
  • 2020-12-04 10:43

    This is what works on my first generation Droid X with Android version 2.3.4. I suspect that this will be universal. Steps:

    1. root system and install su.

    2. Install busybox

    3. Install a terminal program.

    4. to mount system rw first su then

      busybox mount -o rw,remount system
      
    5. To remount ro

      busybox mount -o ro,remount system
      

    Note that there are no slashes on "system".

    0 讨论(0)
  • 2020-12-04 10:45

    You can try adb remount command also to remount /system as read write

    adb remount
    
    0 讨论(0)
  • 2020-12-04 10:51

    Instead of

    mount -o rw,remount /system/

    use

    mount -o rw,remount /system

    mind the '/' at the end of the command. you ask why this matters? /system/ is the directory under /system while /system is the volume name.

    0 讨论(0)
  • 2020-12-04 10:51

    If you have rooted your phone, but so not have busybox, only stock toybox, here a one-liner to run as root :

    mount -o rw,remount $( mount | sed '/ /system /!d' | cut -d " " -f 1 ) /system

    toybox do not support the "-o remount,rw" option

    if you have busybox, you can use it :

    busybox mount -o remount,rw /system

    0 讨论(0)
提交回复
热议问题