[GUIDE]Magisk, SuperSU and Xposed for MEmu 7.3.2 or LDPlayer 4.0.45

Search This thread

Peter1212

Senior Member
Apr 19, 2014
105
22
It used to work before. Maybe Bluestack has updated some few things in the latest version. Could you update it? Your work is amazing
OP is still @HemanthJabalpuri I did those tests while I was in the need for a emu as I didn't have a working phone at that time. I'll take a look at it and update but might not be for a little bit while, a week or so perhaps.

Safetynet can't be passed unfortunately. For that you not just need magisk modules to be working for one, but riru too probably. Unless someone can make a safetynet patch for android nougat exclusively.

Xposed can be installed both on x86 and x86_64 versions, see OP. Hemanth has described it pretty clearly, but alas, installing xposed that way would probably kill any chance to bypass safetynet.

No magiskhide isn't working. And no, Edxposed module can't be installed. Correct me if I am wrong, but Edxposed, Riru and LSposed are Oreo and above, no chance for nougat unless someone eclusively works on it for emulators only.
 
  • Wow
Reactions: CalaxMinD

El Moffat

New member
Dec 2, 2021
1
0
What is the point of Magisk if the module cannot be installed properly? And even Magisk Hide doesn't do its job, again "properly."

Alas, the magisk module CAN'T be uninstalled. it just still sit there, greyed out. nothing is changed. The only interesting method is the one here made by @immns, I hope this one will do its job on memu.

Tested @immns's method on Memu v7.6.3 32bit, it's working and it do its job very well with these modules: Energized Protection, Busybox for Android NDK, Etc and Thank you @HemanthJabalpuri , @immns and @Peter1212.
 
Last edited:

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
What is the point of Magisk if the module cannot be installed properly? And even Magisk Hide doesn't do its job, again "properly."

Alas, the magisk module CAN'T be uninstalled. it just still sit there, greyed out. nothing is changed. The only interesting method is the one here made by @immns, I hope this one will do its job on memu.

Tested @immns's method on Memu v7.6.3 32bit, it's working and it do its job very well with these modules: Energized Protection, Busybox for Android NDK, Etc and Thank you @HemanthJabalpuri , @immns and @Peter1212.
Magisk Hide will be permanentely removed from Magisk, my friend.
This is the point.
 

immns

Senior Member
What is the point of Magisk if the module cannot be installed properly? And even Magisk Hide doesn't do its job, again "properly."
It's difficult. I don't really know which emulator has proper selinux implementations which i guess it's mandatory for Android to certify itself through safetynet or anything else. at least permissive selinux will do.
Magisk Hide will be permanentely removed from Magisk, my friend.
This is the point.
There's a hope. The new zygisk could avoid many security measurements in regural Android phone. as per now, there's project to implement zygisk inside WSA on windows 11. Though, still no safetynet bypass module works atm.
 

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
It's difficult. I don't really know which emulator has proper selinux implementations which i guess it's mandatory for Android to certify itself through safetynet or anything else. at least permissive selinux will do.

There's a hope. The new zygisk could avoid many security measurements in regural Android phone. as per now, there's project to implement zygisk inside WSA on windows 11. Though, still no safetynet bypass module works atm.
First, we need an alternative magisk hide for zygisk.
We hope someone begin this building.
 

immns

Senior Member
First, we need an alternative magisk hide for zygisk.
We hope someone begin this building.
Zygisk itself is successor of magiskhide. You can select which app you would hide inside denylist setting. It just hide root and magisk detection though. You can try it on canary or alpha build. I don't really know whether it works on emu or non emu android device only.
 

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
Zygisk itself is successor of magiskhide. You can select which app you would hide inside denylist setting. It just hide root and magisk detection though. You can try it on canary or alpha build. I don't really know whether it works on emu or non emu android device only.
It does NOT hide nothing.
It just makes zygisk to be loaded or not.
We really need a fork for magisk hide.
 

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
Zygisk itself is successor of magiskhide. You can select which app you would hide inside denylist setting. It just hide root and magisk detection though. You can try it on canary or alpha build. I don't really know whether it works on emu or non emu android device only.

