|
1 | 1 | # BlueStacks Root GUI |
2 | 2 |
|
3 | | -[](https://github.com/RobThePCGuy/BlueStacks-Root-GUI) [](https://youtu.be/zpihBs3FtEc) [](https://github.com/RobThePCGuy/BlueStacks-Root-GUI/commits/main) |
| 3 | +[](https://github.com/RobThePCGuy/BlueStacks-Root-GUI) |
| 4 | +[](https://youtu.be/zpihBs3FtEc) |
| 5 | +[](https://github.com/RobThePCGuy/BlueStacks-Root-GUI/commits/main) |
4 | 6 |
|
5 | | ------ |
| 7 | +--- |
6 | 8 |
|
7 | 9 |  |
8 | 10 |
|
9 | | -BlueStacks Root GUI is a utility designed to easily toggle root access settings and enable read/write (R/W) permissions for your BlueStacks 5 instances (specifically targeting the `BlueStacks_nxt` structure and the MSI App Player's `BlueStacks_msi5`). It aims to simplify the process described in the original guide: **[Root BlueStacks with Kitsune Mask](https://github.com/RobThePCGuy/Root-Bluestacks-with-Kitsune-Mask/)** by providing a graphical interface. |
| 11 | +A utility designed to easily toggle root access and enable read/write (R/W) permissions for BlueStacks 5 instances. Provides a graphical interface for the process described in **[Root BlueStacks with Kitsune Mask](https://github.com/RobThePCGuy/Root-Bluestacks-with-Kitsune-Mask/)**. |
10 | 12 |
|
11 | | ------ |
| 13 | +> [!WARNING] |
| 14 | +> **BlueStacks 5.22+ users:** See [Version Compatibility](#version-compatibility) for known issues with recent updates. |
| 15 | +
|
| 16 | +--- |
12 | 17 |
|
13 | 18 | ## Table of Contents |
14 | 19 |
|
15 | | - - [Features](/README.md#features) |
16 | | - - [Prerequisites](/README.md#prerequisites) |
17 | | - - [Installation & Download](/README.md#installation--download) |
18 | | - - [Usage Guide](/README.md#usage-guide) |
19 | | - - [Troubleshooting](/README.md#troubleshooting) |
20 | | - - [Development](/README.md#development) |
21 | | - - [Contributing](/README.md#contributing) |
| 20 | +- [Features](#features) |
| 21 | +- [Prerequisites](#prerequisites) |
| 22 | +- [Installation](#installation) |
| 23 | +- [Usage Guide](#usage-guide) |
| 24 | +- [Troubleshooting](#troubleshooting) |
| 25 | +- [Development](#development) |
| 26 | +- [Contributing](#contributing) |
22 | 27 |
|
23 | | ------ |
| 28 | +--- |
24 | 29 |
|
25 | 30 | ## Features |
26 | 31 |
|
27 | | - - **Auto-Detection:** Discovers BlueStacks installation paths via the Windows Registry (`SOFTWARE\BlueStacks_nxt` or `SOFTWARE\BlueStacks_msi5`). |
28 | | - - **Instance Listing:** Reads `bluestacks.conf` to find and list configured instances. |
29 | | - - **Root Toggle:** Modifies `bst.instance.<name>.enable_root_access` and `bst.feature.rooting` in `bluestacks.conf`. |
30 | | - - **Read/Write Toggle:** Modifies the `Type` attribute (`Normal` vs `Readonly`) for key disk files (`fastboot.vdi`, `Root.vhd`) within instance-specific `.bstk` files. |
31 | | - - **Process Handling:** Detects running BlueStacks processes and attempts graceful termination before applying changes. |
32 | | - - **Status Display:** Shows the current Root and R/W status for each detected instance. |
33 | | - - **Responsive UI:** Uses background threads (`QThread`) for potentially long operations (file I/O, process termination) to keep the GUI responsive. |
34 | | - - **Basic Internationalization:** Includes English and Japanese translations. |
| 32 | +- **Auto-Detection** - Discovers BlueStacks installation paths via Windows Registry |
| 33 | +- **Instance Listing** - Reads `bluestacks.conf` to display all configured instances |
| 34 | +- **Root Toggle** - Modifies `bst.instance.<name>.enable_root_access` and `bst.feature.rooting` |
| 35 | +- **Read/Write Toggle** - Changes disk file attributes (`fastboot.vdi`, `Root.vhd`) between `Normal` and `Readonly` |
| 36 | +- **Process Handling** - Detects and gracefully terminates BlueStacks processes before applying changes |
| 37 | +- **Status Display** - Shows current Root and R/W status for each instance |
| 38 | +- **Responsive UI** - Uses background threads (`QThread`) to keep the interface responsive |
| 39 | +- **Internationalization** - Includes English and Japanese translations |
35 | 40 |
|
36 | 41 | ## Prerequisites |
37 | 42 |
|
38 | | - - **Operating System:** Windows 10 or later (due to registry keys and file paths used). |
39 | | - - **BlueStacks Version:** BlueStacks 5 or MSI App Player (versions using the `BlueStacks_nxt` or `BlueStacks_msi5` registry keys and configuration structure). *Compatibility with other versions is not guaranteed.* |
40 | | - - **Python (for development):** Python 3.7+ |
41 | | - - **Administrator Rights:** **Required** to read the HKLM registry and terminate BlueStacks processes effectively. Run the application as an administrator. |
42 | | - - **Dependencies:** Listed in `requirements.txt`. Key dependencies include `PyQt5`, `pywin32`, `psutil`. |
| 43 | +- **Operating System:** Windows 10 or later |
| 44 | +- **BlueStacks Version:** BlueStacks 5 or MSI App Player (5.21 or earlier recommended) |
| 45 | +- **Administrator Rights:** Required for registry access and process termination |
| 46 | +- **Python (development only):** Python 3.7+ |
| 47 | + |
| 48 | +## Installation |
43 | 49 |
|
44 | | -## Installation & Download |
| 50 | +### Option 1: Download Executable (Recommended) |
45 | 51 |
|
46 | | -### For End Users (Executable Download) |
| 52 | +1. Download the latest `.exe` from **[Releases](https://github.com/RobThePCGuy/BlueStacks-Root-GUI/releases)** |
| 53 | +2. Right-click the executable and select **"Run as administrator"** |
47 | 54 |
|
48 | | -1. **Download the Latest Executable:** Go to the **[Releases](https://github.com/RobThePCGuy/BlueStacks-Root-GUI/releases)** page on GitHub and download the latest `.exe` file. |
49 | | -2. **Run as Administrator:** Right-click the downloaded `.exe` and select "Run as administrator". This is necessary for registry access and process termination. |
50 | | -3. **Important Pre-Run Steps:** |
51 | | - * **Clean BlueStacks Install Recommended:** If you encounter issues, fully uninstall *all* previous BlueStacks versions using the official **[BlueStacks Cleaner tool](https://support.bluestacks.com/hc/en-us/articles/360057724751-How-to-uninstall-BlueStacks-5-BlueStacks-X-and-BlueStacks-Services-completely-from-your-PC)**. |
52 | | - * **Install Latest BlueStacks 5:** Download and install the latest version from the official **[BlueStacks website](https://www.bluestacks.com/)**. |
| 55 | +**Before first use:** |
| 56 | +- Uninstall previous BlueStacks versions using the official **[BlueStacks Cleaner tool](https://support.bluestacks.com/hc/en-us/articles/360057724751-How-to-uninstall-BlueStacks-5-BlueStacks-X-and-BlueStacks-Services-completely-from-your-PC)** |
| 57 | +- Install **BlueStacks 5.21 or earlier** (see [Version Compatibility](#version-compatibility)) |
53 | 58 |
|
54 | | -### For Developers (Building from Source) |
| 59 | +### Option 2: Run from Source |
55 | 60 |
|
56 | | -1. **Clone the Repository:** |
| 61 | +```bash |
| 62 | +git clone https://github.com/RobThePCGuy/BlueStacks-Root-GUI.git |
| 63 | +cd BlueStacks-Root-GUI |
| 64 | +python -m venv venv |
| 65 | +.\venv\Scripts\activate |
| 66 | +pip install -r requirements.txt |
| 67 | +python main.py |
| 68 | +``` |
57 | 69 |
|
58 | | - ```bash |
59 | | - git clone https://github.com/RobThePCGuy/BlueStacks-Root-GUI.git |
60 | | - cd BlueStacks-Root-GUI |
61 | | - ``` |
| 70 | +**Note:** Run your terminal as administrator. |
62 | 71 |
|
63 | | -2. **Create a Virtual Environment (Recommended):** |
| 72 | +### Building the Executable |
64 | 73 |
|
65 | | - ```bash |
66 | | - python -m venv venv |
67 | | - .\venv\Scripts\activate |
68 | | - ``` |
| 74 | +```bash |
| 75 | +pip install pyinstaller |
| 76 | +pyinstaller --onefile --windowed --icon="favicon.ico" --add-data "favicon.ico;." --name BlueStacksRootGUI main.py |
| 77 | +``` |
69 | 78 |
|
70 | | -3. **Install Dependencies:** |
| 79 | +Output will be in the `dist/` folder. |
71 | 80 |
|
72 | | - ```bash |
73 | | - pip install -r requirements.txt |
74 | | - ``` |
| 81 | +## Usage Guide |
75 | 82 |
|
76 | | -4. **Run the Application:** |
| 83 | +### Initial Setup |
77 | 84 |
|
78 | | - ```bash |
79 | | - python main.py |
80 | | - ``` |
| 85 | +1. Launch the GUI **as administrator** |
| 86 | +2. The app will auto-detect your BlueStacks installation and list available instances |
| 87 | +3. Select the instance(s) you want to modify |
81 | 88 |
|
82 | | - *(Remember to run your terminal/IDE as administrator if running directly)* |
| 89 | +### Installing Kitsune Mask |
83 | 90 |
|
84 | | -5. **Build the Executable (Optional):** |
| 91 | +1. **Enable Root & R/W** |
| 92 | + - Select your target instance |
| 93 | + - Click **"Toggle Root"** (turn ON) |
| 94 | + - Click **"Toggle R/W"** (turn ON) |
85 | 95 |
|
86 | | - ```bash |
87 | | - pip install pyinstaller |
88 | | - pyinstaller --onefile --windowed --icon="favicon.ico" --add-data "favicon.ico;." --name BlueStacksRootGUI main.py |
89 | | - ``` |
| 96 | +2. **Install Kitsune Mask** |
| 97 | + - Download **[Kitsune Mask APK](https://github.com/1q23lyc45/KitsuneMagisk/releases)** |
| 98 | + - Launch the instance via BlueStacks Multi-Instance Manager |
| 99 | + - Install the APK (drag-and-drop) |
| 100 | + - Open Kitsune Mask app |
90 | 101 |
|
91 | | - The executable will be in the `dist/` folder. |
| 102 | +3. **Direct Install to System** |
| 103 | + - Tap **Install** -> **Next** |
| 104 | + - Select **"Direct Install to /system"** |
| 105 | + - If this option is missing, close and reopen the Kitsune Mask app |
| 106 | + - Let installation complete and reboot when prompted |
92 | 107 |
|
93 | | -## Usage Guide |
| 108 | +4. **Final Configuration** |
| 109 | + - Return to BlueStacks Root GUI |
| 110 | + - Click **"Toggle Root"** to turn it OFF |
| 111 | + - **Leave "Toggle R/W" ON** |
94 | 112 |
|
95 | | -1. **Launch as Administrator:** Start the GUI (`.exe` or `python main.py`) with administrator privileges. |
96 | | -2. **Instance Detection:** The GUI will attempt to find your BlueStacks installation and list the instances found in `bluestacks.conf`. Statuses (Root, R/W) will be displayed. |
97 | | -3. **Select Instances:** Check the box(es) next to the instance(s) you want to modify. |
98 | | -4. **Toggle Root:** |
99 | | - * Click **"Toggle Root"**. This enables the necessary settings in `bluestacks.conf`. |
100 | | - * **Turn this ON only temporarily** while you are installing Kitsune Mask. |
101 | | -5. **Toggle R/W:** |
102 | | - * Click **"Toggle R/W"**. This sets the instance's disk files (`Root.vhd`, `fastboot.vdi`) to `Normal` (Read/Write) mode. |
103 | | - * **This needs to be left ON** for the system modifications (like Kitsune Mask) to persist after the instance restarts. |
104 | | -6. **Install Kitsune Mask:** |
105 | | - * Ensure **Root is ON** and **R/W is ON** in the GUI for the target instance. |
106 | | - * Download the latest **[Kitsune Mask APK](https://github.com/1q23lyc45/KitsuneMagisk/releases)**. |
107 | | - * Launch the modified instance using the BlueStacks Multi-Instance Manager. |
108 | | - * Install the downloaded Kitsune Mask APK onto the instance (drag-and-drop usually works). |
109 | | - * Open the Kitsune Mask app inside the instance. |
110 | | - * Tap **Install**. |
111 | | - * Tap **Next**. |
112 | | - * Select the option **"Direct Install to /system"**. |
113 | | - * *Troubleshooting:* If the "Direct Install" option is missing, fully close and reopen the Kitsune Mask app *inside* BlueStacks. It should then appear. |
114 | | - * Let the installation complete and reboot when prompted (the instance will restart). |
115 | | -7. **Final GUI Step:** |
116 | | - * **Crucially:** Once Kitsune Mask is successfully installed to `/system`, return to the BlueStacks Root GUI. |
117 | | - * Select the instance again. |
118 | | - * Click **"Toggle Root"** to turn the configuration setting **OFF**. |
119 | | - * **Leave "Toggle R/W" ON.** |
120 | | -8. **Verify:** Launch the instance. Open Kitsune Mask; it should show as installed and active. Root applications should now work. |
121 | | -9. **Close:** Close the BlueStacks Root GUI. |
| 113 | +5. **Verify** |
| 114 | + - Launch instance and open Kitsune Mask |
| 115 | + - Should show as installed and active |
122 | 116 |
|
123 | 117 | ## Troubleshooting |
124 | 118 |
|
125 | | - - **"Path Not Found" / No Instances Listed:** |
126 | | - * Ensure you ran the GUI as **Administrator**. |
127 | | - * Verify BlueStacks 5 or MSI App Player is installed correctly and the registry keys (`HKLM\SOFTWARE\BlueStacks_nxt\UserDefinedDir` and `DataDir` or `HKLM\SOFTWARE\BlueStacks_msi5`) exist. |
128 | | - * A clean reinstall of BlueStacks using the official cleaner tool might be necessary. |
129 | | - - **Permission Errors during Toggle:** |
130 | | - * You *must* run the GUI as Administrator. |
131 | | - - **R/W Toggle Doesn't Stick:** |
132 | | - * Ensure BlueStacks processes (`HD-Player.exe`, `HD-Agent.exe`, etc.) were fully terminated before toggling. The GUI attempts this, but manual termination via Task Manager might be needed if issues persist. |
133 | | - * Ensure you are leaving the **R/W** setting **ON** in the GUI after installing Kitsune Mask. |
134 | | - - **"Direct Install to /system" Missing in Kitsune Mask:** |
135 | | - * Make sure **Root** and **R/W** were both **ON** in the GUI *before* launching the instance and attempting installation. |
136 | | - * Try closing and reopening the Kitsune Mask app within the BlueStacks instance. |
137 | | - - **Errors during Toggle Operations:** Check the status bar in the GUI and the application logs (if run from source/console) for specific error messages. |
| 119 | +### Version Compatibility |
| 120 | + |
| 121 | +| BlueStacks Version | Root Working? | Notes | |
| 122 | +|-------------------|---------------|-------| |
| 123 | +| 5.20.x | Yes | Fully compatible | |
| 124 | +| 5.21.x | Yes | Last confirmed working version | |
| 125 | +| 5.22.0.1102+ | No | Play Integrity enforcement blocks root | |
| 126 | + |
| 127 | +**Issue:** BlueStacks 5.22+ (October 2025) shows *"Android system doesn't meet security"* popup when root/R/W is enabled. |
| 128 | + |
| 129 | +**Cause:** Google replaced SafetyNet with Play Integrity API in January 2025. BlueStacks 5.22 now enforces integrity checks that detect system modifications. |
| 130 | + |
| 131 | +**Solution:** Downgrade to BlueStacks 5.21 |
| 132 | + |
| 133 | +<details> |
| 134 | +<summary><b>How to Downgrade to 5.21</b></summary> |
| 135 | + |
| 136 | +1. **Backup your data** - Export important app data/saves |
| 137 | + |
| 138 | +2. **Complete uninstall** |
| 139 | + - Download **[BSTCleaner](https://support.bluestacks.com/hc/en-us/articles/360057724751)** |
| 140 | + - Run to remove all BlueStacks files |
| 141 | + |
| 142 | +3. **Install BlueStacks 5.21** |
| 143 | + - Download from **[Uptodown Archive](https://bluestacks-app-player.en.uptodown.com/windows/versions)** |
| 144 | + - Look for version **5.21.x.xxxx** (January 2025) |
| 145 | + |
| 146 | +4. **Disable auto-updates** |
| 147 | + - Edit `C:\ProgramData\BlueStacks_nxt\bluestacks.conf` |
| 148 | + - Add or modify: `bst.auto_update="0"` |
| 149 | + |
| 150 | +5. **Apply rooting guide** - Follow normal steps above |
| 151 | + |
| 152 | +</details> |
| 153 | + |
| 154 | +**Tracking:** See [Issue #11](https://github.com/RobThePCGuy/Root-Bluestacks-with-Kitsune-Mask/issues/11) for updates. |
| 155 | + |
| 156 | +### Common Issues |
| 157 | + |
| 158 | +**No instances listed / "Path Not Found"** |
| 159 | +- Run GUI as **Administrator** |
| 160 | +- Verify registry keys exist: `HKLM\SOFTWARE\BlueStacks_nxt` or `HKLM\SOFTWARE\BlueStacks_msi5` |
| 161 | +- Perform clean reinstall using official cleaner tool |
| 162 | + |
| 163 | +**Permission errors during toggle** |
| 164 | +- Must run as Administrator |
| 165 | + |
| 166 | +**R/W toggle doesn't persist** |
| 167 | +- Ensure BlueStacks processes were fully terminated |
| 168 | +- Manually kill processes via Task Manager if needed |
| 169 | +- Keep R/W **ON** after installing Kitsune Mask |
| 170 | + |
| 171 | +**"Direct Install to /system" option missing** |
| 172 | +- Verify both **Root** and **R/W** are ON before launching instance |
| 173 | +- Close and reopen Kitsune Mask app within BlueStacks |
| 174 | + |
| 175 | +**Toggle operation errors** |
| 176 | +- Check status bar in GUI for error messages |
| 177 | +- Review console logs if running from source |
138 | 178 |
|
139 | 179 | ## Development |
140 | 180 |
|
141 | | -Follow the steps in [Installation & Download \> For Developers](/README.md#for-developers-building-from-source). |
| 181 | +### Project Structure |
142 | 182 |
|
143 | | -Key modules: |
| 183 | +- `main.py` - PyQt5 GUI, application logic, threading |
| 184 | +- `config_handler.py` - Reads/writes `bluestacks.conf` |
| 185 | +- `instance_handler.py` - Modifies `.bstk` files, handles processes |
| 186 | +- `registry_handler.py` - Reads BlueStacks paths from Windows Registry |
| 187 | +- `constants.py` - Shared constants (keys, filenames, modes) |
144 | 188 |
|
145 | | - - `main.py`: PyQt5 GUI, application logic, threading. |
146 | | - - `config_handler.py`: Reads/writes `bluestacks.conf`. |
147 | | - - `instance_handler.py`: Modifies `.bstk` files, handles processes. |
148 | | - - `registry_handler.py`: Reads BlueStacks paths from Windows Registry. |
149 | | - - `constants.py`: Shared constant values (keys, filenames, modes, etc.). |
| 189 | +### Dependencies |
| 190 | + |
| 191 | +See `requirements.txt`. Key dependencies: |
| 192 | +- PyQt5 |
| 193 | +- pywin32 |
| 194 | +- psutil |
150 | 195 |
|
151 | 196 | ## Contributing |
152 | 197 |
|
153 | | -Contributions are welcome\! Please follow these guidelines: |
| 198 | +Contributions are welcome! Please: |
| 199 | + |
| 200 | +- Maintain existing code style and structure |
| 201 | +- Use the `logging` module for debugging output |
| 202 | +- Add/update docstrings for new or modified code |
| 203 | +- Use background threads for blocking operations to keep UI responsive |
| 204 | +- Update `constants.py` for new configurable values |
| 205 | +- Submit pull requests with clear descriptions |
| 206 | +- Open an issue to discuss significant changes before implementing |
| 207 | + |
| 208 | +--- |
154 | 209 |
|
155 | | - - Maintain code style and structure. |
156 | | - - Use the `logging` module appropriately. |
157 | | - - Add/update docstrings for new/modified code. |
158 | | - - Ensure UI remains responsive (use background threads for blocking tasks). |
159 | | - - Update `constants.py` if adding new configurable values. |
160 | | - - Submit pull requests with clear descriptions of changes. |
161 | | - - Open an issue to discuss significant changes beforehand. |
| 210 | +**Related Project:** [Root BlueStacks with Kitsune Mask](https://github.com/RobThePCGuy/Root-Bluestacks-with-Kitsune-Mask/) |
0 commit comments