I am trying to remount the /system as a rw file system so I can push some files into /system/framework. It is an android emulator running Android 6.0 x86 image.
$ mount
...
/dev/block/vda /system ext4 ro,seclabel,relatime,data=ordered 0 0
...
Then I do
su
mount -o rw,remount /system
mount
...
/dev/block/vda /system ext4 rw,seclabel,relatime,data=ordered 0 0
...
At this time I am thinking I am ok. Then I am doing on host:
adb push test.jar /system/framework/
However I see:
failed to copy 'test.jar' to '/system/framework/test.jar': Read-only file system
Then I go back to adb:
mount
...
/dev/block/vda /system ext4 ro,seclabel,relatime,data=ordered 0 0
...
It goes back to ro again.
When I trying to do remount again, it doesn't even let me do it this time:
mount: Read-only file system
255|root@generic_x86:/ #
So where I am doing wrong? Thanks!
___ Edit____
restarting adbd as root via adb root command solves my issue.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…