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.
- Install Homebrew first.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install
adbwith Homebrew.
brew install android-platform-tools
- 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
- Install
adbusing Chocolatey or Winget.
choco install adb
winget install Google.AndroidSDKPlatformTools
- Verify the installation.
adb version
Linux
Ubuntu / Debian family
- Install
adbwith the apt package manager.
sudo apt update
sudo apt install android-tools-adb android-tools-fastboot
- Verify the installation.
adb version
ADB connection and device check
This command lists attached devices. If no serial appears, try reconnecting.
adb devices
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.
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.
- Install a tool to package video (e.g. ffmpeg).
brew install ffmpeg
- Start recording
adb exec-out screenrecord --output-format=h264 - > ~/Desktop/screen.h264
-
Stop recording In the same terminal where recording is running, press
Ctrl+Cto stop. -
Convert format Repackage the H.264 stream into an MP4 container. After this step you can play the capture on your PC.
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.
adb shell pm list packages | grep [partial-package-name]
# adb shell pm list packages | grep radioline
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).
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.
adb uninstall [package-name]
# adb uninstall ai.umos.appmarket
adb shell pm clear [package-name]
# adb shell pm clear ai.umos.appmarket
Force-stop an app
Force-stops the app process.
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.
adb shell input text "[text]"
# adb shell input text "test"
Change gear state
Injects gear-related VHAL events.
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 4
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 2
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 3
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 8
The gear indicator in Driving view may not update visually, but the underlying gear state value is affected.
Enable / disable driving restrictions
Step-by-step commands to turn driving restrictions on and off. Commands differ by device—use the section that matches your hardware.
Connect-W
- Enable driving restrictions
Run the following two steps.
- Set vehicle speed above 5 km/h (hold 30 m/s for 20 seconds)
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11600207 30 -t 20
- Parking brake — Off / Gear — not P
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11200402 "false"
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 8
- Disable driving restrictions
Run these two steps to clear the state you enabled.
- Set vehicle speed to 0 km/h
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11600207 0
- Parking brake — On / Gear — P
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11200402 "true"
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 4
Connect-S/L
ICE (internal combustion)
- Enable driving restrictions
adb shell dumpsys activity service com.android.car inject-vhal-event 0x21408A93 1
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11600207 30 -t 60
- Disable driving restrictions
adb shell dumpsys activity service com.android.car inject-vhal-event 0x21408A93 0
HEV (hybrid)
- Enable driving restrictions
adb shell dumpsys activity service com.android.car inject-vhal-event 0x21408209 1
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11600207 30 -t 60
- Disable driving restrictions
adb shell dumpsys activity service com.android.car inject-vhal-event 0x21408209 0
EV (electric vehicle)
- Enable driving restrictions
adb shell dumpsys activity service com.android.car inject-vhal-event 0x214081A4 1
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11600207 30 -t 60
- Disable driving restrictions
adb shell dumpsys activity service com.android.car inject-vhal-event 0x214081A4 0
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