Skip to content

Instantly share code, notes, and snippets.

@TameemS
Last active May 4, 2024 19:42
Show Gist options
  • Star 71 You must be signed in to star a gist
  • Fork 17 You must be signed in to fork a gist
  • Save TameemS/603686cec857ff1f91e68607e374b0d8 to your computer and use it in GitHub Desktop.
Save TameemS/603686cec857ff1f91e68607e374b0d8 to your computer and use it in GitHub Desktop.
Debloating & Optimizing MEmu

Inspired by this

More of my guides: Debloating LDPlayer - Debloating Nox (Updated)

Edit 22/8/2021: I have updated MEmu and it seems like it reinstalls the apps and re-enables the services. Repeat steps 5, 7, 8, and 9 if you update MEmu.

Debloating MEmu

In my experience, Nox can be quite slow and choppy, and looks like I'm not the only person with this problem. A lot of people say that MEmu performs better than Nox, and I could agree with that. I have no chopping issues with it so far. But like Nox, there are kinda shady stuff going on. No one has made a guide on this, so I did it.

  1. If you don't have MEmu yet, go download it. Better to go with the offline installer
  2. Go to MEmu's Settings and enable Root Mode if it isn't enabled
  3. For the launcher, I would suggest going away from MEmu's launcher. Go install one of your choice.
  4. Once you got the launcher, get this and add the launcher to auto-start. (if you are on MEmu 6.3.7 or below, no need for the auto-start app, just set it as default in the Android Settings). Also check MEmu preferences for App auto-start if it's on. Use Launcher Hijack and follow the instructions here
  5. Go get something like Root Browser, go to the system folder and then the priv-app folder. Delete the MEmu guide, the MEmu launcher, and the Google apps installer (Guide, Launcher, and Installer folders) provided by MEmu from the Root Browser, then reboot the emulator.
  6. Go get Blokada, enable it, then in the Android Settings, go to VPN options, and set Blokada to Always-on VPN. Go to Activity in the app and disallow everything that has to do with ads and anything that includes microvirt, applovin, applvn, memuplay, and facebook. Feel free to disallow requests that are unknown to you as well.
  7. Open Run (Win+R) then type in C:\Windows\System32\drivers\etc\hosts. Open it with a text editor of your choice.
  8. When open, place this in the hosts file:
0.0.0.0 memuplay.com
0.0.0.0 www.memuplay.com
0.0.0.0 u888.v.baishan-cloud.net
0.0.0.0 u999.v.bsclink.cn
0.0.0.0 uz95.v.bsclink.cn
0.0.0.0 ut89.v.bsclink.cn
0.0.0.0 dl.memuplay.com
0.0.0.0 www.microvirt.com
0.0.0.0 microvirt.com
0.0.0.0 hebei.22.121.in-addr.arpa
0.0.0.0 d2bg5ibrp06389.cloudfront.net
0.0.0.0 www.xyaz.cn.w.cdngslb.com
0.0.0.0 d1ygnxto00lnhl.cloudfront.net
0.0.0.0 d3p779s2xhx48e.cloudfront.net
0.0.0.0 d2bg5ibrp06389.cloudfront.net

(Most of these domains are according to Glasswire. If there are any more to block, tell me in the comments)

And block the IP addresses using the files attached to this gist (original courtesy of ehindiayleau). Make sure both the batch and the text file are in the same folder! Open command prompt as admin and CD to the folder where you saved the two files.

  1. Open Run and type in services.msc. Find MemuSVC, stop the service, and set its startup mode to Disabled. This is to prevent it from running in the background if you close all foreground MEmu processes.

Optimization

Open Multi-MEmu, close the emulator window and go to the instance settings.

Engine

If you have a good CPU and plenty of RAM to spare, then go to Engine, and set the Preset to High. (anything higher is useless if you use a 32-bit Android instance)

If you use a 64-bit Android 7/9 instance (which I would suggest against as I have a lot of issues with it), then you can set the preset to Top

Display

If you have a good enough GPU, set the resolution to 1920 * 1080. If you want to set it to 2K so that you can play games like Ragnarok at a higher resolution, select Customize and set the Width to 2560 and the Height to 1440. (For Ragnarok, I would suggest setting the DPI to 320)

(NEW!) Enable Discord Live if you're going to screenshare MEmu. Disable it if you're done screensharing.

Storage

Set the Disk Management to Manual management and crank the slider to the max. (The emulator must be closed for this!)

