How to use Genymotion with Expo

Neila
3 min readJan 8, 2018

After battling with Android Studio, Genymotion, Expo, adb, and sdkmanager, on Windows for hours I’ve finally found the solution.

Keep in mind that this article was last updated in October 2018.

How it works
First we will be using Android Studio to install platform-tools including adb and Android SDKs. Adb is Android Debug Bridge Utility, it’s a program that allows communication to Android devices. SDKs are Software Development Kits specific to an Android version. Then we’ll install Genymotion to run virtual devices. Lastly we’ll add platform-tools to the PATH environment variable so Expo can use the adb then we’ll set Genymotion to also use the same adb. Expo can be run via command line or through the XDE.

You can install Android Studio (it’s huge) or you can find a workaround to install adb and SDKs separately like Daniel K. has.

Instructions

  1. Install Android Studio (683MB)
  2. Install Genymotion with Virtual Box
  3. Open Android Studio
    Go to Configure -> SDK Manager or File -> Settings -> Android SDK
    Select the SDK Platforms tab
    Select Show Package Details in the bottom right hand corner
    Select Android SDK Platform 27, Android SDK Platform 26, and Android SDK Platform 25
    Select the SDK Tools tab
    Select Android SDK Platform-Tools, and Android SDK Tools
    Click Apply and OK
  4. Open Genymotion
    Install virtual devices of your choice, I prefer versions without ‘Preview’ as it may mean it is in beta, I suggest trying devices with the latest versions such as 7.0.0, 7.1.0, and 8.0.
  5. Open CMD
    Run npm install -g exp
  6. Add a new environment variable (see detailed instructions)
    Add C:\Users\{USERNAME}\AppData\Local\Android\Sdk\platform-tools to the System Variable named Path
    This will ensure you can run adb in CMD
    Open CMD
    Run adb, ensure a bunch of instructions on how to use adb is displayed
    Run adb kill-server andadb start-server
    Run adb devices, ensure List of devices attached is displayed and nothing else, the device will be installed in Genymotion
    Run exp path
  7. Open Genymotion
    Go to Settings -> ADB
    Check Use custom Android SDK Tools
    Click Browse select C:\Users\{USERNAME}\AppData\Local\Android\Sdk
    Start virtual device
  8. Open CMD
    Run adb devices, ensure you can see one new device
  9. Start your Expo project
    Open Expo Dev Tools
    Click on the Run on Android device/emulator
  10. Celebrate 🎉

The exp package is installed when running npm install -g expo, is needed to run exp path which will copy the PATH environment variable to Expo XDE.

You can uninstall Android Studio after and the SDKs and tools will remain in the AppData folder as long as you don’t select the option to delete user files on uninstall.

For more information see the Expo Genymotion guide.

We grow from failure, not success. When in doubt use Google!

If anyone finds out how you can install adb and sdk other than using Android Studio please leave a comment below 😜

☕ Code like you’ve never been hurt before ko-fi.com/psyanite

--

--