Command command = new Command(0, “chmod 777 /data/datan ls data/data”) {
@Override
public void commandCompleted(int id, int exitcode) {
super.commandCompleted(id, exitcode);
Log.e(TAG, "commandCompleted: Exit code: " + exitcode);
}
@Override
public void commandOutput(int id, String line) {
super.commandOutput(id, line);
Log.e(TAG, "commandOutput: " + line);
}
@Override
public void commandTerminated(int id, String reason) {
Log.e(TAG, "commandTerminated: " + reason);
super.commandTerminated(id, reason);
}
};
try {
RootTools.getShell(true).add(command);
} catch (IOException e) {
throw new RuntimeException(e);
} catch (TimeoutException e) {
throw new RuntimeException(e);
} catch (RootDeniedException e) {
throw new RuntimeException(e);
}
Although there are more than two files in this path, data/data, only two files appear to me.
New contributor
CARLOSS PVN is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.