Connect to Genymotion Android emulator remotely

Even if this might appear as an edge case I know a lot of Android devs using Genymotion emulator for Mac in their daily work, but emulators in general, are RAM eater that slow down the entire system.

Genymotion is an awesome Android emulator, the support is good and the installation is fast and simple: it simply works out of the box!

After experimenting some configurations, I’ve accomplished to run Genymotion on a Windows PC and make it available for connection from my Mac.

The solution has been tested on a local trusted network nevertheless, an SSH tunnel would be preferable.

This solution can be convenient if you don’t want to overload your Mac with the heaviness of the emulator or/and a long test suite takes some time to finish and in the meantime you need to switch to another emulator.

 

Precondition:

  • Mac with Android SDK.
  • Windows with Genymotion installed.

First of all,  go to Genymotion settings > ADB > Select Use custom Android SDK tool and leave it empty, in this way Genymotion will not restart the local ADB when the external ADB will try to connect.

Set Genymotion SDK empty

Now you need to open port 5555 and 5554 to let ADB connects to Genymotion.

On Start, go to Windows System > Control Panel > System and Security > Windows Firewall > Advanced Settings.

ADB remote 5555

Right click on Inbound Rules > New Rule

Select Port

img_20161002_181101

Select TCP

In Specific local ports type 5555

img_20161002_181123

Select Allow the connection

img_20161002_181133

Uncheck Domain and Public if you need this rule for your home network only

img_20161002_181143

Add a name to the rule I’ve called it ADB remote 5555

img_20161002_181236

Now right click on Inbound Rules > New Rule once again and repeat the process for port 5554.

Use the same configurations, just specify 5554 in Specific local ports, and in the end call the rule ADB remote 5554

It’s time to start Genymotion and run our Android emulator.

Take note of the IP address of the emulator, from now on I’ll call it <emulatorIP>.

emulatorip

And now it’s time to forward the incoming connections to the Genymotion emulator.

From the windows machine run command line as administrator: go to Start > type cmd > the first result will be Command Prompt right-click on it and select Run as administrator.

type


netsh interface portproxy add v4tov4 listenport=5555 connectport=5555 connectaddress=<emulatorIP>

and hit return.

type

netsh interface portproxy add v4tov4 listenport=5554 connectport=5554 connectaddress=<emulatorIP>

and hit return.

You can double check you typed correctly running this command

netsh interface portproxy show all

and you should see something like this

screenshot-2016-10-02-18-38-30

Now kill adb on Win

adb kill-server

And take note of the local IP typing

ipconfig | findstr IPv4

I’ll call it <windowsIP>.

screenshot-2016-10-02-18-48-32

Go finally to your Mac and restart the adb.


adb kill-server
adb start-server

And connect to Genymotion by typing the IP of the Windows PC

adb connect <windowsIP>:5555

screenshot-2016-10-02-18-51-05

 

 

This is the solution I found without using any external software for SSH tunnel or PuTTy, if you want to explore more solutions you can check these posts on StackOverflow

 

Overlap2D, a level editor for LibGdx Open Source

overlap2d level editor

Level Editor

A level editor for LibGdx is a rocky topic.

Coming from the Android world, I thought a clever move would have been sticking to Java for game development. Unfortunately, the panorama of level editing software for this language is still really poor. Many game engines, like Unity, contain awesome integrated solutions, stable and rock-solid for creating complex levels.

You will find a totally different scenario if you decide to develop your game using Java and LibGdx.

A stable level editor recognised from the community is somehow still missing in the LibGdx ecosystem. The choice is limited and some of them are not maintained anymore or unstable.

The top 3 most promising:

Far from being production ready, I decided to give it a shot with Overlap2D.

Now at its 0.1.3 version.

Overlap2D

Pro

Even if not super stable, I have to admit I enjoyed using this editor. The learning curve is smooth and several tutorials are available on a youtube channel

A big problem I had, was related with rotations applied to a physical body, that feature was not working properly so I had to spend a while in the code base to figure out a solution and gladly the overlap team accepted my pull request 🙂

Among the changes, I decoupled overlap2D from physics and light, so now there is a way for managing outside the engine this two elements.

The project is open source available on GitHub.

Cons

Among the drawbacks that I found so far: the resizing. Sometimes after a window resize the editor becomes unusable. All the UI elements will become somehow misaligned with the mouse pointer. This is very frustrating and I hope the team will try to fix this really annoying issue.

The community forum is still small and sometimes the feedback may arrive after a while.

Conclusion

Overlap2D is not ready for big productions, but it can be a good solution for Indie Devs or small games based on LibGdx. Being open source is a big plus.

VisEditor looks promising also. It worth mentioning that Overlap2D is based on VisEditor.

I hope the community will embrace the potential of one of these two.

Considerations are always welcome.

If you have a direct experience with a level editor for LibGdx let me know in the comments below!

 

 

 

First Post

sarpex

Sarpex.co.uk is live! In these pages you’ll find information about Sarpex Ltd and day to day blogs about Java, Android and LibGDX development.

Blog section will cover development topic with ideas, concepts, tutorials and code snippet.

Comments and suggestions are encouraged from who wants to share his point of view.

simone