RootTools
RootTools copied to clipboard
java.lang.IllegalStateException: Unable to add commands to a closed shell
I'm getting the RootTools shell and executing commands like so:
RootTools.getShell(true).add(cmd);
and sometimes (not always, and not reproduceably) it throws the error mentioned above.
In the same code, I'm performing various other root commands, using other RootTools functions (copyFile
, remount
), and also explicitly running some commands with Runtime.getRuntime().exec()
, both before and after this call. But I'm only explicitly calling getShell
once. How can I fix/work around this issue? I can check to see if the shell that getShell
returns is closed, but I don't know how to get an open shell in that case.
I've got the exact same issue myself. Did you ever figure out was the cause was or how to get around it?
No, I'm sorry. We ultimately decided that we could deal with it, basically.