-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.py
More file actions
25 lines (18 loc) · 702 Bytes
/
Test.py
File metadata and controls
25 lines (18 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from AndroidAPI import DeviceInfo, DevicePower, OpenApp, AndroidInfo, SideloadAPK
from AdbConnect import AdbUsbConnect
import os;os.system("")
print("\x1b[31mMake sure to connect to USB before executing!\033[0m")
input("Press enter when you have connected your device")
conn = AdbUsbConnect()
print(DeviceInfo.GetDeviceInfo(conn))
AndroidInfo.AndroidVersion(conn, say=True)
AndroidInfo.AndroidSDKVersion(conn, say=True)
AndroidInfo.AndroidBuildID(conn, say=True)
OpenApp.Open(conn, "com.android.chrome")
OpenApp.Close(conn, "com.android.chrome")
a = input("Please enter yes or no to shutdown device: ")
if a.lower == "yes":
DevicePower.Shutdown(conn, "graceful")
else:
pass
conn.close()