🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.advocacy
11 messages
11 total messages Started by Maria Sophia Sun, 29 Nov 2026 18:42
Do you have a free app that you like that contains advertisements?
#1523
Author: Maria Sophia
Date: Sun, 29 Nov 2026 18:42
28 lines
2605 bytes
Q: Do you have a free app that you like that contains advertisements?
A: ?

The thread on loss of hardware functionality morphed at one point to the 
loss of the FM radio, which can be partially replaced with streaming radio.
 From: "Carlos E.R." <robin_listas@es.invalid>
 Newsgroups: misc.phone.mobile.iphone,comp.mobile.android,comp.sys.mac.advocacy
 Subject: FM radio, or streaming radios.
 Date: Sat, 28 Nov 2026 21:34:47 +0100
 Message-ID: <7gqrtmxfcc.ln2@Telcontar.valinor>

In that thread, a cross-platform free streaming app was mentioned, 
so I picked it up, intending to remove the ads from it, if possible.
  <https://streema.com/mobile/>
  <https://play.google.com/store/apps/details?id=com.streema.simpleradio>
  <https://apps.apple.com/us/app/simple-radio-fm-am-stations/id891132290>

I've already written the code to scan for ads and trackers, but I haven't
yet written the code to remove ads from apps and repackage the app IPA/APK.

 *But first, what do ads even look like for you?*
 It's been years since I've seen an ad on my phone.

Do the ads you see look like this? 
 <https://i.postimg.cc/xTCy4sfM/simpleradio.jpg>

-- 
On Usenet, we teach what we know & others teach us what we didn't know.
Re: Do you have a free app that you like that contains advertisements?
#1524
Author: Maria Sophia
Date: Sun, 29 Nov 2026 18:59
11 lines
1885 bytes
Maria Sophia wrote:
> Do the ads you see look like this? 
>  <https://i.postimg.cc/xTCy4sfM/simpleradio.jpg>

Drat. I pressed the "Premium" button, and this flashes for a split second.
 <https://i.postimg.cc/SR6ykL77/freetrial.jpg>

So we need to wait a week before asking that question of *that* app.
But the question is still valid for *any* app that shows ads on day 1.

What app do you like that has ads that I can test if I can remove them?
Re: Do you have a free app that you like that contains advertisements?
#1529
Author: The Real Bev
Date: Sun, 29 Nov 2026 19:24
14 lines
1780 bytes
On 11/29/26 10:42, Maria Sophia wrote:
> Q: Do you have a free app that you like that contains advertisements?
> A: ?

Classic Words (Android), a perfect Scrabble game which only shows popup 
ads if you're connected.  Since I'm in airplane mode almost all the time 
I rarely see them.

-- 
Cheers, Bev
   "I love this country...
   ...and the freedoms we used to have..."
                      --George Carlin
Re: Do you have a free app that you like that contains advertisements?
#1532
Author: Lawrence D’Oliveiro
Date: Sun, 29 Nov 2026 19:30
8 lines
1578 bytes
On Sun, 29 Nov 2026 13:42:23 -0500, Maria Sophia wrote:

> Q: Do you have a free app that you like that contains
> advertisements?

I suppose you mean proprietary freeware
<https://en.wikipedia.org/wiki/Freeware> rather than Free software
<https://en.wikipedia.org/wiki/Free_software> ...
Re: Do you have a free app that you like that contains advertisements?
#1534
Author: Maria Sophia
Date: Sun, 29 Nov 2026 20:06
45 lines
3524 bytes
The Real Bev wrote:
> On 11/29/26 10:42, Maria Sophia wrote:
>> Q: Do you have a free app that you like that contains advertisements?
>> A: ?
> 
> Classic Words (Android), a perfect Scrabble game which only shows popup 
> ads if you're connected.  Since I'm in airplane mode almost all the time 
> I rarely see them.

Hi The Real Bev,

Ah, perfect!
I love a team effort!

Everyone pushes the ball forward. Together. Working as a well-honed team!

Thanks for coming through for the team, where you seem to suggest this:
 <https://play.google.com/store/apps/details?id=com.lulo.scrabble.classicwords>
  (marked "Contains ads")
