FacebookAppAdsRemover
Facebook App Ads Remover Xposed Module
Install / Use
/learn @Loukious/FacebookAppAdsRemoverREADME
Facebook App Ads Remover
An LSPosed/Xposed module for com.facebook.katana that removes ads from the Facebook app without relying on hardcoded obfuscated class or method names.
Scope
- News Feed sponsored units
- Story ads and in-disc story ads
- Reels / upstream ad-backed story append paths
- Quicksilver game ad requests
- Audience Network and Neko playable ad activities used by games
Main Findings
- Obfuscated names such as
AiD,A84,A8t,ADF, orAueare too unstable to hardcode. They changed across builds and caused broken hooks. - Stable strings and structural signatures are much more reliable than direct obfuscated names.
- Feed ads are inserted at multiple layers. Blocking only one layer is not enough.
- Game ads are not a single pipeline either. Quicksilver request hooks, postMessage hooks, and UI activity fallbacks all matter.
- Blocking
AudienceNetworkActivityatstartActivity(...)was too early and caused game hangs. Letting it launch and closing it immediately from activity lifecycle hooks worked better.
Hook Strategy
Feed / Stories / Reels
- Resolve classes with DexKit using stable strings and method shapes.
- Remove ad-backed stories from the upstream list builder append path.
- Sanitize feed CSR filter inputs and outputs.
- Sanitize late-stage feed lists before they reach rendering.
- Block sponsored entries from the sponsored pool and story pool.
- Block story ad providers by intercepting merge/fetch/update style methods.
Game Ads
- Resolve Quicksilver ad request methods by their stable JSON error strings.
- Hook the Quicksilver
postMessage(String, String)bridge as a second request-layer fallback. - Resolve ad requests as a no-op success payload where possible so the caller does not hang waiting on the bridge.
- Close
AudienceNetworkActivity,AudienceNetworkRemoteActivity, andNekoPlayableAdActivityfrom lifecycle hooks as UI-level fallbacks. - Only hard-block the playable activity launch path directly; Audience Network activity launches are allowed so their internal close/error flow can run before the activity is closed.
Notes About Logs
- Runtime logs are debug-only.
Patches.ktandModule.javanow gate logging behindBuildConfig.DEBUG.- Release builds should stay quiet unless you re-enable logging yourself.
About feedCsr=0
The startup line:
DexKit groups: ... feedCsr=0 ...
is normal in the current implementation.
That number is only the result of the initial batch string-group search. Feed CSR hooks are also resolved by later structural and fallback matchers, so feedCsr=0 does not mean feed CSR filtering is disabled.
The line that actually matters is:
Resolved feed CSR filters=...
If that later line contains resolved classes, the CSR filtering path is active even when the earlier batch count is zero.
Build
- Android app module:
app - Host package:
com.facebook.katana - Application ID:
tn.loukious.facebookappadsremover
Build the debug APK with:
./gradlew :app:assembleDebug
Current Direction
- Prefer stable strings, type signatures, and runtime structure over obfuscated identifiers.
- Keep debug instrumentation available in debug builds only.
- Treat feed, story, and game ads as separate pipelines with separate fallbacks.
Related Skills
node-connect
353.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
