1 打印log日志
adb logcat -vtime > log.txt
ctrl+c 停止后 日志目录 C:\Users\xxx\log.txt
2 打开设置页面
adb shell am start com.android.settings/com.android.settings.Settings
3 清理app缓存
adb shell pm clear 包名
4 启动app
adb shell am start 包名/MainActivity
5 停止app
adb shell am force-stop 包名 ~~~不会清除app产生的数据
adb shell pm clear 包名 ~~~清除app产生的数据
6 adb pull push
adb pull sdcard/test.txt D:\ ~~~sd卡里test.txt文件拷贝到d盘根目录
adb push d:\test.txt /sdcard/test.txt ~~~反推
7 adb 拷贝
adb shell
cd data/tombstones
cp tombstone_01 /sdcard/ ~~~将tombston_01文件拷贝到sdcard根目录下
8 logcat 日志打印不完全(4k限制)
adb shell stop svdebug
常用 adb命令 持续更新
最新推荐文章于 2025-03-07 16:35:33 发布