Code:
Zygisk has a denylist that revokes almost all changes made by Magisk (Note it's not doing the same thing as Magisk Hide, and it CANNOT view as an alternative to Magisk Hide).
Revocation includes Zygisk modules. That means apps in the denylist will NOT load Zygisk modules.
From LSPosed developers on their telegram group:
 

immns

Senior Member
Note it's not doing the same thing as Magisk Hide, and it CANNOT view as an alternative to Magisk Hide).
of course not. Currently I'm using zygisk only for avoiding magisk detection. before zygisk is a thing, i use taichi in order to hide magisk from banking apps. just magiskhide alone isn't sufficient. Also, I'm not fan of riru and lsposed. It doesn't run well on my phone.
 

FinleyCarvert

New member
Dec 11, 2021
2
0
EDIT: Deleting my previous comments for a proper post.
This is how I managed to get magisk 21.4 over Bluestacks 5 (tested on v5.0.100.2106 - should work on subsequent or previous versions using the same)
The script file is the same as LDPlayer's instructions with a little modification.

1) Need to make /system partition writable first.
For that, you need to go to this directory "%ProgramData%\Bluestacks_nxt\Engine"
If you're changing this for one of the master instance go to respective folder, Nougat32 for x86 and Nougat64 for the x64 bit android.
Edit the file Nougatxx.bstk and change type="ReadOnly" to type="Normal" for Root.vdi

2) Need superuser.
For this go to "%ProgramData%\Bluestacks_nxt" and edit the file bluestacks.conf present within. Again, remember which instance you're enabling root for. Search for root and look for an entry similar to - bst.instance.Nougat32.enable_root_access="0"
That entry is for the master instance of Nougat32. Change it's value to 1 and save this file.

Note: Make sure you made these changes while there were no instances running and no services related to bluestacks were running, if there are please close or kill them via task manager. HD-Player.exe BstkSVC.exe needs to be not running essentially. If not, these changes might revert back.
Now fire up the emulator and let the instance run. Optional apps you can install - Mixplorer, Terminal

3) Need to make a file called bootstat.rc for the script to work.
Head over to /system/etc/init and make a new file within it called bootstat.rc (make sure extension is rc and not txt).
This directory might not be mounted as rewritable, which you can by either running
mount -o rw,remount / from terminal or via mixplorer settings, Auto remount
This file is crucial for magisk to be there when bluestack boots.

4) You'll also require these files:
Magisk 21.4 from here - Place it over at /sdcard/init.d/bin/magisk.zip
Magisk Manager 8.0.7 from here - Install the app
Script File - Place the run.sh over at any directory like /sdcard/Download
Bluestacks doesn't work with enforcing selinux and hence needs it to be permissive. The script file changes selinux status once it finishes, by the command setenforce 1 search for it within the script file and change it's value to 0
Another thing to note is that shell script files only work in UNIX eof. I have already edited the file and provided it here just in case.

5) Fire up a terminal window and run this code
Code:
su
sh /sdcard/Download/run.sh

6) Close emulator.
Edit the bluestacks.conf file once again, disable root access to the instance. Make sure again no bluestacks related services were running.
That is all. Run Bluestacks once again and fire up magisk app.

7) Can optionally update busybox after that using the stericson's app.

Note: If you're making changes to an cloned/non-master instance instead, you'll have to use BStweaker latest version instead. Run BStweaker and choose the instance you want, check it's box and then go to Root tab, click Unlock. This might take a couple seconds to a minute, be patient. Also, this is only necessary for cloned/non-master instance. Bluestacks only creates a cloned/fresh Data.vdi and it's hdd ID hence, any changes to the system partition will all be saved in the master instance instead, defeats the purpose of instances not that they ever thought it'd be getting messed up with.
BStweaker only works for cloned/non-master instances only, hence it is needed. Using BStweaker, it automatically puts the type to "Normal" so no need to edit manually. Once done, this should make your system partition writable.

View attachment 5318363

could please make a video tutorial please ?
 

CosmicArrow

New member
Dec 14, 2021
2
0
Hello,

I don't understand the tutorial from Peter1212 with Bluestack.

- How do i make the bootstat.rc file?
- How do i place the bootstat.rc file and how to enter in that destination?
- How do i go to /sdcard/init.d/bin/ ?

Explain also for new users not only for people who already know also a video tutorial will help.
 

chaoscreater

Senior Member
Does anyone know how to root Bluestacks X (cloud instance)? Seems like we could potentially use Magisk to patch boot.img and it seems like Bluestacks X is running Nougat x64. I'm thinking we can take normal Bluestacks and somehow convert the .VDI file into .img. Just need to extract boot.img somehow and then upload it somewhere, then download it from within Bluestacks X and patch using Magisk?
 

