Genymotion on Demand

– How to enable or disable ADB? –


Enable ADB

# Login with ssh
$ ssh -i key.pem [email protected]_ip
# Enable ADB
$ setprop persist.sys.usb.config adb

We do not recommend opening the adb port 5555 in AWS Security Group since the adb connection is neither secured nor authenticated. We recommend creating instead a ssh tunnel. But, if you decide to open the adb connection, here is the port adb TCP 5555

# ssh tunnel this connection
$ ssh -i key.pem -NL 5555:localhost:5555 [email protected]_ip

You need to open another shell to use other commands. For the 1st device, there will be an adb auto connection but not for the others.

Addtionnal tips: You can connect to other instances

$ ssh -i key.pem -NL 5556:localhost:5555 [email protected]_ip2
$ adb connect localhost:5556

Disable ADB

# Login with ssh
$ ssh -i key.pem [email protected]_ip
# Execute shell command
$ setprop persist.sys.usb.config none