Skip to main content

FAQ - Key ADB Command Usage for Debugging

Installing ADB​

Expand installation steps

Mac​

Install adb with Homebrew. If you install manually, you must configure environment variables yourself.

  1. Install Homebrew first.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install adb with Homebrew.
brew install android-platform-tools
  1. Verify the installation.
adb version

If adb is not recognized as a runnable program, check that the adb path is included in the PATH environment variable.

Windows​

  1. Install adb using Chocolatey or Winget.
Using Chocolatey
choco install adb
Using Winget
winget install Google.AndroidSDKPlatformTools
  1. Verify the installation.
adb version

Linux​

Ubuntu / Debian family​

  1. Install adb with the apt package manager.
sudo apt update
sudo apt install android-tools-adb android-tools-fastboot
  1. Verify the installation.
adb version

ADB connection and device check​

This command lists attached devices. If no serial appears, try reconnecting.

Command
adb devices
Sample output
List of devices attached
emulator-5554 device

CCS connection​

These commands link the device to the service. Use them to connect to Bluelink, Genesis Connected Services, and similar offerings.

CCS vehicle-specific commands

The commands below are required to connect to the service on CCS vehicles. They are not supported on Devboxes or the Pleos Connect Emulator. Do not run them or use them for CCS connection testing in those environments.

adb shell settings put secure hmg_is_ccs_account_linked 1
adb shell settings put global hmg_provisioning_status 4

Screen capture​

Captures a screenshot from the connected device. The file is saved on the desktop as screen_<timestamp>.png.

adb exec-out screencap -p > ~/Desktop/screen_$(date +"%Y%m%d_%H%M%S").png

Screen recording​

Records the device screen while connected.

  1. Install a tool to package video (e.g. ffmpeg).
Example on Mac
brew install ffmpeg
  1. Start recording
adb exec-out screenrecord --output-format=h264 - > ~/Desktop/screen.h264
  1. Stop recording In the same terminal where recording is running, press Ctrl+C to stop.

  2. Convert format Repackage the H.264 stream into an MP4 container. After this step you can play the capture on your PC.

Example on Mac/Linux
ffmpeg -framerate 60 -i ~/Desktop/screen.h264 -c copy ~/Desktop/screen_$(date +"%Y%m%d_%H%M%S").mp4

Install / run / stop / uninstall apps​

Install an app​

Installs the APK.

adb install -d -r [path-to-apk]
# adb install -d -r app-my-signed.apk

Options
-d: Allow version downgrade
-r: Remove local data

If the command above fails, try:

adb push [path-to-apk] /data/local/tmp/
adb shell pm install -d -r /data/local/tmp/[apk-file-name]

# adb push app-my-signed.apk /data/local/tmp/
# adb shell pm install -d -r /data/local/tmp/app-my-signed.apk

Launch an app​

Find the package, then start the app.

Find package
adb shell pm list packages | grep [partial-package-name]
# adb shell pm list packages | grep radioline
Launch app: 1) Via launcher
adb shell monkey -p [package-name] -c android.intent.category.LAUNCHER 1
# adb shell monkey -p ai.umos.appmarket -c android.intent.category.LAUNCHER 1
  • Behaves similarly to choosing the app from the Global Navigation Bar (GNB).
Launch app: 2) Start activity directly
adb shell am start -n [package-name]/[activity-path]
# adb shell am start -n com.radioline.android.radioline/.MainActivity

Uninstall an app​

Removes the app. After uninstalling, clear the package data if needed.

Uninstall app
adb uninstall [package-name]
# adb uninstall ai.umos.appmarket
Clear app data
adb shell pm clear [package-name]
# adb shell pm clear ai.umos.appmarket

Force-stop an app​

Force-stops the app process.

Force-stop app
adb shell am force-stop [package-name]
# adb shell am force-stop ai.umos.appmarket

UI text input​

Sends text into the focused field on the emulator or device.

Text input
adb shell input text "[text]"
# adb shell input text "test"

Change gear state​

Change the gear mode in Pleos Connect Virtual Console.

For more information, refer to the Pleos Connect Virtual Console user guide.

Enable / disable driving restrictions​

These are step-by-step commands to enable driving restrictions and to disable an enabled driving-restriction state.

This command is available across all vehicle models.

  • Enable driving restrictions (ON)
adb shell cmd hmg_car_service --service drivingstate driving_regulation on
  • Disable driving restrictions (OFF)
adb shell cmd hmg_car_service --service drivingstate driving_regulation off

Change mode​

Switches to utility mode.

Run utility-mode commands only after establishing vehicle speed 0, parking brake on, and gear P.

adb shell echo -e -n "\x83\x50\x10\x00\x00\x02\xAA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00" > /dev/vcs_simulator_rx