I made some buttons in my app that exec a bash cmd.
Here is my string:
final String[] test = {"su","-c","echo test > /system/test.txt"};
This cmd works, in fact, i can see the test.txt file on /system/ with the line test inside.
My question is: When i push on the button for exec that cmd the device create a toast with the string "echo test /system/text.txt". I'm guessing this is due to "-c", anyway:
final String[] test = {"su","echo test > /system/test.txt"};
won't work, and:
final String[] test = {"su","-c","echo test > /system/test.txt >> /dev/null"};
won't work as well and create a toast showing "echo test /system/test.txt /dev/null"
is there any way i can avoid this "problem"?
Also, can anyone show me a little function that create a toast with a spinning wheel when i onClick to the button that exec it?
Thanks!!!