Android系统应用添加系统签名
在开发的过程中,如果需要设置当前的应用为系统应用,需要两步:
- 在 对应的AndroidManifest.xml文件中将“android:sharedUserId”设置为"android.uid.system"。如下所示:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.localmediaplayerdemo"
android:sharedUserId="android.uid.system">
- 使用签名文件对应用进行签名
该类App在安装到系统的时候,需要有系统签名,否则无法安装,提示下面的错误:
04/24 18:02:52: Launching 'mobile' on ×××Android Device.
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
List of apks