DroidPluginTeam / DroidPlugin

A plugin framework on android,Run any third-party apk without installation, modification or repackage
http://droidpluginteam.github.io/DroidPlugin/
GNU Lesser General Public License v3.0
6.89k stars 2.53k forks source link

java.lang.SecurityException: getDeviceId: Neither user xxx nor current process has android.permission.READ_PHONE_STATE. #150

Open chasel opened 8 years ago

chasel commented 8 years ago

Android 6.0.1出现该错误日志, 导致应用无法使用, 其它版本没有该问题.

 W/System.err: java.lang.SecurityException: getDeviceId: Neither user 10251 nor current process has android.permission.READ_PHONE_STATE.
 W/System.err:     at android.os.Parcel.readException(Parcel.java:1620)
 W/System.err:     at android.os.Parcel.readException(Parcel.java:1573)
 W/System.err:     at com.android.internal.telephony.ITelephony$Stub$Proxy.getDeviceId(ITelephony.java:4207)
 W/System.err:     at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:706)
 W/System.err:     at com.tencent.bugly.crashreport.common.info.b.a(BUGLY:86)
 W/System.err:     at com.tencent.bugly.crashreport.common.info.a.p(BUGLY:247)
 W/System.err:     at com.tencent.bugly.crashreport.common.info.a.n(BUGLY:204)
 W/System.err:     at com.tencent.bugly.proguard.s.a(BUGLY:129)
 W/System.err:     at com.tencent.bugly.proguard.w.a(BUGLY:156)
 W/System.err:     at com.tencent.bugly.crashreport.common.strategy.c.i(BUGLY:483)
 W/System.err:     at com.tencent.bugly.crashreport.common.strategy.c$a.run(BUGLY:858)
 W/System.err:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
 W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
 W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
 W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
 W/System.err:     at java.lang.Thread.run(Thread.java:818)
 W/System.err: java.lang.SecurityException: getSubscriberId: Neither user 10251 nor current process has android.permission.READ_PHONE_STATE.
 W/System.err:     at android.os.Parcel.readException(Parcel.java:1620)
 W/System.err:     at android.os.Parcel.readException(Parcel.java:1573)
 W/System.err:     at com.android.internal.telephony.IPhoneSubInfo$Stub$Proxy.getSubscriberIdForSubscriber(IPhoneSubInfo.java:557)
 W/System.err:     at android.telephony.TelephonyManager.getSubscriberId(TelephonyManager.java:2013)
 W/System.err:     at android.telephony.TelephonyManager.getSubscriberId(TelephonyManager.java:1994)
 W/System.err:     at com.tencent.bugly.crashreport.common.info.b.b(BUGLY:108)
 W/System.err:     at com.tencent.bugly.crashreport.common.info.a.r(BUGLY:269)
 W/System.err:     at com.tencent.bugly.crashreport.common.info.a.n(BUGLY:204)
 W/System.err:     at com.tencent.bugly.proguard.s.a(BUGLY:129)
 W/System.err:     at com.tencent.bugly.proguard.w.a(BUGLY:156)
 W/System.err:     at com.tencent.bugly.crashreport.common.strategy.c.i(BUGLY:483)
 W/System.err:     at com.tencent.bugly.crashreport.common.strategy.c$a.run(BUGLY:858)
 W/System.err:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
 W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
 W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
 W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
 W/System.err:     at java.lang.Thread.run(Thread.java:818)
jtbuaa commented 8 years ago

在宿主里预埋权限不行?

chasel commented 8 years ago

@jtbuaa 对

yi-zhe commented 8 years ago

这是新的权限模型, 需要使用者动态申请, 这个问题和插件没有关系, 放到任何一个6.0的系统都会崩溃