예제 #1
0
 def __init__(self, **kwargs):
     android_step.__init__(self, **kwargs)
     self.platform_name = fastboot_utils.get_platform_name(
         serial=self.serial)
     self.o_platform_list = ["o_celadon", "o_cel_apl"]
     self.p_platform_list = ["p_cel_apl"]
     self.o_partition_list = [
         "boot", "bootloader", "multiboot", "system", "tos", "vbmeta",
         "vendor"
     ]
예제 #2
0
 def __init__(self, create_crash_mode, wait_for_state, use_combo_button,
              **kwargs):
     self.create_crash_mode = create_crash_mode
     self.wait_for_state = wait_for_state
     self.panic_command = "\"echo e > /proc/sysrq-trigger\""
     self.watchdog_process_name = "/sbin/watchdogd"
     self.wait_for_fastboot_timeout = 70
     self.use_combo_button = use_combo_button
     relay_step.__init__(self, **kwargs)
     android_step.__init__(self, **kwargs)
예제 #3
0
 def __init__(self,
              pin,
              set_screen_lock=False,
              set_wifi=False,
              require_pin_to_start_device=False,
              ap_name=None,
              ap_password=None,
              blocking=True,
              **kwargs):
     android_step.__init__(self, **kwargs)
     self.set_screen_lock = set_screen_lock
     self.require_pin_to_start_device = require_pin_to_start_device
     self.pin = pin
     self.set_wifi = set_wifi
     self.ap_name = ap_name
     self.ap_password = ap_password
예제 #4
0
    def __init__(self,
                 unlock_bootloader,
                 dessert,
                 oem_unlock_enabled="yes",
                 **kwargs):
        android_step.__init__(self, **kwargs)
        relay_step.__init__(self, **kwargs)
        self.unlock_bootloader = unlock_bootloader
        self.dessert = dessert
        self.oem_unlock_enabled = oem_unlock_enabled

        # Define the unlock command depending on Android version
        if self.dessert == "L":
            self.unlock_cmd = "oem"
        elif self.dessert >= "M":
            self.unlock_cmd = "flashing"

        # Define the state command
        if self.unlock_bootloader == "yes":
            self.state_cmd = "unlock"
        elif self.unlock_bootloader == "no":
            self.state_cmd = "lock"

        if self.oem_unlock_enabled == "yes":
            self.string_to_check = "finished. total time:"
            self.set_errorm(
                "", "Could not change state to \"{0}\"".format(
                    self.unlock_bootloader))
            self.set_passm("State Changed to \"{0}\"".format(
                self.unlock_bootloader))
        else:
            self.string_to_check = "Unlock is not allowed"
            self.set_errorm(
                "", "State changed to \"{0}\", even if OEM unlock is disabled".
                format(self.unlock_bootloader))
            self.set_passm(
                "State not changed to \"{0}\". OEM unlock is disabled".format(
                    self.unlock_bootloader))
예제 #5
0
    def __init__(self, **kwargs):
        android_step.__init__(self, **kwargs)
        self.uidevice = ui_device(**kwargs)

        if "TESTLIB_UI_WATCHERS_GROUP" in os.environ:
            ui_utils.register_watchers(
                serial=self.serial,
                ui_watcher_groups=os.environ["TESTLIB_UI_WATCHERS_GROUP"])
        elif "ui_watcher_group" in kwargs:
            ui_utils.register_watchers(
                serial=self.serial,
                ui_watcher_groups=kwargs["ui_watcher_group"])
        else:
            pass
            # ui_utils.remove_watchers(serial = self.serial)
        if "TESTLIB_UI_HANDLERS_GROUP" in os.environ:
            ui_utils.register_handlers(
                serial=self.serial,
                ui_handler_groups=os.environ["TESTLIB_UI_HANDLERS_GROUP"])
        elif "ui_handler_group" in kwargs:
            ui_utils.register_handlers(
                serial=self.serial,
                ui_handler_groups=kwargs["ui_handler_group"])
예제 #6
0
 def __init__(self, vars, **kwargs):
     self.vars = vars
     android_step.__init__(self, **kwargs)
예제 #7
0
 def __init__(self, **kwargs):
     android_step.__init__(self, **kwargs)
     self.adb_connection = connection_adb(**kwargs)
예제 #8
0
 def __init__(self, timeout=5, **kwargs):
     android_step.__init__(self, **kwargs)
     self.timeout = timeout
예제 #9
0
 def __init__(self, **kwargs):
     android_step.__init__(self, **kwargs)