Skip to content

Instantly share code, notes, and snippets.

@minanagehsalalma
Last active December 9, 2025 20:44
Show Gist options
  • Select an option

  • Save minanagehsalalma/e6497ad1db67929593ce8af7d5688a13 to your computer and use it in GitHub Desktop.

Select an option

Save minanagehsalalma/e6497ad1db67929593ce8af7d5688a13 to your computer and use it in GitHub Desktop.
Kill ads on LDPlayer (systemwide + home screen) Full Guide

Kill ads on LDPlayer (systemwide + home screen) — guide

This covers the “LDPlayer-served” promos: home-screen recommended games row, splash/promo banners, and other injected junk. We’ll use layered defenses so it stays gone.


What you’re trying to remove

  • LDPlayer home screen “recommended games” strip (like in your screenshot)
  • In-emulator promos coming from LD system apps (store/market/recommendation services)
  • (Optional) in-app ads from regular Android apps (handled by DNS/VPN blockers)

Step 1 — Do NOT use the online installer (you chose not to, so skip)

You said you don’t want to do the “offline installer” approach. That’s fine — we’ll handle it with in-emulator + Windows-side blocking.


Step 2 — Windows-side domain blocking (helps but not sufficient alone)

This reduces a lot of LDPlayer promo assets.

A) Edit hosts file (Windows)

  1. Open Notepad as Administrator
  2. Open: C:\Windows\System32\drivers\etc\hosts
  3. Add:
0.0.0.0 res.ldrescdn.com
0.0.0.0 cdn.ldplayer.net
  1. Save
  2. Open CMD as admin, run:
ipconfig /flushdns

Result: many LD promo images/feeds fail to load. Note: the bottom/home strip can still show because it’s rendered locally by LD components.


Step 2! Stop the startup/splash ad by blocking LDPlayer’s ad cache folder

A common working trick is to block LDPlayer from accessing its cache folder:

  • Go to: %AppData%\XuanZhi9\cache
  • delete the contents of that folder
  • then on that Folder Properties → Security → Advanced → Disable inheritance → Remove all inherited permissions → Apply

(You can undo by re-enabling inheritance later.)

Step 3 — Switch away from LD’s launcher (you did this)

This is a big win because most home-screen ads are tied to the default launcher.

Install and set Nova Launcher

Inside LDPlayer:

  1. Install Nova Launcher
  2. Go to: Settings → Apps → Default apps → Home app → Nova Launcher
  3. Press Home and confirm you land in Nova.

Result: home screen becomes clean + controllable.


Step 4 — Stop ad injection via “Draw over other apps”

LDPlayer promo strips/popups are often injected via overlay permission.

Inside LDPlayer:

  1. Settings → Apps → Special app access

  2. Open Display over other apps

  3. Turn OFF overlays for anything that looks like:

    • LD / XuanZhi / LDAppStore / Market
    • Game Center / Hot Apps / Hot Games
    • Recommendation / Promotion / News / Ads (names vary)

Also do: 4. Special app access → Usage access 5. Turn OFF usage access for the same LD/market/recommendation apps.

Result: cuts a lot of “systemwide” injected UI.


Step 5 — The real fix: disable LD ad/recommendation packages (ADB)

This is the most “for good” approach without reinstalling.

A) Connect ADB to LDPlayer

On Windows (using adb you have available):

adb devices
adb connect 127.0.0.1:5555
adb devices

(If 5555 doesn’t connect, LDPlayer may use another local port. adb devices will show what’s connected.)

B) List suspicious LD packages

Run:

adb shell pm list packages | findstr /i "ld xuan xz appstore market game center recommend hot ad"

C) Disable the offenders

For each suspicious package you identify:

adb shell pm disable-user --user 0 <package.name>
adb shell am force-stop <package.name>

D) Deny overlay permission at the system level (extra hardening)

For the same packages:

adb shell appops set <package.name> SYSTEM_ALERT_WINDOW deny

E) Restart LDPlayer

Close and reopen LDPlayer to confirm the “recommended games” strip is gone.

Result: this is typically what actually removes the home-screen promo row and other LD-injected ads.


Step 6 — If LDPlayer “heals” itself after reboot (your folder issue suggests this)

LDPlayer can re-enable components or rewrite settings. If that happens, use a repeatable script.

Create a kill-ld-ads.bat

@echo off
adb connect 127.0.0.1:5555

:: Disable LD promo/store/recommend packages (fill in your actual package names)
adb shell pm disable-user --user 0 <pkg1>
adb shell pm disable-user --user 0 <pkg2>
adb shell pm disable-user --user 0 <pkg3>

:: Force stop them
adb shell am force-stop <pkg1>
adb shell am force-stop <pkg2>
adb shell am force-stop <pkg3>

:: Deny overlay injection
adb shell appops set <pkg1> SYSTEM_ALERT_WINDOW deny
adb shell appops set <pkg2> SYSTEM_ALERT_WINDOW deny
adb shell appops set <pkg3> SYSTEM_ALERT_WINDOW deny

Run it after LDPlayer starts, or add it to Task Scheduler (trigger: “at log on” or “on LDPlayer start”).

Result: even if LDPlayer re-enables stuff, you smack it back down immediately.


Optional: block regular in-app ads too (not just LDPlayer promos)

If you also want fewer ads inside apps:

  • Use Private DNS inside LDPlayer:

    • Settings → Network & Internet → Private DNS
    • dns.adguard-dns.com (or NextDNS)

This is separate from the “LDPlayer itself serves ads” issue, but it helps overall.


Troubleshooting notes

  • If the “recommended games” strip still appears while you’re on Nova, it’s almost always:

    1. an overlay-enabled LD service, or
    2. an LD store/recommendation package that needs ADB disabling.
  • Don’t disable Google packages (Play Services / Play Store) unless you’re sure.

  • If something breaks, you can re-enable a package:

    adb shell pm enable <package.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment