【问题标题】:how to create a folder in /system with root in my app如何在我的应用程序中使用根目录在 /system 中创建文件夹
【发布时间】:2013-09-03 02:37:49
【问题描述】:

嗨,在我的文件管理器中,我想添加一个选项以在 /system 目录中创建文件夹。我试过这个添加到我的代码中。它不起作用。我做错了什么?

File dir = new File(path + name);

Runtime.getRuntime().exec("su -c \"mount -orw,remount /\"");
Runtime.getRuntime().exec("su -c \"mkdir" + dir.getAbsolutePath + "\"");

【问题讨论】:

    标签: android directory root explorer su


    【解决方案1】:

    已修复!我需要在 mkdir 之后添加一个空格。

    Runtime.getRuntime().exec("su -c \"mkdir " + dir.getAbsolutePath + "\"");
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-11
      • 2019-01-02
      • 2013-10-22
      • 1970-01-01
      • 1970-01-01
      • 2017-04-27
      相关资源
      最近更新 更多