RootTools
RootTools copied to clipboard
Not possible to receive binary output from stdout
Hi,
I've been using the library for a while now, but recently I needed to call the screencap command which outputs the screenshot to either a file or stdout. I'd like to use stdout so I don't have the IO overhead, but the Command class automatically converts the data to Strings, deleting line seperators and other important info.
I was wondering how I could work around the issue or if there is a library that does allow binary output
It might be easier to manually use a root shell in a Process
object, (instantiate one with Runtime.getRuntime().exec("su")
) and send and receive commands and data with process.getInputStream()
and process.getOutputStream()
.
There's a lot of help online for doing this.