Support Videoland: hide ads for Plus/Premium subscribers (Bedrock Streaming) #13
Labels
No labels
area/architecture
area/build-ci
area/bytecode
area/code-quality
area/docs
area/extension
area/fingerprint
area/security
area/tests
Bug report
Feature request
review
sev/low
sev/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midas/midas-patches#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
separates Basis from Plus;
isPremium, offer/pack/product models, Gigyaaccount 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)
base,arm64_v8a,xxxhdpi), merged toapks/nl.rtl.videoland.v2-1.115.2.apk.com.bedrockstreaming.*, ~7.9kreferences). Most of its class names are unobfuscated in the dex (including toothpick
__Factoryclasses), which is promising for stable fingerprints.com.bedrockstreaming.plugin.exoplayer,androidx.media3). NoGoogle IMA (
com.google.ads.interactivemedia: 0 hits); Bedrock has its own VAST ad engine.feature/adengine/domain/pausead/PauseAdCoordinatorImpl,.../pausead/usecase/GetFirstPlayablePauseAdItemUseCaseImpl,data/repository/PauseAdRequesterRepositoryImpl: pause adsfeature/adengine/domain/requester/AdEngineAdRequester,AdEngineAdRequestUrlData,AdEngineJingles,data/repository/AdEngineAdRequesterRepositoryImpl,data/datasource/RemoteAdEngineDataSource,data/config/AdEngineConfigImpl: VASTpre/post-roll requests (+ jingles, the "advertising" bumpers)
feature/adengine/domain/adsloader/AdEngineAdsLoader(Provider),domain/adhandler/AdsLoaderAdHandlerFactory,AdsQueueAdHandlerFactory,domain/player/AdsQueuePlayerComponent: the Media3AdsLoader/ ads queuefeature/adengine/domain/lbanner/*(LBannerManagerImpl,LBannerAdRequester): L-shapedbanner around the player
plugin/displayad/gam/breakvertising/model/GamAdData+com.google.android.gms.ads.*(
AdManagerAdRequest,AdView): GAM display adscomponent/ad/limiter/*(InterstitialAdLimiter,AdvertisingCapping): frequency cappingfeature/player/presentation/mobile/control/ad/MobileAdControl,MobileAdPlayingControlView,MobileLegacyPauseAdControlView: ad UI in the playerfeature/player/domain/dai/*(DefaultIsDaiAssetUseCase,DefaultDaiPluginFactory) andplugin/yospace: server-side ad insertion (DAI/Yospace, probably live TV). Stitchedads are part of the stream; see question below.
AppsFlyer, Salesforce, Usabilla, Open Measurement.
Research questions
pre-roll, post-roll, jingle, L-banner, GAM display in the home/catalog, live TV DAI?
(device check with logcat, see Method)
VMAP in the playback/layout response,
AdEngineConfigImpl, remote config), or locallyper offer? This decides where the safe choke point is and whether it touches the
subscription (out of scope, see above).
PauseAdCoordinatorImpl/GetFirstPlayablePauseAdItemUseCaseImplreturn"no ad" (null / empty /
Resultfailure) so the player just shows the normal pause state?AdEngineAdRequester/AdEngineAdRequesterRepositoryImpl/AdEngineAdsLoaderProviderwhere "no ads" is alreadya handled case (empty VAST, no ads loader)? Prefer that over the Media3
AdsLoaderinternals.
LBannerManagerImpl, GAM requester).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.
"ad blocker detected" path)? Main risk.
Method
.\scripts\decompile.ps1on the 1.115.2 APK (running). Delegate the broad search throughdecompiled/to an Explore/Sonnet subagent; read the relevant files yourself.(
add-patchskill).adb logcatfiltered onadengine|PauseAd|LBanner|Vast|yospace|ExoPlayerto confirm whichflows run on this account.
Deliverables
docs/apps/videoland.md: platform, ad flows, chosen hooks and why, what the injectedsmali does, and the scope boundary above.
patches/.../videoland/shared/Constants.kt:COMPATIBILITY_VIDEOLAND(packagenl.rtl.videoland.v2, launcher name, icon colour, signing cert SHA-256 frombase.apk,apkFileTypefor the split/XAPK download, tested version 1.115.2).videoland/ads/), meeting the definition of done in AGENTS.md:build,
Applied: Hide adson 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.
app-update-check.yml) picks up the new package(APKPure XAPK for
nl.rtl.videoland.v2).feat(videoland): ...ondev(pre-release; ask before pushing).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
advertisingbag (component/layout/data/core/model/VideoItem), the pausead URL comes from remote config
playerPauseAdVastConfig(AdEngineConfigImpl), and the VAST/VMAPresponse 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): Objectfetches the pause-ad VAST via
PauseAdRequesterRepositoryImpland returns the first playableitem (
d.b) ornullwhen there is none.PauseAdCoordinatorImplalready handlesnull(no overlay, normal pause state).
const/4 p1, 0x0+return-object p1(reuse the request-data parameterregister; returning
nulldirectly from a suspend function is a valid immediate result).GetFirstPlayablePauseAdItemUseCaseImpl, parametersPauseAdAdRequestUrlData+L, returnLjava/lang/Object;. Both classes are unobfuscated inthe dex.
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(obfuscatedD9.w), so "no ads" is a state the player already handles(same as a network failure).
b(...)andc(...)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 isexactly what Plus sells. That's subscription circumvention for anyone on Basis who uses the
patch, so it's out of scope as-is. Options:
breaks, only the pause ad; if that holds for this account, (1) is all that's needed.
b()/c()and keep mid-rollsintact. 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 logcatonadengine|PauseAd|LBanner|Vast, play a film and an episode, pause, let itrun to the end.
3. Still to look at
LBannerManagerImpl/LBannerAdRequesterRepositoryImpl, same pattern as pauseads) and GAM display ads (
plugin/displayad/gam): only if they show up on Plus/Premium.not planned.
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
29f0637onclaude/videoland-ads-paid-subscription-30c45f, not pushed yet):AdEngineAdRequesterRepositoryImpl.a(String, L, L)D9.w.d, resolved at patch time via theRemoteAdEngineDataSourceparse call)GetFirstPlayablePauseAdItemUseCaseImpl.a(PauseAdAdRequestUrlData, L)nully9.a.a(Context, Bag)(check-castGamAdData)nullLBannerAdRequesterRepositoryImpl.a(String, L)nullNot patched: DAI/Yospace (server-side stitched,
"yospace"assets, probably live TV).Status:
buildAndroidApplied: Hide adson 1.115.2; 4 classes modified, injected code checked in the patched dexdev+ 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).I randomly clicked something, this is not my jam 🗡️
Released as pre-release v1.5.0-dev.1 (
dev, commitsb4ac7bb+539c430). Available via thedevchannel in Morphe Manager.Released in stable v1.5.0 (
main). Closing.