public boolean fixUtils(String[] utils) throws Exception {
  for (  String util : utils) {
    if (!checkUtil(util)) {
      if (checkUtil("busybox")) {
        if (hasUtil(util,"busybox")) {
          fixUtil(util,RootTools.utilPath);
        }
      }
 else {
        if (checkUtil("toolbox")) {
          if (hasUtil(util,"toolbox")) {
            fixUtil(util,RootTools.utilPath);
          }
        }
 else {
          return false;
        }
      }
    }
  }
  return true;
}

public boolean fixUtils ( String [ ] utils ) throws Exception { for ( String util : utils ) { if ( ! checkUtil ( util ) ) { if ( checkUtil ( "busybox" ) ) { if ( hasUtil ( util , "busybox" ) ) { fixUtil ( util , RootTools . utilPath ) ; } } else { if ( checkUtil ( "toolbox" ) ) { if ( hasUtil ( util , "toolbox" ) ) { fixUtil ( util , RootTools . utilPath ) ; } } else { return false ; } } } } return true ; }
this will check an array of binaries , determine if they exist and determine that it has either the permissions 755 , 775 , or 777 . if an applet is not setup correctly it will try and fix it . ( this is for busybox applets or toolbox applets )
