ADB 命令查询
常用 ADB 调试命令速查表
加载工具中...
ADB 命令查询功能特点
- 收录常用ADB调试命令
- 支持关键词搜索
- 支持一键复制命令
- 按功能分类整理
- 显示命令使用说明
- 持续更新命令库
ADB 命令查询使用场景
- Android应用开发调试
- 设备管理和连接
- 应用安装和卸载
- 文件传输和管理
- 日志查看和问题排查
常用 ADB 调试命令速查表
加载工具中...
adb devices列出所有连接的设备
示例: adb devices -l
adb connect <ip>:<port>通过网络连接到设备
示例: adb connect 192.168.1.100:5555
adb disconnect <ip>:<port>断开网络设备连接
示例: adb disconnect 192.168.1.100:5555
adb kill-server停止 ADB 服务
示例: adb kill-server
adb start-server启动 ADB 服务
示例: adb start-server
adb install <apk路径>安装 APK
示例: adb install app.apk
adb install -r <apk路径>覆盖安装(保留数据)
示例: adb install -r app.apk
adb uninstall <包名>卸载应用
示例: adb uninstall com.example.app
adb shell pm list packages列出所有应用包名
示例: adb shell pm list packages -3
adb shell pm clear <包名>清除应用数据
示例: adb shell pm clear com.example.app
adb shell am start -n <包名>/<Activity>启动应用
示例: adb shell am start -n com.example.app/.MainActivity
adb shell am force-stop <包名>强制停止应用
示例: adb shell am force-stop com.example.app
adb push <本地路径> <设备路径>推送文件到设备
示例: adb push file.txt /sdcard/
adb pull <设备路径> [本地路径]从设备拉取文件
示例: adb pull /sdcard/file.txt
adb logcat查看设备日志
示例: adb logcat | grep -i error
adb logcat -c清除日志缓冲区
示例: adb logcat -c && adb logcat
adb bugreport生成完整错误报告
示例: adb bugreport > bugreport.zip
adb shell dumpsys <服务>获取系统服务信息
示例: adb shell dumpsys battery
adb shell screencap <文件路径>屏幕截图
示例: adb shell screencap /sdcard/screen.png
adb shell screenrecord <文件路径>录制屏幕
示例: adb shell screenrecord /sdcard/demo.mp4
adb shell进入设备 Shell
示例: adb shell
adb shell <命令>在设备上执行命令
示例: adb shell ls /sdcard
adb shell input tap <x> <y>模拟点击
示例: adb shell input tap 500 500
adb shell input swipe <x1> <y1> <x2> <y2>模拟滑动
示例: adb shell input swipe 500 500 500 1000
adb shell input keyevent <键码>模拟按键
示例: adb shell input keyevent 26
adb shell wm size获取屏幕分辨率
示例: adb shell wm size
adb shell wm density获取屏幕密度
示例: adb shell wm density
adb reboot重启设备
示例: adb reboot
adb reboot bootloader重启到 bootloader
示例: adb reboot bootloader
adb reboot recovery重启到 recovery
示例: adb reboot recovery
adb root以 root 权限重启 adbd
示例: adb root
adb remount重新挂载系统分区为可读写
示例: adb remount
adb forward <本地端口> <远程端口>端口转发
示例: adb forward tcp:8080 tcp:8080
adb reverse <远程端口> <本地端口>反向端口转发
示例: adb reverse tcp:8081 tcp:8081
adb sideload <更新包>刷入 OTA 更新包
示例: adb sideload update.zip