-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
51 lines (38 loc) · 1.21 KB
/
main.py
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# todo:
# - layout scheme for elements
from gui import Window, tk, ttk
from apk_manager import ApkManager
from plugins_manager import PluginsManager
from tkinter import Canvas
from pathlib import Path
from adb_manager import AdbManager
# global vars holding tk, window, style and canvas instances
g_root = tk.Tk()
g_style = ttk.Style(g_root)
g_root.tk.call(
"source", str(Path.cwd()) +
"\\themes\\breeze-dark\\breeze-dark.tcl"
)
g_win_w = 900
g_win_h = 500
# use breeze-dark theme
g_style.theme_use('breeze-dark')
# remove wanky dashed line which appears when tab is selected
g_style.configure("Tab", focuscolor=g_style.configure(".")["background"])
g_app = Window(g_root, g_win_w, g_win_h, "A-RE: Android")
g_canvas = Canvas(g_root, width=g_win_w, height=g_win_h)
def init() -> None:
g_app.construct()
g_logger = g_app.get_logger()
g_logger.special(
"A-RE android: android apps RE utility\n"
"https://github.com/h4rdee/a-re-android\n\n"
)
apk_manager = ApkManager(g_app)
adb_manager = AdbManager(g_app)
plugins_manager = PluginsManager(g_app)
g_canvas.pack()
g_logger.info("[+] UI initialized\n")
g_root.mainloop()
if __name__ == '__main__':
init()