Пример #1
0
  public static JSONObject getJSON() {
    JSONObject result;

    String res = null;
    try {
      res = Utils.runCommandWithException("uci config", true);
    } catch (Exception e) {
      L.e("Can't access live customconfig: " + e.getMessage());
      return null;
    }

    try {
      result = (JSONObject) JSONValue.parse(res);
    } catch (ClassCastException e) {
      L.e(e.getMessage());
      return null;
    }

    return result;
  }
Пример #2
0
 public static boolean isUciSupport() throws RunCommandFailedException, RootFailureException {
   runCommandWithException("uci", false);
   return true;
 }