Issue
Can anyone say, whether adb
commands can be executed through my android application. If it is possible to execute, how it can be implemented?
Solution
You can do it with this:
Process process = Runtime.getRuntime().exec("your command");
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
Don't forget to surround it with a try and catch statement.
Edit:
@Phix is right, ProcessBuilder would be better to use.
Answered By - Ahmad
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.