There's also a paid, ad-free sibling, Classic Words Plus, from the same
developer (~$9.90 on Play) but, of course, my phone can't buy anything.

For the iOS team, it's also apparently on iOS but we won't try removing
the ads from the iOS IPA until after we're successful on the Android APK.
 <https://apps.apple.com/lb/app/classic-words-solo-word-game/id670587290>
 "Classic Words (solo word game)", Lulo Apps
Although there are more than one Lulo word-game listings on the App Store.

Backing up your claims, it appears that Classic Words serves its
interstitial ads through Google's ad stack, so on a device with no Google
services and no connectivity to those networks, the ad requests might
simply fail which may be why you "rarely see them" in airplane mode.

The game itself is apparently designed to run offline since it's a pure
single-player vs AI word game with no server dependency, as far as I see.

Since I don't have a Google Play Store account, I installed it off the
Google Play repository using Aurora as the Google Play Store app instead.

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)?
Re: Do you have a free app that you like that contains advertisements?
#1580
Author: Chris
Date: Mon, 30 Nov 2026 08:14
6 lines
1488 bytes
Maria Sophia <mariasophia@comprehension.com> wrote:
> Q: Do you have a free app that you like that contains advertisements?
> A: ?

Several. Like Flightradar24 and Reddit. 
Re: Do you have a free app that you like that contains advertisements?
#1584
Author: Maria Sophia
Date: Mon, 30 Nov 2026 09:52
224 lines
8343 bytes
Chris wrote:
>> Q: Do you have a free app that you like that contains advertisements?
>> A: ?
> 
> Several. Like Flightradar24 and Reddit.

Thanks for suggesting apps you use where you would recognize where ads
should be, since I don't see ads, so I don't even know where they go.
 <https://i.postimg.cc/5yBb7sQL/flightradarsetup.jpg> (this is genius!)
 <https://i.postimg.cc/NFkZrMz1/reddit.jpg> (this requires an account)

Your suggestion of FlightRadar is sheer genius for this thread because it
literally lists each and every ad SDK that it has incorporated into it.

That listing is going to be wonderful later when I run scanads.bat on it.

This is a critically important thread since it covers ground nobody knows.
Not even me. Nor you. Nor anyone. Yet. But we can solve it, as a team.

I'll install any app that doesn't require a privacy-robbing account to test.
But since I've not seen an ad in years, I need apps that others know well.

Do you know these two apps well enough such that if I screenshot them, you
can help me determine if my tests worked out to remove ads from the apps?

 FlightRadar24
  <https://www.flightradar24.com/>
  <https://apps.apple.com/us/app/flightradar24-flight-tracker/id382233851>
  <https://play.google.com/store/apps/details?id=com.flightradar24free>

 Reddit
  <https://www.reddit.com/>
  <https://apps.apple.com/us/app/reddit/id1064216828>
  <https://play.google.com/store/apps/details?id=com.reddit.frontpage>

Since I don't have a privacy-robbing mothership account on Android, I'll
try that first, because proof of concept is the first step to solving this.

FlightRadar24
1. I installed it from the Google Repo w/o using a Google Account 
2. Upon opening, it knew my area (based on my IP address at that time)
3. I turned off the main Analytics, Crash reporting & Performance 
    monitoring in the main settings
4. In the Privacy Preferences Center settings, I turned off the "targeted" 
    buttons for Advertising, Marketing, Analytics, Functional & Use my 
    personal information.
5. In the "Manage our partners" settings, I turned off, OMG, there are 
    27 different items, which will be very useful to turn on one by one!
    a. AppLovin Corp. 
    b. Equativ
    c. fluct
    d. Google Ads Measurement
    e. Google Adsense
    f. Google Advertising Products
    g. Google Analytic Products
    h. Google IMA
    i. Google Publisher Tags
    j. Google Safeframe
    k. Google Tag
    l. Index Exchange Inc.
    m. Liftoff Montetize and Vungle Exchange
    n. Magnite, Inc.
    o. Media.net Advertising FZ-LLC
    p. MetaAds
    q. Mobfox US LLC
    r. Moloco, Inc.
    s. Nexxen Group LLC
    t. OneTag Limited
    u. OpenX
    v. Pangle
    w. PubMatic, Inc
    x. The UK Trade Desk Ltd
    y. Triple Lift, Inc.
    z. Verve Group Europe GmbH
    +. Yieldmo, Inc.
