查看最上层成activity名字
1234#linux:adb shell dumpsys activity | grep "mFocusedActivity"#windows:adb shell dumpsys activity | findstr "mFocusedActivity"查看service列表
1adb shell dumpsys activity services [包名(可选)]查看window列表
1adb shell dumpsys window启动activity
1234567adb shell am start -n <包名/完整类名> --es extra_key "extra_value"#(-n 类名,-a action,-d date,-m MIME-TYPE,-c category,-e 扩展数据,等)#扩展数据类型:#-e String, int#--es String#--ez boolean#--ei int启动service
12adb shell am startservice -n <包名/完整类名>#同启动activity一样也可以添加扩展数据挂载/system 为可读写
123adb shellsumount -o remount,rw /system查看ip等网络信息
1adb shell ifconfigkill adb服务
有时候adb shel找不到设备,可以先杀掉adb服务再试试1adb kill-serverkill adb进程
有时候杀掉adb服务还是不行,可以尝试杀掉adb进程1234#linuxkillall adb#windowstaskkill /f /im adb.exe安装apk
1adb install <apkfile>卸载已安装的app
1adb uninstall <package>通过settings修改AndroidId
123456#获取aidsettings get secure android_id#修改aidsettings put secure android_id [aid]#直接输入settings可查看使用说明settings查看activity情况
1adb shell dumpsys activity top