ADB (Android Debug Bridge) lets you control an Android device from your computer. You can use it to install apps, run shell commands, collect logs, and perform other tasks without interacting with the phone directly. If you're an automation engineer or part of a QA team, then you're probably already familiar with this.
However, with a physical phone, you typically connect to ADB over USB. Cloud phones are a little different because they run remotely, so there's no cable to plug in. Incogniton supports network-based ADB connections, which lets you run the same commands on a cloud phone from your computer.
Since ADB gives you direct access to the device, it's worth understanding how to establish the connection, use it safely, and disconnect when you're finished. This guide walks you through the setup, common ADB commands, and the options for automating your Incogniton cloud phones.
What You Can Do With ADB on a Cloud Phone
Once connected, you can use ADB to transfer files, collect system logs, capture screenshots and install APK files directly on the cloud phone.
Incogniton Cloud Phones run on real ARM hardware and let you choose the device model and Android version. This makes it easier for QA teams to test apps across different device configurations without maintaining a collection of physical phones.
How to Connect to a Cloud Phone With ADB
Connecting takes three steps. Enable ADB for the phone, copy the connect command once the phone is running, and paste it into a terminal. Before you start, check that you have the following:
- The adb tool from Android SDK Platform-Tools installed on your computer. Adding the platform-tools folder to your PATH lets you run adb from any folder; otherwise, run commands from inside that folder.
- Incogniton open on the same computer.
- A cloud phone with a proxy attached, since every Incogniton cloud phone needs one before you can use it.
Turn On ADB for the Phone
Open Cloud Phones in the left-side menu, click the three-dot icon (⋮) next to the phone, and click Enable ADB. A confirmation appears once ADB is on.
You can enable ADB with the phone powered on or off. The option is unavailable while the phone is being set up, starting, resetting or changing its Android version, and once enabled, ADB stays on across restarts until you turn it off yourself.
Copy the ADB Command
The phone has to be running before Incogniton can give you a command, so power it on first. You can then copy the command in either of two ways:
- Click the ⋮ icon next to the phone and click Copy ADB command.
- Click the phone's ADB Address column, which shows Copy until a connection is open and the local address after that.
The copied command looks like adb connect 127.0.0.1:6555. Copy ADB command appears in the menu only while the phone is running with ADB enabled.
Connect From Your Terminal
Open Command Prompt or PowerShell on Windows, or Terminal on macOS, then paste the command and press Enter:
adb connect 127.0.0.1:6555
Once adb reports the connection, check that the phone is listed:
The cloud phone now appears alongside any other Android device connected to your computer, ready for ADB commands.
Why the ADB Address Starts With 127.0.0.1
The address 127.0.0.1 refers to your own computer. As the old saying goes, there's no place like 127.0.0.1. When ADB is enabled and the phone is running, Incogniton opens a local port on your computer in the range 6555 to 6654. Incogniton then relays the commands you send to that port to the cloud phone.
Your terminal communicates only with the local port, and Incogniton manages the connection to the phone.
The connection behaves as follows:
- The address works only on the computer running Incogniton, and connections from other user accounts on that computer are refused.
- The port stays open while the phone is running, ADB is enabled and Incogniton is open.
- The port closes when you power off the phone, disable ADB, reset the phone or log out of Incogniton.
- The port number can change each time the phone starts, so copy the command again after a restart and update any script that stores the old address.
ADB Commands That Work on a Cloud Phone
With the connection set up, you can run ADB commands on the phone from your terminal. The examples below use 127.0.0.1:6555, so swap in the address you copied.
To install an APK without going through Google Play:
adb install app.apk
To open a shell inside Android:
adb shell
To end the session once you're finished with the phone:
adb disconnect 127.0.0.1:6555
Automating actions inside third-party apps falls under each platform's terms, so check them before you script activity on an account.
When to Use ADB or Scheduled Tasks
ADB is one of two ways to automate an Incogniton cloud phone, and each one fits a different kind of work:
- ADB works inside Android. Use it for command-level tasks such as installing builds, reading logs or running shell commands.
- Scheduled tasks run from the Automation tab with no code. You pick a ready-made task and one or more phones, then run it now, schedule it for later or set it to repeat.
How to Fix Common ADB Connection Errors
When an ADB connection fails, Incogniton shows a specific message, and most of them have a one-step fix.
| Message | What it means | What to do |
| ADB access was refused. Check that the phone is on and ADB is enabled. | The phone is off, or ADB is disabled | Power on the phone, check that ADB is enabled in the ⋮ menu, and copy the command again |
| Could not open a local ADB port | Incogniton couldn't open the local port | Click Copy ADB command again |
| Too many ADB connections are open. Close some and try again. | Too many connections are open at once | Run adb disconnect on devices you no longer use |
| The Incogniton ADB service cannot be reached. adb keeps retrying. | Your computer can't reach the Incogniton ADB service | Check your internet connection; adb keeps retrying on its own |
The ADB page in the Incogniton docs keeps the current list of messages and steps.
How to Turn Off ADB When You're Done
Since ADB gives direct access to the phone, Incogniton recommends enabling it only when you need it and disabling it afterward. To turn it off, open the ⋮ menu next to the phone and click Disable ADB, which also closes the local connection on your computer.
Running adb disconnect 127.0.0.1:6555 is the lighter option when you plan to reconnect soon. The command ends the session in your terminal while ADB stays enabled on the phone, ready for a freshly copied command.
On a team, turning ADB on or off and copying the command requires the Manage cloud phones permission for that phone. Give that permission only to the people who need terminal access to the phone.
Conclusion
ADB lets you run commands on a cloud phone from your terminal, using the same tools you use on a physical device.
The local relay opens when you enable ADB, works only on your computer, and closes when you disable ADB or when the phone shuts down. Standard ADB commands then work as they would on a physical device, while scheduled tasks handle the work outside Android.
To set up your first phone, start with Incogniton cloud phones.