I'm currently writing a android app that executes su commands and I would like to print the output of that commands to a toast my code looks like this
try {
Runtime.getRuntime().exec("su -c rm -rf /data/cache");
} catch (Exception e ) {
}
But I found nothing and I have no idea how to do it so any help would be appreciated.