returnBoolean.parseBoolean(Shell.su("touch "+path+" 2>/dev/null; if [ -f "+path+" ]; then echo true; else echo false; fi").get(0));
}
}
StringBuilderbuilder=newStringBuilder();
for(Strings:result){
builder.append(s);
publicstaticbooleanremoveFile(Stringpath){
if(!Shell.rootAccess()){
returnfalse;
}else{
returnBoolean.parseBoolean(Shell.su("rm -f "+path+" 2>/dev/null; if [ -f "+path+" ]; then echo false; else echo true; fi").get(0));
}
}
returnbuilder.toString();
publicstaticList<String>getModList(Stringpath){
List<String>ret;
ret=Shell.sh("find "+path+" -type d -maxdepth 1 | while read ITEM ; do if [ -f $ITEM/module.prop ]; then echo $ITEM; fi; done");
if(ret.isEmpty()&&Shell.rootAccess())ret=Shell.su("find "+path+" -type d -maxdepth 1 | while read ITEM ; do if [ -f $ITEM/module.prop ]; then echo $ITEM; fi; done");