當前位置: 首頁>>代碼示例>>Java>>正文


Java RootTools.remount方法代碼示例

本文整理匯總了Java中com.stericson.RootTools.RootTools.remount方法的典型用法代碼示例。如果您正苦於以下問題:Java RootTools.remount方法的具體用法?Java RootTools.remount怎麽用?Java RootTools.remount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.stericson.RootTools.RootTools的用法示例。


在下文中一共展示了RootTools.remount方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createRootdir

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean createRootdir(String parentPath, String name) {
    File dir = new File(parentPath + File.separator + name);
    if (dir.exists())
        return false;

    try {
        if (!readReadWriteFile())
            RootTools.remount(parentPath, "rw");

        execute("mkdir " + getCommandLineString(dir.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:kranthi0987,項目名稱:easyfilemanager,代碼行數:18,代碼來源:RootCommands.java

示例2: createRootFile

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean createRootFile(String parentPath, String name) {
    File dir = new File(parentPath + File.separator + name);

    if (dir.exists())
        return false;

    try {
        if (!readReadWriteFile())
            RootTools.remount(parentPath, "rw");

        execute("touch " + getCommandLineString(dir.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:kranthi0987,項目名稱:easyfilemanager,代碼行數:19,代碼來源:RootCommands.java

示例3: renameRootTarget

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean renameRootTarget(RootFile before, RootFile after) {
    File file = new File(before.getParent() + File.separator + before.getName());
    File newf = new File(after.getParent() + File.separator + after.getName());

    if (after.getName().length() < 1)
        return false;

    try {
        if (!readReadWriteFile())
            RootTools.remount(before.getPath(), "rw");

        execute("mv " + getCommandLineString(file.getAbsolutePath()) + " "
                + getCommandLineString(newf.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:medalionk,項目名稱:simple-share-android,代碼行數:21,代碼來源:RootCommands.java

示例4: renameRootTarget

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean renameRootTarget(String path, String oldname, String name) {
    File file = new File(path + File.separator + oldname);
    File newf = new File(path + File.separator + name);

    if (name.length() < 1)
        return false;

    try {
        if (!readReadWriteFile())
            RootTools.remount(path, "rw");

        execute("mv " + getCommandLineString(file.getAbsolutePath()) + " "
                + getCommandLineString(newf.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:gigabytedevelopers,項目名稱:FireFiles,代碼行數:21,代碼來源:RootCommands.java

示例5: deleteFileRoot

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean deleteFileRoot(String path) {
    try {
        if (!readReadWriteFile())
            RootTools.remount(path, "rw");

        if (new File(path).isDirectory()) {
            execute("rm -f -r " + getCommandLineString(path));
        } else {
            execute("rm -r " + getCommandLineString(path));
        }
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }
    return false;
}
 
開發者ID:gigabytedevelopers,項目名稱:FireFiles,代碼行數:17,代碼來源:RootCommands.java

示例6: createRootdir

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean createRootdir(File dir, String path) {
    if (dir.exists())
        return false;

    try {
        if (!readReadWriteFile())
            RootTools.remount(getCommandLineString(path), "rw");

        runAndWait("mkdir " + getCommandLineString(dir.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:wade-fs,項目名稱:MediaManager,代碼行數:17,代碼來源:RootCommands.java

示例7: renameRootTarget

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static void renameRootTarget(String path, String oldname, String name) {
    File file = new File(path + "/" + oldname);
    File newf = new File(path + "/" + name);

    if (name.length() < 1)
        return;

    try {
        if (!readReadWriteFile())
            RootTools.remount(getCommandLineString(path), "rw");

        runAndWait("mv " + getCommandLineString(file.getAbsolutePath()) + " "
                + getCommandLineString(newf.getAbsolutePath()));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
開發者ID:wade-fs,項目名稱:MediaManager,代碼行數:18,代碼來源:RootCommands.java

示例8: createRootFile

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean createRootFile(String cdir, String name) {
    File dir = new File(cdir + "/" + name);

    if (dir.exists())
        return false;

    try {
        if (!readReadWriteFile())
            RootTools.remount(getCommandLineString(cdir), "rw");

        runAndWait("touch " + getCommandLineString(dir.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:wade-fs,項目名稱:MediaManager,代碼行數:19,代碼來源:RootCommands.java

示例9: doInBackground

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
@Override
protected Boolean doInBackground(final GenericFile... params) {
    final String path = params[0].getAbsolutePath();
    final Settings settings = Settings.getInstance(mContext);
    final boolean remount = settings.useCommandLine() && settings.isSuEnabled() &&
            Environment.needsRemount(path);
    if (remount) {
        RootTools.remount(path, "RW");
    }
    try {
        return params[0].applyPermissions(this.mTarget);
    } finally {
        if (remount) {
            RootTools.remount(path, "RO");
        }
    }
}
 
開發者ID:Doctoror,項目名稱:Pure-File-Manager,代碼行數:18,代碼來源:FilePropertiesDialog.java

示例10: createRootdir

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean createRootdir(File dir) {
    if (dir.exists())
        return false;

    try {
        if (!readReadWriteFile())
            RootTools.remount(getCommandLineString(dir.getParent()), "rw");

        runAndWait("mkdir " + getCommandLineString(dir.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:DF1E,項目名稱:SimpleExplorer,代碼行數:17,代碼來源:RootCommands.java

示例11: moveCopyRoot

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean moveCopyRoot(String old, String newDir) {
    try {
        if (!readReadWriteFile())
            RootTools.remount(newDir, "rw");

        execute("cp -fr " + getCommandLineString(old) + " "
                + getCommandLineString(newDir));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }
    return false;
}
 
開發者ID:kranthi0987,項目名稱:easyfilemanager,代碼行數:14,代碼來源:RootCommands.java

示例12: changeGroupOwner

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean changeGroupOwner(File file, String owner, String group) {
    try {
        if (!readReadWriteFile())
            RootTools.remount(file.getAbsolutePath(), "rw");

        execute("chown " + owner + "." + group + " "
                + getCommandLineString(file.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:medalionk,項目名稱:simple-share-android,代碼行數:15,代碼來源:RootCommands.java

示例13: applyPermissions

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean applyPermissions(File file, Permissions permissions) {
    try {
        if (!readReadWriteFile())
            RootTools.remount(file.getAbsolutePath(), "rw");

        execute("chmod " + Permissions.toOctalPermission(permissions) + " "
                + getCommandLineString(file.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:kranthi0987,項目名稱:easyfilemanager,代碼行數:15,代碼來源:RootCommands.java

示例14: moveCopyRoot

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static void moveCopyRoot(String old, String newDir) {
    try {
        if (!readReadWriteFile())
            RootTools.remount(getCommandLineString(newDir), "rw");

        runAndWait("cp -fr " + getCommandLineString(old) + " " + getCommandLineString(newDir));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
開發者ID:wade-fs,項目名稱:MediaManager,代碼行數:11,代碼來源:RootCommands.java

示例15: changeGroupOwner

import com.stericson.RootTools.RootTools; //導入方法依賴的package包/類
public static boolean changeGroupOwner(File file, String owner, String group) {
    try {
        if (!readReadWriteFile())
            RootTools.remount(getCommandLineString(file.getAbsolutePath()), "rw");

        runAndWait("chown " + owner + "." + group + " "
                + getCommandLineString(file.getAbsolutePath()));
        return true;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
 
開發者ID:wade-fs,項目名稱:MediaManager,代碼行數:15,代碼來源:RootCommands.java


注:本文中的com.stericson.RootTools.RootTools.remount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。