huskydg

Senior Member
Feb 17, 2021
430
553
Integrate Magisk root into Nox Player and other emulators

Screenshot%20(3).png



Features

- Bring Magisk / Zygisk to Nox
- MagiskHide / MagiskDenyList for hiding root
- Magisk / Zygisk modules work properly!

More information click here
 

huskydg

Senior Member
Feb 17, 2021
430
553
Does anyone know how to root Bluestacks X (cloud instance)? Seems like we could potentially use Magisk to patch boot.img and it seems like Bluestacks X is running Nougat x64. I'm thinking we can take normal Bluestacks and somehow convert the .VDI file into .img. Just need to extract boot.img somehow and then upload it somewhere, then download it from within Bluestacks X and patch using Magisk?
The simplest way is to install Magisk directly into /system but still make Magisk able to hide root access
 

chaoscreater

Senior Member
The simplest way is to install Magisk directly into /system but still make Magisk able to hide root access
And how do you propose we do that without root in the first place? Magisk can't even do a Direct Install in an emulator.

As far as I know, emulators do not have a recovery partition and there isn't a boot partition either. It's just using ramdisk and zkernel. Latest version of Bluestacks v5 (NXT) has built in root, which you can toggle in the Bluestacks .conf file. Alternatively, you can use BSTweaker to enable root. However, Bluestacks X (cloud version) can't be patched using BSTweaker and you can't modify the .conf file, since you can't access the underlying host of the emulator...
 

huskydg

Senior Member
Feb 17, 2021
430
553
And how do you propose we do that without root in the first place? Magisk can't even do a Direct Install in an emulator.

As far as I know, emulators do not have a recovery partition and there isn't a boot partition either. It's just using ramdisk and zkernel. Latest version of Bluestacks v5 (NXT) has built in root, which you can toggle in the Bluestacks .conf file. Alternatively, you can use BSTweaker to enable root. However, Bluestacks X (cloud version) can't be patched using BSTweaker and you can't modify the .conf file, since you can't access the underlying host of the emulator...
I have make a script to install Magisk, you can see here, only few of emulator have all Magisk features work properly, recommended NoxPlayer for Android 9 or MEmu for Android 7.
Check my video:

My repo:

And this:
 

chaoscreater

Senior Member
OK thanks, but my question was about rooting in Bluestacks X.

I'm aware of other emulators, but those are all emulators that you run locally on your system. Bluestacks X is a cloud-based emulator that is currently in beta. Rather than running apps or games in an emulator on my machine, I can just run the apps/games in my browser via Bluestacks X. I don't have to worry about my machine having low CPU or memory specs for running Bluestacks.
 

huskydg

Senior Member
Feb 17, 2021
430
553
OK thanks, but my question was about rooting in Bluestacks X.

I'm aware of other emulators, but those are all emulators that you run locally on your system. Bluestacks X is a cloud-based emulator that is currently in beta. Rather than running apps or games in an emulator on my machine, I can just run the apps/games in my browser via Bluestacks X. I don't have to worry about my machine having low CPU or memory specs for running Bluestacks.
So your question is dumb, Because that's cloud emulator so no way :))))
 

huskydg

Senior Member
Feb 17, 2021
430
553
OK thanks, but my question was about rooting in Bluestacks X.

I'm aware of other emulators, but those are all emulators that you run locally on your system. Bluestacks X is a cloud-based emulator that is currently in beta. Rather than running apps or games in an emulator on my machine, I can just run the apps/games in my browser via Bluestacks X. I don't have to worry about my machine having low CPU or memory specs for running Bluestacks.
Bluestacks X, you actually control the emulator from somewhere else through the internet.
the cloud-emulator only allows you to remote the screen of that
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    A new tool is available which can install Magisk in emulators. See Delta Magisk

    This tool is depreciated. No support will be provided.



    Magisk

    Note:- This is a experimental feature. I made this guide only for SuperUser management in MEmu. If you want modules then don't expect it to work. Modules like MigiskHideProps are not working. So don't expect much.


    As of now there is no working way for passing SafetyNet for playing games and apps that use it.

    For someone who want to install Magisk in emulators MEmu v7.3.2/LDPlayer v4.0.45 which is based on Android-x86, follow below guide.

    What is this method?
    -This method is used by exploits like mtk-su, qu1ckr00t without patching boot.img. I used this method because I don't know how to modify .vmdk as seen in here. Drawback of this method is that, many modules like MagiskHideProps are not working.

    If you are using MEmu then follow https://xdaforums.com/t/guide-magis...-3-2-or-ldplayer-4-0-45.4222919/post-84574053
    If you are using LDPlayer then follow https://xdaforums.com/t/guide-magis...-3-2-or-ldplayer-4-0-45.4222919/post-84580333

    Reference:-
    -https://xdaforums.com/t/amazing-temp-root-for-mediatek-armv8-2020-08-24.3922213/post-82081703
    -https://github.com/grant-h/qu1ckr00t/blob/master/app/src/main/res/raw/magisk_install

    Credits:-
    @topjohnwu
    @diplomatic

    Enjoy!

    SuperSU
    If you want SuperSU instead of Magisk, then follow below guide
    • Enable Root mode
    • Download SuperSU zip from here
    • Download and install BusyBox from here
    • Download update-binary script from here. We can save this with CTRL + S if using browser in Windows OS
    • In Terminal Emulator run below commands
      Code:
      su
      export PATH=/system/xbin:/system/bin
      cd /sdcard/Download
      sh update-binary 2 1 $PWD/SR5-SuperSU-v2.82-SR5-20171001224502.zip
    • Restart MEmu. Enjoy!

    Credits:-
    @Chainfire

    Xposed
    I have modified youling257's xposed at Github. Since it is not flashable zip by default, we have to do it our own. Made it x86_64 flashable zip like x86 one. Nothing is changed. Just added x86_64 files to x86 system folder after deleting its contents, changed `arch` to x64 and signed.

    We can also install Xposed in MEmu/LDPlayer Android 7.1.2(25) by below

    Reference:-

    Credits:-
    @rovo89
    @youling257
    @Camlin3 for initial thread.

    Enjoy!
    4
    patch ramdisk and kernel
    1. extract kernel and ramdisk from disk1.vmdk (you can use 7zip)
    2. use mkbootimg to make boot.img
    mkbootimg --ramdisk ramdisk --kernel kernel -o boot.img
    3. copy boot.img to MemuDownload
    4. open MEmu install magisk.apk, then patch boot.img
    5. close MEmu copy pacthed.img then extract it with Bootloader (un/re)pack tool
    6. rename the one named ****ramdisk.cpio.gz to ramdisk (without extention)
    7. rename the one named ***zImage** to kernel (also without extention)
    8. now patched ramdisk and kernel is ready

    resizing bootloader partition
    1. install and configure vmware+linux mint(or any linux)
    2. mount disk1.vmdk as second drive in linux vm when prompted select keep format
    3. expand disk1.vmdk size to 2.5GB in vm setting
    (it's easier than editing partition table)
    4. duplicate disk1.vmdk file in windows file explorer (disk1-copy.vmdk)
    5. mount disk1-copy.vmdk as 3rd drive in linux vm (keep format)
    6. boot up Linux VM and install gparted
    7. open gparted select /dev/sdb (it's 2nd drive)
    8. delete sdb6(ext4 system), sdb5(unknown), and sdb4(extended) partition hit apply
    9. resize sdb3(this is bootloader partition) to 16MB hit apply
    10. select unallocated space, create extended partition hit apply
    11. now select another drive /dev/sdc/ and copy sdc5(unknown) paste to /dev/sdb/(2nd Drive)
    12. copy /dev/sdc6(system) paste to /dev/sdb/ then hit apply
    13. you may or may not resize system partition, there's no difference i think
    14. exit gparted. now you can replace ramdisk and kernel file
    (you might have to use root permission to replace those files)

    i know it's all "manual labor" maybe someone could help make script to automize it all

    Which raises another question, whether other emu's will work if one could replace the ramdisk successfully? Is there any file check that prevents booting from a modified ramdisk? Further testing is needed.
    emu works perfectly and magisk installed properly. i don't think there's any file check, at least on MEmu. I tried same method on Nox Player, the emu itself works as intended but magisk doesn't. on Nox player, magisk doesn't detect ramdisk partition. I'll try LDplayer.
    3
    EDIT: Deleting my previous comments for a proper post.
    This is how I managed to get magisk 21.4 over Bluestacks 5 (tested on v5.0.100.2106 - should work on subsequent or previous versions using the same)
    The script file is the same as LDPlayer's instructions with a little modification.

    1) Need to make /system partition writable first.
    For that, you need to go to this directory "%ProgramData%\Bluestacks_nxt\Engine"
    If you're changing this for one of the master instance go to respective folder, Nougat32 for x86 and Nougat64 for the x64 bit android.
    Edit the file Nougatxx.bstk and change type="ReadOnly" to type="Normal" for Root.vdi

    2) Need superuser.
    For this go to "%ProgramData%\Bluestacks_nxt" and edit the file bluestacks.conf present within. Again, remember which instance you're enabling root for. Search for root and look for an entry similar to - bst.instance.Nougat32.enable_root_access="0"
    That entry is for the master instance of Nougat32. Change it's value to 1 and save this file.

    Note: Make sure you made these changes while there were no instances running and no services related to bluestacks were running, if there are please close or kill them via task manager. HD-Player.exe BstkSVC.exe needs to be not running essentially. If not, these changes might revert back.
    Now fire up the emulator and let the instance run. Optional apps you can install - Mixplorer, Terminal

    3) Need to make a file called bootstat.rc for the script to work.
    Head over to /system/etc/init and make a new file within it called bootstat.rc (make sure extension is rc and not txt).
    This directory might not be mounted as rewritable, which you can by either running
    mount -o rw,remount / from terminal or via mixplorer settings, Auto remount
    This file is crucial for magisk to be there when bluestack boots.

    4) You'll also require these files:
    Magisk 21.4 from here - Place it over at /sdcard/init.d/bin/magisk.zip
    Magisk Manager 8.0.7 from here - Install the app
    Script File - Place the run.sh over at any directory like /sdcard/Download
    Bluestacks doesn't work with enforcing selinux and hence needs it to be permissive. The script file changes selinux status once it finishes, by the command setenforce 1 search for it within the script file and change it's value to 0
    Another thing to note is that shell script files only work in UNIX eof. I have already edited the file and provided it here just in case.

    5) Fire up a terminal window and run this code
    Code:
    su
    sh /sdcard/Download/run.sh

    6) Close emulator.
    Edit the bluestacks.conf file once again, disable root access to the instance. Make sure again no bluestacks related services were running.
    That is all. Run Bluestacks once again and fire up magisk app.

    7) Can optionally update busybox after that using the stericson's app.

    Note: If you're making changes to an cloned/non-master instance instead, you'll have to use BStweaker latest version instead. Run BStweaker and choose the instance you want, check it's box and then go to Root tab, click Unlock. This might take a couple seconds to a minute, be patient. Also, this is only necessary for cloned/non-master instance. Bluestacks only creates a cloned/fresh Data.vdi and it's hdd ID hence, any changes to the system partition will all be saved in the master instance instead, defeats the purpose of instances not that they ever thought it'd be getting messed up with.
    BStweaker only works for cloned/non-master instances only, hence it is needed. Using BStweaker, it automatically puts the type to "Normal" so no need to edit manually. Once done, this should make your system partition writable.

    2021-05-24_10h07_57.png
    3
    Magisk v22 for MEmu Emulator

    • Enable Root mode in Settings and Restart MEmu
    • Download and Install Magisk app from here.
    • Install Busybox by using stericson app here
    • Place Magisk.apk as /sdcard/init.d/bin/magisk.apk
    • Extract the run.sh script from below attached zip to any folder like /sdcard/Download
    • Execute the run.sh script. To do this run below commands in Terminal
      Code:
      su
      sh /sdcard/Download/run.sh
    • After executing above, disable Root mode in Settings and Restart MEmu
    • Enjoy!
    3
    @VD171 do u have any ideas?
    srry if i bother u
    couldn't resist myself
    Ah, I made this guide for only SuperUser management in MEmu.
    But it turns into many other things like using Magisk modules, passing SafetyNet etc.,

    I also tried as @VD171 said. Installed Xposed, Magisk and installed HiddenCore but PokenmonGo fails to login.

    I have no idea about these things. Let us wait for someone look into these things.

    Thanks
    I'm not sure. Probably the emulator is beign detected.
    Only XPRIVACYLUA can hides it completely.
    When exactly the app POKEMON GO closes ???
    Beucase I've tried on my device (root magisk + edxposed + xprivacylua + titaniumbackup + luckypatchers + many other root things) and apparentely it is working.
    (I didn't need to enable MAGISK HIDE for that neither XPRIVACYLUA. Only HIDDENCORE-MODULE is acting).
    I am on login screen and it didn't close.

    See screenshot:
    screenshot_2021-02-16-19-31-14-176_com-android-systemui-jpg.5224123