如何做自己的網站商城實時seo排名點擊軟件
查看屏幕分辨率
adb shell wm size
查看dpi
adb shell dumpsys window | grep ‘dpi’
WIFI調試:
- adb tcpip 5555
- adb connect 設備ip
注意,USB拔插會斷掉,所以插上USB后再 adb connect 設備ip?!咀⒁狻咳A為手機自建熱點的ip一般是192.168.43.1
adb獲取root
- adb root
- adb remount
adb 查看當前應用包名
adb shell dumpsys window | grep mCurrentFocus
查看一個activity所關聯的service
adb shell dumpsys activity s [package-name]
例如:adb shell dumpsys activity s dji.go.v4
proguard gui
在 ~/Library/Android/sdk/tools/proguard/bin 下面
查看一個應用的內存情況
dumpsys meminfo [package-name]
當有多個設備時,adb選擇指定設備
adb -s [serial-number] [cmd]
查看系統(tǒng)中所有已安裝的包
adb shell pm list packages -f
查看系統(tǒng)中運行的進程
adb shell ps (舊版android的ps是toolbox版本的ps)
adb shell ps -A (新版android的ps換成了toybox版本的ps)
殺死一個應用程序
adb shell am force-stop [package-name]
查看當前的activity
adb shell logcat | grep ActivityManager
adb shell dumpsys activity activities
模擬用戶按home鍵把app退到后臺,然后系統(tǒng)因資源不足而殺死app,
此時用戶再通過應用列表回到app,此時app已經死掉,但是activity棧還在,
因此系統(tǒng)拉起的是退出時的activity,而不是重新走一遍app啟動流程
adb shell
su
kill [pid]
查看當前activity所在的task
adb shell dumpsys activity activities
在其中搜索 ‘Running activities’,其中的 TaskRecord 就表示一個 task 堆棧
獲取當前手機的危險權限
adb shell pm list permissions -d -g
am啟動應用并統(tǒng)計啟動時間
adb shell am start -W -n [package name]/[launcher activity的全限定名]
adb shell am start -W -n dji.go.v4.debug/dji.pilot.main.activity.DJILauncherActivity
查看AndroidManifest.xml中信息總匯
aapt d badging [Your apk’s path]
adb logcat 出現EOF
adb logcat -G 2m
清除logcat緩存空間
adb logcat -b all -c
發(fā)生anr,獲取traces.txt
adb pull data/anr/traces.txt
proguardgui反混淆
java -jar ~/Library/Android/sdk/tools/proguard/lib/proguardgui.jar
內存使用情況
adb shell dumpsys meminfo [package name] -d
adb 模擬觸摸屏幕(人工操作經常一按就很多 MOVE)
adb shell input swipe [source.x] [source.y] [dst.x] [dst.y] [duration/ms]
例如 adb shell input swipe 300 1400 300 1420 1
查看包名
adb shell pm list packages -f | grep ‘xxx’
以 attach debugger 啟動 app
讓調試器 attached 上后采取執(zhí)行 Application 的啟動:adb shell am set-debug-app -w --persistent dji.mimo.debug
使用 adb shell am clear-debug-app 來清理
IMEI
adb shell getprop persist.sys.factory.imei