如何在Android Studio Emulator中使系统可写



我希望能够在Android Studio Emulator中写入/system。我已经确保使用一个可root的,非谷歌播放服务AVD。我目前正在使用像素2-API 28 AVD(目标Android 9.0(.

我已经确保运行adb root,这是有效的,尽管adb remountremount of the / superblock failed: Permission denied作为一个错误。(我也尝试过运行adb disable-verity并在重新安装之前重新启动,但我仍然收到相同的重新安装错误。(

我试过adb shell mount -o rw,remount /system,但我得到了mount: '/system' not in /proc/mounts

我也试过

adb shell
su
mount -o rw,remount /system

但得到相同的mount: '/system' not in /proc/mounts错误

(我也尝试过不使用/system。它似乎有效,但如果我尝试写入/system,我会得到mv: /system: Read-only file system(

我试过emulator -avd -writeable-system,但我得到了'emulator' is not recognized as an internal or external command, operable program or batch file.

有人能帮我弄清楚如何以这样一种方式运行模拟器,让我可以写到/system吗?

在Windows上,在C:UsersYourUserAppDataLocalAndroidSdktools中打开命令提示符/电源外壳并执行

.emulator.exe -writable-system -avd Pixel_2_API_28

C:UsersYourUserAppDataLocalAndroidSdkplatform-tools中的另一个命令提示符/电源外壳中执行

.adb.exe remount

在Linux上,您可以使用以下命令:

$ANDROID_HOME/tools/emulator -writable-system -avd Pixel_2_API_28
adb remount

最新更新