Research: block video ads in de Volkskrant (Edition platform) #12

Closed
opened 2026-10-10 08:43:21 +02:00 by midas · 1 comment
Owner

Sub-issue of #2 (Research: block video ads in DPG apps), scoped to de Volkskrant (be.persgroep.android.news.mobilevk).

Why a separate issue

Video ads are already blocked for De Gelderlander (see the comment on #2 and docs/apps/gelderlander.md), but that fix does not carry over: De Gelderlander runs on DPG's Kubus platform with the video SDK nl.dpgmedia.publishingservices.videosdk, where VideoProduction.getAdsEnabled() and VideoPlayableContent.Video.getAdTagUrl() are the choke points. De Volkskrant is built on the older Edition platform (nl.persgroep.edition.*) and wraps Google IMA in be.persgroep.advertising.video.ima. The Gelderlander fingerprints will most likely not match here, so the Volkskrant needs its own research and hook.

Research questions

  • Check first: does the Volkskrant APK also contain nl.dpgmedia.publishingservices.videosdk (e.g. for a subset of videos)? If so, the Gelderlander fingerprints may apply as-is and the work is mostly moving them to a shared place.
  • Which video player does the app use (Media3/ExoPlayer with the IMA extension, an older ExoPlayer, a DPG player)? Where is it created?
  • Where do video ads appear: article videos, the video section, live streams, podcasts/audio (nl.dpgmedia.mcdpg.amalia.*, check for audio pre-rolls too)?
  • How does be.persgroep.advertising.video.ima get its ad tag (VAST/VMAP URL, adTagUrl, ImaSdkFactory, AdsLoader, AdsRequest, AdDisplayContainer)? Where does the app decide whether a video gets ads?
  • Single choke point, in order of preference:
    1. The Edition/DPG layer that decides "ads yes/no" or supplies the ad tag (return false / null / empty tag), comparable to getAdsEnabled() on Kubus.
    2. The place where the IMA ads loader is attached to the player (skip attaching it).
    3. Last resort: IMA SDK internals (fragile, avoid).
  • Does playback start immediately without an ad tag (no spinner, no error)? Main risk.
  • Is the ad decision also driven by remote config or a per-video flag?

Method

  1. .\scripts\decompile.ps1 on the current Volkskrant APK; delegate the broad search through decompiled/ to an Explore/Sonnet subagent and read the relevant files yourself.
  2. On the device (with the user's OK): find an article/video with a pre-roll in the unpatched app; adb logcat filtered on IMA / ExoPlayer / persgroep to confirm the flow.
  3. Fingerprint on unobfuscated DPG/SDK class names and strings, never on obfuscated names (see AGENTS.md).

Deliverables

  • "Video ads" section in docs/apps/volkskrant.md: call chain, chosen hook, why, what the injected smali does. Replace the "still need research" note there.
  • The patch, meeting the definition of done in AGENTS.md: build, Applied: Hide ads on the real APK, device test showing a video starts directly without pre-roll and plays to the end, plus a regression check that banner ads stay hidden.
  • Same decision as for De Gelderlander: extend Hide ads (consistent with Gelderlander) unless playback turns out to be fragile, then a separate Hide video ads.
  • Commit as feat(volkskrant): ... on dev (pre-release; ask before pushing). Report back on #2 and close #2 when both apps are done.

Out of scope

Paywall/subscription circumvention, including paid video content.

Sub-issue of #2 (Research: block video ads in DPG apps), scoped to **de Volkskrant** (`be.persgroep.android.news.mobilevk`). ## Why a separate issue Video ads are already blocked for De Gelderlander (see the comment on #2 and `docs/apps/gelderlander.md`), but that fix does not carry over: De Gelderlander runs on DPG's Kubus platform with the video SDK `nl.dpgmedia.publishingservices.videosdk`, where `VideoProduction.getAdsEnabled()` and `VideoPlayableContent.Video.getAdTagUrl()` are the choke points. De Volkskrant is built on the older Edition platform (`nl.persgroep.edition.*`) and wraps Google IMA in `be.persgroep.advertising.video.ima`. The Gelderlander fingerprints will most likely not match here, so the Volkskrant needs its own research and hook. ## Research questions - [ ] Check first: does the Volkskrant APK also contain `nl.dpgmedia.publishingservices.videosdk` (e.g. for a subset of videos)? If so, the Gelderlander fingerprints may apply as-is and the work is mostly moving them to a shared place. - [ ] Which video player does the app use (Media3/ExoPlayer with the IMA extension, an older ExoPlayer, a DPG player)? Where is it created? - [ ] Where do video ads appear: article videos, the video section, live streams, podcasts/audio (`nl.dpgmedia.mcdpg.amalia.*`, check for audio pre-rolls too)? - [ ] How does `be.persgroep.advertising.video.ima` get its ad tag (VAST/VMAP URL, `adTagUrl`, `ImaSdkFactory`, `AdsLoader`, `AdsRequest`, `AdDisplayContainer`)? Where does the app decide whether a video gets ads? - [ ] Single choke point, in order of preference: 1. The Edition/DPG layer that decides "ads yes/no" or supplies the ad tag (return false / null / empty tag), comparable to `getAdsEnabled()` on Kubus. 2. The place where the IMA ads loader is attached to the player (skip attaching it). 3. Last resort: IMA SDK internals (fragile, avoid). - [ ] Does playback start immediately without an ad tag (no spinner, no error)? Main risk. - [ ] Is the ad decision also driven by remote config or a per-video flag? ## Method 1. `.\scripts\decompile.ps1` on the current Volkskrant APK; delegate the broad search through `decompiled/` to an Explore/Sonnet subagent and read the relevant files yourself. 2. On the device (with the user's OK): find an article/video with a pre-roll in the unpatched app; `adb logcat` filtered on IMA / ExoPlayer / persgroep to confirm the flow. 3. Fingerprint on unobfuscated DPG/SDK class names and strings, never on obfuscated names (see AGENTS.md). ## Deliverables - [ ] "Video ads" section in `docs/apps/volkskrant.md`: call chain, chosen hook, why, what the injected smali does. Replace the "still need research" note there. - [ ] The patch, meeting the definition of done in AGENTS.md: build, `Applied: Hide ads` on the real APK, device test showing a video starts directly without pre-roll and plays to the end, plus a regression check that banner ads stay hidden. - [ ] Same decision as for De Gelderlander: extend **Hide ads** (consistent with Gelderlander) unless playback turns out to be fragile, then a separate **Hide video ads**. - [ ] Commit as `feat(volkskrant): ...` on `dev` (pre-release; ask before pushing). Report back on #2 and close #2 when both apps are done. ## Out of scope Paywall/subscription circumvention, including paid video content.
Author
Owner

Result (de Volkskrant 7.52.0)

De Volkskrant does not need a different implementation: article videos (ArticleVideoContentKt, VideoEmbedKt, set up by VideoSdkInstaller) play through the same DPG video SDK as De Gelderlander, nl.dpgmedia.publishingservices.videosdk, with identical code (PlayerIntentResolver.maybeGetAdTagUrl checks VideoProduction.getAdsEnabled()).

  • be.persgroep.advertising.video.ima only renders video creatives inside banner slots (banner SDK nativerenderer/VideoViewModel); those come from AdManager.load, which Hide ads already skips.
  • VideoPlayableContent.AdOnly is never constructed; the Amalia podcast player has no client-side ad loading.

Change (5d34b73, pushed to dev): the two video hooks moved into a shared, unnamed patch nl.midasvo.patches.dpg.videosdk.hideVideoAdsPatch; both apps' Hide ads pull it in with dependsOn. Documented in docs/apps/volkskrant.md.

Verified: build; Applied: Hide ads on Volkskrant 7.52.0 and Gelderlander 9.21.1; dexdump of both patched APKs shows getAdsEnabled -> const/4 v0, 0; return v0 and Video.getAdTagUrl -> null; patched Volkskrant installed on the device, starts without crash/VerifyError.

Not yet verified on device: actual playback of a DPG-player video in the Volkskrant (no suitable article found during the test; YouTube embeds don't use this player). Same code path as the device-verified Gelderlander fix.

### Result (de Volkskrant 7.52.0) De Volkskrant does **not** need a different implementation: article videos (`ArticleVideoContentKt`, `VideoEmbedKt`, set up by `VideoSdkInstaller`) play through the same DPG video SDK as De Gelderlander, `nl.dpgmedia.publishingservices.videosdk`, with identical code (`PlayerIntentResolver.maybeGetAdTagUrl` checks `VideoProduction.getAdsEnabled()`). - `be.persgroep.advertising.video.ima` only renders video creatives inside banner slots (banner SDK `nativerenderer/VideoViewModel`); those come from `AdManager.load`, which **Hide ads** already skips. - `VideoPlayableContent.AdOnly` is never constructed; the Amalia podcast player has no client-side ad loading. **Change** (5d34b73, pushed to `dev`): the two video hooks moved into a shared, unnamed patch `nl.midasvo.patches.dpg.videosdk.hideVideoAdsPatch`; both apps' **Hide ads** pull it in with `dependsOn`. Documented in `docs/apps/volkskrant.md`. **Verified**: build; `Applied: Hide ads` on Volkskrant 7.52.0 and Gelderlander 9.21.1; dexdump of both patched APKs shows `getAdsEnabled` -> `const/4 v0, 0; return v0` and `Video.getAdTagUrl` -> `null`; patched Volkskrant installed on the device, starts without crash/VerifyError. **Not yet verified on device**: actual playback of a DPG-player video in the Volkskrant (no suitable article found during the test; YouTube embeds don't use this player). Same code path as the device-verified Gelderlander fix.
midas closed this issue 2026-10-10 10:43:39 +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.

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