Skip to content

Instantly share code, notes, and snippets.

@TameemS
Last active April 12, 2024 22:35
Show Gist options
  • Star 67 You must be signed in to star a gist
  • Fork 14 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
@Werve
Copy link

Werve commented Oct 19, 2022

For those who do not know from version 8 Memu has added Hyper-V support (and if it is enabled it converts the instances already created for both boot modes).
I also noticed that in Hyper-V mode there are no ads in the launcher (maybe not yet implemented?).

Warning that the settings for cpu number and ram are strange in Hyper-V mode, they do not seem consistent with what is written. Even increasing the Ram It happened to me that it crash after opening several apps in the background.

Also if you have problems with Google play certification you can solve with this method https://www.reddit.com/r/memuplayer/comments/vsfyix/comment/is0j95f/
Using Android 9 64 bit and seems to work decently

@LOuroboros
Copy link

LOuroboros commented Feb 4, 2023

Do any of you know if it's possible to replace the default launcher of MEmu in its latest version completely?
I used Launcher Hijack to set the default launcher to Rootless Launcher, uninstalled MEmu Launcher and MEmu Guide using System App Remover, and now MEmu just stays on a black screen, forever trying to open an app that is not there anymore, as if it didn't register the changes Launcher Hijack did.

EDIT: I checked around, and it looks like I should be able to force-set a default launcher by going to Settings -> Developer Options -> Running Services -> Android Services Library -> Settings, but sadly, when I hit on "Home app" I'm not given any options, as if Rootless Launcher wasn't a valid home launcher :/

1
2

@heinkhant4ung
Copy link

Can you update the guide for the latest version?

@TameemS
Copy link
Author

TameemS commented Mar 14, 2023

Do any of you know if it's possible to replace the default launcher of MEmu in its latest version completely? I used Launcher Hijack to set the default launcher to Rootless Launcher, uninstalled MEmu Launcher and MEmu Guide using System App Remover, and now MEmu just stays on a black screen, forever trying to open an app that is not there anymore, as if it didn't register the changes Launcher Hijack did.

EDIT: I checked around, and it looks like I should be able to force-set a default launcher by going to Settings -> Developer Options -> Running Services -> Android Services Library -> Settings, but sadly, when I hit on "Home app" I'm not given any options, as if Rootless Launcher wasn't a valid home launcher :/

1 2

Can you update the guide for the latest version?

I'll look into it.

@TameemS
Copy link
Author

TameemS commented Mar 16, 2023

Update: Added more hosts and IPs as of the latest version

Do any of you know if it's possible to replace the default launcher of MEmu in its latest version completely? I used Launcher Hijack to set the default launcher to Rootless Launcher, uninstalled MEmu Launcher and MEmu Guide using System App Remover, and now MEmu just stays on a black screen, forever trying to open an app that is not there anymore, as if it didn't register the changes Launcher Hijack did.

EDIT: I checked around, and it looks like I should be able to force-set a default launcher by going to Settings -> Developer Options -> Running Services -> Android Services Library -> Settings, but sadly, when I hit on "Home app" I'm not given any options, as if Rootless Launcher wasn't a valid home launcher :/

1 2

Launcher Hijack seems to work fine for me. Maybe try another launcher?
The app you mentioned seems like a stock Android launcher replacement. Try Lawnchair 2.

@fspo1
Copy link

fspo1 commented Apr 22, 2023

stop on step 5. i can't delete files cause the file system is read only. how can i change the permission?thanks a lot

@TameemS
Copy link
Author

TameemS commented Apr 29, 2023

stop on step 5. i can't delete files cause the file system is read only. how can i change the permission?thanks a lot

You should be able to have read and write access after turning on Root Mode. Are you using a file manager that plays nicely with root?

@TrialMacameau
Copy link

TrialMacameau commented May 2, 2023

If you can't remove system apps like the 3 mentioned apps in Step 5 because the system is Read-Only even if you have Root Privileges, Find, install and run Titanium Backup, go to Backup and Restore, find the 3 mentioned apps and simply freeze them (Equals to Disable when you go check the app section in the Android Settings.)
I can provide you one that works and I use a lot for blocking those apps instead of removing those folders : https://drive.google.com/file/d/1KXARgGteRzFBd_rs77g19S31pag-R3E9/view?usp=share_link

