Genymotion Cloud PaaS

– How to enable or disable ADB? –

 

From HTTP API

1. To get the API reference, refer to Documentation → API Reference → /configuration/adb

2. To set it directly from the user interface, click on “Try it out”.

3. Enable or disable ADB by editing the payload, click on execute.
– To enable at runtime, set “active”=true
– To disable at runtime, set “active”=false
– To enable by default after reboot, set “active_on_reboot”=true
– To disable by default after reboot, set “active_on_reboot”=false

If you enable ADB using the standard 5555 TCP port, we do not recommend opening the ADB port 5555 in Security Group / Firewall, since the ADB connection is neither secured nor authenticated. Instead, we recommend creating an SSH tunnel or opening it only for your IP address.

 

From Command Line

Enable ADB

To establish the communication between your computer and Android virtual devices, follow the steps below:

1. Log in with SSH or PuTTY

Please refer to How do I access my Virtual Device via ssh cli? or How do I access my Virtual Device With PuTTY (Windows)?

2. Enable ADB

From the instance shell, use the command:

setprop persist.sys.usb.config adb

ADB is now accessible using the standard 5555 TCP port. We do not recommend opening the ADB port 5555 in AWS Security Group since the ADB connection is neither secured nor authenticated. Instead, we recommend creating an SSH tunnel.

3. Create an SSH tunnel for this connection

Please refer to How to create a tunnel connection with SSH cli or PuTTY (Windows)?

5. (Optional) Connect your virtual device

Use the command:

adb connect localhost:5555

This is optional as the first virtual device might have been automatically connected to ADB.

6. Connect other virtual devices to ADB

Create new tunnels as explained in How to create a tunnel connection with SSH cli or PuTTY (Windows)?

Connect ADB to the corresponding tunnel.
For example:

adb connect localhost:5556

This will connect ADB to the instance set to the SSH tunneled port 5556

Disable ADB

To stop the communication between your computer and Android virtual devices, follow the steps below:

1. Log in with SSH or PuTTY (Windows)

Please refer to How do I access my Virtual Device via ssh cli? or How do I access my Virtual Device With PuTTY (Windows)?

2. In the virtual device shell, run command

setprop persist.sys.usb.config none
x