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

前端 未结 9 2167
离开以前
离开以前 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:52

    You don't need to pass both arguments when performing a remount. You can simply pass the mount point (here /system). And /system is universal amongst Android devices.

    0 讨论(0)
  • 2020-12-04 11:00

    You can run the mount command without parameter in order to get partition information before constructing your mount command. Here is an example of the mount command without parameter outputed from my HTC Hero.

    $ mount
    mount
    rootfs / rootfs ro 0 0
    tmpfs /dev tmpfs rw,mode=755 0 0
    devpts /dev/pts devpts rw,mode=600 0 0
    proc /proc proc rw 0 0
    sysfs /sys sysfs rw 0 0
    tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
    none /dev/cpuctl cgroup rw,cpu 0 0
    /dev/block/mtdblock3 /system yaffs2 rw 0 0
    /dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
    /dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
    /dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=
    1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,s
    hortname=mixed,utf8,errors=remount-ro 0 0
    
    0 讨论(0)
  • 2020-12-04 11:02

    I had the same problem. So here is the real answer: Mount the system under /proc. Here is my command:

    mount -o rw,remount /proc /system

    It works, and in fact is the only way I can overcome the Read-only System problem.

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