@TameemS
Copy link
Author

TameemS commented May 14, 2023

Is there a guide to debloat for ldplayer9?

Alright, done

@helmiau
Copy link

helmiau commented May 26, 2023

Thanks for ur info bro @TameemS
here's i give some contribution to make all-in-one MEmu's domains blocker

  1. Create empty file.txt in C:\ directory
  2. Edit it, then fill with these codes below
@echo off
echo "src: https://gist.github.com/TameemS/603686cec857ff1f91e68607e374b0d8"
echo "AdBlocker for MEmu PLAY Emulator"
echo "Editing Hosts..."
set hostspath=%windir%\System32\drivers\etc\hosts
echo 0.0.0.0 memuplay.com >> %hostspath%
echo 0.0.0.0 www.memuplay.com >> %hostspath%
echo 0.0.0.0 u888.v.baishan-cloud.net >> %hostspath%
echo 0.0.0.0 u999.v.bsclink.cn >> %hostspath%
echo 0.0.0.0 uz95.v.bsclink.cn >> %hostspath%
echo 0.0.0.0 ut89.v.bsclink.cn >> %hostspath%
echo 0.0.0.0 dl.memuplay.com >> %hostspath%
echo 0.0.0.0 www.microvirt.com >> %hostspath%
echo 0.0.0.0 microvirt.com >> %hostspath%
echo 0.0.0.0 hebei.22.121.in-addr.arpa >> %hostspath%
echo 0.0.0.0 d2bg5ibrp06389.cloudfront.net >> %hostspath%
echo 0.0.0.0 www.xyaz.cn.w.cdngslb.com >> %hostspath%
echo 0.0.0.0 d1ygnxto00lnhl.cloudfront.net >> %hostspath%
echo 0.0.0.0 d3p779s2xhx48e.cloudfront.net >> %hostspath%
echo 0.0.0.0 d2bg5ibrp06389.cloudfront.net >> %hostspath%

echo "Generating MEmu's Ads IP..."
echo 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 > memu_block.txt

echo "Setting firewall memu_ip_to_fw_rule for blocking MEmu's Ads..."
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
echo "Clearing cache... Done..."
del memu_block.txt
pause
  1. Run it as administrator

@Cesio137
Copy link

Cesio137 commented Jul 5, 2023

@helmiau I have an easier way to solve the problem with ads!

  1. Open memu and go to Settings->Network->Private DNS
  2. Then use "dns.adguard.com"

image

the most that will happen is you see the screen blink when memu tries to run some ads.

@TameemS
Copy link
Author

TameemS commented Jul 10, 2023

Thanks for ur info bro @TameemS here's i give some contribution to make all-in-one MEmu's domains blocker

1. Create empty file.txt

2. Edit it, then fill with these codes below
@echo off
echo "src: https://gist.github.com/TameemS/603686cec857ff1f91e68607e374b0d8"
echo "AdBlocker for MEmu PLAY Emulator"
echo "Editing Hosts..."
set hostspath=%windir%\System32\drivers\etc\hosts
echo 0.0.0.0 memuplay.com >> %hostspath%
echo 0.0.0.0 www.memuplay.com >> %hostspath%
echo 0.0.0.0 u888.v.baishan-cloud.net >> %hostspath%
echo 0.0.0.0 u999.v.bsclink.cn >> %hostspath%
echo 0.0.0.0 uz95.v.bsclink.cn >> %hostspath%
echo 0.0.0.0 ut89.v.bsclink.cn >> %hostspath%
echo 0.0.0.0 dl.memuplay.com >> %hostspath%
echo 0.0.0.0 www.microvirt.com >> %hostspath%
echo 0.0.0.0 microvirt.com >> %hostspath%
echo 0.0.0.0 hebei.22.121.in-addr.arpa >> %hostspath%
echo 0.0.0.0 d2bg5ibrp06389.cloudfront.net >> %hostspath%
echo 0.0.0.0 www.xyaz.cn.w.cdngslb.com >> %hostspath%
echo 0.0.0.0 d1ygnxto00lnhl.cloudfront.net >> %hostspath%
echo 0.0.0.0 d3p779s2xhx48e.cloudfront.net >> %hostspath%
echo 0.0.0.0 d2bg5ibrp06389.cloudfront.net >> %hostspath%

echo "Generating MEmu's Ads IP..."
echo 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 > memu_block.txt

echo "Setting firewall memu_ip_to_fw_rule for blocking MEmu's Ads..."
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
echo "Clearing cache... Done..."
del memu_block.txt
pause
3. Run it as administrator

Thank you for your effort to contribute. Small correction, these are moreso trackers rather than ads.

@helmiau I have an easier way to solve the problem with ads!

1. Open memu and go to Settings->Network->Private DNS

2. Then use "dns.adguard.com"

image

the most that will happen is you see the screen blink when memu tries to run some ads.

Putting the small correction in consideration, as far as I know the trackers I listed aren't in any sort of global list plus even if it did block trackers, it only would block the ones inside Android, not the emulator itself.
If you want to block ads in Android, I guess that's another way of doing it. But I suggested a local way of doing it as DNS-based adblockers especially introduce delay in domain resolving. I wish AdGuard had datacenters pretty much everywhere.

@RexEldislav
Copy link

RexEldislav commented Jul 22, 2023

For getting rid of ads in Memu, the easiest way I found which requires root is, using Open Hosts, an app available in Google Play which is a hosts file editor for the hosts file on the emulator itself. No popup videos when starting the emulator and as far as I can tell no ads are appearing after updating the hosts file. When editing the file within Open Hosts, you can copy and paste your hosts file list into the editor. Your mileage may vary. Here is the Hosts file list that I used.

