1

I have root access and am able to remount. I created a folder in /system/lib/ named rfsa, but I don't know why I cannot see or open that folder.

When I type ls, it is there. But when I type ls -l, I get this error

lstat './rfsa' failed: I/O error.

The first time I get this error, I have to reboot and root and remount again. Also, if I try rmdir /system/lib/rfsa/ (I created this folder myself), I get this error

rmdir: rfsa: Read-only file system

Any ideas what can I try?


Here it is before the ls -l command:

/dev/block/bootdevice/by-name/system /system ext4 rw,seclabel,relatime,discard,data=ordered 0 0

After ls -l and getting the error, it changes to:

/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,relatime,discard,data=ordered 0 0

I don't have busybox, but the first time I try mount -w -o remount -t ext4 /dev/block/bootdevice/by-name/system /system, nothing is changed. After I get the file I/O error, this time I get:

mount: Read-only file system

Here is the cat /proc/mounts output, before I try to access the bad folder:

rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=949072k,nr_inodes=237268,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
debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=949072k,nr_inodes=237268,mode=750,gid=1000 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,size=949072k,nr_inodes=237268,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
/dev/block/bootdevice/by-name/system /system ext4 rw,seclabel,relatime,discard,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/dsp /dsp ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/modem /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/bootdevice/by-name/tctpersist /tctpersist ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/hdcp /persist/data ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,size=949072k,nr_inodes=237268,mode=755,gid=1000 0 0
/dev/block/dm-0 /data ext4 rw,seclabel,nosuid,nodev,relatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
root@idol4:/ # cat /proc/mounts | grep system
/dev/block/bootdevice/by-name/system /system ext4 rw,seclabel,relatime,discard,data=ordered 0 0
  • what is the output of mount | grep system when it says rmdir: rfsa: Read-only file system? – Yasser Zamani Jan 19 '16 at 15:32
  • How do you remount? please try mount -o rw,remount,rw /system. – Yasser Zamani Jan 19 '16 at 16:03
  • 1
    Might have to do with the seclabel, see: What does the 'seclabel' mount option do? Can you check what extended attributes are set (xattrs should do that)? – Izzy Jan 19 '16 at 16:03
  • 1
    PS: Using the @ in question/answer posts doesn't work. To get the attention of those addressed, you must use it in a comment of the same chain those addressed have posted. – Izzy Jan 19 '16 at 16:05
  • 2
    @Vahid as per Izzy's comment, you can't use @ in the question/answer, but you need to use @ in comment to reply to specific user. – Andrew T. Jan 20 '16 at 2:21
0

If you have a busybox you can try

busybox mount /system -o rw,remount

or use system mount command:

mount -w -o remount -t ext4 /dev/block/bootdevice/by-name/system /system
| improve this answer | |
  • There is no busbox. But The system mount does not change anything at first (cause I already have rw access). But once I try to access the folder I had created (rfsa), the access is changed to ro and typing the command above too, returns: "mount: Read-only file system" – Vahid Jan 19 '16 at 16:09
  • Please paste output of 'cat /proc/mounts' command. – QkiZ Jan 19 '16 at 17:33
  • I eddited the question and added it. Thanks a lot.. – Vahid Jan 19 '16 at 22:01
  • I think you have filesystem error, like @ott-- says. I would run recovery and try repair filesystem. When custom recovery boots, try adb shell from PC, mount /system partition and delete bad directory. Or try repair filesystem. – QkiZ Jan 19 '16 at 22:52
0

It is a mount-option that the fs is remounted readonly if an error occurs.

But for you problem with the folder:

Could it be that the foldername contains special characters (that includes spaces or backspaces)? Check it with ls -b * or ls -q * if your ls supports it.

| improve this answer | |
  • I did try, but these options are not supported for ls. Any other suggestions? I tried adb reboot recovery but the phone reboots in a screen that has a graphic showing volume up/down, but I can not do anything there. – Vahid Jan 20 '16 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.