如何在 Genymotion 中重启 android 设备模拟器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25739957/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 09:41:52  来源:igfitidea点击:

How to reboot android device emulator in Genymotion

androidandroid-emulatorgenymotion

提问by user3926701

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

重新启动(启动完成)后如何使用 Genymotion 测试我的应用程序我使用 nexus 4 作为设备

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

回答by eyal-lezmy

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

您可以将命令行与adb reboot. 它应该重新启动您的设备。

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.

要使用 adb,您需要位于 adb 二进制文件的文件夹中。即,<android SDK>/platform-tools/或者<genymotion folder>/tools/如果未安装 android SDK。您还可以将这些文件夹添加到您的路径中,以便从任何地方访问它。

回答by user3889585

works for me on mac:

在 mac 上对我有用:

  • open terminal
  • go to /Applications/Android Studio.app/sdk/platform-tools
  • make sure adb is in directory (use ls command)
  • ./adb reboot
  • 打开终端
  • 转到 /Applications/Android Studio.app/sdk/platform-tools
  • 确保 adb 在目录中(使用 ls 命令)
  • ./adb 重启

Genymotion emulator restarts...

Genymotion 模拟器重新启动...

回答by B M

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

在此处输入图片说明

回答by tigerHyman89

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

还使用@eyal-lezmy 和网上其他内容的答案找到了解决方案。如果您有多个设备在运行,您可以通过这种方式重新启动特定设备

  1. LIST DEVICES
  1. 列出设备

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

<genymotion-installer-path>发布开始 genymotion-shell

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

在 shell 中,运行devices,记下要重启并退出的设备的 IP 地址和端口。

  1. REBOOT WITH ADB
  1. 用亚行重启

From <android-sdk-folder>/platform-toolsrun

<android-sdk-folder>/platform-tools运行

adb -s <device-ip>:<device-port> reboot

回答by Dylan Pierce

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

在 linux 上我发现 adb 二进制文件 /path/to/genymotion/tools/adb

In my case:

就我而言:

~/genymotion/tools/adb reboot

~/genymotion/tools/adb reboot

Works like a charm.

奇迹般有效。

回答by Alan Nelson

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.

按住 Genymotion 用户界面右下角的电源按钮。这将弹出菜单以重新启动。该应用程序将在关闭时冻结,但在重新启动时,您会看到它已重新启动。

enter image description here

在此处输入图片说明