用途
analyze-mobile-app 是一个通过 ADB 对 Android 移动应用进行竞品分析的工具。它适用于分析竞品 Android 应用、探索应用 UX 模式、记录移动端用户流程等场景。
主要能力
该工具通过 ADB 自动化导航应用、截取屏幕截图、记录 UX/UI,并生成完整报告。输出文件包括:
- docs/{APP}_ANALYSIS.md
- docs/{APP}_REPORT.html
- docs/{APP}_USER_FLOWS.md
- img/*.png
分析维度涵盖:
- 视觉设计:颜色(十六进制)、排版、间距、图标、插画、品牌
- UX 模式:导航、信息层级、CTA、表单、引导流程、空状态/错误状态
- 心理学:社会认同、稀缺性、承诺、游戏化、损失厌恶
- 商业模式:付费墙类型、定价、免费与高级版、追加销售时机
使用方式
1. 设置
adb devices # Verify connection
adb shell wm size # Device info
adb shell dumpsys window | grep mCurrentFocus # Current app package
2. 主循环(对每个屏幕重复)
# A) Screenshot
adb exec-out screencap -p > {app}_{seq:02d}.png
# B) Analyze screenshot visually (Read tool)
# C) UI dump for coordinates
adb shell uiautomator dump /sdcard/ui.xml
adb shell cat /sdcard/ui.xml
# D) Find bounds: [left,top][right,bottom]
# E) Calculate center: x=(left+right)/2, y=(top+bottom)/2
# F) Tap
adb shell input tap X Y
# G) Repeat from A)
3. 导航命令
adb shell input tap X Y # Tap
adb shell input swipe 540 1500 540 500 300 # Scroll down
adb shell input swipe 540 500 540 1500 300 # Scroll up
adb shell input swipe 900 1000 100 1000 300 # Swipe left
adb shell input swipe 100 1000 900 1000 300 # Swipe right
adb shell input swipe X Y X Y 1000 # Long press
adb shell input keyevent 4 # Back
adb shell input keyevent 3 # Home
adb shell input keyevent 66 # Enter
adb shell input text "text" # Type
报告模板
参见 references/report-templates.md 获取 ANALYSIS.md、USER_FLOWS.md 和 REPORT.html 模板。
检查清单
- Onboarding complete
- All tabs explored
- Settings captured
- Paywall documented
- Input methods tested
- User flows created
- Design tokens extracted
- Psychology analyzed
- Business model mapped
- Recommendations written
- ZIP created
故障排除
# No device
adb kill-server && adb start-server && adb devices
# UI dump fail
adb shell uiautomator dump /data/local/tmp/ui.xml
adb shell cat /data/local/tmp/ui.xml
# Black screenshot
adb shell screencap -p /sdcard/s.png && adb pull /sdcard/s.png
# Tap not working - recalculate coordinates from fresh UI dump,
# verify clickable="true", add sleep 1 before tap
适用场景
适用于需要分析竞品 Android 应用、探索应用 UX 模式、记录移动端用户流程的场景。
限制
该工具依赖 ADB 连接 Android 设备,需要设备连接正常。具体平台支持范围、收费模式、价格等信息暂未提供。