ADB tunnel

The ADB tunnel feature allows you to create an SSH tunnel to a running Appetize Android session, enabling you to interact with the device via Android Studio or standard adb protocol.

Enable ADB Tunnel

To enable the ADB tunnel feature, you can either choose to enable it through a query parameter or by utilizing the JavaScript SDK.

Enabling the SSH ADB tunnel has a limitation that causes our ADB connection to terminate. Consequently, the following Appetize features will be affected and unavailable:

With Query Parameter

Add the debug=true query parameter to your app or embed URL

&enableAdb=true

See Query Params Reference for more information.

With JavaScript SDK

Set enableAdb: true in the configuration e.g.

await client.config({
    enableAdb: true,
    ...
})

See Configuration for more information.

Usage

With App Page

One common practice is to use the ADB tunnel to connect to an Android "standalone" device, without any specific app installed. For more information see Standalone Device.

The app page provides a simple way to retrieve the adb information required to connect to the device. You can access this via your app's app link

https://appetize.io/app/{publicKey}?&enableAdb=true

or by going to your Apps page, clicking view under the app you want to inspect and then toggling Adb Tunnel to On

Select Tap To Play (or your equivalent text to start the session). A command will then be generated that you need to copy and paste in your shell environment e.g.

Then, the Appetize virtual Android device will appear with adb devices, as if it were a device plugged into your computer via USB.

With JavaScript SDK

You can retrieve all the information needed to start an ADB session via the adbConnection property

const adbInfo = session.adbConnection
const command = adbInfo.command

See our JavaScript API Reference for more information.

Last updated