Putty工具链接Android设备
下载连接:https://github.com/sztupy/adbputty/downloads
android
如上图所示:在HostName中输入transport-usb,port输入5037,connection type选择ADB。git
adb卸载系统应用
adb shell //进入Android shell su mount -o rw,remount /system rm -rf /system/app/xxx.apk rm -rf /data/data/<xxx的包名> mount -o ro,remount /system
github
adb 查看最顶层activity名称
adb shell dumpsys activity | grep “mFocusedActivity”
shell
adb 启动指定app
adb shell am start <包名>.<Activity名>
app
adb shell su setprop service.adb.tcp.port 5555 stop adbd start adbd
adb connect <同一局域网下设备ip地址>:5555
adb get-state
输出"device"或"emulator-5555"tcp
logcat
adb logcat *:W
工具
adb shell nohup command &
jobs//查询有多少在后台运行的命令 [1] + Running nohup command fg %n//将命令调到前台 Ctrl+C
adb install xxx.apk adb install -r xxx.apk //从新安装应用,保留应用数据
adb uninstall 应用包名
参考网址:https://developer.android.com/studio/command-line/adb?hl=zh-cn3d