-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp_version.py
More file actions
22 lines (20 loc) · 786 Bytes
/
app_version.py
File metadata and controls
22 lines (20 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from android_scripts_python.library.device_operations import display_selected_device, is_adb_device
from android_scripts_python.library.apk_operations import apk_operations
from android_scripts_python.library.main_functions import get_device_choice, deviceSerial
def main():
if len(sys.argv) < 2:
APKname = input("\n Enter the apk string to search : ").strip()
else:
APKname = sys.argv[1]
get_device_choice()
display_selected_device(deviceSerial)
if is_adb_device(deviceSerial):
apk_operations(deviceSerial, APKname, "version")
else:
print(" Device is not in 'adb' mode")
print("")
if __name__ == "__main__":
main()