I need to execute adb commands from DOS batch files, but I need to know if the push and pull commands were successful. Do these commands return an ERRORLEVEL, or some other environment variable to determine of the push or pull was successful?

1 Answer 1


According to the source code for ADB push and pull commands, they return 0 for success and 1 for failure. I have not tried this in batch files, so cannot comment on accuracy.

  • Thanks, that is useful. When you say they return these values, do you mean as error levels, or to standard output? Can I use this: adb -s mydevice pull file1 file1 > reseult.txt ? Commented May 28, 2014 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .