Skip to content

Instantly share code, notes, and snippets.

@TameemS
Last active December 8, 2024 18:58
Show Gist options
  • 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
@Tito151
Copy link

Tito151 commented Nov 15, 2024

Do they still have old versions of MEmu hosted on their site or on archive.org? We might have to try an older version until another permissions hack is found.

@TameemS
Copy link
Author

TameemS commented Nov 16, 2024

Do they still have old versions of MEmu hosted on their site or on archive.org? We might have to try an older version until another permissions hack is found.

they have a release archive

@TameemS
Copy link
Author

TameemS commented Nov 16, 2024

if the files are simply read-only this sounds like the same shit nox is pulling

@TheFish1236
Copy link

I am encourting an error in the latest version of Memu - that wont let me delete the items in this :

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.

I did enable root, and used root browser (and a second application) it wont allow it - it seems the new launcher is always coming back?

Any ideas?

I got it working, I personally use zarchiver for file ops: https://www.zdevs.ru/en/za/apk.html

This was what worked for me, it was suggested by @dan4ik94:

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

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