显示当前activity adb shell dumpsys window w | grep \/ | grep name= | cut -d = -f 3 | cut -d \) -f 1 打开应用详情 adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS -d package:com.baidu.hi 清空应用信息 shell pm clear com.baidu.hi 多语言选择 adb shell am start -a android.settings.LOCALE_SETTINGS
adb
标签: adb
adb获取手机里安装的apk
操作步骤 手机用数据线连上电脑,开启USB调试 运行你要拷贝的APK,并使用adb获取包名 # MAC || Linux adb shell dumpsys activity | grep "top-activity" # Window adb shell dumpsys activity | find "top-activity" 获取包名位置 adb shell pm path com.apkfuns.demo 取出包名 adb pull /data/app/com.apkfuns.demo-1.apk <桌面上路径> 注意事项 如果apk是直接运行进去手机的,直接安装会报错: Failure [INSTALLFAILEDTEST_ONLY: installPackageLI] 方法1: adb push
利用adb查看设备当前栈信息
利用adb查看当前设备的所有activity信息 adb shell #dumpsys activity activities 显示信息如下 ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities) Main stack: * TaskRecord{430c7458 #29 A com.baidu.bpit.dushenghuo U 0} numActivities=10 rootWasReset=false userId=0 affinity=com.baidu.bpit.dushenghuo intent={act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=
adb server is out of date. killing...
是adb server端口被占用了 你先执行adb nodaemon server ,查看adb server的端口是多少 1 2 C:\Users\xxxx>adb nodaemon server cannot bind ‘tcp:5037’ 再执行下netstat -ano | findstr “5037” 1 2 3 4 C:\Users\xxxxxx>netstat -ano | findstr “5037” TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 4236 TCP 127.0.