在使用微博认证登录时出现java.lang.SecurityException: getSerial: The user 10347 does not meet the requirements to access device identifiers
完整异常如下:
I/Timeline: Timeline: Activity_launch_request time:1931131651
D/ViewContentFactory: initViewContentFetcherClass
I/ContentCatcher: ViewContentFetcher : ViewContentFetcher
D/ViewContentFactory: createInterceptor took 0ms
E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
W/System.err: java.lang.SecurityException: getSerial: The user 10347 does not meet the requirements to access device identifiers.
W/System.err: at android.os.Parcel.createExceptionOrNull(Parcel.java:2376)
at android.os.Parcel.createException(Parcel.java:2360)
W/System.err: at android.os.Parcel.readException(Parcel.java:2343)
W/System.err: at android.os.Parcel.readException(Parcel.java:2285)
W/System.err: at android.os.IDeviceIdentifiersPolicyService$Stub$Proxy.getSerialForPackage(IDeviceIdentifiersPolicyService.java:162)
at android.os.Build.getSerial(Build.java:175)
W/System.err: at com.weibo.ssosdk.MfpBuilder.getSerialNoForO(SourceFile:534)
at com.weibo.ssosdk.MfpBuilder.getSerialNo(SourceFile:498)
W/System.err: at com.weibo.ssosdk.MfpBuilder.genMfpString(SourceFile:251)
W/System.err: at com.weibo.ssosdk.MfpBuilder.getMfp(SourceFile:186)
at com.weibo.ssosdk.WeiboSsoSdk.updateInfo(SourceFile:272)
W/System.err: at com.weibo.ssosdk.WeiboSsoSdk.access$200(SourceFile:21)
at com.weibo.ssosdk.WeiboSsoSdk$5.run(SourceFile:353)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
W/System.err: Caused by: android.os.RemoteException: Remote stack trace:
W/System.err: at com.android.internal.telephony.TelephonyPermissions.reportAccessDeniedToReadIdentifiers(TelephonyPermissions.java:385)
at com.android.internal.telephony.TelephonyPermissions.checkPrivilegedReadPermissionOrCarrierPrivilegePermission(TelephonyPermissions.java:327)
W/System.err: at com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadDeviceIdentifiers(TelephonyPermissions.java:261)
at com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadDeviceIdentifiers(TelephonyPermissions.java:237)
W/System.err: at com.android.server.os.DeviceIdentifiersPolicyService$DeviceIdentifiersPolicy.getSerialForPackage(DeviceIdentifiersPolicyService.java:68)
I/TetheringManager: registerTetheringEventCallback:com.ciam.demo
W/com.ciam.demo: Accessing hidden method Lcom/android/internal/os/PowerProfile;->(Landroid/content/Context;)V (greylist, reflection, allowed)
W/System.err: java.lang.RuntimeException: please init sdk before use it. Wb.install()
W/System.err: at com.sina.weibo.sdk.a.a(SourceFile:62)
at com.sina.weibo.sdk.a.b(SourceFile:76)
W/System.err: at com.sina.weibo.sdk.auth.a.d(SourceFile:117)
W/System.err: at com.sina.weibo.sdk.openapi.a.authorize(SourceFile:1041)
W/System.err: at com.ciam.weibo.WeiboHandler.authorize(WeiboHandler.java:45)
at com.ciam.CiamSdkApi.sendAuthRequest(CiamSdkApi.java:71)
W/System.err: at com.ciam.demo.weibo.WeiboActivity.lambda$initView$0$WeiboActivity(WeiboActivity.java:39)
W/System.err: at com.ciam.demo.weibo.-$$Lambda$WeiboActivity$RSONxjdf6OB3ASMiKoO05dq0ji0.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:7509)
W/System.err: at android.view.View.performClickInternal(View.java:7486)
at android.view.View.access$3600(View.java:841)
W/System.err: at android.view.View$PerformClick.run(View.java:28709)
W/System.err: at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err: at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8061)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
I/WeiboActivity: 微博授权出错
W/com.ciam.demo: Accessing hidden method Lcom/android/internal/os/PowerProfile;->getAveragePower(Ljava/lang/String;)D (greylist, reflection, allowed)
W/pool-2-thread-1: type=1400 audit(0.0:612212): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c91,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c91,c257,c512,c768 tclass=netlink_route_socket permissive=0 b/155595000 app=com.ciam.demo
Disconnected from the target VM, address: 'localhost:64118', transport: 'socket'
build.gradle
android { compileSdkVersion 30 buildToolsVersion "30.0.3" defaultConfig { applicationId "com.ciam.demo" minSdkVersion 19 targetSdkVersion 30 versionCode 1 versionName "1.0" ndk { abiFilters 'armeabi' //, 'armeabi-v7a','arm64-v8a' } } }
在使用微博认证登录时出现java.lang.SecurityException: getSerial: The user 10347 does not meet the requirements to access device identifiers 完整异常如下: I/Timeline: Timeline: Activity_launch_request time:1931131651 D/ViewContentFactory: initViewContentFetcherClass I/ContentCatcher: ViewContentFetcher : ViewContentFetcher D/ViewContentFactory: createInterceptor took 0ms E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length W/System.err: java.lang.SecurityException: getSerial: The user 10347 does not meet the requirements to access device identifiers. W/System.err: at android.os.Parcel.createExceptionOrNull(Parcel.java:2376) at android.os.Parcel.createException(Parcel.java:2360) W/System.err: at android.os.Parcel.readException(Parcel.java:2343) W/System.err: at android.os.Parcel.readException(Parcel.java:2285) W/System.err: at android.os.IDeviceIdentifiersPolicyService$Stub$Proxy.getSerialForPackage(IDeviceIdentifiersPolicyService.java:162) at android.os.Build.getSerial(Build.java:175) W/System.err: at com.weibo.ssosdk.MfpBuilder.getSerialNoForO(SourceFile:534) at com.weibo.ssosdk.MfpBuilder.getSerialNo(SourceFile:498) W/System.err: at com.weibo.ssosdk.MfpBuilder.genMfpString(SourceFile:251) W/System.err: at com.weibo.ssosdk.MfpBuilder.getMfp(SourceFile:186) at com.weibo.ssosdk.WeiboSsoSdk.updateInfo(SourceFile:272) W/System.err: at com.weibo.ssosdk.WeiboSsoSdk.access$200(SourceFile:21) at com.weibo.ssosdk.WeiboSsoSdk$5.run(SourceFile:353) W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923) W/System.err: Caused by: android.os.RemoteException: Remote stack trace: W/System.err: at com.android.internal.telephony.TelephonyPermissions.reportAccessDeniedToReadIdentifiers(TelephonyPermissions.java:385) at com.android.internal.telephony.TelephonyPermissions.checkPrivilegedReadPermissionOrCarrierPrivilegePermission(TelephonyPermissions.java:327) W/System.err: at com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadDeviceIdentifiers(TelephonyPermissions.java:261) at com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadDeviceIdentifiers(TelephonyPermissions.java:237) W/System.err: at com.android.server.os.DeviceIdentifiersPolicyService$DeviceIdentifiersPolicy.getSerialForPackage(DeviceIdentifiersPolicyService.java:68) I/TetheringManager: registerTetheringEventCallback:com.ciam.demo W/com.ciam.demo: Accessing hidden method Lcom/android/internal/os/PowerProfile;->(Landroid/content/Context;)V (greylist, reflection, allowed)
W/System.err: java.lang.RuntimeException: please init sdk before use it. Wb.install()
W/System.err: at com.sina.weibo.sdk.a.a(SourceFile:62)
at com.sina.weibo.sdk.a.b(SourceFile:76)
W/System.err: at com.sina.weibo.sdk.auth.a.d(SourceFile:117)
W/System.err: at com.sina.weibo.sdk.openapi.a.authorize(SourceFile:1041)
W/System.err: at com.ciam.weibo.WeiboHandler.authorize(WeiboHandler.java:45)
at com.ciam.CiamSdkApi.sendAuthRequest(CiamSdkApi.java:71)
W/System.err: at com.ciam.demo.weibo.WeiboActivity.lambda$initView$0$WeiboActivity(WeiboActivity.java:39)
W/System.err: at com.ciam.demo.weibo.-$$Lambda$WeiboActivity$RSONxjdf6OB3ASMiKoO05dq0ji0.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:7509)
W/System.err: at android.view.View.performClickInternal(View.java:7486)
at android.view.View.access$3600(View.java:841)
W/System.err: at android.view.View$PerformClick.run(View.java:28709)
W/System.err: at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err: at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8061)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
I/WeiboActivity: 微博授权出错
W/com.ciam.demo: Accessing hidden method Lcom/android/internal/os/PowerProfile;->getAveragePower(Ljava/lang/String;)D (greylist, reflection, allowed)
W/pool-2-thread-1: type=1400 audit(0.0:612212): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c91,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c91,c257,c512,c768 tclass=netlink_route_socket permissive=0 b/155595000 app=com.ciam.demo
Disconnected from the target VM, address: 'localhost:64118', transport: 'socket'