So I saved that setup, but this is stuff I'm sure everyone already does.
 <https://i.postimg.cc/5yBb7sQL/flightradarsetup.jpg>

N.B. Some are advertising platforms, some measurement services, and some
web advertising technologies, so not all are advertising SDKs themselves.

Note to self: There's a user token, which I will save for the future, so I
can find out to wipe it out at will, likely by uninstall/reinstall methods.

So now the question is what do I need to do to see those ads on this app?
I don't see any ads yet, but that's why I want to test apps others know.

Moving on to Reddit, drat. I installed it but it won't run unless I provide
it with personal information, which is a Google account, a phone number, or
an email. Let's try giving it a completely bogus email address first... 

Drat. It says "Sign in another way" and "View options".but those options
are merely "Use a different device" or "Open Google Password Manager".

Let's see what it does with "Continue with Google". Nope. Nothing works.
 <https://i.postimg.cc/NFkZrMz1/reddit.jpg>
So I deleted Reddit as it can't be run w/o logging into it in some manner.

Let's concentrate on FlightRadar for now out of these two suggestions.
One GREAT thing about this suggestion is I used it to improve scanads.bat.

My scanads.bat advertising SDK scanner looks for DEX class descriptors,
whereas some advertising technologies in FlightRadar24 are apparently
implemented as web scripts, dynamically loaded code or external services.

What I learned just from installing this wonderfully useful FlightRadar24
test was my scanads.bat script had at least four important scanning gaps.
 A. Incomplete package signatures
 B. Web advertising
 C. Native libraries
 D. Dynamic loading

a. An example of an incomplete package sig is I was already scanning 
   for "com/applovin/mediation" but other AppLovin components can use 
   different package paths. 

b. An example of the web advertising is my DEX scan won't find their 
   implementation because they can be javascript based.

c. Similarly, I scan DEX files but not .so native libraries.

d. Likewise, if code is downloaded after installation, then it won't
   likely exist in the APK/IPA when I scan it on the desktop.

Here's what I may *add* to the scanads_sdk_ads.txt pattern-matching file.   
   com/applovin/sdk
   com/applovin/impl
   com/google/android/gms/ads
   com/google/ads
   com/google/ads/interactivemedia
   com/google/android/exoplayer2/ext/ima
   com/google/android/ump
   com/google/android/ads
   com/facebook/ads
   com/facebook/applinks
   com/facebook/appevents
   com/equativ
   com/indexexchange
   com/magnite
   com/mediamath
   com/openx
   com/pubmatic
   com/triplelift
   com/yieldmo
   com/moloco
   com/pangle
   com/bytedance/sdk
   com/mobfox
   com/media/net
   com/nexxen
   com/verve
   com/onetag
   com/mopub
   com/ironsource
   com/chartboost
   com/inmobi
   com/mintegral
   com/amazon/device/ads
   com/unity3d/ads
   
And, given FlightRadar24 has 14 trackers according to Muntashirakon App
Manager, here's what I may add to the scanads_sdk_trackers.txt patterns.
   com/adjust/sdk
   com/appsflyer
   com/kochava
   com/singular/sdk
   io/branch/referral
   com/airbridge
   com/tenjin
   com/leanplum
   com/mixpanel
   com/amplitude
   com/segment
   com/onesignal
   com/clevertap
   com/braze
   com/firebase/analytics
   com/google/firebase/analytics

But first I have to check that each is appropriate since some may simply be 
the result of web advertising technologies rather than incorporated SDKs.

