def android_aapt_install(): print( WindowsOsUtil.get_command_output(' '.join( ('adb push', GlobalParam.get_aapt_path(), '/data/local/tmp')))) print( WindowsOsUtil.get_command_output( 'adb shell chmod 0755 /data/local/tmp/aapt-arm-pie'))
def android_device_list(): return WindowsOsUtil.get_command_output('adb devices').split( '\n')[1].replace('device', '').strip()
def android_api_version(): return WindowsOsUtil.get_command_output( 'adb shell getprop ro.build.version.sdk')
def android_backup_app_apk(app_package, backup_path): cmd = ''.join(('pm path ', app_package)) msg = WindowsOsUtil.get_shell_output(['adb', 'shell'], cmd) cmd = ''.join(('adb pull ', msg.replace('package:', '').strip(), ' ', backup_path)) WindowsOsUtil.get_command_output(cmd)
def android_product_info(): return WindowsOsUtil.get_command_output( 'adb shell getprop ro.product.model')
def test_get_command_output(self): self.assertEqual('123', WindowsOsUtil.get_command_output(self.command))
def test_get_command_output(self): assert '123' == WindowsOsUtil.get_command_output(self.command)