Skip to content

Commit 69c5c9c

Browse files
committed
Add python script to check adb install
1 parent 5bffef1 commit 69c5c9c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/check-install.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""Check if adb works and print the version."""
2+
from subprocess import check_output, STDOUT
3+
4+
def check_adb_version():
5+
return check_output(['adb', 'version'], stderr=STDOUT).decode()
6+
7+
8+
if __name__ == "__main__":
9+
print("Checking if adb is installed...")
10+
adb_version = check_adb_version()
11+
if adb_version:
12+
print(adb_version)
13+
print("Done.")
14+
else:
15+
print("Failed.")

0 commit comments

Comments
 (0)