android 开机时间异常情况分析

平时会遇到开机时间变长问题,可以通过以下log来看:

logcat -v time -b events|grep boot
01-01 20:00:02.329 I/boot_progress_start( 1135): 4539
01-01 20:00:02.969 I/boot_progress_preload_start( 1135): 5175
01-01 20:00:05.509 I/boot_progress_preload_end( 1135): 7713
01-01 20:00:05.679 I/boot_progress_system_run( 1712): 7889
01-01 20:00:05.839 I/boot_progress_pms_start( 1712): 8040
01-01 20:00:05.879 I/boot_progress_pms_system_scan_start( 1712): 8080
01-01 20:00:10.979 I/boot_progress_pms_data_scan_start( 1712): 13182
01-01 20:00:10.979 I/boot_progress_pms_scan_end( 1712): 13182
01-01 20:00:11.139 I/boot_progress_pms_ready( 1712): 13342

01-01 20:00:25.989 I/boot_progress_ams_ready( 1712): 28190


这些都是 android 原生添加的 log,从这些log可以看到android各个阶段所需要的时间,如果跟之前比有明显增长,就需要看看到底是哪里有问题。



同时,一般造成开机时间变长,可以看看framework 中系统 service启动是否有异常:

01-02 08:00:00.189  1690  1690 I SystemServer: Power Manager
01-02 08:00:00.189  1690  1690 I SystemServer: Activity Manager
01-02 08:00:00.499  1690  1690 I SystemServer: Display Manager
01-02 08:00:00.499  1690  1690 I SystemServer: Telephony Registry
01-02 08:00:00.499  1690  1690 I SystemServer: Scheduling Policy
01-02 08:00:00.509  1690  1690 I SystemServer: Package Manager
01-02 08:00:02.989  1690  1690 I SystemServer: Entropy Mixer
01-02 08:00:02.999  1690  1690 I SystemServer: User Service
01-02 08:00:02.999  1690  1690 I SystemServer: Account Manager
01-02 08:00:03.009  1690  1690 I SystemServer: Content Manager
01-02 08:00:03.009  1690  1690 I SystemServer: System Content Providers
01-02 08:00:03.039  1690  1690 I SystemServer: Lights Service
01-02 08:00:03.039  1690  1690 I SystemServer: Battery Service
01-02 08:00:03.049  1690  1690 I SystemServer: Vibrator Service
01-02 08:00:03.049  1690  1690 I SystemServer: Consumer IR Service
01-02 08:00:03.049  1690  1690 I SystemServer: Alarm Manager
01-02 08:00:03.059  1690  1690 I SystemServer: Init Watchdog
01-02 08:00:03.059  1690  1690 I SystemServer: Input Manager
01-02 08:00:03.059  1690  1690 I SystemServer: Window Manager
01-02 08:00:03.119  1690  1690 I SystemServer: Bluetooth Manager Service
01-02 08:00:08.129  1690  1690 I SystemServer: Input Method Service
01-02 08:00:08.149  1690  1690 I SystemServer: Accessibility Manager
01-02 08:00:08.239  1690  1690 I SystemServer: Mount Service
01-02 08:00:08.249  1690  1690 I SystemServer: LockSettingsService
01-02 08:00:08.249  1690  1690 I SystemServer: Device Policy

01-02 08:00:08.249  1690  1690 I SystemServer: Status Bar


先到这里,写文章一大难事。做个记录,后面有空更新......

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值