How to reboot android device emulator in Genymotio

2019-01-22 21:27发布

How can i test my application after reboot(BOOT COMPLETED) using Genymotion I am using nexus 4 as device

<receiver android:name="com.template.SampleBootReceiver"
            android:enabled="true">
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED"/>
    </intent-filter>
</receiver>

6条回答
smile是对你的礼貌
2楼-- · 2019-01-22 22:08

Press and HOLD the power button on Genymotion's UI on the bottom right. That will pop up the menu to restart. The app will freeze up as it shuts down, but upon rebooting it you will see that it has restarted.

enter image description here

查看更多
Viruses.
3楼-- · 2019-01-22 22:15

You can press emulator power button. When pressed, you will see option dialog. That dialog you can choose "Restart". Hope for help.

enter image description here

查看更多
神经病院院长
4楼-- · 2019-01-22 22:18

You can use the command line with adb reboot. It should restart your device.

To use adb you need to be inside the adb binary's folder. ie, <android SDK>/platform-tools/ or <genymotion folder>/tools/ if the android SDK is not installed. You can also these folders to your path to access it from anywhere.

查看更多
Luminary・发光体
5楼-- · 2019-01-22 22:23

Found the solution using also the answer from @eyal-lezmy and other stuff on the web. If you have more than one device running, you can reboot a specific device in this way

  1. LIST DEVICES

From <genymotion-installer-path> launch genymotion-shell

Inside the shell, run devices, take note of IP address and port of the device you want to reboot and exit.

  1. REBOOT WITH ADB

From <android-sdk-folder>/platform-tools run

adb -s <device-ip>:<device-port> reboot
查看更多
6楼-- · 2019-01-22 22:23

When on linux I found the adb binary in /path/to/genymotion/tools/adb

In my case:

~/genymotion/tools/adb reboot

Works like a charm.

查看更多
相关推荐>>
7楼-- · 2019-01-22 22:25

works for me on mac:

  • open terminal
  • go to /Applications/Android Studio.app/sdk/platform-tools
  • make sure adb is in directory (use ls command)
  • ./adb reboot

Genymotion emulator restarts...

查看更多
登录 后发表回答