Is adb remount broken on android api 29?

AndroidAndroid EmulatorAdbAndroid 10.0

Android Problem Overview


adb remount does not work correctly on api 29 when running from the emulator. The command works fine on all other emulators that have been tried (18, 23, 25, 26, 27 and 28).

Any ideas why this might be?

Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
W Disabling verity for /system
E Skipping /system
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
/system/bin/remount exited with status 7
remount failed

Android Solutions


Solution 1 - Android

I started the emulator with emulator -avd Pixel_3a_XL_API_29 -writable-system -no-snapshot-load

I found many ppl encounter emulator freeze and unable to start the android if you try

$ adb root
$ adb disable-verity
$ adb reboot   <--- By now emulator is freezed

Then you can try this

$ adb root
$ adb shell avbctl disable-verification  <--- this will not freeze the emulator
$ adb reboot

When the emulator restarted Try to remount will be no issue

adb root
adb remount 

adb push will be able to write on system directory

Solution 2 - Android

Update:

See @KiddTang answer which seems to be an actual solution


  • This issue is still occurring now even with API 30 (API R)! And even when starting emulator with writable-system option: (emulator -writable-system -avd NAME_OF_DEVICE)!

    • I found there is an existing issue for it in Google's issue tracker.
  • I tried following these instructions to disable-verity and reboot before remounting

    • However this solution caused my emulator to freeze/hang, and never booting.

Note: I am experiencing the current issue when using the emulator with the "AVD" provided "Android Sdk Images". Its possible however that this kind of images are limited somewhat. So it might not occur for other types of Android Images


  • This code did not work for my situation, as it causes the emulator to freeze and wont start after rebooting, however, they may work others.
    • See the link for additional details and caveats.
  • Use the following sequence to perform the remount.
$ adb root
$ adb disable-verity
$ adb reboot
$ adb wait-for-device
$ adb root
$ adb remount
  • Then enter one of the following sequences:
$ adb shell stop
$ adb sync
$ adb shell start
$ adb reboot
  • or
$ adb push <source> <destination>
$ adb reboot
  • Note that you can replace these two lines in the above sequence:
$ adb disable-verity
$ adb reboot
  • with this line:
$ adb remount -R

Note: adb remount -R won’t reboot if the device is already in the adb remount state.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser12090237View Question on Stackoverflow
Solution 1 - AndroidKidd TangView Answer on Stackoverflow
Solution 2 - AndroidSDP190View Answer on Stackoverflow