If you try to create any folder or push any file using ADB to android file systems like /system and if it is mounted as Read-Only then it may shows error code like “failed to copy files to ‘/system/lib//cfg80211.ko’: Read-only file system. In this case you nee,d to remount it as Read-Write(RW). Below are the commands for this.
- For re-mounting as read-write,
$ mount -o rw,remount /system
- For remounting root, //will be used for pushing init.rc files in /root
$ mount -o rw,remount /
- For re-mounting as read-only after while
$ mount -o ro,remount /system
- Or you can use adb tool to remount it as R/W
$ adb remount