Windows命令行查看文件的MD5
certutil -hashfile D:\1.exe MD5
certutil -hashfile D:\1.exe SHA1
certutil -hashfile D:\1.exe SHA256
Lint 沒有使用的資源文件
D:\sdk\tools>lint.bat --check UnusedResources D:\code\OS_xiangmu --html UnusedResources.html
monkey:
adb shell monkey --ignore-crashes --ignore-timeouts --kill-process-after-error --ignore-security-exceptions -p com.android.dialer --throttle 100 -v 200000
檢查內存泄露
adb shell dumpsys meminfo 包名
查字符串
find frameworks/ packages/ vendor/ -name "*.xml" | xargs grep -n --color ""
常用adb 命令
導出Trace.
adb pull /sdcard/Android/data/com.android.dialer/files/dmtrace.trace
1.清除應用數據與緩存
adb shell pm clear <packagename>
adb shell pm clear com.android.dialer
adb shell pm clear com.android.providers.contacts
2.查看前臺 Activity
adb shell
dumpsys activity activities | grep mFocusedActivity
3.點亮/熄滅屏幕
點亮屏幕:
adb shell input keyevent 224
熄滅屏幕:
adb shell input keyevent 223
4.滑動解鎖
adb shell input swipe 300 1000 300 500
5.輸入文本
adb shell input text hello
6.屏幕分辨率
adb shell wm size
7.屏幕截圖
adb shell screencap -p /sdcard/sc.png
然后將 png 文件導出到電腦:
adb pull /sdcard/sc.png
8.錄制屏幕
adb shell screenrecord /sdcard/test.mp4
停止 Ctrl + C
adb pull /sdcard/test.mp4
9.模擬點擊
模擬點擊返回按鍵
adb shell input keyevent 4
//更多
每個數字與keycode對應表
http://blog.csdn.net/q610098308/article/details/48781747