| 174 | raise RuntimeError("/dev/kvm cannot be found!") |
| 175 | |
| 176 | def deploy(self): |
| 177 | self.logger.info(f"Deploying the {self.device_type}") |
| 178 | |
| 179 | basic_cmd = "emulator @{n}".format(n=self.name) |
| 180 | basic_args = "-gpu swiftshader_indirect -accel on -writable-system -verbose" |
| 181 | wipe_arg = "-wipe-data" if not self.is_initialized() else "" |
| 182 | |
| 183 | start_cmd = f"{basic_cmd} {basic_args} {wipe_arg} {self.additional_args}" |
| 184 | self.logger.info(f"Command to run {self.device_type}: '{start_cmd}'") |
| 185 | subprocess.Popen(start_cmd.split()) |
| 186 | |
| 187 | def start(self) -> None: |
| 188 | super().start() |