想写个小应用,需要使用root权限管理/data/目录下的任意文件,该怎么实现呢?
3.29补
通过shell命令方式来操作文件。
shell
设定目标权限,再进行常规File操作
File
但都有缺点啊
操作不方便,不好控(如进度、结果等)
安全性问题,设定权限操作完成后没能把权限改回(擦脚印)
现求一更优雅的实现方式或者谁知道像rootexplorer这种软件是怎么来做的呢?
ringa_lee
chomd 777
Already have root access? Managing files is nothing more than deleting, renaming, copying and pasting, moving, and io operations.
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.
Use listview to display the file directory, and the remaining various operations on the files can be placed in the menu.
chomd 777
Already have root access? Managing files is nothing more than deleting, renaming, copying and pasting, moving, and io operations.
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.
Use listview to display the file directory, and the remaining various operations on the files can be placed in the menu.