def install_sample(path):
 log.info('Installing sample in the device: %s', path)
 try:
  args = ['/system/bin/sh', '/system/bin/pm', 'install', path]
  output = subprocess.check_output(args)
 except subprocess.CalledProcessError as e:
  log.error('Error installing sample: %r', e)
  return
 log.info('Installed sample: %r', output)

def install_sample ( path ) : log . info ( 'Installing sample in the device: %s' , path ) try : args = [ '/system/bin/sh' , '/system/bin/pm' , 'install' , path ] output = subprocess . check_output ( args ) except subprocess . CalledProcessError as e : log . error ( 'Error installing sample: %r' , e ) return log . info ( 'Installed sample: %r' , output )
install the sample on the emulator via adb .