Ejemplo n.º 1
0
 def get_adb_logcat(self, log_file):
     """
     get recently 10000 adb logcat.
     :return:
     """
     cmd = "adb -s " + self.serial_number + " logcat -t 10000 >" + log_file
     execute.Command(cmd).run()
Ejemplo n.º 2
0
 def stop_music(self):
     cmd = "adb -s " + self.serial_number + " shell input keyevent 86"
     execute.Command(cmd).run()
Ejemplo n.º 3
0
 def delete_anr(self):
     cmd = "adb -s " + self.serial_number + " shell rm -rf sdcard/anr*"
     execute.Command(cmd).run()
Ejemplo n.º 4
0
 def disconnect(self):
     if self.serial_number.__contains__(":"):
         cmd = "adb disconnect " + self.serial_number
         execute.Command(cmd).run()
Ejemplo n.º 5
0
 def reboot(self):
     cmd = "adb -s " + self.serial_number + " reboot"
     execute.Command(cmd).run()
Ejemplo n.º 6
0
 def install(self, apk_name):
     cmd = "adb -s " + self.serial_number + " install -r -g " + apk_name
     execute.Command(cmd).run(timeout=120)
Ejemplo n.º 7
0
 def uninstall(self):
     cmd = "adb -s " + self.serial_number + " uninstall " + self.package_name
     execute.Command(cmd).run()