Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android 系統啟動不起原因查找

Android 系統啟動不起原因查找

編輯:關於Android編程

我們遇到Android系統開機界面(bootanimation)後,系統沒法運行起來的問題,

系統一直出現 waiting for ...日志

似乎在等什麼服務啟動

因此懷疑system server 被block了

調試方法如下:

1. adb shell mkdir /data/anr/

2. adb shell ps | grep system_server


system 1138 234 908376 39440 ffffffff 40061a54 S system_server


3. adb shell kill -3 1138


4. adb shell pull /data/anr/trace.txt


----- pid 1138 at 2014-01-01 08:40:42 -----
Cmd line: system_server


JNI: CheckJNI is off; workarounds are off; pins=1; globals=289


DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)


"main" prio=5 tid=1 MONITOR
| group="main" sCount=1 dsCount=0 obj=0x4159ee58 self=0x414be920
| sysTid=1138 nice=-2 sched=0/0 cgrp=apps handle=1073963348
| state=S schedstat=( 6367457522 242583118 5270 ) utm=595 stm=41 core=0
at com.android.server.am.ActivityManagerService.registerReceiver(ActivityManagerService.java:~13106)


- waiting to lock <0x41965278> (a com.android.server.am.ActivityManagerService) held by tid=27 (InputDispatcher)


at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1458)
at android.app.ContextImpl.registerReceiverAsUser(ContextImpl.java:1433)
at android.content.pm.RegisteredServicesCache.(RegisteredServicesCache.java:134)
at android.content.SyncAdaptersCache.(SyncAdaptersCache.java:43)
at com.android.server.content.SyncManager.(SyncManager.java:399)
at com.android.server.content.ContentService.getSyncManager(ContentService.java:75)
at com.android.server.content.ContentService.notifyChange(ContentService.java:283)
at android.content.ContentResolver.notifyChange(ContentResolver.java:1621)
at com.android.providers.settings.SettingsProvider.sendNotify(SettingsProvider.java:262)
at com.android.providers.settings.SettingsProvider.insertForUser(SettingsProvider.java:941)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:645)
at android.content.ContentProvider$Transport.call(ContentProvider.java:325)
at android.provider.Settings$NameValueCache.putStringForUser(Settings.java:903)
at android.provider.Settings$System.putStringForUser(Settings.java:1169)
at android.provider.Settings$System.putIntForUser(Settings.java:1274)
at android.provider.Settings$System.putInt(Settings.java:1268)

可以清晰的看到調用堆棧,是誰阻塞了system_server 的運行。





  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved