device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java
private boolean pushHandleGps2Device() {

    InputStream io = AbstractDevice.class.getResourceAsStream("handlePopBox.jar");
    File dest = new File(FileUtils.getTempDirectory(), "handlePopBox.jar");

    try {
      FileUtils.copyInputStreamToFile(io, dest);
    } catch (IOException e) {
      e.printStackTrace();
    }

    CommandLine pushcommand = adbCommand("push ", dest.getAbsolutePath(), "/data/local/tmp/");
    String outputPush = executeCommandQuietly(pushcommand);
    log.debug("Push automator.jar to device {}", outputPush);

    try {
      // give it a second to recover from the activity start
      Thread.sleep(1000);
    } catch (InterruptedException ie) {
      throw new RuntimeException(ie);
    }
    return outputPush.contains("KB/s");
  }
private boolean pushHandleGps2Device() {

    InputStream io = AbstractDevice.class.getResourceAsStream("handlePopBox.jar");
    File dest = new File(FileUtils.getTempDirectory(), "handlePopBox.jar");

    try {
      FileUtils.copyInputStreamToFile(io, dest);
    } catch (IOException e) {
      e.printStackTrace();
    }

    CommandLine pushcommand = adbCommand("push ", dest.getAbsolutePath(), "/data/local/tmp/");
    String outputPush = executeCommandQuietly(pushcommand);
    log.debug("Push automator.jar to device {}", outputPush);

    try {
      // give it a second to recover from the activity start
      Thread.sleep(1000);
    } catch (InterruptedException ie) {
      throw new RuntimeException(ie);
    }
    return outputPush.contains("KB/s");
  }
Push handlePopBox.jar to android tmp folder

@return push device successful or not