在框架/基/數據的/ etc/platform.xml
您可以定義與相應的GID新創建的權限。
<permissions>
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- The following tags are associating low-level group IDs with
permission names. By specifying such a mapping, you are saying
that any application process granted the given permission will
also be running with the given group ID attached to its process,
so it can perform any filesystem (read, write, execute) operations
allowed for that group. -->
<permission name="android.permission.BLUETOOTH_ADMIN" >
<group gid="net_bt_admin" />
</permission>
<permission name="android.permission.BLUETOOTH" >
<group gid="net_bt" />
</permission>
<permission name="android.permission.BLUETOOTH_STACK" >
<group gid="net_bt_stack" />
</permission>
<permission name="android.permission.NET_TUNNELING" >
<group gid="vpn" />
</permission>
<permission name="android.permission.INTERNET" >
<group gid="inet" />
</permission>
<permission name="android.permission.CAMERA" >
<group gid="camera" />
</permission>
<permission name="android.permission.READ_LOGS" >
<group gid="log" />
</permission>
...
</permission>
其他權限定義不在上述文件中,因爲實際上Android中有兩種權限,如下圖所示。只有在Linux文件中定義的權限才被定義。
像ACCESS_FINE_LOCATION,READ_CONTACTS等
其他權限是在AndroidManifest.xml在系統應用程序定義(包/.../ AndroidManifest.xml中)和框架(框架/鹼/核心/ RES/AndroidManifest .XML)。
您將您的許可和相關代碼後,根據Building Instruction
+1對於IPC說明編譯並生成項目,你畫一個你自己還是你發現它的地方? – 2013-02-15 11:35:46
我自己畫了。 @ BjarkeFreund-Hansen – StarPinkER 2013-02-15 11:44:07
@StarPinkER你可以提供更多的信息,IPC是如何在Android應用程序中發生的。當應用程序實際詢問位置時,如果應用程序沒有拋出異常,則具有相應權限的操作系統如何驗證。 – 2013-11-03 02:46:26