》背景,车载应用可能添加新的接口,如刹车等,为新的接口提供保护权限,暂定的解决方案。
1.在platform.xml中添加
frameworks/base/data/etc/platform.xml
<permission name="android.permission.SAY_HELLO" >
<group gid="say_hello" />
</permission>
2、在android_filesystem_config.h中添加
#define AID_SAY_HELLO 8001
在android_ids数组中添加
{ “say_hello”, AID_SAY_HELLO, },
3、在frameworks/base/core/res/AndroidManifest.xml中添加
<permission android:name="android.permission.SAY_HELLO"
android:protectionLevel="dangerous"
android:label="say hello"
/>
4、将frameworks/base/data/etc/platform.xml push到/etc/permissions/下
5、执行mmm bionic/libc/ 编译出libc.so,并将其push到/system/lib下
6、执行mmm frameworks/base/core/res/编译出framework-res.apk,并将其push到/system/framework下
完成,可以在android应用中验证成果了!