Android Champ
Published in

Android Champ

Get Android System write permission

Note: The following premise is that the system has been rooted.

/systemIt is the Android system directory, which stores Android system applications and lib. Sometimes we need to write files into this directory. For example, we build our own apk into the system and start it as a system apk, but this directory has only read permission by default. no write permission will appear after the execution write Read-only file systemwrong tips.
The following describes how to get the write permission:

  • Execute adb shell su. Enter adb shell as root user;
  • Execution mount|grep /system, you can see the following information, different devices, see different information.
/dev/block/platform/15740000.dwmmc0/by-name/system /system ext4 ro,relatime,data=ordered 0 0

Seeing ro, it means that the directory has only read permission, and then try to modify the permission.

  • Execution mount -o remount <device> /system, which <device>partially fill in the file path seen above, for example, I was here
    /dev/block/platform/15740000.dwmmc0/by-name/system, so I should have the full command is executed
mount -o remount /dev/block/platform/15740000.dwmmc0/by-name/system /system
  • Re-run mount|grep /system, we see the following message, ro has become rw, represents the system had now ready to /systemfile written.
/dev/block/platform/15740000.dwmmc0/by-name/system /system ext4 rw,relatime,data=ordered 0 0

If you want to restore the read and write permissions of the directory, you can execute it

/mount -o remount,ro <device> /system



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Budhdi Sharma

Budhdi Sharma

A developer is responsible for developing a framework and system applications for devices powered by the Android operating system.