127.0.0.1 localhost
127.0.0.1 memuplay.com
127.0.0.1 www.memuplay.com
127.0.0.1 u888.v.baishan-cloud.net
127.0.0.1 u999.v.bsclink.cn
127.0.0.1 uz95.v.bsclink.cn
127.0.0.1 ut89.v.bsclink.cn
127.0.0.1 dl.memuplay.com
127.0.0.1 www.microvirt.com
127.0.0.1 microvirt.com
127.0.0.1 hebei.22.121.in-addr.arpa
127.0.0.1 d2bg5ibrp06389.cloudfront.net
127.0.0.1 www.xyaz.cn.w.cdngslb.com
127.0.0.1 d1ygnxto00lnhl.cloudfront.net
127.0.0.1 d3p779s2xhx48e.cloudfront.net
127.0.0.1 d2bg5ibrp06389.cloudfront.net
127.0.0.1 applovin.com
127.0.0.1 rt.applovin.com
127.0.0.1 ms.applovin.com
127.0.0.1 d.applovin.com
127.0.0.1 a.applovin.com
127.0.0.1 prod-ms.applovin.com
127.0.0.1 res1.applovin.com
127.0.0.1 prod-a.applovin.com
127.0.0.1 ms4.applovin.com
127.0.0.1 assets.applovin.com
127.0.0.1 prod-bid.applovin.com
127.0.0.1 stage-ms.applovin.com
127.0.0.1 img.applovin.com
127.0.0.1 pdn.applovin.com
127.0.0.1 prod-ms4.applovin.com
127.0.0.1 stage-a.applovin.com
127.0.0.1 gcp-prod-ms4.applovin.com
127.0.0.1 info.applovin.com
127.0.0.1 s.info.applovin.com
127.0.0.1 rt-usa.applovin.com
127.0.0.1 prod-a4.applovin.com
127.0.0.1 stage-bid.applovin.com
127.0.0.1 stage-ms4.applovin.com
127.0.0.1 stage-assets.applovin.com
127.0.0.1 gcp-stage-ms4.applovin.com
127.0.0.1 gcp-ms4.applovin.com
127.0.0.1 a-usa.applovin.com
127.0.0.1 stage-img.applovin.com
127.0.0.1 prod-mediate-events.applovin.com
127.0.0.1 stage-pdn.applovin.com
127.0.0.1 events.applovin.com
127.0.0.1 dls-prod-mediate-cluster-al-p-ax-xxfz.events.applovin.com
127.0.0.1 ewrprod-rtbwin.applovin.com
127.0.0.1 gcp-ms.applovin.com
127.0.0.1 nuqprod-rtbwin.applovin.com
127.0.0.1 sfoprod-rtbwin.applovin.com
127.0.0.1 prod-a-usa.applovin.com
127.0.0.1 a4.applovin.com
127.0.0.1 exp1-ms4.applovin.com
127.0.0.1 gcp-a.applovin.com
127.0.0.1 ewrstage-rtbwin.applovin.com
127.0.0.1 stage-a4.applovin.com
127.0.0.1 local-prod-bid.applovin.com
127.0.0.1 gcp-img.applovin.com
127.0.0.1 goog.applovin.com
127.0.0.1 bid.applovin.com
127.0.0.1 gcp-res1.applovin.com
127.0.0.1 stage-mediate-events.applovin.com
127.0.0.1 dash.applovin.com
127.0.0.1 stage-a-usa.applovin.com
127.0.0.1 sfostage-rtbwin.applovin.com
127.0.0.1 ehd-stage-a.applovin.com
127.0.0.1 hkg-prod-a.applovin.com
127.0.0.1 ue.applovin.com
127.0.0.1 vid.applovin.com
127.0.0.1 ms-d.applovin.com
127.0.0.1 www.applovin.com
127.0.0.1 ehd-prod-bid.applovin.com
127.0.0.1 stage-vid.applovin.com
127.0.0.1 nyj-prod-a.applovin.com
127.0.0.1 nrt-prod-a.applovin.com
127.0.0.1 ams-prod-a.applovin.com
127.0.0.1 safedk.applovin.com
127.0.0.1 r.applovin.com
127.0.0.1 img2.applovin.com
127.0.0.1 assets2.applovin.com
127.0.0.1 dls-stage-bid.applovin.com
127.0.0.1 amsstage-rtbwin.applovin.com
127.0.0.1 amsprod-rtbwin.applovin.com
127.0.0.1 sfo-prod-a.applovin.com
127.0.0.1 dls-stage-mediate-cluster-al-s-ax-0u9s.events.applovin.com
127.0.0.1 dls-prod-a.applovin.com
127.0.0.1 api.applovin.com
127.0.0.1 ms-usa.applovin.com
127.0.0.1 nrtstage-rtbwin.applovin.com
127.0.0.1 applvn.com
127.0.0.1 d.applvn.com
127.0.0.1 ms.applvn.com
127.0.0.1 a.applvn.com
127.0.0.1 rt.applvn.com
127.0.0.1 prod-ms.applvn.com
127.0.0.1 stage-ms.applvn.com
127.0.0.1 rt-usa.applvn.com
127.0.0.1 a-usa.applvn.com
127.0.0.1 ms4.applvn.com
127.0.0.1 ue.applvn.com

@donradzsk
Copy link

donradzsk commented Aug 3, 2023

I'm getting an error when I run the batch file to add the IP addresses in memu_block.txt:

No rules match the specified criteria.
A specified IP address or address keyword is not valid.

(Both files are in the same folder.)

@LOuroboros
Copy link

did you perhaps know how to fix @LOuroboros issue already?, coz i also facing the same issue. After uninstalling memu launcher, whenever the emulator start its always show blank screen on home tab not loading the launcher i choose before

Nope. I just stopped using MEmu.

I'm currently using MSI App Player 5 without any sort of tweak for my Android needs, and LDPlayer for any apps that it can't handle.

@TameemS
Copy link
Author

TameemS commented Aug 4, 2023

I'm getting an error when I run the batch file to add the IP addresses in memu_block.txt:

No rules match the specified criteria.
A specified IP address or address keyword is not valid.

(Both files are in the same folder.)

Are you double-clicking on the batch file from Explorer?
Because that won't work, you have to go to the folder in the admin command prompt then run the batch file using it.

@donradzsk
Copy link