Device

Set the microphone to Disabled if you are not using it.

And you're done! Have fun gaming with MEmu with less worries!

118.31.236.63,114.215.159.204,221.194.169.66,121.22.238.237,121.22.238.244,60.163.132.161,119.188.76.81,119.188.76.84,119.188.76.90,61.160.199.215,119.188.76.84,61.160.199.227,119.188.76.90,6.160.199.231,106.225.234.102,121.22.238.246,121.22.238.247,117.21.36.40,103.215.142.16,103.215.142.15,103.215.142.17,103.215.142.34,107.155.25.121,103.211.230.23,103.211.230.24,45.40.48.212,103.215.142.18,103.215.142.25,103.215.142.29,103.215.142.26,103.211.230.18,18.66.161.122,18.66.161.101,18.66.161.129,18.66.161.64,163.181.92.226,163.181.92.227,163.181.92.228,163.181.92.229,163.181.92.230,163.181.92.231,163.181.92.232,163.181.92.225,18.66.161.30,18.66.161.92,18.66.161.73,13.227.8.32,13.227.8.87,13.227.8.3,13.227.8.43,13.227.8.49,13.227.8.70,13.227.8.118
@echo off
if "%1"=="list" (
netsh advfirewall firewall show rule memu_ip_to_fw_rule | findstr RemoteIP
exit/b
)
netsh advfirewall firewall delete rule name="memu_ip_to_fw_rule"
for /f %%i in (memu_block.txt) do (
netsh advfirewall firewall add rule name="memu_ip_to_fw_rule" protocol=any dir=in action=block remoteip=%%i
netsh advfirewall firewall add rule name="memu_ip_to_fw_rule" protocol=any dir=out action=block remoteip=%%i
)
call %0 list
pause
@initialrise
Copy link

Just posted this same guide in xda, but installing delta magisk is definitely possible. I just did it a little while ago.

Kitsune magisk might be possible as well, but it needs some manual fixes that did not work for me.

Well currently kitsune magisk has some bugs that do not allow it to start properly on memu. You have to use the slightly older 26105 delta magisk to get it to work. Why they have removed this version even though its needed for memu is beyond me. Luckily archive.org has a copy.

https://web.archive.org/web/20231111054630/https://github.com/HuskyDG/magisk-files/releases/tag/d2a66567-delta

After you grab a copy, follow the instructions here: https://huskydg.github.io/magisk-files/#how-to-install-magisk-into-android-emulator

With the exception of you do need to disable root access after you install magisk to the system partition. Why they tell you not to disable it for other emulators besides ldplayer is also beyond me.

Lastly, you probably want to debloat it since memu pushes so much ads and junkware its ridiculous.

Scroll up to the top lol

image
I installed the exact version you mentioned. The supersu is still grayed out.

@initialrise
Copy link

@bvhfve what memu version are you using?

@1004A
Copy link

1004A commented Mar 29, 2024

I spent so much time reading and I have no experience in this, why can't someone just post one that had already been done for easy download? Appreciate,

@dan4ik94
Copy link

For root issues, check the disk sharing in the settings, it should be Independent system disk ! By default on my side it was shared.

evf5EeUVGh

@TameemS
Copy link
Author

TameemS commented Apr 5, 2024

I spent so much time reading and I have no experience in this, why can't someone just post one that had already been done for easy download? Appreciate,

So that you retroactively apply it to newer versions. Uploading a new modded version every time there's an update or two would be time consuming, especially that Android itself (atleast with Google services) is not a lightweight OS....

@giguhbo019jda
Copy link

Btw, why don't you use Mumu instead of Memu? (https://www.mumuplayer.com/update/) I tried all these emulators and Mumu is clearly better than nox,memu in terms of performance. I would like to see the same guide for Mumu from you. Also, have you tried installing kernelsu on virtualbox-based emulators? MagiskDelta works, but it is impossible to hide root with any new modules.

@TameemS
Copy link
Author

TameemS commented Apr 28, 2024

Btw, why don't you use Mumu instead of Memu? (https://www.mumuplayer.com/update/) I tried all these emulators and Mumu is clearly better than nox,memu in terms of performance. I would like to see the same guide for Mumu from you. Also, have you tried installing kernelsu on virtualbox-based emulators? MagiskDelta works, but it is impossible to hide root with any new modules.

I have considered Mumu, but I'm not gonna be bothered yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment