I am using avdmanager to create an avd to run with the latest android emulator on Ubuntu 21.10.
I am using Android emulator version 31.2.8.
When I create and avd with system image 28...
avdmanager create avd -n pixel_5 -k "system-images;android-28;google_apis_playstore;x86_64" --device "pixel_5"
and run it..
emulator -avd pixel_5
I can then subsequently hold the power button, and the android OS on the emulator properly powers off.
When I create and avd with system image 30 or 31...
avdmanager create avd -n pixel_5 -k "system-images;android-31;google_apis_playstore;x86_64" --device "pixel_5"
Once the emulator starts, the power button does absolutely nothing, if I click on long click.
It's because a bad person at Google decided that the power button should trigger the Google Assistant. You can un-break it in Settings->System->Gestures->Press and hold power button->Hold for Assistant
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With