android uid.system,android.uid.system

在AndroidManife.xml 中添加

android:sharedUserId="",

可以将不同的程序加入到同一个进程中,方便数据的共享。

但必须要满足一个条件,即:共享UserId的程序必须使用相同的签名。

在AndroidManifest.xml中声明

android:sharedUserId="android.uid.system"后,

意味着将自己的程序加入到了系统的进程中,同时也将获得极大的权限。

遗憾的是该应用程序将没有权限读写SD卡。

Processes that continue holding open fds on the sdcard a little after it is

requested to be unmounted will be killed so that it can unmount.

We don't want the system process to  be able to access the sdcard to avoid

these kinds of issues (and just general security cleanliness), so that it

does not have permission to access it.

The system user can not access the SD card, because if the SD card gets unmounted it may need to kill any processes that have files open on it and we don't want system processes being killed like that. If you want to access the SD card, you need to not use the system shared user ID.

解决方法:

需要用到android:sharedUserId="android.uid.system"可以做成一个服务,

或者把SD卡操作的功能独立出去,做成一个服务。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值