More precise sudb management

This commit is contained in:
topjohnwu
2017-12-20 12:14:46 +08:00
parent 5ee49ba065
commit a7ed6c15d3
8 changed files with 33 additions and 31 deletions
@@ -62,9 +62,9 @@ public class Utils {
return Shell.su(fmt("cat %s | sed '$a\\ ' | sed '$d'", path));
}
public static String checkMD5(Object path) {
List<String> ret = Shell.su(fmt("md5sum %s", path));
return isValidShellResponse(ret) ? ret.get(0).split("\\s+")[0] : null;
public static String checkInode(Object path) {
List<String> ret = Shell.su(fmt("ls -i %s", path));
return isValidShellResponse(ret) ? ret.get(0).trim().split("\\s+")[0] : null;
}
public static void uninstallPkg(String pkg) {