Back to project page masa.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUC...
If you think the Android project masa listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.jvending.masa; /*from w ww . j a v a 2 s . c o m*/ import java.io.File; import java.util.ArrayList; import java.util.List; import org.apache.maven.plugin.logging.Log; public class ApkInstaller { public static void install( File apk, String adbPath, Log log ) throws ExecutionException { CommandExecutor executor = CommandExecutor.Factory.createDefaultCommmandExecutor(); executor.setLogger( log ); List<String> commands = new ArrayList<String>(); commands.add( "install" ); commands.add( "-r" ); commands.add( apk.getAbsolutePath() ); log.info( adbPath + ":" + commands.toString() ); executor.executeCommand( adbPath, commands ); } }