Mobile Session
Mobile devices in QDC are accessed through ADB (Android Debug Bridge) over an SSH tunnel. This secure connection allows you to run ADB commands on remote devices as if they were connected locally.
To get started, click Connect on your Interactive Session to view the SSH tunnel setup instructions.
ADB Commands
The following are the most commonly used ADB commands for interacting with mobile devices.
Using a non-default port?
Add -P <port> before each command: adb devices → adb -P <port> devices
adb devices - Lists all connected devices
adb shell - Opens a remote shell on the connected device, allowing you to run commands directly on the device
adb install - Installs an APK on the connected device
adb push - Copies a file from your local machine to the device
adb pull - Copies a file from the device to your local machine
adb logcat - Displays the device's log output in real-time. Useful for debugging
FAQ
How do I copy a file to the device?
Use adb push to copy files from your local machine to the device:
adb push <local_path> <device_path>
Example:
Input:
adb push C:\path\to\myfile.txt /sdcard/myfile.txtOutput:
C:\path\to\myfile.txt: 1 file pushed, 0 skipped.How do I get a file from the device?
Use adb pull to copy files from the device to your local machine:
adb pull <device_path> <local_path>
Example:
Input:
adb pull /sdcard/myfile.txt C:\path\to\destination\myfile.txtOutput:
/sdcard/myfile.txt: 1 file pulled, 0 skipped.To pull to your current directory, use . as the local path:
adb pull /sdcard/myfile.txt .Why am I seeing a security warning about host authenticity?
When connecting for the first time, you may see a message like:
The authenticity of host 'ssh.qdc.qualcomm.com' can't be established.
Are you sure you want to continue connecting (yes/no/[fingerprint])?This warning message is a standard SSH security feature that appears the first time you connect to a new server. Type yes and press Enter to continue.
What if the SSH tunnel fails with "Permission denied"?
If you see an error like this when running the SSH tunnel command:
bind [127.0.0.1]:<port>: Permission deniedThis means the port is already in use by another process (usually a local ADB server).
To fix:
- Run
adb kill-serverto free the port - Run the SSH tunnel command again
How do I connect to additional ports of the device?
QDC allows you to connect to additional ports on the device in the range 8900 to 8909.
Before running the command below, replace the following values with your session details:
| Value | Description | Where to find it |
|---|---|---|
{path_to_private_key} | Path to your SSH private key file | The file you created/uploaded when setting up the session |
{session_id} | Your session ID | Shown in the Connect dialog of your Interactive Session |
Example command to forward port 8900 over SSH tunnel:
ssh -i {path_to_private_key} -L 8900:sa{session_id}.sa.svc.cluster.local:8900 -N sshtunnel@ssh.qdc.qualcomm.com