4

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.

2 Answers 2

19

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

Sign up to request clarification or add additional context in comments.

3 Comments

I can't believe (ok I can, It's Google) that they actually made it so that when you start an emulator you can't shut it down without diving into the settings to disable this stupid feature. How did nobody think of this?
This setting does not exist for me. In 'Power menu' I only have 'Device Controls'.
How do you switch off a device if you actually want to use the assistant?
-1
  1. Find your avd path(default~/.android/avd)
  2. Find the AVD name (your is pixel_5)
  3. Open the folder and find config.ini
  4. Edit hw.keyboard = yes

1 Comment

Not related to the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.