Android SDK 提供的開發者工具
AAPT
apk 路徑————/Users/sandy.peng/Desktop/ofo_eye_learn-debug.apk
問題————platform-tools 沒有 aapt 工具了
開始配置?
open -e .bash_profile | source .bash_profile
在 build-tools 里面 path《》
打開. bash_profile 文件,命令:open -e .bash_profile
更新. bash_profile 文件 source .bash_profile
AAPT 基本使用方法 ———— aapt
aap 列舉 APK 內容文件
aapt list /Users/sandy.peng/Desktop/ofo_eye_learn-debug.apk
./aapt l[ist] > 重定向到合適的 APK path
aapt list /Users/sandy.peng/Desktop/ofo_eye_learn-debug.apk > /Users/sandy.peng/Desktop/ofo_eye_learn-debug.txt
aapt dump 命令 ———— aapt dump badging /Users/sandy.peng/Desktop/ofo_eye_learn-debug.apk ———— | grep package
xmlstrings
Print the strings of the given compiled xml assets
configurations
Print the configurations in the APK
resources
Print the resource table from the APK
esources
Print the resource table from the AP
permissions
Print the permissions from the APK ———— 較簡單,輸出 APK 中使用到的權限信息
bading
Print the label and icon for the app declared in APK.
strings
Print the contents of the resource table string pool in the APK
查看 AAPT 命令格式 aapt
Lint
ADB 指令
普通指令
adb 啟動 / 停止 應用程序
adb shell am start -n [packageName/StartActivity]
adb shell am force-stop [packageName]
應用安裝卸載
# 獲取apk的packagename 和 classnameaapt d badging
# 安裝apkadb install # 保留數據和緩存文件,重新安裝apk,adb install -r
# 安裝apk到sd卡adb install -s
# 卸載appadb uninstall
# 卸載app但保留數據和緩存文件adb uninstall -k
# 同時安裝包多個apk到設備上adb install-multiple
應用狀態查看——adb shell ps
# 查看進程列表adb shell ps
# 查看指定進程狀態adb shell ps -x [PID]
# 查看后臺services信息adb shell service list
# 查看IO內存分區adb shell cat /proc/iomem
截圖與錄屏 —— adb shell screencap -p /sdcard/screenshot.png
幀率分析 —— adb shell dumpsys gfxinfo com.starlight.mobile.android.smsone
16ms一幀——以每秒 60 幀來刷新 60 幀每秒就意味著: 16ms=1000/60Hz
dumpsys ——adb shell dumpsys window windows | grep -E mCurrentFocus————講一下當前 Activity
adb shell dumpsys window windows | grep -E mCurrentFocus
設備信息 adb shell top | adb shell top -m 6
# 查看設備cpu和內存占用情況adb shell top
# 查看占用內存前6的app adb shell top -m 6
# 刷新一次內存信息,然后返回adb shell top -n 1
# MAC地址adb shell cat /sys/class/net/wlan0/address
# CPU序列號adb shell cat /proc/cpuinfo
Android Device Monitor ———— ddms,java 環境
9Patch 工具 draw9patch———— 沒了
UI Automator Viewer ———— uiautomatorviewer__,java 環境
開發者選項
Process Stats (進程信息,正在運行的服務)————smsone 有三個服務
Show Touches && Pointer Location (顯示點按操作反饋,指針位置)————多點觸摸,屏幕最上方 坐標
Show Layout Bounds (布局邊界)
Animation Scale () 過渡動畫 速率,研究動畫
Simulate Secondary Displays 模擬輔助顯示設備
Debug GPU Overdraw 調試 gpu 過渡繪制
Show CPU Usage 顯示cpu 使用情況
Profile GPU Rending 條形顯示 gpu 刷新
Strick Mode 啟用嚴格模式
不保留活動
小功能點
保持不休眠
模擬顏色空間——紅綠色弱
其他的能用到的一些工具
當前 Activity
vysor
adb
snaps
Paste
Sizeup