简体   繁体   English

Android:创建一个新文件夹并更改其权限

[英]Android: Create a new folder and change it's permissions

I have an app. 我有一个应用程序。 I want this app to create a new folder which can only be opened by this app and no one else. 我希望这个应用程序创建一个新文件夹,该文件夹只能由该应用程序打开,没有其他人可以打开。 I want this folder outside the application internal storage, so that it is visible in file manager, but it can't be opened because of folder permission (rwx --- ---). 我希望此文件夹位于应用程序内部存储之外,以便在文件管理器中可见,但由于文件夹权限(rwx --- ---)而无法打开。

So is there a way create a folder, make this app its owner, and change its permission so that only this app can open it and no one else (not even file manager or gallery etc.) 因此,有一种方法可以创建一个文件夹,将该应用程序设为其所有者,并更改其权限,以便只有该应用程序可以打开它,而没有其他人可以打开(甚至文件管理器或图库等也不能)。

In order to change file's permission. 为了更改文件的权限。 First you should get root ownership of the device. 首先,您应该获得设备的root所有权。 Which means YOU HAVE TO ROOT the DEVICE! 这意味着您必须启动设备!

Android Application SandBox Android应用程序沙箱

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM