Maria Sophia wrote:
> Once "Classic Words Free - V2.12.0" was installed, I left the Wi-Fi and > cellular data on & checked to see what these advertisements look like. > <https://i.postimg.cc/vHq3z4ns/classicwords.jpg> > > Can you show us what I need to do in order to get the ads to show up? > Where would I look for the ads in that app (on Wi-Fi & on cellular data)?
Ah, never mind. It was the DNS setting all along. I had forgotten about it. <https://i.postimg.cc/V6BP37L8/classicwordsdns.jpg> Since every thread should add useful value that wasn't there before, and, to make it easier to test various DNS options, I wrote this script. It works on Windows to change the DNS settings at will on an Android. The easier we make this for users, the more people will use it. C:\app\editor\android\scrcpy> dir adbdns* Directory of C:\app\editor\android\scrcpy 11/30/2026 07:33 PM 9,570 adbdns.bat 11/30/2026 04:13 PM 2,915 adbdns.bat_v1p0.txt 11/30/2026 04:17 PM 3,335 adbdns.bat_v1p1.txt 11/30/2026 04:18 PM 5,156 adbdns.bat_v1p2.txt 11/30/2026 04:22 PM 7,448 adbdns.bat_v1p3.txt 11/30/2026 04:46 PM 7,594 adbdns.bat_v1p4.txt 11/30/2026 04:58 PM 8,732 adbdns.bat_v1p5.txt 11/30/2026 07:33 PM 9,570 adbdns.bat_v1p6.txt C:\app\editor\android\scrcpy> adbdns.bat === Private DNS check === Mode : hostname Specifier: dns.adguard-dns.com Status: set to AdGuard DNS. Change to another resolver? [y/N]: y [1] Adblock Mullvad adblock adblock.dns.mullvad.net [2] Adblock AdGuard DNS dns.adguard-dns.com [3] Adblock Control D (Adblock) p2.freedns.controld.com [4] Malware Control D (Malware) p1.freedns.controld.com [5] Malware Quad9 dns.quad9.net [6] Nofilter Cloudflare one.one.one.one [7] Nofilter Google dns.google [8] Nofilter Off (no Private DNS) [9] Nofilter Automatic (opportunistic) [Q] quit Choose 1-9: 3 Setting Private DNS to p2.freedns.controld.com ... Verifying ... Mode : hostname Specifier: p2.freedns.controld.com OK - applied. Testing ad domain resolution ... PING googleads.g.doubleclick.net (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.115 ms --- googleads.g.doubleclick.net ping statistics --- ======================================================================== Summary ======================================================================== Mode : hostname Resolver : Control D (Adblock) Hostname : p2.freedns.controld.com Ad block : yes - ads and trackers This run : changed ======================================================================== Press any key to continue . . . C:\app\editor\android\scrcpy> type adbdns.bat :: ------------------------------------------------------------------------ :: adbdns.bat :: Checks and sets Android ad-blocking via DNS-over-TLS on port 853 :: <https://i.postimg.cc/V6BP37L8/classicwordsdns.jpg> real-world example :: ------------------------------------------------------------------------ :: v1p6 20261130 Added Control D p1 (malware) with Control D p2 (adblock) :: v1p5 20261130 Added comments explaining ad-blocking DNS basics :: v1p4 20261130 Annotated the selection choice grouped by DNS type :: v1p3 20261130 Added end-of-run summary of the resulting setup :: v1p2 20261130 Added Control D, Quad9, Cloudflare, Google, off/auto options :: v1p1 20261130 Added option to switch to adguard ad-blocking DNS setup :: v1p0 20261130 Check for and set mullvad ad-blocking DNS setup :: ------------------------------------------------------------------------ :: Android encrypts DNS lookups and sends them to the chosen resolver. :: Works across both Wi-Fi and mobile data. Requires adb and Android 9+. :: :: Blocks most ads and trackers because ad networks usually live :: on their own domains (e.g., doubleclick.net, googlesyndication.com, :: graph.facebook.com). Kill the lookup and the ad never loads. :: :: Does not block first-party ads served from the content's own domain :: or bundled inside an app's normal API traffic (e.g., YouTube, feeds). :: Does not block anything fetched from a hardcoded IP address. :: Those need a filtering proxy like AdGuard, TrackerControl or NetGuard :: or a patched client like NewPipe/Revanced or Firefox/Brave for Android. :: :: 1-3 Ad block ads and trackers :: 4-5 Malware Quad9 & Control D p1: malware/phishing only, no ads :: 6-7 Nofilter fast clean resolvers, for troubleshooting :: 8-9 Nofilter Private DNS off or whatever the network offers :: :: "unknown host" = blocking is live. A resolved IP is normal on 4-9, :: and on 1-3 may mean the network stack has not picked it up yet. :: ------------------------------------------------------------------------ @echo off setlocal EnableDelayedExpansion set "MULLVAD=adblock.dns.mullvad.net" set "ADGUARD=dns.adguard-dns.com" set "CTRLD_AD=p2.freedns.controld.com" set "CTRLD_MAL=p1.freedns.controld.com" set "QUAD9=dns.quad9.net" set "CLOUDFLARE=one.one.one.one" set "GOOGLE=dns.google" echo === Private DNS check === echo. for /f "usebackq delims=" %%A in (`adb shell settings get global private_dns_mode 2^>nul`) do set "MODE=%%A" for /f "usebackq delims=" %%A in (`adb shell settings get global private_dns_specifier 2^>nul`) do set "SPEC=%%A" rem strip stray CR from adb output set "MODE=!MODE:\r=!" set "SPEC=!SPEC:\r=!" if "!MODE!"=="" goto :noadb echo Mode : !MODE! echo Specifier: !SPEC! echo. set "KNOWN=" if /i "!MODE!"=="hostname" ( if /i "!SPEC!"=="%MULLVAD%" ( set "KNOWN=Mullvad adblock" & set "CURRENT=1" ) if /i "!SPEC!"=="%ADGUARD%" ( set "KNOWN=AdGuard DNS" & set "CURRENT=2" ) if /i "!SPEC!"=="%CTRLD_AD%" ( set "KNOWN=Control D (Adblock)" & set "CURRENT=3" ) if /i "!SPEC!"=="%CTRLD_MAL%" ( set "KNOWN=Control D (Malware)" & set "CURRENT=4" ) if /i "!SPEC!"=="%QUAD9%" ( set "KNOWN=Quad9" & set "CURRENT=5" ) if /i "!SPEC!"=="%CLOUDFLARE%" ( set "KNOWN=Cloudflare" & set "CURRENT=6" ) if /i "!SPEC!"=="%GOOGLE%" ( set "KNOWN=Google" & set "CURRENT=7" ) ) if /i "!MODE!"=="off" ( set "KNOWN=Off (no Private DNS)" & set "CURRENT=8" ) if /i "!MODE!"=="opportunistic" ( set "KNOWN=Automatic" & set "CURRENT=9" ) if defined KNOWN ( echo Status: set to !KNOWN!. echo. set "ANSWER=" set /p "ANSWER=Change to another resolver? [y/N]: " if /i not "!ANSWER!"=="Y" goto :summary echo. ) else ( echo Current setting is not in the known list. echo. ) echo [1] Adblock Mullvad adblock %MULLVAD% echo [2] Adblock AdGuard DNS %ADGUARD% echo [3] Adblock Control D (Adblock) %CTRLD_AD% echo [4] Malware Control D (Malware) %CTRLD_MAL% echo [5] Malware Quad9 %QUAD9% echo [6] Nofilter Cloudflare %CLOUDFLARE% echo [7] Nofilter Google %GOOGLE% echo [8] Nofilter Off (no Private DNS) echo [9] Nofilter Automatic (opportunistic) echo [Q] quit echo. :choose set "CHOICE=" set /p "CHOICE=Choose 1-9: " if /i "!CHOICE!"=="Q" goto :summary if "!CHOICE!"=="1" ( set "TARGET=%MULLVAD%" & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply ) if "!CHOICE!"=="2" ( set "TARGET=%ADGUARD%" & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply ) if "!CHOICE!"=="3" ( set "TARGET=%CTRLD_AD%" & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply ) if "!CHOICE!"=="4" ( set "TARGET=%CTRLD_MAL%" & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply ) if "!CHOICE!"=="5" ( set "TARGET=%QUAD9%" & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply ) if "!CHOICE!"=="6" ( set "TARGET=%CLOUDFLARE%" & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply ) if "!CHOICE!"=="7" ( set "TARGET=%GOOGLE%" & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply ) if "!CHOICE!"=="8" ( set "TARGET=" & set "TARGETMODE=off" & set "CHANGED=1" & goto :apply ) if "!CHOICE!"=="9" ( set "TARGET=" & set "TARGETMODE=opportunistic" & set "CHANGED=1" & goto :apply ) echo Invalid choice, try again. goto :choose :apply if defined CURRENT if "!CHOICE!"=="!CURRENT!" ( echo. echo Already on that setting - nothing to change. goto :summary ) echo. if /i "!TARGETMODE!"=="hostname" ( echo Setting Private DNS to !TARGET! ... ) else ( echo Setting Private DNS mode to !TARGETMODE! ... ) adb shell settings put global private_dns_mode !TARGETMODE! if /i "!TARGETMODE!"=="hostname" adb shell settings put global private_dns_specifier !TARGET! echo. echo Verifying ... for /f "usebackq delims=" %%A in (`adb shell settings get global private_dns_mode 2^>nul`) do set "NEWMODE=%%A" for /f "usebackq delims=" %%A in (`adb shell settings get global private_dns_specifier 2^>nul`) do set "NEWSPEC=%%A" set "NEWMODE=!NEWMODE:\r=!" set "NEWSPEC=!NEWSPEC:\r=!" echo Mode : !NEWMODE! echo Specifier: !NEWSPEC! if /i "!NEWMODE!"=="!TARGETMODE!" ( if /i not "!TARGETMODE!"=="hostname" ( echo. echo OK - applied. goto :pingtest ) if /i "!NEWSPEC!"=="!TARGET!" ( echo. echo OK - applied. goto :pingtest ) ) echo. echo Warning - value did not stick. A reboot or airplane-mode toggle may be needed. :pingtest echo. echo Testing ad domain resolution ... adb shell ping -c 1 googleads.g.doubleclick.net 2>&1 | findstr /i "unknown host PING bytes" goto :summary :: ------------------------------------------------------------------------ :: Summary - read the live state back off the device and describe it :: ------------------------------------------------------------------------ :summary echo. echo ======================================================================== echo Summary echo ======================================================================== for /f "usebackq delims=" %%A in (`adb shell settings get global private_dns_mode 2^>nul`) do set "SMODE=%%A" for /f "usebackq delims=" %%A in (`adb shell settings get global private_dns_specifier 2^>nul`) do set "SSPEC=%%A" set "SMODE=!SMODE:\r=!" set "SSPEC=!SSPEC:\r=!" set "SNAME=" set "SBLOCK=" if /i "!SMODE!"=="hostname" ( if /i "!SSPEC!"=="%MULLVAD%" ( set "SNAME=Mullvad adblock" & set "SBLOCK=yes - ads and trackers" ) if /i "!SSPEC!"=="%ADGUARD%" ( set "SNAME=AdGuard DNS" & set "SBLOCK=yes - ads and trackers" ) if /i "!SSPEC!"=="%CTRLD_AD%" ( set "SNAME=Control D (Adblock)" & set "SBLOCK=yes - ads and trackers" ) if /i "!SSPEC!"=="%CTRLD_MAL%" ( set "SNAME=Control D (Malware)" & set "SBLOCK=malware only, no ads" ) if /i "!SSPEC!"=="%QUAD9%" ( set "SNAME=Quad9" & set "SBLOCK=malware only, no ads" ) if /i "!SSPEC!"=="%CLOUDFLARE%" ( set "SNAME=Cloudflare" & set "SBLOCK=no" ) if /i "!SSPEC!"=="%GOOGLE%" ( set "SNAME=Google" & set "SBLOCK=no" ) if not defined SNAME ( set "SNAME=custom hostname" & set "SBLOCK=unknown - not in the known list" ) ) if /i "!SMODE!"=="off" ( set "SNAME=Off" & set "SBLOCK=no - Private DNS disabled" ) if /i "!SMODE!"=="opportunistic" ( set "SNAME=Automatic" & set "SBLOCK=no - whatever the network offers" ) if not defined SNAME ( set "SNAME=unrecognised" & set "SBLOCK=unknown" ) echo Mode : !SMODE! echo Resolver : !SNAME! echo Hostname : !SSPEC! echo Ad block : !SBLOCK! if defined CHANGED ( echo This run : changed ) else ( echo This run : no change made ) echo ======================================================================== goto :done :noadb echo Could not read settings from the device. echo Check that adb is on PATH and a device is connected ^(adb devices^). :done echo. pause endlocal :: ------------------------------------------------------------------------ :: end of adbdns.bat :: ------------------------------------------------------------------------
-- On Usenet we can have intelligent discussions with well-meaning people.