gpt4 book ai didi

安卓模拟器root权限应用

转载 作者:行者123 更新时间:2023-11-29 18:14:30 24 4
gpt4 key购买 nike

我在将文件复制到 Android 模拟器上的虚拟 SD 卡时遇到问题。我正在创建一个将 data/data/package 文件夹复制到 sdcard 的应用程序。当应用程序复制自己的程序包时,这可以正常工作,但不会为其他应用程序执行此操作。我研究了其他主题,但我似乎无法给我的应用程序 super 用户状态。

最佳答案

来自 Android 开发人员,Security and Permissions :

A central design point of the Android security architecture is that no application, by default, has permission to perform any operations that would adversely impact other applications, the operating system, or the user. This includes reading or writing the user's private data (such as contacts or e-mails), reading or writing another application's files, performing network access, keeping the device awake, etc.

此外,

Because Android sandboxes applications from each other, applications must explicitly share resources and data. They do this by declaring the permissions they need for additional capabilities not provided by the basic sandbox.

因此,这回答了您关于为什么不能从其他应用程序写入数据的问题。为了做你想做的事,在应用程序之间共享数据,你需要用相同的签名签署应用程序并请求相同的 sharedUserId,如上面的链接所示。

关于安卓模拟器root权限应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8918132/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com