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