android:sharedUserId
The name of a Linux user ID that will be shared with other applications. 
By default, Android assigns each application its own unique user ID.
However, if this attribute is set to the same value for two or more 
applications,they will all share the same ID — provided that they are 
also signed by the same certificate. Application with the same user ID 
can access each other's data and, if desired, run in the same process.

android:sharedUserId = "android.uid.system"首先加入android:sharedUserId="android.uid.system"这个属性。通过Shared User id,拥有同一个User id的多个APK可以配置成运行在同一个进程中。那么把程序的UID配成android.uid.system,也就是要让程序运行在系统进程中,这样就有权限来修改系统xx了。 只是加入UID还不够,如果这时候安装APK的话发现无法安装,提示签名不符,原因是程序想要运行在系统进程中还要有目标系统的platform key,就是上面第二个方法提到的platform.pk8和platform.x509.pem两个文件。用这两个key签名后apk才真正可以放入系统进程中。第一个方法中加入LOCAL_CERTIFICATE := platform其实就是用这两个key来签名。

更多相关文章

  1. Android(安卓)Provider 属性
  2. android:process=":remote"
  3. android aidl 进程通信 调用错误
  4. Android(安卓)IPC机制
  5. 知识梳理之Android进程
  6. 知识梳理之Android进程
  7. hello world 第一个android程序
  8. Android多进程之Binder解绑监听的问题
  9. Android(安卓)SDK 2.0安装(配置图文教程)

随机推荐

  1. 前端开发工具,总有一款深得你心?
  2. Web前端开发人员必知的七项数据库优化技
  3. 基于web的图书管理系统设计与实现(附演示
  4. 千锋重庆Java教程之:详解依赖注入
  5. Linux运维教程-Linux系统远程配置
  6. Linux运维教程-Linux系统网络管理
  7. Linux运维教程-Linux服务进程管理
  8. Java文件上传是如何实现的?
  9. Linux运维教程-Linux软件包管理
  10. php的初步认识与常用数据类型