Support Videoland: hide ads for Plus/Premium subscribers (Bedrock Streaming) #13

Closed
opened 2026-10-10 10:50:22 +02:00 by midas · 6 comments
Owner

Support a new app, Videoland (nl.rtl.videoland.v2), with a Hide ads patch.

Background

The user has a paid Plus/Premium subscription. Since 2026 Videoland also shows ads on these
tiers: there are no ad breaks during playback, but there are ads before and after playback
and a still "pause ad" overlay when you pause. (iCulture,
ID.nl,
Emerce)

Scope

In scope: hiding the ads the app shows a Plus/Premium subscriber, i.e. pause ads, pre/post-roll
around playback, display/banner ads (GAM, L-banner) in the UI.

Out of scope (AGENTS.md hard rule): anything that unlocks tier features, such as:

  • removing the mid-roll ad breaks of the Basis (ad-supported) tier, since those are what
    separates Basis from Plus;
  • touching entitlement/offer/subscription checks (isPremium, offer/pack/product models, Gigya
    account data), downloads, screen limits, DRM.

The hook must sit in the ad layer itself, not in "which subscription does the user have". If
the only working choke point turns out to be a subscription/offer check, stop and report back.

First findings (APK 1.115.2, pulled from the phone)

  • Three splits (base, arm64_v8a, xxxhdpi), merged to apks/nl.rtl.videoland.v2-1.115.2.apk.
  • Built on Bedrock Streaming (the M6/RTL platform, com.bedrockstreaming.*, ~7.9k
    references). Most of its class names are unobfuscated in the dex (including toothpick
    __Factory classes), which is promising for stable fingerprints.
  • Player: Media3/ExoPlayer (com.bedrockstreaming.plugin.exoplayer, androidx.media3). No
    Google IMA (com.google.ads.interactivemedia: 0 hits); Bedrock has its own VAST ad engine.
  • Ad-related classes:
    • feature/adengine/domain/pausead/PauseAdCoordinatorImpl,
      .../pausead/usecase/GetFirstPlayablePauseAdItemUseCaseImpl,
      data/repository/PauseAdRequesterRepositoryImpl: pause ads
    • feature/adengine/domain/requester/AdEngineAdRequester, AdEngineAdRequestUrlData,
      AdEngineJingles, data/repository/AdEngineAdRequesterRepositoryImpl,
      data/datasource/RemoteAdEngineDataSource, data/config/AdEngineConfigImpl: VAST
      pre/post-roll
      requests (+ jingles, the "advertising" bumpers)
    • feature/adengine/domain/adsloader/AdEngineAdsLoader(Provider),
      domain/adhandler/AdsLoaderAdHandlerFactory, AdsQueueAdHandlerFactory,
      domain/player/AdsQueuePlayerComponent: the Media3 AdsLoader / ads queue
    • feature/adengine/domain/lbanner/* (LBannerManagerImpl, LBannerAdRequester): L-shaped
      banner around the player
    • plugin/displayad/gam/breakvertising/model/GamAdData + com.google.android.gms.ads.*
      (AdManagerAdRequest, AdView): GAM display ads
    • component/ad/limiter/* (InterstitialAdLimiter, AdvertisingCapping): frequency capping
    • feature/player/presentation/mobile/control/ad/MobileAdControl,
      MobileAdPlayingControlView, MobileLegacyPauseAdControlView: ad UI in the player
    • feature/player/domain/dai/* (DefaultIsDaiAssetUseCase, DefaultDaiPluginFactory) and
      plugin/yospace: server-side ad insertion (DAI/Yospace, probably live TV). Stitched
      ads are part of the stream; see question below.
  • Other trackers present (not part of this patch): NPAW, Snowplow, Tealium, New Relic,
    AppsFlyer, Salesforce, Usabilla, Open Measurement.

Research questions

  • Which ad types actually show up on a Plus/Premium account in this version: pause ad,
    pre-roll, post-roll, jingle, L-banner, GAM display in the home/catalog, live TV DAI?
    (device check with logcat, see Method)
  • How does the app decide whether a given playback gets ads? Server-driven (ad config /
    VMAP in the playback/layout response, AdEngineConfigImpl, remote config), or locally
    per offer? This decides where the safe choke point is and whether it touches the
    subscription (out of scope, see above).
  • Pause ads: can PauseAdCoordinatorImpl / GetFirstPlayablePauseAdItemUseCaseImpl return
    "no ad" (null / empty / Result failure) so the player just shows the normal pause state?
  • Pre/post-roll: is there a single choke point in AdEngineAdRequester /
    AdEngineAdRequesterRepositoryImpl / AdEngineAdsLoaderProvider where "no ads" is already
    a handled case (empty VAST, no ads loader)? Prefer that over the Media3 AdsLoader
    internals.
  • L-banner and GAM display ads: same approach (LBannerManagerImpl, GAM requester).
  • DAI/Yospace: are server-side stitched ads used for VOD on Plus/Premium, or only for live
    TV? Stitched ads can't be left out client-side, only skipped (seek over ad periods). That
    is more fragile and possibly a separate decision; report before building it.
  • Does playback start immediately without an ad (no spinner, no error, no
    "ad blocker detected" path)? Main risk.
  • Is anything verified server-side (ad tracking beacons as playback precondition)?

Method

  1. .\scripts\decompile.ps1 on the 1.115.2 APK (running). Delegate the broad search through
    decompiled/ to an Explore/Sonnet subagent; read the relevant files yourself.
  2. Verify class/method names are really unobfuscated in the dex before fingerprinting on them
    (add-patch skill).
  3. On the device (with the user's OK): unpatched app, play a film/series episode and pause;
    adb logcat filtered on adengine|PauseAd|LBanner|Vast|yospace|ExoPlayer to confirm which
    flows run on this account.
  4. Fingerprint on unobfuscated Bedrock types/strings, never on obfuscated names (AGENTS.md).

Deliverables

  • docs/apps/videoland.md: platform, ad flows, chosen hooks and why, what the injected
    smali does, and the scope boundary above.
  • patches/.../videoland/shared/Constants.kt: COMPATIBILITY_VIDEOLAND (package
    nl.rtl.videoland.v2, launcher name, icon colour, signing cert SHA-256 from base.apk,
    apkFileType for the split/XAPK download, tested version 1.115.2).
  • Patch Hide ads (videoland/ads/), meeting the definition of done in AGENTS.md:
    build, Applied: Hide ads on the real APK, device test: play, pause (no pause ad), resume,
    play to the end / next episode, live TV channel if applicable, no crash in logcat.
  • Check that the app update check (app-update-check.yml) picks up the new package
    (APKPure XAPK for nl.rtl.videoland.v2).
  • Commit as feat(videoland): ... on dev (pre-release; ask before pushing).
Support a new app, **Videoland** (`nl.rtl.videoland.v2`), with a **Hide ads** patch. ## Background The user has a paid **Plus/Premium** subscription. Since 2026 Videoland also shows ads on these tiers: there are no ad breaks during playback, but there are ads before and after playback and a still "pause ad" overlay when you pause. ([iCulture](https://www.iculture.nl/nieuws/videoland-reclames-duurdere-bundels/), [ID.nl](https://id.nl/huis-en-entertainment/beeld-en-geluid/tv/videoland-bevestigt-reclame-komt-ook-naar-plus-en-premium), [Emerce](https://emerce.nl/nieuws/videoland-trekt-stekker-uit-reclamevrije-abonnementen)) ## Scope In scope: hiding the ads the app shows a Plus/Premium subscriber, i.e. pause ads, pre/post-roll around playback, display/banner ads (GAM, L-banner) in the UI. **Out of scope** (AGENTS.md hard rule): anything that unlocks tier features, such as: - removing the mid-roll ad breaks of the **Basis** (ad-supported) tier, since those are what separates Basis from Plus; - touching entitlement/offer/subscription checks (`isPremium`, offer/pack/product models, Gigya account data), downloads, screen limits, DRM. The hook must sit in the ad layer itself, not in "which subscription does the user have". If the only working choke point turns out to be a subscription/offer check, stop and report back. ## First findings (APK 1.115.2, pulled from the phone) - Three splits (`base`, `arm64_v8a`, `xxxhdpi`), merged to `apks/nl.rtl.videoland.v2-1.115.2.apk`. - Built on **Bedrock Streaming** (the M6/RTL platform, `com.bedrockstreaming.*`, ~7.9k references). Most of its class names are **unobfuscated** in the dex (including toothpick `__Factory` classes), which is promising for stable fingerprints. - Player: Media3/ExoPlayer (`com.bedrockstreaming.plugin.exoplayer`, `androidx.media3`). No Google IMA (`com.google.ads.interactivemedia`: 0 hits); Bedrock has its own VAST ad engine. - Ad-related classes: - `feature/adengine/domain/pausead/PauseAdCoordinatorImpl`, `.../pausead/usecase/GetFirstPlayablePauseAdItemUseCaseImpl`, `data/repository/PauseAdRequesterRepositoryImpl`: **pause ads** - `feature/adengine/domain/requester/AdEngineAdRequester`, `AdEngineAdRequestUrlData`, `AdEngineJingles`, `data/repository/AdEngineAdRequesterRepositoryImpl`, `data/datasource/RemoteAdEngineDataSource`, `data/config/AdEngineConfigImpl`: **VAST pre/post-roll** requests (+ jingles, the "advertising" bumpers) - `feature/adengine/domain/adsloader/AdEngineAdsLoader(Provider)`, `domain/adhandler/AdsLoaderAdHandlerFactory`, `AdsQueueAdHandlerFactory`, `domain/player/AdsQueuePlayerComponent`: the Media3 `AdsLoader` / ads queue - `feature/adengine/domain/lbanner/*` (`LBannerManagerImpl`, `LBannerAdRequester`): L-shaped banner around the player - `plugin/displayad/gam/breakvertising/model/GamAdData` + `com.google.android.gms.ads.*` (`AdManagerAdRequest`, `AdView`): GAM display ads - `component/ad/limiter/*` (`InterstitialAdLimiter`, `AdvertisingCapping`): frequency capping - `feature/player/presentation/mobile/control/ad/MobileAdControl`, `MobileAdPlayingControlView`, `MobileLegacyPauseAdControlView`: ad UI in the player - `feature/player/domain/dai/*` (`DefaultIsDaiAssetUseCase`, `DefaultDaiPluginFactory`) and `plugin/yospace`: **server-side ad insertion** (DAI/Yospace, probably live TV). Stitched ads are part of the stream; see question below. - Other trackers present (not part of this patch): NPAW, Snowplow, Tealium, New Relic, AppsFlyer, Salesforce, Usabilla, Open Measurement. ## Research questions - [ ] Which ad types actually show up on a Plus/Premium account in this version: pause ad, pre-roll, post-roll, jingle, L-banner, GAM display in the home/catalog, live TV DAI? (device check with logcat, see Method) - [ ] How does the app decide whether a given playback gets ads? Server-driven (ad config / VMAP in the playback/layout response, `AdEngineConfigImpl`, remote config), or locally per offer? This decides where the safe choke point is and whether it touches the subscription (out of scope, see above). - [ ] Pause ads: can `PauseAdCoordinatorImpl` / `GetFirstPlayablePauseAdItemUseCaseImpl` return "no ad" (null / empty / `Result` failure) so the player just shows the normal pause state? - [ ] Pre/post-roll: is there a single choke point in `AdEngineAdRequester` / `AdEngineAdRequesterRepositoryImpl` / `AdEngineAdsLoaderProvider` where "no ads" is already a handled case (empty VAST, no ads loader)? Prefer that over the Media3 `AdsLoader` internals. - [ ] L-banner and GAM display ads: same approach (`LBannerManagerImpl`, GAM requester). - [ ] DAI/Yospace: are server-side stitched ads used for VOD on Plus/Premium, or only for live TV? Stitched ads can't be left out client-side, only skipped (seek over ad periods). That is more fragile and possibly a separate decision; report before building it. - [ ] Does playback start immediately without an ad (no spinner, no error, no "ad blocker detected" path)? Main risk. - [ ] Is anything verified server-side (ad tracking beacons as playback precondition)? ## Method 1. `.\scripts\decompile.ps1` on the 1.115.2 APK (running). Delegate the broad search through `decompiled/` to an Explore/Sonnet subagent; read the relevant files yourself. 2. Verify class/method names are really unobfuscated in the dex before fingerprinting on them (`add-patch` skill). 3. On the device (with the user's OK): unpatched app, play a film/series episode and pause; `adb logcat` filtered on `adengine|PauseAd|LBanner|Vast|yospace|ExoPlayer` to confirm which flows run on this account. 4. Fingerprint on unobfuscated Bedrock types/strings, never on obfuscated names (AGENTS.md). ## Deliverables - [ ] `docs/apps/videoland.md`: platform, ad flows, chosen hooks and why, what the injected smali does, and the scope boundary above. - [ ] `patches/.../videoland/shared/Constants.kt`: `COMPATIBILITY_VIDEOLAND` (package `nl.rtl.videoland.v2`, launcher name, icon colour, signing cert SHA-256 from `base.apk`, `apkFileType` for the split/XAPK download, tested version 1.115.2). - [ ] Patch **Hide ads** (`videoland/ads/`), meeting the definition of done in AGENTS.md: build, `Applied: Hide ads` on the real APK, device test: play, pause (no pause ad), resume, play to the end / next episode, live TV channel if applicable, no crash in logcat. - [ ] Check that the app update check (`app-update-check.yml`) picks up the new package (APKPure XAPK for `nl.rtl.videoland.v2`). - [ ] Commit as `feat(videoland): ...` on `dev` (pre-release; ask before pushing).
Author
Owner

Research round 1 (1.115.2, static analysis)

Ad decision is server-driven. There is no local "subscription has ads" flag in the player.
Layout items carry an advertising bag (component/layout/data/core/model/VideoItem), the pause
ad URL comes from remote config playerPauseAdVastConfig (AdEngineConfigImpl), and the VAST/VMAP
response decides which ad spots exist. So a client hook is tier-agnostic: it does the same
thing on Basis as on Plus/Premium. That matters for the scope (see 2).

1. Pause ads: clean hook, in scope

feature/adengine/domain/pausead/usecase/GetFirstPlayablePauseAdItemUseCaseImpl.a(PauseAdAdRequestUrlData, Continuation): Object
fetches the pause-ad VAST via PauseAdRequesterRepositoryImpl and returns the first playable
item (d.b) or null when there is none. PauseAdCoordinatorImpl already handles null
(no overlay, normal pause state).

  • Hook: at index 0, const/4 p1, 0x0 + return-object p1 (reuse the request-data parameter
    register; returning null directly from a suspend function is a valid immediate result).
  • Fingerprint: defining class GetFirstPlayablePauseAdItemUseCaseImpl, parameters
    PauseAdAdRequestUrlData + L, return Ljava/lang/Object;. Both classes are unobfuscated in
    the dex.
  • Side effect: no pause-ad request is made at all (no tracking beacons either).

2. Pre/mid/post-roll: technically easy, scope question

feature/adengine/data/repository/AdEngineAdRequesterRepositoryImpl.a(String, O9.b, Continuation)
does the VAST/VMAP request for the ads loader. On any exception it already falls back to the
empty response w.f4686d (obfuscated D9.w), so "no ads" is a state the player already handles
(same as a network failure). b(...) and c(...) filter that response by time offset
(spot position), so pre-, mid- and post-roll all go through this one call.

Problem: hooking a() also removes the mid-roll ad breaks of the Basis tier, which is
exactly what Plus sells. That's subscription circumvention for anyone on Basis who uses the
patch, so it's out of scope as-is. Options:

  • (a) Don't touch video ads. According to Videoland, Plus/Premium get no pre-roll and no
    breaks, only the pause ad; if that holds for this account, (1) is all that's needed.
  • (b) Only drop pre/post-roll spots (offset 0 / end) in b()/c() and keep mid-rolls
    intact. More work and more fragile, and only justified if logcat shows pre/post-rolls on a
    Plus/Premium account.

Next step: check on the device (unpatched app, Plus/Premium account) which ad types actually
run: adb logcat on adengine|PauseAd|LBanner|Vast, play a film and an episode, pause, let it
run to the end.

3. Still to look at

  • L-banner (LBannerManagerImpl / LBannerAdRequesterRepositoryImpl, same pattern as pause
    ads) and GAM display ads (plugin/displayad/gam): only if they show up on Plus/Premium.
  • DAI/Yospace: live TV. The linear channels' own commercial breaks are part of the broadcast;
    not planned.
## Research round 1 (1.115.2, static analysis) **Ad decision is server-driven.** There is no local "subscription has ads" flag in the player. Layout items carry an `advertising` bag (`component/layout/data/core/model/VideoItem`), the pause ad URL comes from remote config `playerPauseAdVastConfig` (`AdEngineConfigImpl`), and the VAST/VMAP response decides which ad spots exist. So a client hook is tier-agnostic: it does the same thing on Basis as on Plus/Premium. That matters for the scope (see 2). ### 1. Pause ads: clean hook, in scope `feature/adengine/domain/pausead/usecase/GetFirstPlayablePauseAdItemUseCaseImpl.a(PauseAdAdRequestUrlData, Continuation): Object` fetches the pause-ad VAST via `PauseAdRequesterRepositoryImpl` and returns the first playable item (`d.b`) or **`null`** when there is none. `PauseAdCoordinatorImpl` already handles `null` (no overlay, normal pause state). - Hook: at index 0, `const/4 p1, 0x0` + `return-object p1` (reuse the request-data parameter register; returning `null` directly from a suspend function is a valid immediate result). - Fingerprint: defining class `GetFirstPlayablePauseAdItemUseCaseImpl`, parameters `PauseAdAdRequestUrlData` + `L`, return `Ljava/lang/Object;`. Both classes are unobfuscated in the dex. - Side effect: no pause-ad request is made at all (no tracking beacons either). ### 2. Pre/mid/post-roll: technically easy, scope question `feature/adengine/data/repository/AdEngineAdRequesterRepositoryImpl.a(String, O9.b, Continuation)` does the VAST/VMAP request for the ads loader. On **any** exception it already falls back to the empty response `w.f4686d` (obfuscated `D9.w`), so "no ads" is a state the player already handles (same as a network failure). `b(...)` and `c(...)` filter that response by time offset (spot position), so pre-, mid- and post-roll all go through this one call. Problem: hooking `a()` also removes the **mid-roll ad breaks of the Basis tier**, which is exactly what Plus sells. That's subscription circumvention for anyone on Basis who uses the patch, so it's out of scope as-is. Options: - **(a)** Don't touch video ads. According to Videoland, Plus/Premium get no pre-roll and no breaks, only the pause ad; if that holds for this account, (1) is all that's needed. - **(b)** Only drop pre/post-roll spots (offset 0 / end) in `b()`/`c()` and keep mid-rolls intact. More work and more fragile, and only justified if logcat shows pre/post-rolls on a Plus/Premium account. Next step: check on the device (unpatched app, Plus/Premium account) which ad types actually run: `adb logcat` on `adengine|PauseAd|LBanner|Vast`, play a film and an episode, pause, let it run to the end. ### 3. Still to look at - L-banner (`LBannerManagerImpl` / `LBannerAdRequesterRepositoryImpl`, same pattern as pause ads) and GAM display ads (`plugin/displayad/gam`): only if they show up on Plus/Premium. - DAI/Yospace: live TV. The linear channels' own commercial breaks are part of the broadcast; not planned.
Author
Owner

Decision + implementation (round 2)

Decision (user, 2026-10-10): the user is on Plus/Premium, sees ads everywhere and wants all ads blocked, accepting that the hooks are tier-agnostic (on a Basis account they also remove the mid-roll breaks). Recorded in docs/apps/videoland.md. No entitlement/offer/download code is touched.

Patch "Hide ads" (commit 29f0637 on claude/videoland-ads-paid-subscription-30c45f, not pushed yet):

Ad Hook Effect
Pre/mid/post-roll AdEngineAdRequesterRepositoryImpl.a(String, L, L) returns the app's own empty VAST response (D9.w.d, resolved at patch time via the RemoteAdEngineDataSource parse call)
Pause ad (VAST) GetFirstPlayablePauseAdItemUseCaseImpl.a(PauseAdAdRequestUrlData, L) returns null
Pause ad (GAM breakvertising) y9.a.a(Context, Bag) (check-cast GamAdData) returns null
L-banner LBannerAdRequesterRepositoryImpl.a(String, L) returns null

Not patched: DAI/Yospace (server-side stitched, "yospace" assets, probably live TV).

Status:

  • buildAndroid
  • Applied: Hide ads on 1.115.2; 4 classes modified, injected code checked in the patched dex
  • Device test (requires uninstalling the Play version: wipes the login)
  • Merge into dev + push (pre-release)
## Decision + implementation (round 2) **Decision (user, 2026-10-10):** the user is on Plus/Premium, sees ads everywhere and wants all ads blocked, accepting that the hooks are tier-agnostic (on a Basis account they also remove the mid-roll breaks). Recorded in `docs/apps/videoland.md`. No entitlement/offer/download code is touched. **Patch "Hide ads"** (commit `29f0637` on `claude/videoland-ads-paid-subscription-30c45f`, not pushed yet): | Ad | Hook | Effect | | --- | --- | --- | | Pre/mid/post-roll | `AdEngineAdRequesterRepositoryImpl.a(String, L, L)` | returns the app's own empty VAST response (`D9.w.d`, resolved at patch time via the `RemoteAdEngineDataSource` parse call) | | Pause ad (VAST) | `GetFirstPlayablePauseAdItemUseCaseImpl.a(PauseAdAdRequestUrlData, L)` | returns `null` | | Pause ad (GAM breakvertising) | `y9.a.a(Context, Bag)` (check-cast `GamAdData`) | returns `null` | | L-banner | `LBannerAdRequesterRepositoryImpl.a(String, L)` | returns `null` | Not patched: DAI/Yospace (server-side stitched, `"yospace"` assets, probably live TV). Status: - [x] `buildAndroid` - [x] `Applied: Hide ads` on 1.115.2; 4 classes modified, injected code checked in the patched dex - [ ] Device test (requires uninstalling the Play version: wipes the login) - [ ] Merge into `dev` + push (pre-release)
Author
Owner

Device test on 1.115.2 (Plus/Premium account): login works on the re-signed build, an episode (De Verraders UK Celebs, ep. 1) starts directly at 00:00 without a pre-roll, the user confirms no ads, no crashes/VerifyErrors in logcat. Remaining: merge into dev + push (pre-release).

Device test on 1.115.2 (Plus/Premium account): login works on the re-signed build, an episode (De Verraders UK Celebs, ep. 1) starts directly at 00:00 without a pre-roll, the user confirms no ads, no crashes/VerifyErrors in logcat. Remaining: merge into `dev` + push (pre-release).
midas referenced this issue from a commit 2026-10-10 11:07:10 +02:00
Author
Owner

De Verraders UK Celebs

I randomly clicked something, this is not my jam 🗡️

> De Verraders UK Celebs I randomly clicked something, this is not my jam 🗡️
Author
Owner

Released as pre-release v1.5.0-dev.1 (dev, commits b4ac7bb + 539c430). Available via the dev channel in Morphe Manager.

Released as pre-release **v1.5.0-dev.1** (`dev`, commits b4ac7bb + 539c430). Available via the `dev` channel in Morphe Manager.
Author
Owner

Released in stable v1.5.0 (main). Closing.

Released in stable **v1.5.0** (`main`). Closing.
midas closed this issue 2026-10-10 11:29:04 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
midas/midas-patches#13
No description provided.