14

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>
B M
  • 1,863
  • 1
  • 25
  • 40
user3926701
  • 313
  • 1
  • 5
  • 18

6 Answers6

40

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.

The Guy with The Hat
  • 10,836
  • 8
  • 57
  • 75
eyal-lezmy
  • 7,090
  • 3
  • 41
  • 35
  • 5
    This is the creator of Genymotion (context for those who don't know) – orip Jan 04 '15 at 14:32
  • 10
    I'm far to be the Genymotion's creator but I'm part of the team that's right! :-) – eyal-lezmy Jan 05 '15 at 09:50
  • 1
    @eyal-lezmy How? using genyshell, says command adb not found. is there another command line? – Taxellool Mar 01 '15 at 08:22
  • 9
    To use adb you need to be inside the adb binary's folder. ie, /platform-tools or /tools if the android SDK is not installed. Or you can add on the these folders to your path to access it from everywhere. – eyal-lezmy Mar 01 '15 at 23:46
  • @eyal-lezmy Ironically this is NOT the correct answer and it's from one of the dev team. It ignores the actual question because you can't run `adb reboot` from the Genymotion Shell. Down voted until it's corrected. –  Sep 01 '15 at 21:32
  • @mike adb reboot had to be run from the command line (or terminal) and not from the Genyshell. Like evey adb command. I hope it will help you. – eyal-lezmy Sep 03 '15 at 22:10
  • where is the genymotion folder? – bubakazouba Mar 24 '16 at 20:51
  • Nothing happens on the latest Genymotion Emulator 23 API. After `adb reboot` from `C:\Program Files\Genymobile\Genymotion\tools` Underscore `_` just blinks infinitely (https://s9.postimg.org/linusf90v/Screenshot_1.png) – user25 Sep 11 '16 at 08:37
  • @eyal-lezmy Could you take a look at some of my questions regarding Google play services on genymotion emulator. I repeatedly get the "Google play services has stopped". Over and over again. Tried every combination of devices and open gapps (about 30). Rebootibg, clearing data, storage, caches, nothing helps. And no useful info in catlog. –  Feb 08 '17 at 20:45
  • Please open a dedicated post to explain the problem – eyal-lezmy Feb 09 '17 at 21:14
  • i agree with @mike, this is not the right answer since question is "in genymotion" and answer is out of geymotion context, it's a generic adb command. – Ninja Coding Jul 05 '17 at 15:48
17

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

user3889585
  • 217
  • 2
  • 6
11

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

B M
  • 1,863
  • 1
  • 25
  • 40
5

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
tigerjack
  • 1,158
  • 3
  • 21
  • 39
  • 1
    almost perfect... but where can i find out the device-port? "Genymotion Shell > devices list" does only show the ip address. thanks – StefanHeimberg Feb 23 '16 at 18:58
  • From http://stackoverflow.com/questions/24906377/how-to-change-genymotion-port I found that the port is 5555 for Genymotion devices – Roger_S Mar 09 '16 at 18:01
1

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.

Dylan Pierce
  • 4,313
  • 3
  • 35
  • 45
0

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

Alan Nelson
  • 1,129
  • 2
  • 11
  • 27