19

cannot mount /system in android with following command, anyone has a solution for this?

root@hwG7-UL20:/ # mount -o rw,remount,rw /system
mount: Invalid argument

255|root@hwG7-UL20:/ # mount -o remount rw /system
mount: Invalid argument

root@hwG7-UL20:/ # mount|grep system
/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0

the full output for mount is:

255|root@hwG7-UL20:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=970220k,nr_inodes=155384,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=970220k,nr_inodes=155384,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
none /dev/frz cgroup rw,relatime,freezer 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=970220k,nr_inodes=155384,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=970220k,nr_inodes=155384,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
/dev/block/bootdevice/by-name/log /log vfat rw,nosuid,nodev,relatime,uid=1000,gid=1007,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,relatime,noauto_da_alloc,data=ordered 0 0
/dev/block/bootdevice/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/modem /firmware vfat ro,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/data/media /mnt/shell/emulated sdcardfs rw,nosuid,nodev,relatime,uid=1023,gid=1023 0 0
/dev/block/bootdevice/by-name/cust /cust ext4 ro,seclabel,relatime,data=ordered 0 0

thanks a lot!

7
  • Where are you doing this? In recovery mode or in terminal on your device.
    – Vivek Ji
    Commented Jun 28, 2016 at 3:48
  • in "adb shell" terminal with root
    – iclinux
    Commented Jun 28, 2016 at 10:36
  • What happens if you include the name of the device? i.e. mount -o remount,rw /dev/block/bootdevice/by-name/system /system
    – Dan Hulme
    Commented Jun 30, 2016 at 9:04
  • still said: mount: Invalid argument
    – iclinux
    Commented Jul 1, 2016 at 13:07
  • 1
    Old question but I have the same problem as now. Does anyone had a solution for this?
    – Polar
    Commented Aug 28, 2017 at 6:47

3 Answers 3

10

Solution is simple. To remount a mounted system you need to have root privileges. Do an su. You will enter root mode. Then run the below command. It will work, I did it many a times.

So here are the steps:

 adb shell  
 su  
 mount -o rw,remount -t ext4 /system

Edit: Found a better solution

From host machine(Linux or windows PC), execute the following commands.

>> adb root  
>> adb remount

remount will by default remount the /system partition with rw, if you have the permissions.

Note 1: To do su or adb root, your device must be rooted and have su executable on it. When you do an su, if it is executed properly, your terminal prompt will change from $ to #. Thanks..

Note 2: In recent mobiles, few of acer and samsung that i know, Security has been tightened, and even after rooting the phone, adb remount wouldn't work. As of i know, there is no solution available for it so far.

3
  • 2
    I'd be careful including the "-t" option to select the filesystem as that may cause it to attempt to remount as "ext4" when previously it may have been "f2fs" (used by newer custom ROMS). You should only need to say... mount -o rw,remount /system to remount as read-write and to remount as read-only... mount -o ro,remount /system
    – ConceptRat
    Commented Nov 21, 2017 at 19:33
  • adbd cannot run as root in production builds
    – beppe9000
    Commented Oct 28, 2019 at 1:56
  • BIg up for 'adb remount' - this worked for me on Android 9 when mount -o rw,remount -t ext4 /system didn't - thanks!
    – Surfbutler
    Commented Sep 9, 2022 at 8:04
3

see this related articles here and stack exchange answer here

Basically

  1. You need root

  2. Better to have adb secure apk installed

  3. Check how the /system partition is mounted as read-only (ro), In particular note the device

    # mount | grep system
    /dev/block/stl12 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
    
  4. Then remount that as /system

    # mount -o rw,remount /dev/block/stl12 /system
    
  5. Finally, you can confirm it

    # mount | grep system
    /dev/block/stl12 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
    
0
0

If you are root, you can download ES File Explorer from the Play Store, press the 3-Lined Menu icon in the top left. Next, scroll down until you see Root Explorer. Press and hold for 2-3 seconds. A menu should appear. Press "Mount R/W". Put the dot for 'system' in the RW section. A reboot may be necessary.

1
  • 1
    No any results, still RO. It probably uses the same command. Commented Aug 30, 2017 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .