Drone ADB Debugging Guide
Android Debug Bridge (ADB) is an essential tool for debugging Android-based drone applications, smart remote controllers, and onboard Android computing platforms (such as Qualcomm RB5/RB6, Snapdragon Flight, or Android-based Ground Control Stations). It enables developers to install applications, capture logs, inspect processes, debug crashes, and communicate directly with the Android operating system.
1. Prerequisites
- Android SDK Platform Tools (ADB/Fastboot)
- Windows, Linux, or macOS development PC
- USB-C cable or Wi-Fi connection
- Android-based drone controller or onboard computer
- USB Debugging enabled
Verify the installation:
adb version
List connected devices:
adb devices
Expected output:
List of devices attached
1234567890ABCDEF device
2. Enable USB Debugging
On the Android device:
Settings
→ About Phone
→ Tap Build Number 7 times
→ Developer Options
→ Enable USB Debugging
For Android 11+, wireless debugging is also supported.
3. Useful ADB Commands
Device Information
adb devices
adb shell getprop
adb shell getprop ro.build.version.release
adb shell getprop ro.product.model
Install Drone App
adb install DroneApp.apk
Replace existing:
adb install -r DroneApp.apk
Grant permissions automatically:
adb install -r -g DroneApp.apk
Uninstall
adb uninstall com.xdynamics.drone
Start Application
adb shell monkey -p com.xdynamics.drone 1
or
adb shell am start -n \
com.xdynamics.drone/.MainActivity
4. View Logs
Real-time logs:
adb logcat
Filter your application:
adb logcat | grep XDynamics
or
adb logcat | grep Drone
Clear log:
adb logcat -c
Save log:
adb logcat > drone.log
5. Crash Debugging
Only fatal crashes:
adb logcat *:E
Java exceptions:
adb logcat AndroidRuntime:E *:S
Native crashes:
adb logcat | grep libc
6. Monitor Application
List running packages:
adb shell pm list packages
Running process:
adb shell ps | grep drone
Memory:
adb shell dumpsys meminfo com.xdynamics.drone
CPU:
adb shell top
7. Capture Screenshots
adb shell screencap /sdcard/screen.png
Copy to PC:
adb pull /sdcard/screen.png
8. Screen Recording
adb shell screenrecord /sdcard/demo.mp4
Pull:
adb pull /sdcard/demo.mp4
9. File Transfer
Push:
adb push mission.json /sdcard/
Pull:
adb pull /sdcard/logs/
10. Shell Access
adb shell
Common commands:
ls
pwd
cd
cat
cp
mv
rm
ps
top
11. Network Debugging
Find IP:
adb shell ip addr show wlan0
Enable TCP debugging:
adb tcpip 5555
Connect:
adb connect 192.168.1.20:5555
Verify:
adb devices
Wireless ADB is supported on Android 11+ and can simplify debugging when the USB port is occupied by a drone remote controller.
12. Performance Analysis
GPU rendering:
adb shell dumpsys gfxinfo
Frame statistics:
adb shell dumpsys SurfaceFlinger
Battery:
adb shell dumpsys battery
Memory:
adb shell dumpsys meminfo
13. Camera Debugging
List cameras:
adb shell dumpsys media.camera
Media services:
adb shell dumpsys media.camera
adb shell dumpsys media.codec
14. USB Debugging
USB state:
adb shell dumpsys usb
Reconnect:
adb kill-server
adb start-server
15. Network Capture
Enable packet capture:
adb shell tcpdump -i any
Pull capture:
adb pull /sdcard/capture.pcap
Analyze with Wireshark.
16. Flight Log Collection
Typical locations:
/storage/emulated/0/Android/data/
/sdcard/DCIM/
/sdcard/Drone/
/sdcard/log/
Retrieve:
adb pull /sdcard/log
17. Debugging Native Code
Use LLDB or GDB:
lldb
or
gdbserver
Capture tombstones:
adb shell ls /data/tombstones
18. Useful dumpsys Commands
adb shell dumpsys activity
adb shell dumpsys battery
adb shell dumpsys location
adb shell dumpsys wifi
adb shell dumpsys sensorservice
adb shell dumpsys package
adb shell dumpsys input
adb shell dumpsys display
19. Drone App Testing Checklist
- ✔ USB connection
- ✔ Wi-Fi debugging
- ✔ Application installation
- ✔ Permission verification
- ✔ Camera preview
- ✔ Gimbal control
- ✔ Video recording
- ✔ Telemetry
- ✔ GPS
- ✔ IMU
- ✔ Compass
- ✔ Battery
- ✔ Live video streaming
- ✔ Flight log generation
- ✔ Crash log capture
- ✔ Memory monitoring
- ✔ CPU monitoring
- ✔ Network latency
- ✔ Remote controller communication
20. Typical Development Workflow
Android Device
│
│ USB / Wi-Fi
▼
ADB Server
│
▼
Android Studio / VS Code
│
├── Install APK
├── Logcat
├── LLDB
├── Performance Monitor
├── Screen Record
├── File Transfer
└── Shell Commands
For drone applications, a typical debugging session combines:
- ADB Logcat for application and system logs.
- Android Studio Debugger for Java/Kotlin breakpoints.
- LLDB/GDB for native C/C++ flight-control or image-processing code.
- Systrace/Perfetto for performance profiling.
- Wireshark + tcpdump for telemetry, MAVLink, RTSP, or custom network protocol analysis.
dumpsysutilities to inspect sensors, camera, battery, USB, and connectivity. These tools together provide comprehensive visibility into Android-based drone software behavior and performance.