-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathconstants.py
More file actions
63 lines (43 loc) · 1.37 KB
/
constants.py
File metadata and controls
63 lines (43 loc) · 1.37 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
"""Application constants."""
import re
INSTANCE_PREFIX = "bst.instance."
ENABLE_ROOT_KEY = ".enable_root_access"
FEATURE_ROOTING_KEY = "bst.feature.rooting"
BLUESTACKS_CONF_FILENAME = "bluestacks.conf"
REGISTRY_BASE_PATH = r"SOFTWARE\BlueStacks_nxt"
REGISTRY_MSI_BASE_PATH = r"SOFTWARE\BlueStacks_msi5"
REGISTRY_DATA_DIR_KEY = "DataDir"
REGISTRY_USER_DIR_KEY = "UserDefinedDir"
# FIX: Add constants to identify the source application
APP_SOURCE_NXT = "NXT"
APP_SOURCE_MSI = "MSI"
MODE_READWRITE = "Normal"
MODE_READONLY = "Readonly"
MODE_UNKNOWN = "Unknown"
FASTBOOT_VDI = "fastboot.vdi"
ROOT_VHD = "Root.vhd"
FILES_TO_MODIFY_RW = [FASTBOOT_VDI, ROOT_VHD]
ANDROID_BSTK_IN_FILE = "Android.bstk.in"
BSTK_FILE_PATTERN = "*.bstk"
REGEX_BSTK_TYPE_PATTERN = re.compile(
r'(Type\s*=\s*")' + f"({MODE_READONLY}|{MODE_READWRITE})" + r'(")', re.IGNORECASE
)
REGEX_BSTK_READONLY_PATTERN = re.compile(
r'Type\s*=\s*"' + MODE_READONLY + r'"', re.IGNORECASE
)
BLUESTACKS_PROCESS_NAMES = [
"HD-Player.exe",
"BlueStacks.exe",
"HD-Agent.exe",
"BstkSVC.exe",
"HD-Frontend.exe",
"HD-LogRotatorService.exe",
"BlueStacksWebHelper.exe",
]
REFRESH_INTERVAL_MS = 5000
PROCESS_TERMINATION_WAIT_MS = 1500
PROCESS_KILL_TIMEOUT_S = 5
PROCESS_POST_KILL_WAIT_S = 2
APP_ID = "RobThePCGuy.BlueStacksRootGUI.2.6"
APP_NAME = "BlueStacks Root GUI"
ICON_FILENAME = "favicon.ico"