-
-
Save odmnk/c8fe76230265ac20bf2ef8afe775d9b1 to your computer and use it in GitHub Desktop.
Reproduces the problem of freezes when sending commands to device using ADB over WiFi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import time | |
DEVICE_ID = "192.168.2.3:5555" | |
for x in range(100): | |
print(x) | |
print("sleep") | |
subprocess.call(f"adb -s {DEVICE_ID} shell input keyevent KEYCODE_SLEEP", shell=True) | |
time.sleep(3) | |
print("wakeup") | |
subprocess.call(f"adb -s {DEVICE_ID} shell input keyevent KEYCODE_WAKEUP", shell=True) | |
time.sleep(3) | |
print("===================") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment