How do I restart an android emulator?

2019-03-18 21:08发布

I'm basically trying to do this: 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 adb
9条回答
贪生不怕死
2楼-- · 2019-03-18 21:19

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).

查看更多
混吃等死
3楼-- · 2019-03-18 21:21

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

查看更多
甜甜的少女心
4楼-- · 2019-03-18 21:23

In Android Studio go to:

  1. Tools > Android > AVD Manager
  2. Select your emulator device
  3. Click "Wipe data"
查看更多
Animai°情兽
5楼-- · 2019-03-18 21:27

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.

查看更多
霸刀☆藐视天下
6楼-- · 2019-03-18 21:29

I know you asked in your question about how to do it from ADB. But the title lands people here potentially searching about restarting it from the UI.

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

查看更多
forever°为你锁心
7楼-- · 2019-03-18 21:35

you can try

emulator @avd_name -no-snapshot-load

it will clean load the device it worked for me.

查看更多
登录 后发表回答