K230 ADB User Guide#
ADB Overview#
The K230 supports Android Debug Bridge (ADB), providing device debugging and file-transfer capabilities. Through ADB, developers can interact with the K230 device from a PC — executing shell commands, transferring files, and more. ADB is particularly useful for:
Remote debugging and log inspection
Application deployment and testing
File upload and download
ADB Configuration#
Board-side Configuration#
make rtsmart-menuconfig
# Locate the relevant option
Components Configuration > Enable CherryUSB > Enable CherryUSB Device
-> USB Device Function
# Select the function
Choose: CDC + ADB or ADB
Differences between the available configurations:
CDC — CanMV IDE connection
CDC+MTP — CanMV IDE connection + CanMV disk (MTP)
CDC+ADB — CanMV IDE connection + ADB
ADB — ADB only
UVC — UVC Device (incompatible with IDE and ADB)
Host Environment Setup#
Windows#
Download Android SDK Platform Tools from the Android developer website (platform-tools zip).
Extract and add to PATH:
# Add platform-tools directory to the system PATH environment variable
C:\path\to\platform-tools
Verify the installation:
adb version
Linux#
# Ubuntu / Debian
sudo apt update
sudo apt install android-tools-adb
# Or download platform-tools manually
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip platform-tools-latest-linux.zip
export PATH=$PATH:$(pwd)/platform-tools
ADB Commands#
Verify Device Connection#
After connecting the device, run the following on the PC:
# List connected devices
adb devices
# Expected output:
# List of devices attached
# device
ADB Shell#
Enter an interactive shell#
adb shell
Execute a single command#
# Syntax
adb shell <command>
# Example: check memory usage
adb shell free
ADB File Transfer#
adb push — Upload a file to the device#
# Syntax
adb push <local_file_path> <remote_file_path>
# Examples
adb push C:\Users\user\test.txt /tmp/test.txt
adb push ./local_config.json /tmp/config.json
adb push ./app.bin /tmp
adb pull — Download a file from the device#
# Syntax
adb pull <remote_file_path> [local_file_path]
# Examples
adb pull /tmp/syslog ./logs/
adb pull /tmp/debug.log ./debug_backup.log
adb pull /home/user/config.json ./
Notes#
File transfer supports single files only; directory transfer is not supported.
If ADB disconnects unexpectedly during use, the USB cable may have been jostled — reseat the cable firmly.
