【问题标题】:How Do I Make System Writeable in Android Studio Emulator?如何在 Android Studio 模拟器中使系统可写?
【发布时间】:2020-11-05 10:12:28
【问题描述】:

我希望能够在我的 Android Studio 模拟器中写信给/system。我已确保使用可 root 的非 Google Play Services AVD。我目前正在使用 Pixel 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的方式运行模拟器吗?

【问题讨论】:

    标签: android android-studio android-emulator root


    【解决方案1】:

    在 Windows 上,在 C:\Users\YourUser\AppData\Local\Android\Sdk\tools 中打开命令提示符/电源 shell 并执行

    .\emulator.exe -writable-system -avd Pixel_2_API_28
    

    C:\Users\YourUser\AppData\Local\Android\Sdk\platform-tools 中的另一个命令提示符/power shell 中执行

    .\adb.exe remount
    

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

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

    【讨论】:

    猜你喜欢
    • 2017-07-27
    • 2018-02-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-09
    • 2017-05-11
    • 1970-01-01
    • 2016-01-10
    相关资源
    最近更新 更多