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
@tqrute
Copy link

tqrute commented May 19, 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 can open 20 multi-instances to see tiktok live or 10 multi-instances with tiktok live recording. I need to change system/bin/screenrecord
in this tutorial it can be edited with Redare2
Fixing Android's 3-minute screen recording limitation
https://blog.mobile.dev/fixing-androids-3-minute-screen-recording-limitation-4839abc74aee
in mumu android 12 the maximum recording is 1:39:39 hour minute second
I don't know how to use Redare2 to edit the "screenrecord" file for unlimited recording like in mumu x, mumu x AVC at ~12506 kb/s not good, mumu 12 AVC at ~4506 kb/s good
Does anyone know how I can edit the "screenrecord" file using Redare2 or any other binary software? modification does not work with hex

@dan4ik94
Copy link

Does anyone know how I can edit the "screenrecord" file using Redare2 or any other binary software? modification does not work with hex

You need to change the 0xB4 (180 seconds) to a higher value. In theory the max would be 106 days, but I don't think you need so much.
U3NzYmC5R76MEY1catzh9w

@Juris3D
Copy link

Juris3D commented Aug 29, 2024

Hello all! My question on MEMU is: can we somehow feed PC keyboard media control keys ("consumer keys") to Memu Player? On real Android phones, if we connect keyboard via OTG USB, media control keys from physical keyboard work for Android players. Can we somehow do that for emulated Android "Let through" consumer keys (media control keys) keyboard codes from Windows to MEMU? Thank You!

@Drjis
Copy link

Drjis commented Sep 10, 2024

Can we block memu from being updated to a newer version? I mean will be cool if memu can bypass any sort of block from their server.
some memu older version you can't launch, cause you'll get the pop that will tell to upgrade to a new version of memu

@dan4ik94
Copy link

Can we block memu from being updated to a newer version? I mean will be cool if memu can bypass any sort of block from their server. some memu older version you can't launch, cause you'll get the pop that will tell to upgrade to a new version of memu

have your tried to just block the update host?

@Drjis
Copy link

Drjis commented Sep 14, 2024

Can we block memu from being updated to a newer version? I mean will be cool if memu can bypass any sort of block from their server. some memu older version you can't launch, cause you'll get the pop that will tell to upgrade to a new version of memu

have your tried to just block the update host?

I have no idea about it. can you explain how to do this? I am ignorant in this

@Drjis
Copy link

Drjis commented Sep 14, 2024

Is anyone using memu latest version to play web3 games with telegram app? I have tried, and after launching a game I see a black screen. How can I fix this?

@dan4ik94
Copy link

I have no idea about it. can you explain how to do this? I am ignorant in this

Try blocking these hosts in C:\Windows\SYSTEM32\drivers\etc\hosts file. It works for me, memu says I'm on the latest version even though there's an update.

127.0.0.1 www.microvirt.com
127.0.0.1 dl.memuplay.com

@KingRider
Copy link

For me, it worked perfectly. Enter a private number as private number. The address is dns.adguard.com.

dns_memu

@Drjis
Copy link

Drjis commented Sep 15, 2024

I have no idea about it. can you explain how to do this? I am ignorant in this

Try blocking these hosts in C:\Windows\SYSTEM32\drivers\etc\hosts file. It works for me, memu says I'm on the latest version even though there's an update.

127.0.0.1 www.microvirt.com
127.0.0.1 dl.memuplay.com

I'll try it later. Thanks.

@Drjis
Copy link

Drjis commented Sep 15, 2024

For me, it worked perfectly. Enter a private number as private number. The address is dns.adguard.com.

dns_memu

What is this about?

@Drjis
Copy link

Drjis commented Sep 15, 2024

Is anyone using memu latest version to play web3 games with telegram app? I have tried, and after launching a game I see a black screen. How can I fix this?

Any solution for this people? Would be a life saver...

@Drjis
Copy link

Drjis commented Sep 15, 2024

I have no idea about it. can you explain how to do this? I am ignorant in this

Try blocking these hosts in C:\Windows\SYSTEM32\drivers\etc\hosts file. It works for me, memu says I'm on the latest version even though there's an update.

127.0.0.1 www.microvirt.com
127.0.0.1 dl.memuplay.com

Should I open the file hosts with notepad++ and add these two lines that you gave me? And then save the file? That's it?

@dan4ik94
Copy link

Should I open the file hosts with notepad++ and add these two lines that you gave me? And then save the file? That's it?

yes

@KingRider
Copy link

I have no idea about it. can you explain how to do this? I am ignorant in this

Try blocking these hosts in C:\Windows\SYSTEM32\drivers\etc\hosts file. It works for me, memu says I'm on the latest version even though there's an update.

127.0.0.1 www.microvirt.com
127.0.0.1 dl.memuplay.com

Should I open the file hosts with notepad++ and add these two lines that you gave me? And then save the file? That's it?

yes or sublime text is good too

@Drjis
Copy link

Drjis commented Sep 17, 2024

image

well I have done

@Drjis
Copy link

Drjis commented Sep 17, 2024

I have no idea about it. can you explain how to do this? I am ignorant in this

Try blocking these hosts in C:\Windows\SYSTEM32\drivers\etc\hosts file. It works for me, memu says I'm on the latest version even though there's an update.

127.0.0.1 www.microvirt.com
127.0.0.1 dl.memuplay.com

Should I open the file hosts with notepad++ and add these two lines that you gave me? And then save the file? That's it?

yes or sublime text is good too

tell how to do this

@Drjis
Copy link

Drjis commented Sep 17, 2024

is someone using the latest version of memu to play telegram web3 games?

@joeycb
Copy link

joeycb commented Nov 13, 2024

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?

@SuperbFrog
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 am also having this issue today, maybe MeMu devs patched the ability to delete folders in system somehow, but I have tried 3 different file explorer apps and none can delete them. So yes the launcher hijack doesn't work right either.

@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