@WorkerThread
    public static synchronized String version(boolean internal) {
      int idx = internal ? 0 : 1;
      if (suVersion[idx] == null) {
        String version = null;

        CommandResult result = Shell.run(internal ? "su -V" : "su -v", "exit");

        for (String line : result.stdout) {
          if (!internal) {
            if (!line.trim().equals("")) {
              version = line;
              break;
            }
          } else {
            try {
              if (Integer.parseInt(line) > 0) {
                version = line;
                break;
              }
            } catch (NumberFormatException e) {
              // should be parsable, try next line otherwise
            }
          }
        }

        suVersion[idx] = version;
      }
      return suVersion[idx];
    }
<p>Detects the version of the su binary installed (if any), if supported by the binary. Most binaries support
two different version numbers, the public version that is displayed to users, and an internal version number
that is used for version number comparisons. Returns null if su not available or retrieving the version isn't
supported.</p>

<p>Note that su binary version and GUI (APK) version can be completely different.</p>

<p>This function caches its result to improve performance on multiple calls</p>

@param internal
    Request human-readable version or application internal version
@return String containing the su version or null
imitate/src/main/java/com/engineer/imitate/shell/Shell.java