In summary, please check my screenshots and let me know where/how/when I 
should see advertisements in FlightRadar24 because so far, I don't see 'em.
-- 
The best thing about Usenet is learning something useful from someone else.





































     
Re: Do you have a free app that you like that contains advertisements?
#1585
Author: Maria Sophia
Date: Mon, 30 Nov 2026 11:17
151 lines
10640 bytes
Maria Sophia wrote:
> Thanks for suggesting apps you use where you would recognize where ads
> should be, since I don't see ads, so I don't even know where they go.
>  <https://i.postimg.cc/5yBb7sQL/flightradarsetup.jpg> (this is genius!)

I must thank Chris for the suggestion of FlightRadar24 because that app 
seems to be especially up front about allowing us to turn off the targeting
in the ads that it shows up (but not the ads themselves, apparently).

And, in digging into WHY I don't see any ads in FlightRadar24 (not yet 
anyway), I learned that my device has no working Play Store billing, which 
maybe simply means no properly signed-in Google account exists.

But maybe that is the Play Services condition breaking AdMob?
I don't know. (I never purposefully aimed to remove ads per se.)

All I know is I can't get an app to show ads for the life of me.

To see why I don't see ads in FlightRadar24 (yet anyway), I looked deeper.
 adb shell dumpsys package com.flightradar24free | findstr /i "versionName firstInstallTime lastUpdateTime"
    versionName=11.14.0
    lastUpdateTime=2026-11-30 00:37:26
      firstInstallTime=2026-11-30 00:37:26
      firstInstallTime=1969-12-31 16:00:00
 adb shell pm path com.flightradar24free
  package:/data/app/~~PpHPs4LBi5JiwZZ3oJNrng==/com.flightradar24free-aOze8U3i1XTRhj68gqVNeg==/base.apk
  package:/data/app/~~PpHPs4LBi5JiwZZ3oJNrng==/com.flightradar24free-aOze8U3i1XTRhj68gqVNeg==/split_config.arm64_v8a.apk
  package:/data/app/~~PpHPs4LBi5JiwZZ3oJNrng==/com.flightradar24free-aOze8U3i1XTRhj68gqVNeg==/split_config.xhdpi.apk
 adb shell unzip -l /data/app/~~PpHPs4LBi5JiwZZ3oJNrng==/com.flightradar24free-aOze8U3i1XTRhj68gqVNeg==/base.apk | findstr /i "applovin admob ads"
       64  1981-01-01 01:01   ads-mobile-sdk.properties
      704  1981-01-01 01:01   res/drawable/admob_close_button_white_cross.xml
       13  1981-01-01 01:01   META-INF/androidx.privacysandbox.ads_ads-adservices-java.version
       94  1981-01-01 01:01   play-services-ads-identifier.properties
      988  1981-01-01 01:01   res/drawable/admob_close_button_white_circle_black_cross.xml
       63  1981-01-01 01:01   META-INF/vungle-ads_release.kotlin_module
      988  1981-01-01 01:01   res/drawable/admob_close_button_black_circle_white_cross.xml
       13  1981-01-01 01:01   META-INF/androidx.privacysandbox.ads_ads-adservices.version
The ad SDKs are definitely in the build, as shown by AdMob & Vungle.

I pulled the base APK to look at it on the desktop.
 adb pull /data/app/~~PpHPs4LBi5JiwZZ3oJNrng==/com.flightradar24free-aOze8U3i1XTRhj68gqVNeg==/base.apk C:\app\editor\android\scrcpy\fr24.apk
  /data/app/~~PpHPs4LBi5JiwZZ3oJNrng==/com.fligh... skipped. 3.4 MB/s (60177235 bytes in 17.106s)

I put the manifest in a readable state with this command.
 java -jar C:\app\editor\android\apk\apktool\apktool.jar d -s -f C:\app\editor\android\scrcpy\fr24.apk -o C:\app\editor\android\scrcpy\fr24_decoded

 findstr /i /c:"ads" /c:"admob" /c:"vungle" /c:"applovin" /c:"AD_ID" /c:"APPLICATION_ID" C:\app\editor\android\scrcpy\fr24_decoded\AndroidManifest.xml
  <activity ... android:name="com.inmobi.ads.rendering.InMobiAdActivity" .../>
  <activity ... android:name="com.inmobi.ads.rendering.InMobiInAppBrowserActivity" .../>
 This tell us InMobi's ad-rendering code is declared in the manifest.
  <provider android:authorities="com.flightradar24free.vungle-provider"
          android:exported="false" android:initOrder="102"
          android:name="com.vungle.ads.VungleProvider"/>
 Same with Vungle.

