I'm looking to replace the Generic.kl
file on my Samsung. I found a command online to push this file:
adb push Generic.kl /system/usr/keylayout/Generic.kl
But when I tried it says:
"Couldn't create file: Read-only file system"
I assume this is because I'm not a root user. Can I do it some other way? (Fast-boot mode is not supported on Samsung)
Thanks!
No, you need root.
That error isn't a permission denial, though. On Android, the system partition is mounted read-only by default. To make changes, you need to use
mount -o rw,remount /system
That command requires root privileges as well, so it won't run.
Even if system were mounted in read-write mode, you'd just get
Couldn't create file: Permission denied
system is owned by the user root
. Permissions inside of system are, at their most lenient, set to 755
or rwxr-xr-x
. That means only the root
user has permission to write anywhere in system. Since ADB runs under the shell
user, you can't write files.