android - 有root权限,如何管理/data/目录?
ringa_lee
ringa_lee 2017-04-18 09:16:58
0
4
558

原问题:

想写个小应用,需要使用root权限管理/data/目录下的任意文件,该怎么实现呢?


3.29补

现在有两个方案

  1. 通过shell命令方式来操作文件。

  2. 设定目标权限,再进行常规File操作

但都有缺点啊

  1. 操作不方便,不好控(如进度、结果等)

  2. 安全性问题,设定权限操作完成后没能把权限改回(擦脚印)

现求一更优雅的实现方式
或者谁知道像rootexplorer这种软件是怎么来做的呢?

ringa_lee
ringa_lee

ringa_lee

reply all(4)
Peter_Zhu

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template