First, some baseline housekeeping tabs to set the record straight.
 adb shell pm list packages | findstr com.google.android.gms
  package:com.google.android.gms
  package:com.google.android.gms.location.history
  package:com.google.android.gms.supervision
 adb shell pm list packages -u | findstr com.google.android.gms
  package:com.google.android.gms
  package:com.google.android.gms.location.history
  package:com.google.android.gms.supervision
 adb shell dumpsys package com.flightradar24free | findstr /i "AD_ID INTERNET ACCESS_NETWORK_STATE"
      android.permission.INTERNET
      android.permission.ACCESS_NETWORK_STATE
      com.google.android.gms.permission.AD_ID
      android.permission.ACCESS_ADSERVICES_AD_ID
      android.permission.ACCESS_ADSERVICES_AD_ID: granted=true
      android.permission.INTERNET: granted=true
      android.permission.ACCESS_NETWORK_STATE: granted=true
      com.google.android.gms.permission.AD_ID: granted=true

Let's prove GMS is genuine & current but no Google account exists.
 adb shell dumpsys package com.google.android.gms | findstr /i "versionName signatures"
    Signatures: [7C:E8:3C:1B:71:F3:D5:72:FE:D0:4C:8D:40:C5:CB:10:FF:75:E6:D8:7D:9D:F6:FB:D5:3F:04:68:C2:90:50:53]
    versionName=26.45.31 (190400-1020418964)
    signatures=PackageSignatures{3fdbde1 version:3, signatures:[98deb0ca], past signatures:[e3ca78d8 flags: 17, 98deb0ca flags: 17]}
    versionName=23.16.13 (190400-527363516)
    signatures=PackageSignatures{58a51c7 version:0, signatures:[], past signatures:[]}
 adb shell dumpsys account | findstr /i "com.google"
    ServiceInfo: AuthenticatorDescription {type=com.google}, ComponentInfo{com.google.android.gms/com.google.android.gms.auth.account.authenticator.GoogleAccountAuthenticatorService}, uid 10218
    ServiceInfo: AuthenticatorDescription {type=com.google}, ComponentInfo{com.google.android.gms/com.google.android.gms.auth.account.authenticator.GoogleAccountAuthenticatorService}, uid 1110218
    ServiceInfo: AuthenticatorDescription {type=com.google.work}, ComponentInfo{com.google.android.gms/com.google.android.gms.auth.account.authenticator.WorkAccountAuthenticatorService}, uid 1110218

Notice Play Services is present, and every ad-related permission is granted.
 a. The manifest says the ad components are declared. 
 b. The permissions say they're allowed. 
 c. Play Services says the dependency exists. 
Which means everything static says ads should run.

Here's my dynamic test to see what ads FlightRadar24 "tries" to pop up.
In command window #2: (set up for later)
 I get ready to launch Flight Radar to see what it does at startup.
 adb shell monkey -p com.flightradar24free -c android.intent.category.LAUNCHER 1
 adb shell pidof com.flightradar24free
  4842

In command window #1 (I clear and capture the log file first)
 adb shell am force-stop com.flightradar24free
 adb shell am force-stop com.flightradar24free
 adb shell pidof com.flightradar24free
 adb logcat -c
 adb logcat -v threadtime > C:\app\editor\android\scrcpy\fr24_v2.log
 I let the app sit on screen for ~30 seconds, then Ctrl-C stops the log.

