想写个小应用,需要使用root权限管理/data/目录下的任意文件,该怎么实现呢?
3.29补
通过shell
命令方式来操作文件。
设定目标权限,再进行常规File
操作
但都有缺点啊
操作不方便,不好控(如进度、结果等)
安全性问题,设定权限操作完成后没能把权限改回(擦脚印)
现求一更优雅的实现方式
或者谁知道像rootexplorer这种软件是怎么来做的呢?
巴扎黑2017-04-18 09:18:58
Already have root access? Managing files is nothing more than deleting, renaming, copying and pasting, moving, and io operations.
巴扎黑2017-04-18 09:18:58
It is recommended to use it with caution. If you operate the files under data at will, it may cause the loss of some application data, the application cannot be restarted, etc., which is not good.
巴扎黑2017-04-18 09:18:58
Use listview to display the file directory, and the remaining various operations on the files can be placed in the menu.