サスペンドから再開した後 (終了キーを押した後)、Android のメイン画面が表示されないバグをデバッグしています。場合によっては元に戻ることもありますが、元に戻らない場合は、画面が暗くなり、黒くなりますが、シェルはまだ機能しています。
バグレポートをダンプしてchkbugreportアプリを使用できます...私は初心者のAndroid開発者で申し訳ありませんが、バグレポートから調査する場所を教えていただければ幸いです:
電話を数分離れた後、実際にANRをトリガーします.
再開後の興味深いlogcatとAndroid画面なし(powermanager画面のタイムアウト):
01-09 03:14:29.550 1565 1620 I PowerManagerService: Waking up from sleep...
01-09 03:14:29.560 1347 1424 D SurfaceFlinger: Screen acquired, type=0 flinger=0x4178c408
01-09 03:14:29.610 1565 1620 I WindowManager: Lock screen displayed!
01-09 03:14:29.690 1350 1704 D audio_hw: ENTERING adev_set_parameters() screen_state=on
01-09 03:14:29.690 1350 1704 V audio_hw: setFMParameters: screen_state=on
01-09 03:14:29.690 1350 1704 V audio_hw: LEAVING adev_set_parameters()
01-09 03:14:29.710 1565 1712 I qtaguid : Failed write_ctrl(s 1 10022) res=-1 errno=
01-09 03:14:29.810 1865 2388 I NfcService: applyRouting(), screenState = 2
01-09 03:14:33.320 1565 1694 I PowerManagerService: Going to sleep by user request...
01-09 03:14:33.750 1347 1424 D SurfaceFlinger: Screen released, type=0 flinger=0x4178c408
01-09 03:14:33.800 1565 1712 I qtaguid : Failed write_ctrl(s 0 10022) res=-1 errno=1
01-09 03:14:39.470 1565 1620 D EmergencyButton: Is Sim 1 Locked = false, Is Sim 2 locked = false
01-09 03:14:39.500 1565 1620 D EmergencyButton: enalbe emergency call button = false
01-09 03:14:39.590 1565 1620 I Choreographer: Skipped 176 frames! The application may be doing too much work on its main thread.
01-09 03:14:39.640 1565 1568 D dalvikvm: GC_CONCURRENT freed 698K, 21% free 6985K/8792K, paused 5ms+13ms, total 102ms
01-09 03:14:39.650 1565 1620 I PowerManagerService: Waking up from sleep...
01-09 03:14:39.660 1347 1424 D SurfaceFlinger: Screen acquired, type=0 flinger=0x4178c408
01-09 03:14:39.730 1565 1620 I WindowManager: Lock screen displayed!
01-09 03:14:39.800 1565 1712 I qtaguid : Failed write_ctrl(s 1 10022) res=-1 errno=1
01-09 03:14:49.660 1565 1688 I PowerManagerService: Going to sleep due to screen timeout...
01-09 03:14:50.100 1347 1424 D SurfaceFlinger: Screen released, type=0 flinger=0x4178c408
バグレポート chkbugreport から、いくつかのビジー スレッドがあることがわかります。
system_server(1565)/PowerManagerService
•system_server(1565)/ActivityManager
•system_server(1565)/UI
•system_server(1565)/PowerManagerService
•system_server(1565)/ActivityManager
•system_server(1565)/UI
PowerManagerService (tid=22 pid=1688 prio=5 state=NATIVE)
android.view.Surface.nativeCreate
android.view.Surface. (Surface.java)
com.android.server.power.ElectronBeam.createSurface (ElectronBeam.java)
com.android.server.power.ElectronBeam.tryPrepare (ElectronBeam.java)
com.android.server.power.ElectronBeam.prepare (ElectronBeam.java)
com.android.server.power.DisplayPowerState.prepareElectronBeam (DisplayPowerState.java)
com.android.server.power.DisplayPowerController.updatePowerState (DisplayPowerController.java)
com.android.server.power.DisplayPowerController.access$300 (DisplayPowerController.java)
com.android.server.power.DisplayPowerController$DisplayControllerHandler.handleMessage (DisplayPowerController.java)
android.os.Handler.dispatchMessage (Handler.java)
android.os.Looper.loop (Looper.java)
android.os.HandlerThread.run (HandlerThread.java)
ActivityManager (tid=15 pid=1628 prio=5 state=NATIVE)
android.view.Surface.nativeCreate
android.view.Surface. (Surface.java)
com.android.server.wm.WindowStateAnimator.createSurfaceLocked (WindowStateAnimator.java)
com.android.server.wm.WindowManagerService.relayoutWindow (WindowManagerService.java)
com.android.server.wm.Session.relayout (Session.java)
android.view.ViewRootImpl.relayoutWindow (ViewRootImpl.java)
android.view.ViewRootImpl.performTraversals (ViewRootImpl.java)
android.view.ViewRootImpl.doTraversal (ViewRootImpl.java)
android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java)
android.view.Choreographer$CallbackRecord.run (Choreographer.java)
android.view.Choreographer.doCallbacks (Choreographer.java)
android.view.Choreographer.doFrame (Choreographer.java)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java)
android.os.Handler.handleCallback (Handler.java)
android.os.Handler.dispatchMessage (Handler.java)
android.os.Looper.loop (Looper.java)
com.android.server.am.ActivityManagerService$AThread.run (ActivityManagerService.java)
UI (tid=13 pid=1620 prio=5 state=NATIVE)
com.google.android.gles_jni.EGLImpl.eglSwapBuffers
android.view.HardwareRenderer$GlRenderer.draw (HardwareRenderer.java)
android.view.ViewRootImpl.draw (ViewRootImpl.java)
android.view.ViewRootImpl.performDraw (ViewRootImpl.java)
android.view.ViewRootImpl.performTraversals (ViewRootImpl.java)
android.view.ViewRootImpl.doTraversal (ViewRootImpl.java)
android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java)
android.view.Choreographer$CallbackRecord.run (Choreographer.java)
android.view.Choreographer.doCallbacks (Choreographer.java)
android.view.Choreographer.doFrame (Choreographer.java)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java)
android.os.Handler.handleCallback (Handler.java)
android.os.Handler.dispatchMessage (Handler.java)
android.os.Looper.loop (Looper.java)
android.os.HandlerThread.run (HandlerThread.java)
01-09 03:21:02.820 1565 1628 E ActivityManager: ANR in com.android.launcher
01-09 03:21:02.820 1565 1628 E ActivityManager: Reason: Broadcast of Intent { act=android.intent.action.TIME_TICK flg=0x40000014 (has extras) }
01-09 03:21:02.820 1565 1628 E ActivityManager: Load: 0.04 / 0.39 / 0.26
01-09 03:21:02.820 1565 1628 E ActivityManager: CPU usage from 55055ms to 0ms ago:
01-09 03:21:02.820 1565 1628 E ActivityManager: 0.1% 1565/system_server: 0% user + 0.1% kernel / faults: 10 minor
01-09 03:21:02.820 1565 1628 E ActivityManager: 0% 1736/com.android.systemui: 0% user + 0% kernel / faults: 18 minor
01-09 03:21:02.820 1565 1628 E ActivityManager: 0% 482/kworker/0:2: 0% user + 0% kernel
01-09 03:21:02.820 1565 1628 E ActivityManager: 0% 412/kworker/3:1: 0% user + 0% kernel
1-09 03:21:02.820 1565 1628 E ActivityManager: 0% 1347/surfaceflinger: 0% user + 0% kernel
01-09 03:21:02.820 1565 1628 E ActivityManager: 0% 1361/gpslogd: 0% user + 0% kernel
01-09 03:21:02.820 1565 1628 E ActivityManager: 0% TOTAL: 0% user + 0% kernel
01-09 03:21:02.820 1565 1628 E ActivityManager: CPU usage from 1987ms to 2629ms later:
01-09 03:21:02.820 1565 1628 E ActivityManager: 21% 1565/system_server: 0% user + 21% kernel / faults: 1 minor
01-09 03:21:02.820 1565 1628 E ActivityManager: 21% 1628/ActivityManager: 1.5% user + 20% kernel
01-09 03:21:02.820 1565 1628 E ActivityManager: 4.6% TOTAL: 0.5% user + 4.1% kernel
ここから、アンドロイドに関する私の限られた知識で、パワーマネージャーがメイン画面を表示するための電子ビームアニメーションの作成を待っているときにスタックすると推測できます。ネイティブ (またはカーネル コード) が終了するのを待っていますか? したがって、それは下層の問題である可能性があります....?
助けてくれてありがとう。