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 Email程序源码
  2. android 退出程序 seekbar mediaplayer
  3. Android 应用程序背景透明,有标题的初始页
  4. Android调用拨号程序,短信发送
  5. Android指定调用系统自带浏览器打开链接
  6. Android天气提醒程序源码
  7. Android系统中自带的图标
  8. Android程序员必备精品资源
  9. Android P系统时间更新分析

随机推荐

  1. Could not get resource ‘https://dl.go
  2. android系统本身的图片资源
  3. Android Bluetooth蓝牙名称修改
  4. Android: 上传图片到服务器
  5. 【Android Studio】Android Studio和Grad
  6. android获取短信验证码自动填入
  7. android manifest
  8. android 设置各种颜色 android:backgrou
  9. Using the Android Camera - Android OS
  10. android studio Missing Constraints in