After about a minute, I control+C killed the logging & grepped for ads.
 findstr /i /c:"Vungle" /c:"InMobi" /c:"Ads" /c:"GMA" C:\app\editor\android\scrcpy\fr24_v2.log
  11-30 02:51:03.456  4152  4152 I SDHMS:LOAD: type: LoadsFreqs, value: 0:0:7:1122300:1418000:725000:1153300:2000000:500000:210:390:0
  11-30 02:51:03.770  4152  4152 I SDHMS:LOAD: type: LoadsFreqs, value: 0:0:0:0:0:0:0:0:0:0:0:0
  11-30 02:51:03.908  1469  1843 D SilentRoamingManager: updatePnoNetworkList SSIDs { "SFO Free WiFi", "SJC Public Wi-Fi" }
  11-30 02:51:03.934  3139  3262 I SettingManager_FLP: LocationPowerSave is changed to true by screen state
 None of those are from the FlightRadar24 app PID 4842.

 And yet, plenty of lines were from that process ID.
 findstr /c:"4842" C:\app\editor\android\scrcpy\fr24_v2.log

That revealed some interesting things though, as Google can't bill me.
 E GoogleApiManager: java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'.
 E GoogleApiManager: ConnectionResult{statusCode=DEVELOPER_ERROR ...}
 E [Purchases] - ERROR: Billing is not available in this device ... BILLING_UNAVAILABLE

Hmmm... AdMob is a Play Services client. 
If GoogleApiManager can't establish a connection and returns DEVELOPER_ERROR, 
maybe the Mobile Ads SDK cannot initialize as an uninitialized AdMob means no 
ad requests, no fill, no ads. 

Vungle and InMobi are separate SDKs, but FR24's mediation likely routes through 
AdMob as the primary, so a dead AdMob maybe can suppress the whole waterfall?

Apparently the GoogleApiManager failure only breaks the Google client libraries.
But those are the ad stack most likely.
The log shows which Google component was involved: 
 policy_maps_core_dynamite

This is the dynamically-loaded Maps SDK. 
It tried to reach GMS, got Unknown calling package name, and gave up. 

Maybe AdMob makes the same kind of call and fails the same way?

So the picture that's forming is perhaps something like this sequence:
 a. network fine, core app fine
 b. Google-dependent services broken
 c. So FlightRadar24 shows planes but no ads

I'm not sure if this is exactly WHY I see no ads though.
I'll keep digging as I lost the cability to display ads accidentally.

But first... 
Can someone explain to me what the ads look like in any given app?
Re: Do you have a free app that you like that contains advertisements?
#1597
Author: Maria Sophia
Date: Mon, 30 Nov 2026 14:10
92 lines
6034 bytes
Maria Sophia wrote:
> I'll keep digging as I lost the cability to display ads accidentally.

I'm digging to see what exactly it is that kills ads on our devices.
I press unlock features and it says billing error 3 (BILLING_UNAVAILABLE). 

This shows AdMob initializing successfully when "touching" FlightRadar24.
 adb logcat -c
 (then I move around in FlightRadar24)
 adb logcat -v threadtime | findstr /i "Ads AdMob GMA AdsSdk"
  ...
  ads_mobile_sdk.r31.<init>(SourceFile:37)
  ads_mobile_sdk.lz3.invokeSuspend(SourceFile:238)
  ...

Looking it up, ads_mobile_sdk is the Google Mobile Ads SDK, which is
apparently running inside FR24's process (PID 4842). It's constructing 
a WebView (which is the component AdMob uses to render HTML creatives). 
The WebView then registers a network callback, which is normal behavior.

So AdMob is not dead. 
 a. It initialized, it spun up a WebView, a
 b. and it's reaching for the network. 
 c. But the request went out and came back empty, or was never filled.

Digging deeper... 
 adb logcat -c
 adb logcat -v threadtime | findstr /i /c:"AdsSdk" /c:"onAdFailedToLoad" /c:"AdRequest" /c:"NoFill" /c:"onAdLoaded"
 (then I moved around in FlightRadar24 to try to trigger an ad)

