How to root Bluestacks 2 using Linux in VirtualBox (Modify .vdi file)

1,514 posts
Thanks Meter: 706
By evildog1, Senior Member on 6th April 2017, 02:00 PM
Post Reply Email Thread
BlueStacks is introducing "VirtualBox VMs".
The filesystems have been changed to "vdi format" (VirtualBox).

For linux experts: if you know how to mount and modify .vdi without VirtualBox, skip to step 9.

Well, let's get started!

First of all, to root BlueStacks this way you need VirtualBox and you have a Linux OS installed. If you just got started, I'll recommended Ubuntu, you can follow the guide installing Ubuntu on BirtualBox.

Also, you will need some linux knowledge. It's not necessessary, but I won't provide any support about the part dealing with linux commands. Just follow the instructions and probably you will be able to root it, but it might not be that simple.

The second mandatory stuff you will need is the Android App called SuperSU. At this time, you should be able to find the latest SuperSU. The instructions should be the same with other SuperSU versions.
Here is a direct link

This tutorial assumes you already have an installed BlueStacks you wish to root, but make sure Bluestacks and Ubuntu isn't running isn't running. So, let's get started.

In this tutorial i'm using Ubuntu.


2. To modify Root.vdi, you need to mount it in Ubuntu virtual machine. Select Ubuntu and click Settings -> Storage. Select Controller: SATA and click on the HDD with green plus symbol.

3. A dialog box will appear. Select Choose existing disk

4. Navigate to Bluestacks directory where you installed. Select Root.vdi and Open

ProTip: You can mount Data.vdi and SDcard.vdi to transfer files between guest and VDI.

5. Root.vdi should be added in Storage. Click OK

6. Start Ubuntu on VirtualBox

7. Ubuntu: On your desktop, you should see the grey Hard Drive icon on the right taskbar. Yep, that's root.vdi image file that has been mounted and the disk name should be named 8,6 GB Volume

8. Extract x86 Folder from .zip (Recovery archive file and /common/SuperSU.apk somewhere on Ubuntu. Bluestacks is based on Android x86.
8.1. If you already downloaded it on your host computer, Click Devices -> Drag and Drop, Select Bidirectional and you can transfer the file to guest

If you haven't download it yet, download it from and click Recovery

9. Copy the following SuperSU files into your mounted root.vdi

Add file: /x86/su -> (8,6 GB Volume)/android/system/xbin/su
Rename file: /x86/su ---> (8,6 GB Volume)/x86/daemonsu
Add file: /x86/daemonsu ---> (8,6 GB Volume)/android/system/xbin/daemonsu
Add file: /x86/supolicy ---> (8,6 GB Volume)/android/system/xbin/supolicy
Add file: /x86/ ---> (8,6 GB Volume)/android/system/lib/
Add file: /common/Superuser.apk ---> (8,6 GB Volume)/android/system/app/Superuser.apk

10. You need to change file permissions in order for SuperSU to work correctly. Open terminal and type the following commands. Type your password when asked

Note: The disk name might be different. You can check it by right click on 8,6 GB Volume and select Properties

ProTip: Type sudo chmod xxx in terminal and drag a file to get the full path like below. Press UP ARROW on your keyboard to show the last command you used.

sudo chmod 755 '/media/test/<disk udid>/android/system/xbin/su'
sudo chmod 755 '/media/test/<disk udid>/android/system/xbin/daemonsu'
sudo chmod 755 '/media/test/<disk udid>/android/system/xbin/supolicy'
sudo chmod 644 '/media/test/<disk udid>/android/system/lib/'
sudo chmod 644 '/media/test/<disk udid>/android/system/app/Superuser.apk'

Files should be owned by root:root. No need to change it on Ubuntu.

11. Now we need to start "daemonsu" on every reboot. BlueStacks init procedure is quite simple. Seems like there is only android/system/etc/ So, open android/system/etc/ in your preferred linux text-editor, go at the bottom of the file and search for:

Add this
             /system/xbin/daemonsu --auto-daemon &
I'd say we're done now! Shutdown your Virtualbox

12. Now you can start your BlueStacks. When it's booted, launch SuperSU via Play Store.
You will be prompted about a SuperSU update. Choose the "normal" way and after the update, restart your BlueStacks.

13. That should be it. Now your BlueStacks is rooted.
To be certain you should open your PlayStore and install your preferred RootChecker.

An additional task you might want to do would be using some apps like "/system/app Mover" and "System App Uninstall" and change the SystemDefaultAppLauncher and SystemDefaultAppBrowser.
I usually install Nova Launcher.
Also, as Root FileExplorer, I install X-Plore.
You might want to install a CatLog too!
Hope you enjoyed this tutorial
Hope you will enjoy you newly rooted BlueStacks.

Tweak your Bluestacks and share your .vdi files to everyone.

Credit goes to rumbla ( for the original tutorial how to modify root.fs
And me for this new tutorial
The Following User Says Thank You to evildog1 For This Useful Post: [ View ] Gift evildog1 Ad-Free
7th May 2017, 05:00 AM |#2  
Junior Member
Thanks Meter: 1
Here are the links that helped me a lot to copy/paste text and also files between guest operating system (Ubuntu) and host computer (Windows 10)

"How do I tell if virtualbox guest additions is installed and working correctly" on Ubuntu Forums

"Virtualbox and shared folders - permissions problem" also on Ubuntu Forums

Also I had to chown root:root "files"

Working ................. so far, so good

Thanks a lot
The Following User Says Thank You to folajar For This Useful Post: [ View ] Gift folajar Ad-Free
12th February 2020, 06:07 PM |#3  
Junior Member
Thanks Meter: 0
I comfirmed that it still working on bluestack 4 (mac os) thanks a lot! <3
Note that if BS is "x86_64" then you need using files in "x64" folder!
Post Reply Subscribe to Thread

bluestacks 2, root

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes