code: static boolean parseAvailableResult(List<String> stdout, boolean checkForRoot) {
      if (stdout == null) {
        return false;
      }
  
      // this is only one of many ways this can be done
      boolean echoSeen = false;
  
      for (String line : stdout) {
        if (line.contains("uid=")) {
          // id command is working, let's see if we are actually root
          return !checkForRoot || line.contains("uid=0");
        } else if (line.contains("-BOC-")) {
          // if we end up here, at least the su command starts some kind of shell, let's hope it has root privileges -
          // no way to know without additional native binaries
          echoSeen = true;
        }
      }
  
      return echoSeen;
    }
docs: See if the shell is alive, and if so, check the UID
  
  @param stdout
  Standard output from running AVAILABLE_TEST_COMMANDS
  @param checkForRoot
  true if we are expecting this shell to be running as root
  @return true on success, false on error