adb logcat -v threadtime | findstr /i /c:"AdsSdk" /c:"onAdFailedToLoad" /c:"AdRequest" /c:"NoFill" /c:"onAdLoaded"
 11-30 04:48:03.725 26715 20944 D ConnectivityManager: StackLog: 
 [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4300)] 
 [android.net.ConnectivityManager.registerDefaultNetworkCallbackForUid(ConnectivityManager.java:4864)] 
 [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4831)]
 [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4805)]
 [com.google.android.gms.ads.internal.state.e.d(:com.google.android.gms@264531029@26.45.31 
 (190400-1020418964):156)] [ajoh.e(:com.google.android.gms@264531029@26.45.31 (190400-1020418964):58)] 
 [com.google.android.gms.ads.AdRequestBrokerChimeraService.a(:com.google.android.gms@264531029@26.45.31 
 (190400-1020418964):4)] [docu.a(:com.google.android.gms@264531029@26.45.31 (190400-1020418964):3)] 
 [doem.d(:com.google.android.gms@264531029@26.45.31 (190400-1020418964):3)] 
 [doen.a(:com.google.android.gms@264531029@26.45.31 (190400-1020418964):230)] 
 [brng.onTransact(:com.google.android.gms@264531029@26.45.31 (190400-1020418964):60)]

Reading this bottom up, 
 AdRequestBrokerChimeraService.a(...)
 com.google.android.gms.ads.internal.state.e.d(...)
 registerDefaultNetworkCallback(...

Looking it up, AdRequestBrokerChimeraService is apparently the GMS-side
service that handles ad requests on behalf of apps. It's executing in 
the GMS process (PID 26715) and it's registering a network callback.

So the chain is alive that AdMob is running inside Play Services 
and actively building an ad request so the ad request goes out, 
but there's no onAdLoaded or onAdFailedToLoad afterward.

Maybe it's related to the billing error 3 (BILLING_UNAVAILABLE)?
But maybe it's due to the DNS? Dunno. 

Let me check as it's important to know HOW to block all ads.
 adb shell settings get global private_dns_mode
  hostname
 adb shell settings get global private_dns_specifier
  adblock.dns.mullvad.net
 adb shell ping -c 1 googleads.g.doubleclick.net
  ping: unknown host googleads.g.doubleclick.net
 adb shell ping -c 1 pagead2.googlesyndication.com
  ping: unknown host pagead2.googlesyndication.com

So we have DNS blocking going on:
 private_dns_mode = hostname
 private_dns_specifier = adblock.dns.mullvad.net

Where ad domains fail to resolve:
 ping: unknown host googleads.g.doubleclick.net
 ping: unknown host pagead2.googlesyndication.com

Ah. It was so simple. This can be replicated on any phone.
 adb shell settings put global private_dns_mode hostname
 adb shell settings put global private_dns_specifier adblock.dns.mullvad.net

I may write a script which can compare against various DNS blocks.
 adb shell settings put global private_dns_mode hostname
 adb shell settings put global private_dns_specifier dns.adguard-dns.com

To check your current DNS ad-blocking setup:
 adb shell settings get global private_dns_mode
 adb shell settings get global private_dns_specifier
 adb shell ping -c 1 googleads.g.doubleclick.net
-- 
On Usenet, we teach what we know and learn from others what we don't.
Re: Do you have a free app that you like that contains advertisements?
#1598
Author: Maria Sophia
Date: Mon, 30 Nov 2026 14:33
258 lines
11766 bytes
Maria Sophia wrote:
> I may write a script which can compare against various DNS blocks.
>  adb shell settings put global private_dns_mode hostname
>  adb shell settings put global private_dns_specifier dns.adguard-dns.com

OK. Since every thread should strive to add value that wasn't there, 
below is a simple Windows batch script which checks/sets DNS for us.

 C:\app\editor\android\scrcpy> dir adbdns*
  Directory of C:\app\editor\android\scrcpy
   11/30/2026  04:26 PM             7,606 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:26 PM             7,606 adbdns.bat_v1p4.txt
 
 C:\app\editor\android\scrcpy> adbdns.bat
 === Private DNS check ===
 
 Mode     : hostname
 Specifier: p2.freedns.controld.com
 
 Status: set to Control D.
 
 Change to another resolver? [y/N]: y
 
   [1]  AD BLOCK    Mullvad adblock   - adblock.dns.mullvad.net
   [2]  AD BLOCK    AdGuard DNS       - dns.adguard-dns.com
   [3]  AD BLOCK    Control D         - p2.freedns.controld.com
   [4]  MALWARE     Quad9             - dns.quad9.net
   [5]  none        Cloudflare        - one.one.one.one
   [6]  none        Google            - dns.google
   [7]  none        Off (no Private DNS)
   [8]  none        Automatic (opportunistic)
   [Q]  quit
 
 Choose 1-8: 1
 
 Setting Private DNS to adblock.dns.mullvad.net ...
 
 Verifying ...
 Mode     : hostname
 Specifier: adblock.dns.mullvad.net
 
 OK - applied.
 
 Testing ad domain resolution ...
 ping: unknown host googleads.g.doubleclick.net
 
 ========================================================================
  SUMMARY
 ========================================================================
  Mode      : hostname
  Resolver  : Mullvad adblock
  Hostname  : adblock.dns.mullvad.net
  Ad block  : yes - ads and trackers
  This run  : changed
 ========================================================================
 
 Press any key to continue . . .
 C:\app\editor\android\scrcpy>
 
 
 C:\app\editor\android\scrcpy> type adbdns.bat
 :: ------------------------------------------------------------------------
 :: adbdns.bat
 ::  Checks and sets ad-blocking DNS
 :: ------------------------------------------------------------------------
 :: 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
 :: ------------------------------------------------------------------------
 @echo off
 setlocal EnableDelayedExpansion
 
 set "MULLVAD=adblock.dns.mullvad.net"
 set "ADGUARD=dns.adguard-dns.com"
 set "CTRLD=p2.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%"      ( set "KNOWN=Control D"        & set "CURRENT=3" )
     if /i "!SPEC!"=="%QUAD9%"      ( set "KNOWN=Quad9"            & set "CURRENT=4" )
     if /i "!SPEC!"=="%CLOUDFLARE%" ( set "KNOWN=Cloudflare"       & set "CURRENT=5" )
     if /i "!SPEC!"=="%GOOGLE%"     ( set "KNOWN=Google"           & set "CURRENT=6" )
 )
 if /i "!MODE!"=="off"           ( set "KNOWN=Off (no Private DNS)" & set "CURRENT=7" )
 if /i "!MODE!"=="opportunistic" ( set "KNOWN=Automatic"            & set "CURRENT=8" )
 
 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]  AD BLOCK    Mullvad adblock   - %MULLVAD%
 echo   [2]  AD BLOCK    AdGuard DNS       - %ADGUARD%
 echo   [3]  AD BLOCK    Control D         - %CTRLD%
 echo   [4]  MALWARE     Quad9             - %QUAD9%
 echo   [5]  none        Cloudflare        - %CLOUDFLARE%
 echo   [6]  none        Google            - %GOOGLE%
 echo   [7]  none        Off (no Private DNS)
 echo   [8]  none        Automatic (opportunistic)
 echo   [Q]  quit
 echo.
 
 :choose
 set "CHOICE="
 set /p "CHOICE=Choose 1-8: "
 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%"      & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply )
 if "!CHOICE!"=="4" ( set "TARGET=%QUAD9%"      & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply )
 if "!CHOICE!"=="5" ( set "TARGET=%CLOUDFLARE%" & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply )
 if "!CHOICE!"=="6" ( set "TARGET=%GOOGLE%"     & set "TARGETMODE=hostname" & set "CHANGED=1" & goto :apply )
 if "!CHOICE!"=="7" ( set "TARGET="             & set "TARGETMODE=off"      & set "CHANGED=1" & goto :apply )
 if "!CHOICE!"=="8" ( 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%"      ( set "SNAME=Control D"       & set "SBLOCK=yes - ads and trackers" )
     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 pass along knowledge that once we had to learn ourselves.

 
 
 
Re: Do you have a free app that you like that contains advertisements?
#1603
Author: Maria Sophia
Date: Mon, 30 Nov 2026 17:43
296 lines
14361 bytes
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads