获取package信息
adb shell dumpsys package PackageName
eg: adb shell dumpsys package com.baidu.test
获取包名 用grep过滤
adb shell dumpsys package PackageName |grep versionName
eg: adb shell dumpsys package com.baidu.test |grep versionName
模拟按键事件
adb shell input keyevent EVENT_FLAG
eg: adb shell input keyevent 23
启动APP
adb shell am start PACKAGE_NAME/ACTIVITY_PATH
eg: adb shell am start com.baidu.example/.ui.activity.MainActivity
清除规则
adb root ; su ; iptables -F
push pull
前提:adb root;adb remount
adb push /target/target.file /system
adb pull /system /target
查看log
adb shell logcat |grep INFO
adb shell logcat -v time |grep INFO
查看文件
cat query.file
重启
adb reboot