How to make system partition in AVD in emulator writable

后端 未结 4 1513
醉话见心
醉话见心 2021-01-11 23:28

This is fairly a very old question but I am surprised that none of the solutions are working for me. I need to run an android app as system app in an AVD (in emulator) creat

相关标签:
4条回答
  • 2021-01-11 23:33

    When working with Q, this is the only solution that worked for me: https://stackoverflow.com/a/64397712/1898527

    Adding here the steps for completion (kudos to the original author):

    > emulator -avd Pixel_3a_XL_API_29 -writable-system
    > adb shell avbctl disable-verification
    > adb disable-verity
    

    Now reboot your emulator so that the changes take effect.

    > adb root
    > adb remount
    > adb shell "su 0 mount -o rw,remount /system"
    

    Note: you will need an emulator without Google Play, otherwise this won't work. You can get it by following the steps described here: https://stackoverflow.com/a/45668555/1898527

    0 讨论(0)
  • 2021-01-11 23:44

    In my case, I use a avd( Based on: Android 8.0 (Oreo) Tag/ABI: google_apis/x86_64 ).

    $ emulator -avd Nexus_5X_API_26_APIs -writable-system 
    $ adb root 
    $ adb remount
    

    Then, /system is writeable.

    $ adb push somefile /system/bin/ is work.

    0 讨论(0)
  • 2021-01-11 23:52

    use genymotion emulator, which is faster, light weight and pre rooted. (which means you can access system directory)

    0 讨论(0)
  • 2021-01-11 23:52

    For the benefit of others, answer to the question was answered a long ago by @Ishamael in another stackoverflow question Read only file system on Android

    0 讨论(0)
提交回复
热议问题