(self, timeout=10)
| 227 | return |
| 228 | |
| 229 | def pull_pid(self, timeout=10): |
| 230 | elapsed = 0 |
| 231 | while True: |
| 232 | out, _ = adb.execute_privileged_command( |
| 233 | f"cat {PID_PATH}", device_id=self.device_id |
| 234 | ) |
| 235 | try: |
| 236 | out = int(out.decode()) |
| 237 | return out |
| 238 | except ValueError: |
| 239 | if elapsed > timeout: |
| 240 | return None |
| 241 | logging.warning(f"pid not pulled, waiting...") |
| 242 | time.sleep(0.1) |
| 243 | elapsed += 0.1 |
| 244 | continue |
| 245 | |
| 246 | def fuzzer_running(self): |
| 247 | if self.fuzzer_pid is None: |