How do I restart an android emulator?

AndroidAdb

Android Problem Overview


I'm basically trying to do this: https://stackoverflow.com/questions/2417427/changing-the-android-emulator-locale-automatically

Everything works up until 'start'. the emulator starts to boot but keeps loading at the shimmering 'ANDROID' screen forever. I must be missing something... How can I restart the emulator from ADB?

Okay, I should be more specific.

I am trying to do this from the command line using adb. I can use adb to setprop and I can stop the emulator. When I try doing 'start' in the adb shell, the emulator does begin to boot, but it never returns to the lock screen.

Android Solutions


Solution 1 - Android

In Android Studio go to:

  1. Tools > Android > AVD Manager
  2. Select your emulator device
  3. Click "Cold boot now" to restart, or "Wipe data" to factory reset

Solution 2 - Android

you can try

emulator @avd_name -no-snapshot-load

it will clean load the device it worked for me.

Solution 3 - Android

You asked how to restart the emulator from ADB. But the title is framed in a way that pops the question up when searching about restarting it from the UI as well.

One option could be (but it depends on which tooling you are using and may not be available for all emulators/environments) is to tap and hold the Power button and then a menu will pop up with a Restart option in it.

enter image description here


This was a long-standing default behavior, but since Android 12 / API 31 it tries to open the Google Assistant instead (even when there's no such thing on emulators without Google APIs or Google Play ). The old behavior can be reverted by going to Settings > System > Gestures > "Press and hold power button" to bring up the menu in the screenshot.

Solution 4 - Android

To restart a running emulator I used

adb -e reboot

(Assuming there is only one running)

Solution 5 - Android

I'm pretty sure this will work:

  • Clear/Wipe the AVD to defaults or create a new one.

  • Start the AVD/Emulator from the CLI with the following command

     emulator -avd my_avd -prop persist.sys.language=en -prop persist.sys.country=GB
    

change as needed. That way you are not messing with the system image which can cause hangs/crashes. And you can easily set it on boot for a variety of Locales.

Solution 6 - Android

If you are using Android Studio, you can goto the AVD Manager, Under Actions select "Cold Boot Now" to restart the emulator. This would get rid of errors/discrepancies which might occur if the simulator's process has been abruptly closed/terminated.

Solution 7 - Android

For me, kiran-chenna's answer failed me, and the solution was to instead run:

emulator -avd Pixel_2_API_28 -no-cache

Solution 8 - Android

In my case, a cold boot was required after the emulator got stuck. It can be found in the Android Virtual Device Manager.

enter image description here

Solution 9 - Android

Follow the following steps to restart/cold-boot your virtual device:

  1. Open Android Studio
  2. Click on Configure
  3. Click AVD Manager
  4. Click on the Dropdown on the right hand side of the virtual device.
  5. Click on Cold Boot Now

You're done! The device will restart within a couple of minutes.

enter image description here

Solution 10 - Android

To start/stop or restart emulator follow these steps:

using telnet on windows machine

o localhost 5554

avd start start

or

avd start restart

or

avd stop

Solution 11 - Android

Some versions of the emulator (android-7) are buggy and just hang at the shimmmera.

Try restarting it with "wipe user data" option (yes, you will have to re-run your app or at least reinstall it).

Solution 12 - Android

2022 Android Studio Bumblebee: With the emulated device open on screen (the "Emulator" tab open), press and hold the power button at the top of window just as you would on a real device, and it will pop up the device's menu just as if you had held the button on the side of a real device. For example:

enter image description here

Solution 13 - Android

you can restart the emulator from adb shell, start the emulator and also adb shell in the terminal.

start Starts (restarts) an emulator/device instance. stop Stops execution of an emulator/device instance.

Solution 14 - Android

in eclipse in the top most right u will find DDMS go i there, left side you will find Devices and in that in the last you will find a triangle downwards press that in that you will find Reset adb.

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
QuestionjeffView Question on Stackoverflow
Solution 1 - AndroidtotasView Answer on Stackoverflow
Solution 2 - AndroidKiran ChennaView Answer on Stackoverflow
Solution 3 - AndroidNikita R.View Answer on Stackoverflow
Solution 4 - AndroidDiederikView Answer on Stackoverflow
Solution 5 - AndroidTryTryAgainView Answer on Stackoverflow
Solution 6 - AndroidKarthikView Answer on Stackoverflow
Solution 7 - AndroidBen HaywardView Answer on Stackoverflow
Solution 8 - AndroidAlexander PachaView Answer on Stackoverflow
Solution 9 - AndroidKamesh Kumar SinghView Answer on Stackoverflow
Solution 10 - AndroidPrathamView Answer on Stackoverflow
Solution 11 - AndroididarwinView Answer on Stackoverflow
Solution 12 - AndroidsimpleuserView Answer on Stackoverflow
Solution 13 - AndroidprijupaulView Answer on Stackoverflow
Solution 14 - AndroidPradeepView Answer on Stackoverflow