This repository has been archived on 2023-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
Android-Mobile-Toolkit/amt.py

53 lines
1.4 KiB
Python
Raw Normal View History

2019-09-29 19:20:36 +00:00
# amt.py
2019-09-28 04:10:53 +00:00
"""
Code to interact with an android device using ADB
Written by Kevin Rode
2019-09-29 00:19:25 +00:00
Last Updated Sep 28 2019
2019-09-28 04:10:53 +00:00
"""
2019-09-29 00:19:25 +00:00
import sys
2019-09-29 19:38:41 +00:00
from helpers import root
2019-09-29 19:20:36 +00:00
2019-09-29 00:19:25 +00:00
def menu():
while True:
print("[1] Root Device (WIP)\n[2] Extract Data (Coming Soon)\n[99] Quit")
choice = input("Please select a number: ")
if int(choice) == 1:
2019-09-29 19:38:41 +00:00
root.root_device()
2019-09-29 00:19:25 +00:00
elif int(choice) == 2:
print("Data extraction is coming soon.")
time.sleep(2)
elif int(choice) == 99:
print("Goodbye!")
sys.exit()
2019-09-29 19:20:36 +00:00
2019-09-29 01:38:22 +00:00
def show_help():
print("Android Mobile Toolkit v1.1")
print("Written by Kevin Rode (kevroded)")
print()
print("Run with amt.exe [options]")
print()
print("OPTIONS:")
print(" --interactive : start the utility in a mode with a menu for the user to select options on")
print(" -i : alias for --interactive")
print(" --root : root a connected Android device")
print(" -r : alias for --root")
print(" --help : print this message")
print(" -h : alias for --help")
2019-09-28 03:56:01 +00:00
def main():
2019-09-29 01:38:22 +00:00
if "--interactive" in sys.argv[1:] or "-i" in sys.argv[1:]:
2019-09-29 19:38:41 +00:00
root.adb_start()
2019-09-29 01:38:22 +00:00
menu()
elif "--root" in sys.argv[1:] or "-r" in sys.argv[1:]:
2019-09-29 19:38:41 +00:00
root.root_device()
2019-09-29 01:38:22 +00:00
elif "--help" in sys.argv[1:] or "-h" in sys.argv[1:]:
show_help()
else:
show_help()
2019-09-28 03:56:01 +00:00
main()