Official Content
  • This documentation is valid for:

Genymotion is one of the best emulators available and it is far superior to the default emulator provided with the Android SDK. However, when developing with GeneXus on Mac, if you have the emulator inside the Windows partition, its performance is very poor and you can't use it to its full potential.

That's because the Windows partition of the Mac is a virtual machine and Genymotion is based on VirtualBox, which creates another virtual machine inside Windows (VM inside a VM). For this reason, you can't have access to the power of the video card of the Mac and this degrades the emulator’s performance.

To solve this problem, it is necessary to run Windows together with OSX using, for example, Parallels or VmWare Fusion.

Here is a tip that came up when developing PreciosUY on Mac with GeneXus Salto.

The steps for Parallels are as follows:

On Mac

  1. In the properties of the Parallels machine where GeneXus is running, select the Network Sharing type. By default, a network will be created between Mac and Windows, and the default IP numbers 10.211.55.2 and 10.211.55.5 will be assigned to it. These numbers will be needed later.
    Parallels_png
  2. Open Genymotion and create an emulator. In this case, a Custom Phone with Android 5.0.0
    GenyMotionEmulador_png
  3. For the emulator to work properly, you need to install the Google Apps that are not included by default when creating the emulator. You can find them in several sites depending on the required Android version. If these applications are not installed, you will not be able to use Maps or any other Google application that is found on an Android phone.
    1. GApps 4.4.4. (http://forum.xda-developers.com/android/software/reborn-gapps-t3074533)
    2. GApps 5.0.0 (https://www.androidfilehost.com/?fid=95784891001614559)
  4. Open Genymotion and access the settings.
  5. Inside ADB, select the custom SDK option and leave the path blank.
    GenyMotionADB_png
  6. Open VirtualBox and select the virtual machine created for the emulator. In this case, Custom Phone.
    Capturadepantalla2015-07-28alas22_54_07_png
  7. Go to Settings and then Network. Set the connected adapter 2 as "NAT" and the properties shown in the image. The Mac address generated for the network is not relevant (leave the default one created).
     Capturadepantalla2015-07-28alas22_54_18_png
  8. Accept and close VirtualBox.
  9. If you have an Android SDK installed on Mac, you need to download the ADB service. To do so, open a terminal, go to platform-tools inside the SDK installation, and run ./adb kill-server
    Capturadepantalla2015-07-28alas23_01_59_png

On Windows

Next, switch to Windows and download the ADB service in a similar way. Open a command window, go to the platform-tools folder inside the Android SDK installation, and run adb kill-server.
Capturadepantalla2015-07-28alas23_05_14_png

On Mac

  1. Open the emulator in Genymotion, and a message will be displayed indicating that there is no SDK selected. Select the option 'NO' and the emulator will open.
    Capturadepantalla2015-07-28alas23_13_38_png
  2. Next, in the upper right corner of the emulator, look for its IP. In this case, it is 192.168.57.101
     Capturadepantalla2015-07-28alas23_17_04_png

On Windows

  1. You have to connect the Windows ADB with the Genymotion emulator of Mac. To do so, open a CMD console, go to platform-tools again and run adb connect <emulator ip>.
    1. In this example, run adb connect 192.168.57.101
       Capturadepantalla2015-07-28alas23_21_53_png
    2. Then run adb devices to confirm that the connection was successful. If so, the following screen should appear:
      Capturadepantalla2015-07-28alas23_23_19_png
  2. Next, to be able to run on Genymotion Mac, in GeneXus you need to enter your server's IP in Webroot.
    1. In this example, it is http://10.211.55.5/PreciosUY/servlet (it doesn't have port 8080 as Tomcat is installed on port 80)
      Capturadepantalla2015-07-28alas23_26_57_png
  3. If you want to run the iOS emulator as well, in the Smart Devices generator properties enter the data as shown in the image below, changing the OSX user and password.
    Capturadepantalla2015-07-28alas23_27_52_png
  4. If you have the Windows Firewall or any other firewall enabled, add a rule for the local Tomcat and adb.exe so that the firewall doesn't prevent them from communicating on the local network.

    To do so:

    1. Open the Firewall properties and select Allow a program or feature through Windows Firewall.
      Capturadepantalla2015-07-29alas11_05_421_png
    2. Add Tomcat.exe and adb.exe as allowed applications on the Local Network.
      Capturadepantalla2015-07-29alas11_37_441_png

If everything is correct, you will be able to run both emulators on Mac and, for GeneXus Salto, use Live Editing on both platforms simultaneously.

Capturadepantalla2015-07-28alas23_45_372_png

See Also

Prototype SD apps in Genymotion remotely on Windows
 

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant