{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"ADB Connection Guide","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"adb-connection-guide","__idx":0},"children":["ADB Connection Guide"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide provides detailed instructions for connecting to cloud phone devices via ADB, supporting ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android 12/15"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android 13/14"]}," versions."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-adb-connection-for-android-12--android-15-cloud-phones","__idx":1},"children":["1. ADB Connection for Android 12 / Android 15 Cloud Phones"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-connect-to-the-cloud-phone-ip-and-port","__idx":2},"children":["Step 1: Connect to the Cloud Phone IP and Port"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb connect"]}," command to directly connect to the cloud phone's IP address and port."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"adb connect 172.168.10.1:123456\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["172.168.10.1:123456"]}," with your actual cloud phone IP and port."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-authenticate-with-connection-code","__idx":3},"children":["Step 2: Authenticate with Connection Code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After successful connection, authenticate using the connection code."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"adb shell 123456\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After successful authentication, you will be defaulted to enter the cloud phone, and you can use \"exit\" to log out"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"exit\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Or specify the device address:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"adb -s 172.168.10.1:123456 shell 123456\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note: The connection code is usually provided by the cloud phone platform. Ensure it is entered correctly."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-adb-connection-for-android-13--android-14--android-15a--android-16-cloud-phones","__idx":4},"children":["2. ADB Connection for Android 13 / Android 14 / Android 15A / Android 16 Cloud Phones"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For these versions, an SSH tunnel must be established to forward the ADB port. This requires two steps."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-establish-ssh-tunnel-open-first-cmd-window","__idx":5},"children":["Step 1: Establish SSH Tunnel (Open First CMD Window)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the following SSH command to map the remote ADB port to your local machine:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ssh -oHostKeyAlgorithms=+ssh-rsa 10.2.179.250_1763627294587@107.151.131.2 -p 1824 -L 9897:adb-proxy:14566 -Nf\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Notes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Replace the username, IP, and port in the command with your actual configuration."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When prompted for a password, paste the SSH password and press Enter."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The command will not produce any output if successful, indicating the tunnel is running in the background."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-connect-to-local-adb-port-open-second-cmd-window","__idx":6},"children":["Step 2: Connect to Local ADB Port (Open Second CMD Window)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In a new window, execute the ADB connection command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"adb connect localhost:9897\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Successful output example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"connected to localhost:9897\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"complete-workflow-example","__idx":7},"children":["Complete Workflow Example"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-first-cmd-window-ssh-tunnel","__idx":8},"children":["1. First CMD Window (SSH Tunnel):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ssh -oHostKeyAlgorithms=+ssh-rsa 10.2.179.250_1763627294587@107.151.131.2 -p 1824 -L 9897:adb-proxy:14566 -Nf\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Next, enter the SSH connection password"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-second-cmd-window-adb-connection","__idx":9},"children":["2. Second CMD Window (ADB Connection):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"adb connect localhost:9897\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"verify-connection-status","__idx":10},"children":["Verify Connection Status"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the following command to check if the device is connected:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"adb devices\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Expected output:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"List of devices attached\nlocalhost:9897     Device\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-adb-commands-reference","__idx":11},"children":["Common ADB Commands Reference"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb devices"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List connected devices"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb shell"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enter device shell terminal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb shell pm list packages"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List installed apps"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb install app.apk"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Install APK file"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb uninstall package.name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Uninstall app"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb reboot"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reboot device"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"important-notes","__idx":12},"children":["Important Notes"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure you have installed ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.android.com/studio/releases/platform-tools"},"children":["Android SDK Platform Tools"]}," and configured environment variables."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The SSH tunnel method for Android 13/14/15A is encrypted and secure — recommended for use."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If connection times out, check network settings, firewall rules, and port configurations."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Always confirm that the cloud phone is powered on and ADB access is enabled before connecting."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow these steps to successfully connect your cloud phone for ADB debugging and automation tasks."]}]},"headings":[{"value":"ADB Connection Guide","id":"adb-connection-guide","depth":1},{"value":"1. ADB Connection for Android 12 / Android 15 Cloud Phones","id":"1-adb-connection-for-android-12--android-15-cloud-phones","depth":2},{"value":"Step 1: Connect to the Cloud Phone IP and Port","id":"step-1-connect-to-the-cloud-phone-ip-and-port","depth":3},{"value":"Step 2: Authenticate with Connection Code","id":"step-2-authenticate-with-connection-code","depth":3},{"value":"2. ADB Connection for Android 13 / Android 14 / Android 15A / Android 16 Cloud Phones","id":"2-adb-connection-for-android-13--android-14--android-15a--android-16-cloud-phones","depth":2},{"value":"Step 1: Establish SSH Tunnel (Open First CMD Window)","id":"step-1-establish-ssh-tunnel-open-first-cmd-window","depth":3},{"value":"Step 2: Connect to Local ADB Port (Open Second CMD Window)","id":"step-2-connect-to-local-adb-port-open-second-cmd-window","depth":3},{"value":"Complete Workflow Example","id":"complete-workflow-example","depth":2},{"value":"1. First CMD Window (SSH Tunnel):","id":"1-first-cmd-window-ssh-tunnel","depth":3},{"value":"2. Second CMD Window (ADB Connection):","id":"2-second-cmd-window-adb-connection","depth":3},{"value":"Verify Connection Status","id":"verify-connection-status","depth":2},{"value":"Common ADB Commands Reference","id":"common-adb-commands-reference","depth":2},{"value":"Important Notes","id":"important-notes","depth":2}],"frontmatter":{"seo":{"title":"ADB Connection Guide"}},"lastModified":"2026-05-11T01:22:01.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/cloud-phone/adb","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}