You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+63-21Lines changed: 63 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,8 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
18
18
-[Usage Guide](#usage-guide)
19
19
-[Troubleshooting](#troubleshooting)
20
20
-[Development](#development)
21
-
-[Changelog](#changelog)
22
21
-[Contributing](#contributing)
22
+
-[Changelog](#changelog)
23
23
-[License](#license)
24
24
25
25
---
@@ -35,8 +35,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
35
35
-**Responsive UI:** Uses background threads (`QThread`) for potentially long operations (file I/O, process termination) to keep the GUI responsive.
36
36
-**Basic Internationalization:** Includes English and Japanese translations.
37
37
38
-
---
39
-
40
38
## Prerequisites
41
39
42
40
-**Operating System:** Windows 10 or later (due to registry keys and file paths used).
@@ -45,8 +43,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
45
43
-**Administrator Rights:****Required** to read the HKLM registry and terminate BlueStacks processes effectively. Run the application as an administrator.
46
44
-**Dependencies:** Listed in `requirements.txt`. Key dependencies include `PyQt5`, `pywin32`, `psutil`.
47
45
48
-
---
49
-
50
46
## Installation & Download
51
47
52
48
### For End Users (Executable Download)
@@ -85,8 +81,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
85
81
```
86
82
The executable will be in the `dist/` folder.
87
83
88
-
---
89
-
90
84
## Usage Guide
91
85
92
86
1. **Launch as Administrator:** Start the GUI (`.exe` or `python main.py`) with administrator privileges.
@@ -117,8 +111,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
117
111
8. **Verify:** Launch the instance. Open Kitsune Mask; it should show as installed and active. Root applications should now work.
118
112
9. **Close:** Close the BlueStacks Root GUI.
119
113
120
-
---
121
-
122
114
## Troubleshooting
123
115
124
116
- **"Path Not Found" / No Instances Listed:**
@@ -135,8 +127,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
135
127
* Try closing and reopening the Kitsune Mask app within the BlueStacks instance.
136
128
- **Errors during Toggle Operations:** Check the status bar in the GUI and the application logs (if run from source/console) for specific error messages.
137
129
138
-
---
139
-
140
130
## Development
141
131
142
132
Follow the steps in [Installation & Download > For Developers](#for-developers-building-from-source).
@@ -148,14 +138,6 @@ Key modules:
148
138
- `registry_handler.py`: Reads BlueStacks paths from Windows Registry.
Contributions are welcome! Please follow these guidelines:
@@ -168,8 +150,68 @@ Contributions are welcome! Please follow these guidelines:
168
150
- Submit pull requests with clear descriptions of changes.
169
151
- Open an issue to discuss significant changes beforehand.
170
152
171
-
---
153
+
## Changelog
154
+
155
+
> v2.1 vs v2
156
+
157
+
### Major Changes
158
+
159
+
***Code Modularization:** The entire application has been restructured from a single `main.py` file into multiple focused modules:
160
+
*`main.py`: Handles the GUI (PyQt5), application logic, and threading.
161
+
*`config_handler.py`: Dedicated to reading and writing `bluestacks.conf`.
162
+
*`instance_handler.py`: Manages instance file (`.bstk`) modifications and BlueStacks process handling.
163
+
*`registry_handler.py`: Specifically handles reading BlueStacks paths from the Windows Registry.
164
+
*`constants.py`: Centralizes all constants (file names, keys, modes, etc.) for easier maintenance and consistency.
165
+
***Improved Error Handling & Reporting:**
166
+
* More specific exceptions are caught and raised throughout the helper modules (`FileNotFoundError`, `IOError`, `ValueError`, etc.).
167
+
* Worker threads now emit more granular error messages and status updates to the main UI, distinguishing between critical failures and per-instance issues.
168
+
* Functions now often return`Optional[...]` types (like `Optional[bool]`) to better represent indeterminate states (e.g., when a file is missing or unreadable).
* `modify_instance_files` uses more robust regex (`REGEX_BSTK_TYPE_PATTERN`) to find and replace the `Type` attribute in `.bstk` files, handling different whitespace and casing.
178
+
* `is_instance_readonly` now checks specifically for the `Readonly` type associated with target disk files and returns `None` if the status cannot be determined (e.g., file missing, read error), preventing incorrect assumptions.
179
+
* **Process Management (`instance_handler.py`):**
180
+
* `terminate_bluestacks` implements a more robust termination sequence: attempts graceful `terminate()`, waits (`PROCESS_KILL_TIMEOUT_S`), and then forcefully `kill()` any remaining processes.
181
+
* Uses a more comprehensive list of `BLUESTACKS_PROCESS_NAMES` from `constants.py`.
182
+
* `is_bluestacks_running` uses `psutil` for efficient process checking.
183
+
* **Registry Access (`registry_handler.py`):**
184
+
* More specific error handling for `FileNotFoundError` and `PermissionError` during registry access.
185
+
* Checks the registry value type (`REG_SZ`) to ensure a string path is returned.
186
+
* **GUI & User Experience (`main.py`):**
187
+
* Instance list now uses `QGridLayout` for potentially better column alignment.
188
+
* Path label now displays both the `UserDefinedDir` and `DataDir` paths found.
189
+
* Language selection ComboBox moved to the top-left for better visibility.
190
+
* Added tooltips to the "Toggle Root" and "Toggle R/W" buttons explaining their function.
191
+
* Added a specific, clearer "Kitsune Mask Install Reminder" popup message with updated instructions.
192
+
* Worker thread emits detailed status messages (`operation_message` signal) during operations (e.g., "Toggling Root for Nougat64...").
193
+
* Improved cleanup logic for the background thread (`QThread`).
194
+
* Added Windows AppUserModelID setting for better taskbar integration (pinning, icon grouping).
195
+
* Icon handling is more robust, checking for file existence.
196
+
* **Logging:**
197
+
* Standardized logging setup using `logging.basicConfig`.
198
+
* Modules use `logger = logging.getLogger(__name__)` for better log organization.
199
+
* Increased logging detail, especially at the DEBUG level.
200
+
201
+
### Fixes
202
+
203
+
* **Potential State Inconsistencies:** Improved logic for reading R/W status (`is_instance_readonly`) reduces the chance of misrepresenting the state if files are unreadable or missing attributes.
204
+
* **Configuration File Writing:** `modify_config_file` now avoids unnecessary file writes if the value is already correct.
205
+
* **Instance File Modification:** More reliable identification and modification of the `Type` attribute in `.bstk` files due to regex usage.
206
+
207
+
### Code Quality & Refactoring
208
+
209
+
* Massive refactoring into separate modules improves readability and maintainability.
210
+
* Introduction of `constants.py` eliminates magic strings and numbers.
211
+
* Increased use of type hinting (`typing` module) enhances code clarity and allows for static analysis.
212
+
* Removed unused dependencies (`lxml`, `pillow`, `python-docx`) from `requirements.txt`.
213
+
* Improved docstrings across functions and classes.
172
214
173
215
## License
174
216
175
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file (if included, standard MIT otherwise) for details.
217
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file (if included, standard MIT otherwise) for details.
0 commit comments