0
点赞
收藏
分享

微信扫一扫

安卓功耗分析

南柯Taylor 1天前 阅读 3
android
  • power profiler
    • cpu profiler
    • record traces
    1. find “System Tracing” in Developer Options in Settings
    2. choose “long tracings” and add the tile to quick settings
    3. choose necessary ones in Categories, such as idle, freq, power
    4. turn on/off tracing between some work, like sleeping
    5. adb shell pull /data/local/traces .
    6. load it in perfetto and check CPU, device state, system locks in system_erver
  • dumpsys
    1. adb shell dumpsys batterystats --reset
    2. adb shell dumpsys batterystats --enable full-wake-history
    3. do some work, like sleeping
    4. adb shell dumpsys batterystats outputs to a file
    5. check for “alarm” for wake alarms and “walarm” for non-wake alarms
举报

相关推荐

0 条评论