Android: adb push and read-only file system error
If you want to copy a file from your PC to the connected android device the fasten way is to use adb tool with push command. This command get as params the path of the local file and the remote path to copy in the device. Sometimes, especially if you use adb from Windows or MacOS, and error about read-only file system show up and you can not copy any file.
The specific error message showed is the following:
adb: error: failed to copy 'local_filePath' to 'remote_path': remote Read-only file system
To fix this error and have the copy operation working as expected you need to remount the device filesystem from read-only to read/write mode but, probably, you can make this operation only in a rooted device, that's mean a device where you can get the root privileges. The commands sequence is quite simple, from a PC terminal where you can execute adb (and after made a connection with the device) you have to type the following commands:
adb shell su mount -o rw,remount rootfs / chmod 777 /path/to/copy/in exit
First command open a remote shell to the device, second get root privileges (here the reasons you need a rooted device, you can try jump this step and check if work but doesn't ensure), third remount the filesystem in read/write mode. Fourth command is needed for ensure full access to the folder you wan to copy your local file in. Once finished exit from remote shell and try make the push command again, now it should work.
Comments
Post a Comment