2

Android Emulator (provided by Android Studio) hang at black screen forever when:

(1) Create a new Pixel_2_API_29 image and it works fine

(2) Starting the emulator from command line with the -writable-system flag

(3) Run "adb disable-verity"

(4) Shutdown and start the image again from command line with -writable-system flag, now hang at black screen

(5) Still hang when restart with -writable-system flag for more times. But won't hang when -writable-system flag is not used.

with -verbose flag, when the emulator hangs, it output this several times per minute:

emulator: No acpi ini file provided, using default

There is no extra errors in the verbose console output other then those are already in the console output without -writable-system flag

Windows 10 1909, emulator version 30.4.5.0, image is Pixel_2_API_29.

jw_
  • 1,663
  • 18
  • 32

2 Answers2

1

I had the same issue and solved it for API 29 as follows:

 1. adb root
 2. adb shell avbctl disable-verification
 3. adb disable-verity

The key was the "avbctl disable-verification" line which must be run as root. This allowed for the device to reboot without a blank screen when using the -writable-system flag.

Mackenzie
  • 31
  • 1
  • 5
0

To make the image work again you need to "Wipe Data" in the AVD manager.

To avoid it happening again use this commands:

adb root
adb shell avbctl disable-verification
adb reboot

as suggested here: Is adb remount broken on android api 29?

mabi
  • 522
  • 1
  • 6
  • 20