java - 向aosp_shamu, 6.0.1里push一个SystemUI出现的异常
巴扎黑
巴扎黑 2017-04-18 09:29:40
0
2
1015

1.买了一个nexus 6, 编译了源码aosp_shamu_userdebug 版, 刷机器为aosp编译出来的rom, 然后修改SystemUI里的东西(只是加了一些log, 为了查看流程), 然后adb push 到手机, 就出现了systemUI异常的问题. 然后把原来编译出来的SystemUI(未做修改)adb push到手机, 依然出现systemUI异常的错误.

  1. 采用的是aosp的源码, 直接在github上可以搜到.github源码地方:https://github.com/android/platform_frameworks_base/tree/master/packages/SystemUI

3.一下出现的错误信息

01-24 06:31:34.464 E/AndroidRuntime( 2176): FATAL EXCEPTION: main
01-24 06:31:34.464 E/AndroidRuntime( 2176): Process: com.android.systemui, PID: 2176
01-24 06:31:34.464 E/AndroidRuntime( 2176): android.view.InflateException: Binary XML file line #87: uid=10017 needs permission android.permission.READ_CONTACTS to read lock_screen_owner_info_enabled for user 0
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.View.inflate(View.java:19790)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.phone.PhoneStatusBar.makeStatusBarView(PhoneStatusBar.java:665)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.phone.PhoneStatusBar.addStatusBarWindow(PhoneStatusBar.java:2815)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.phone.PhoneStatusBar.createAndAddWindows(PhoneStatusBar.java:2811)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.BaseStatusBar.start(BaseStatusBar.java:601)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.phone.PhoneStatusBar.start(PhoneStatusBar.java:614)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.SystemBars.createStatusBarFromConfig(SystemBars.java:106)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.SystemBars.onNoService(SystemBars.java:58)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.ServiceMonitor.startService(ServiceMonitor.java:230)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.ServiceMonitor.-wrap5(ServiceMonitor.java)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.systemui.statusbar.ServiceMonitor$1.handleMessage(ServiceMonitor.java:73)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.os.Handler.dispatchMessage(Handler.java:102)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.os.Looper.loop(Looper.java:148)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.app.ActivityThread.main(ActivityThread.java:5417)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at java.lang.reflect.Method.invoke(Native Method)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-24 06:31:34.464 E/AndroidRuntime( 2176): Caused by: java.lang.SecurityException: uid=10017 needs permission android.permission.READ_CONTACTS to read lock_screen_owner_info_enabled for user 0
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.os.Parcel.readException(Parcel.java:1620)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.os.Parcel.readException(Parcel.java:1573)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.internal.widget.ILockSettings$Stub$Proxy.getBoolean(ILockSettings.java:368)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.internal.widget.LockPatternUtils.getBoolean(LockPatternUtils.java:1095)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.internal.widget.LockPatternUtils.isOwnerInfoEnabled(LockPatternUtils.java:573)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.keyguard.KeyguardStatusView.getOwnerInfo(KeyguardStatusView.java:203)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.keyguard.KeyguardStatusView.updateOwnerInfo(KeyguardStatusView.java:179)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at com.android.keyguard.KeyguardStatusView.onFinishInflate(KeyguardStatusView.java:119)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:844)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:971)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:831)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:971)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:831)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
01-24 06:31:34.464 E/AndroidRuntime( 2176):     ... 19 more

4.报错是systemUI发生异常, 然后是不断的重启SystemUI, 不断地发生异常.
5.目前在so上发现一个类似的, 但不全像我的问题. 连接在此:http://stackoverflow.com/questions/32115650/android-app-crashes-when-trying-to-read-contacts-in-android-marshmallow-android

巴扎黑
巴扎黑

全部回覆(2)
左手右手慢动作

Caused by: java.lang.SecurityException: uid=10017 needs permission android.permission.READ_CONTACTS to read lock_screen_owner_info_enabled for user 0

權限有問題,是不是你編譯時候簽字檔案用的不對?
另外你push原來的systemui後,重啟手機還會不停的crash嗎?

左手右手慢动作

你push systemUI的指令是什麼?是不是push到對應的路徑下了?

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!