diff --git a/amt.py b/amt.py index 8dae763..af54e68 100644 --- a/amt.py +++ b/amt.py @@ -113,11 +113,35 @@ def menu(): elif int(choice) == 99: print("Goodbye!") sys.exit() +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") def main(): - adb_start() - menu() + if "--interactive" in sys.argv[1:] or "-i" in sys.argv[1:]: + adb_start() + menu() + elif "--root" in sys.argv[1:] or "-r" in sys.argv[1:]: + device = adb_connect() + twrp_download(device) + push_files(device) + reboot_bootloader() + root_device() + elif "--help" in sys.argv[1:] or "-h" in sys.argv[1:]: + show_help() + else: + show_help() main()