donradzsk commented Aug 4, 2023

I right-clicked the batch file and ran it as administrator. But I did what you said and got the same error.
I use both Nox and Memu and did the same for Nox and that one worked. Could that be the problem? Can't run both?

Edit: Fixed it. Had to put the full path to memu_block.txt:.

@furkandebey
Copy link

For getting rid of ads in Memu, the easiest way I found which requires root is, using Open Hosts, an app available in Google Play which is a hosts file editor for the hosts file on the emulator itself. No popup videos when starting the emulator and as far as I can tell no ads are appearing after updating the hosts file. When editing the file within Open Hosts, you can copy and paste your hosts file list into the editor. Your mileage may vary. Here is the Hosts file list that I used.

127.0.0.1 localhost 127.0.0.1 memuplay.com 127.0.0.1 www.memuplay.com 127.0.0.1 u888.v.baishan-cloud.net 127.0.0.1 u999.v.bsclink.cn 127.0.0.1 uz95.v.bsclink.cn 127.0.0.1 ut89.v.bsclink.cn 127.0.0.1 dl.memuplay.com 127.0.0.1 www.microvirt.com 127.0.0.1 microvirt.com 127.0.0.1 hebei.22.121.in-addr.arpa 127.0.0.1 d2bg5ibrp06389.cloudfront.net 127.0.0.1 www.xyaz.cn.w.cdngslb.com 127.0.0.1 d1ygnxto00lnhl.cloudfront.net 127.0.0.1 d3p779s2xhx48e.cloudfront.net 127.0.0.1 d2bg5ibrp06389.cloudfront.net 127.0.0.1 applovin.com 127.0.0.1 rt.applovin.com 127.0.0.1 ms.applovin.com 127.0.0.1 d.applovin.com 127.0.0.1 a.applovin.com 127.0.0.1 prod-ms.applovin.com 127.0.0.1 res1.applovin.com 127.0.0.1 prod-a.applovin.com 127.0.0.1 ms4.applovin.com 127.0.0.1 assets.applovin.com 127.0.0.1 prod-bid.applovin.com 127.0.0.1 stage-ms.applovin.com 127.0.0.1 img.applovin.com 127.0.0.1 pdn.applovin.com 127.0.0.1 prod-ms4.applovin.com 127.0.0.1 stage-a.applovin.com 127.0.0.1 gcp-prod-ms4.applovin.com 127.0.0.1 info.applovin.com 127.0.0.1 s.info.applovin.com 127.0.0.1 rt-usa.applovin.com 127.0.0.1 prod-a4.applovin.com 127.0.0.1 stage-bid.applovin.com 127.0.0.1 stage-ms4.applovin.com 127.0.0.1 stage-assets.applovin.com 127.0.0.1 gcp-stage-ms4.applovin.com 127.0.0.1 gcp-ms4.applovin.com 127.0.0.1 a-usa.applovin.com 127.0.0.1 stage-img.applovin.com 127.0.0.1 prod-mediate-events.applovin.com 127.0.0.1 stage-pdn.applovin.com 127.0.0.1 events.applovin.com 127.0.0.1 dls-prod-mediate-cluster-al-p-ax-xxfz.events.applovin.com 127.0.0.1 ewrprod-rtbwin.applovin.com 127.0.0.1 gcp-ms.applovin.com 127.0.0.1 nuqprod-rtbwin.applovin.com 127.0.0.1 sfoprod-rtbwin.applovin.com 127.0.0.1 prod-a-usa.applovin.com 127.0.0.1 a4.applovin.com 127.0.0.1 exp1-ms4.applovin.com 127.0.0.1 gcp-a.applovin.com 127.0.0.1 ewrstage-rtbwin.applovin.com 127.0.0.1 stage-a4.applovin.com 127.0.0.1 local-prod-bid.applovin.com 127.0.0.1 gcp-img.applovin.com 127.0.0.1 goog.applovin.com 127.0.0.1 bid.applovin.com 127.0.0.1 gcp-res1.applovin.com 127.0.0.1 stage-mediate-events.applovin.com 127.0.0.1 dash.applovin.com 127.0.0.1 stage-a-usa.applovin.com 127.0.0.1 sfostage-rtbwin.applovin.com 127.0.0.1 ehd-stage-a.applovin.com 127.0.0.1 hkg-prod-a.applovin.com 127.0.0.1 ue.applovin.com 127.0.0.1 vid.applovin.com 127.0.0.1 ms-d.applovin.com 127.0.0.1 www.applovin.com 127.0.0.1 ehd-prod-bid.applovin.com 127.0.0.1 stage-vid.applovin.com 127.0.0.1 nyj-prod-a.applovin.com 127.0.0.1 nrt-prod-a.applovin.com 127.0.0.1 ams-prod-a.applovin.com 127.0.0.1 safedk.applovin.com 127.0.0.1 r.applovin.com 127.0.0.1 img2.applovin.com 127.0.0.1 assets2.applovin.com 127.0.0.1 dls-stage-bid.applovin.com 127.0.0.1 amsstage-rtbwin.applovin.com 127.0.0.1 amsprod-rtbwin.applovin.com 127.0.0.1 sfo-prod-a.applovin.com 127.0.0.1 dls-stage-mediate-cluster-al-s-ax-0u9s.events.applovin.com 127.0.0.1 dls-prod-a.applovin.com 127.0.0.1 api.applovin.com 127.0.0.1 ms-usa.applovin.com 127.0.0.1 nrtstage-rtbwin.applovin.com 127.0.0.1 applvn.com 127.0.0.1 d.applvn.com 127.0.0.1 ms.applvn.com 127.0.0.1 a.applvn.com 127.0.0.1 rt.applvn.com 127.0.0.1 prod-ms.applvn.com 127.0.0.1 stage-ms.applvn.com 127.0.0.1 rt-usa.applvn.com 127.0.0.1 a-usa.applvn.com 127.0.0.1 ms4.applvn.com 127.0.0.1 ue.applvn.com


i did as you said and it worked. thank you very much. ( btw, for android 9.0 version of Memu Play)

@ViperCode7
Copy link

Yes, the hosts version in Memu v9 using Open Hosts works, for now, but man, that's a long list of hosts and addresses.

However, the other methods don't work anymore...
Ending up at Root Browser, I got nothing in the Root Directory, it's empty. I got a different one and it works.
I got into priv-app, but not sign of any Memu apps, nor any microvrt, appl(ovin). Moving on.
Got Launcher Hijack, and installed Nova too, but it doesn't stick. I guess without removing the previous apps they revert back. There's more going on under the hood there... so no custom launcher.

On a clean image I managed to removed the launcher from system... it went blank, no mention of any errors or offering to launch something else.

At least the hosts editor is a good option to stop ads.

@donradzsk
Copy link

donradzsk commented Jan 6, 2024

Any idea why it's so hard to install Magisk delta on Memu? I think it's because it isn't being granted superuser access but I could be wrong.

@feelingemu
Copy link

Any idea why it's so hard to install Magisk delta on Memu? I think it's because it isn't being granted superuser access but I could be wrong.

Same here, it's because memu doesn't provide write access to it's root folder even when root is turned on.

It would be a great help if anyone can share how to give write access in memu, I've searched a lot about this but couldn't find anything at all.

@tech128
Copy link

tech128 commented Jan 22, 2024

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

@huydatabc
Copy link

Thanks for this, just a question but are you planning to do this for mumu?
From what I have seen it seems to be one of the better emus out there gaming performance wise.

@TameemS
Copy link
Author

TameemS commented Jan 30, 2024

Thanks for this, just a question but are you planning to do this for mumu? From what I have seen it seems to be one of the better emus out there gaming performance wise.

I was hesitant with doing mumu but I just did some research on it and it has Vulkan support. Interesting, might get to it later.

@bvhfve
Copy link

bvhfve commented Feb 29, 2024

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

Hi, I followed your tutorial and successfully installed magisk, but I couldn't enable zygisk because it will cause bootloop, are there any solutions? I searched for it but so far none is for memu. I'm using latest memu 9 android 9 64bit

@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....

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