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; }
public static boolean isUciSupport() throws RunCommandFailedException, RootFailureException { runCommandWithException("uci", false); return true; }