向aosp_shamu, 6.0.1里push一个SystemUI出现的异常

xuwanjin
  • 6

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

回复
阅读 3.6k
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到对应的路径下了?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