应用程序访问权限的内部存储的文件 [英] Application access permission to files on internal storage

查看:214
本文介绍了应用程序访问权限的内部存储的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关内部存储的一个问题那是私有的每个应用程序(与Context.MODE_PRIVATE存储文件尤其是当)。

A question about the internal storage that's private to each application (especially when storing files with Context.MODE_PRIVATE).

这是怎么存储实际分配给应用程序?仅仅通过包名或还莫名其妙地绑定到应用程序的符号键?

How is that storage actually assigned to the application? Just by package name or also somehow bound to the sign key of the app?

比方说,我已经安装的应用程序1,然后写另一个应用程序2具有相同的名称和包名称(只是不同用不同的密钥签名),并安装它(APP 2更换程序1),将这项申请2可以访问的/数据/数据​​/ [程序] /文件?

Let's say I have installed application 1 and then write another application 2 with the same name and package name (just differently signed with different keys) and install it (app 2 replacing app 1), would that application 2 get access to the /data/data/[app]/files ?

或者我不是甚是能够与APP2取代APP1因为摆在首位?

Or would I not even be able to replace app1 with app2 due to different sign keys in the first place?

推荐答案

我不认为你可以有2个应用程序相同的包。我知道,如果我有一个开发版本我的设备上,我尝试安装的版本,我得到一个错误,我必须先卸载previous。

I don't think you can have 2 applications with the same package. I know if I have a development build on my device and I try to install the release, I get an error and I MUST uninstall the previous first.

这也正好是下午,其卸载,并列出了包名的应用程序。

This also coincides with pm, which uninstalls, and lists applications by the package name.

所以我的答案是,它赋予它根据包的名字,但你不能有2个应用程序使用相同的包名。

So my answer is that it assigns it based on the package name, but you can't have 2 applications with the same package name.

这篇关于应用程序访问权限的内部存储的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