ADB高級應用
來源:程序員人生 發布時間:2014-11-19 09:00:55 閱讀次數:3211次
ADB高級利用
1、利用無線來查看adb shell
> adb tcpip 5555
連接:
> adb connect IP:5555
見后文《調試注意事項》
2、摹擬按鍵
> adb shell input keyevent "value"
部份常見按鍵對應值:
Key | Constant Value
Back 4
Power 26
Menu 82
Home 3
Search 84
方向鍵:
上 19
下 20
左 21
右 22
確認(類似單擊):23
3、adb shell下查看系統盤符
> adb shell df
4、adb shell下掛載系統
> adb shell
> busybox mount -o remount,rw /system
5、adb shell 下移除USB裝備
> adb shell
> vdc unshare /mnt/sdcard ums
6、adb shell 下查看內核信息
> cat /proc/kmsg &
7、查看build配置的值(以heap為例)
> adb shell getprop | grep heap
8、通過sendevent
摹擬按鍵和鼠標
直接用input實現:
> adb shell input keyevent 3
> adb shell input tap 250 250
> adb shell input swipe 250 250 300 300
9、查看屏幕顯示的fps
開啟系統屬性:debug.sf.fps=1
然后直接logcat -s SurfaceFlinger -v time
(看SurfaceFlinger里面打印出來時多少)
10、查看當前運行程序棧
> dumpsys window windows | busybox grep "Window #"
101、查看當前裝備DDR運行頻率
> cat /proc/clocks | busybox grep "ddr"
102:ADB logcat過濾
adb logcat -s TAG_NAME
adb logcat -s TAG_NAME_1 TAG_NAME_2
adb logcat “*:PRIORITY”
adb logcat -s TAG_NAME:PRIORITY
adb logcat -s TAG_NAME_1:PRIORITY_1 TAG_NAME_2:PRIORITY
優先級(PRIORITY)分為以下幾種:
V
生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
------分隔線----------------------------
------分隔線----------------------------