How can system app located in /system/app have system permission in Android 4.4 KitKat build?

落爺英雄遲暮 提交于 2019-11-28 01:44:30

问题


I'm Jaemoon.

My system app located in /system/app was running well until Android 4.3 Jelly Bean but it started having some problems which was security problem in Android 4.4 KitKat.

In other words, My system app needed permissions such as android.permission.WRITE_APN_SETTINGS and android.permission.CONNECTIVITY_INTERNAL and did well until Jelly Bean but from KitKat, there were security problems as follows. I don't understand the reason why my system app doing well in Jelly Bean started to have security problems from KitKat.

I am doubting that KitKat needs new setting in some script files for system permission. Could anyone help me or guide me ?

---------------------------------------------------------------------
java.lang.SecurityException: No permission to write APN settings: Neither user 10146 nor current process has android.permission.WRITE_APN_SETTINGS.
...
---------------------------------------------------------------------
java.lang.SecurityException: ConnectivityService: Neither user 10097 nor current process has android.permission.CONNECTIVITY_INTERNAL.
---------------------------------------------------------------------

Thanks in advance..


回答1:


In Android 4.4 just apps located at /system/priv-app have the "system" level permission.

Google did this so that manufacturers like Samsung can have better control of the permissions the bundled apps have.

So administrative apps goes to /system/priv-app. Games, freemium apps and other garbages goes to /system/app

Thanks!




回答2:


In 4.4, use /system/priv-app instead.




回答3:


It will go to priv-app folder now. Before kitkat, all apps in system partition had "system"-level permissions. Now only apps in priv-app can get system permissions.



来源:https://stackoverflow.com/questions/19812924/how-can-system-app-located-in-system-app-have-system-permission-in-android-4-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!