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

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

巴扎黑
巴扎黑

membalas semua(2)
左手右手慢动作

Disebabkan oleh: java.lang.SecurityException: uid=10017 memerlukan kebenaran android.permission.READ_CONTACTS untuk membaca lock_screen_owner_info_enabled untuk pengguna 0

Terdapat masalah dengan kebenaran Adakah anda menggunakan fail tandatangan yang salah semasa menyusun?
Selain itu, selepas anda menolak systemui asal, adakah ia masih akan ranap apabila anda memulakan semula telefon?

左手右手慢动作

Apakah arahan anda untuk menolak systemUI? Adakah anda telah menolaknya ke laluan yang sepadan?

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan
Tentang kita Penafian Sitemap
Laman web PHP Cina:Latihan PHP dalam talian kebajikan awam,Bantu pelajar PHP berkembang dengan cepat!