Where to lookup for the meaning “adb screencap” command's exit codes or how to get the meaning programatically?
问题 Process p = Runtime.getRuntime().exec("screencap -p /storage/sdcard0/test3332.png"); p.waitFor(); String error = "error: " + p.exitValue(); p.exitValue() is equal to 11 How to get the "meaning" or message from this exit code? If this should be available in the command's manual, then where to find this manual? Can someone post a link or a reference ? 回答1: The error message can be retrieved in this way: int ch; StringBuilder sb = new StringBuilder(); while((ch = p.getErrorStream().read()) != -1