问题来源:手机厂商在进行GMS认证测试时测试出的问题,比如如下代码会产生权限安全问题
<receiver android:name=".wxapi.WXRegister" android:permission="com.tencent.mm.plugin.permission.SEND" > <intent-filter> <action android:name="com.tencent.mm.plugin.openapi.Intent.ACTION_REFRESH_WXAPP" /> </intent-filter> </receiver>
com.sohu.newsclient.wxapi.WXRegister (com.tencent.mm.plugin.permission.SEND)
问题分析:1.任何具有com.tencent.mm.plugin.permission.SEND权限的代码可能会执行你组件(如BroadCastReceiver)中的逻辑。
2.如果第三方危害性的应用首先安装已经注册了这com.tencent.mm.plugin.permission.SEND权限
<uses-permission android:name="com.master.me.CUSTOM_PERMISSION_TEST" android:protectionLevel="signature"/>。
问题根源:At the beginning Lolipop OS, Basically, Duplicated custom permission definition is not allowed. (If A App defines Permission P and is installed, B App which defines Permission P can not be installed if A app and B App's signature is different.)
解决方法:
1.利用Android FrameWork来规避此问题
manifest>
...
<activity
android:name=".InternalActivity"
android:permission="com.hiqes.sample.frm_enf_perm"
android:exported="false" >
<intent-filter>
<action android:name="com.hiqes.sample.INTERNAL_ACTION1" />
<category android:name="android.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.hiqes.sample.INTERNAL_ACTION2" />
<category android:name="android.category.DEFAULT" />
</intent-filter>
...
</activity>
....
</manifest>
本文探讨了在GMS认证测试中遇到的权限问题,涉及代码安全,具体表现为某些权限可能导致恶意第三方应用执行组件逻辑。问题起源于Lolipop系统后不允许重复定义自定义权限。解决方案是利用Android Framework来避免此类问题。
2376

被折叠的 条评论
为什么被折叠?



