简介:
该程序通过Java执行ADB CMD命名获取回调信息判断设备信息,获取信息时通过多线程操作节约读取时间;
1、获取Android屏幕顶层焦点应用名称,可用于辨别Activity和悬浮窗页面
2、获取Android屏幕顶层应用,不能识别悬浮窗
3、获取应用程序位数 PackBit
4、获取屏幕顶层应用程序常用信息:PackName、Launchable_Activity、TopActivity、versionName、versionCode等
5、提供常用APP功能操作:备份、清除缓存、关闭、截图、卸载功能
$ adb shell dumpsys activity activities |grep -i hist |head -1
* Hist #0: ActivityRecord{c08fc2a u0 com.test.benjamin/.ui.activity.MainTabActivity t2179}
$ adb shell dumpsys package com.test.benjamin |grep -B5 android.intent.category.LAUNCHER |grep filter
9cd481a com.test.benjamin/.SplashActivity filter f3f0a77
$ adb shell ps -A |grep com.test.benjamin
u0_a862 8771 632 2065724 158884 0 0 S com.test.benjamin
u0_a862 8873 632 1888260 86208 0 0 S com.test.benjamin:pushcore
u0_a862 9236 632 1852636 85000 0 0 S com.test.benjamin:monitorService
u0_a862 9433 632 1769844 73896 0 0 S com.test.benjamin:channel
$ adb shell ps -A |grep zygote
root 631 1 2183544 28908 0 0 S zygote64
root 632 1 1621752 23992 0 0 S zygote
webview_zygote 2217 1 1429812 13896 0 0 S webview_zygote32
adb shell pm path
adb pull
adb shell pm clean
adb shell am start -n <packname/packname.Activity>
adb shell am force-stop