I want to be able to write to /system
in my Android Studio Emulator. I've made sure to use a rootable, non-Google Play Services AVD. I'm currently using the Pixel 2 - API 28 AVD (targets Android 9.0).
I've made sure to run adb root
and that works, though adb remount
gives remount of the / superblock failed: Permission denied
as an error. (I also tried running adb disable-verity
and rebooting before remounting, but I still get the same remount error.)
I've tried adb shell mount -o rw,remount /system
, but I get mount: '/system' not in /proc/mounts
.
I've also tried
adb shell
su
mount -o rw,remount /system
but get the same mount: '/system' not in /proc/mounts
error
(I've tried it without /system
too. It appears to work, but if I then try to write to /system
, I get mv: /system: Read-only file system
)
I've tried emulator -avd -writeable-system
but I get 'emulator' is not recognized as an internal or external command, operable program or batch file.
Can someone please help me figure out how to run the emulator in such a way that I can write to /system
?