Peek a boo
An LSPosed module that hides selected views in an app, together with the frames around them. Rules are made and edited in the settings app.
Pab is a frame remover, not an ad blocker. Stopping ads is the job of network-level tools; Pab hides the frames left behind — the empty slot after an ad is blocked, promo cards, and other frames the user chooses. Which frames to hide is up to the user: Pab never decides what counts as an ad.
The design draws on two works: hiding a view together with its frame comes from MinMinGuard, and picking elements on screen comes from uBlock Origin's Element Picker. The code is an original implementation. Kotlin + Modern Xposed API (libxposed) 102.
- LSPosed framework with API 102 support
- Android 10 (API 29) or later
- "All files access" permission for the Pab app (to read and write the rule files in Download)
- Install the APK and enable the module in LSPosed.
- Add the apps whose frames you want to hide to the scope.
- Open a scoped app. If it has no rules yet, it opens in
capture mode:
- Every view is outlined with a colored frame.
- Each tap cycles through the candidates at the spot you tapped.
- Volume Up adds the candidate shown (one per press).
- Volume Down saves and exits.
- From the next launch, views matching the saved rules are hidden together with their frames.
- Open the Pab app and only the scoped apps are listed. Tap an app to edit its rules (one rule per line) or use "Launch in capture mode". Existing rules are kept, and start out selected in capture mode.
Frames that only appear further down a scroll can also be captured on the spot. Press "Launch with floating button" on the settings screen and the target app opens with a small "Capture" button showing. Scroll to the frame, press the button, and capture mode starts on that screen. The button appears only for that one launch and is gone once the app's screens are all closed; normal launches never show it.
Saving with nothing selected is fine: the app then opens normally from then on (no capture, nothing hidden).
- Rules live in
Download/Pab/<package>.txt. The file is created by the hook inside the target app; the Pab app only edits it. - A rule saved in capture mode also holds the view's size, after
the class name (e.g.
android.widget.TextView@1200x150). Only views of that size are hidden, so other views with the same class name stay. A rule without a size matches by class name alone. - Apps that crash on launch just by being in the scope (PairIP detection) — that can't be fixed from the module side.
- Screens built with Jetpack Compose — everything is drawn inside one AndroidComposeView, so there are no separate views to hide. An ad embedded in Compose via AndroidView can still be hidden, but the empty space stays, because Compose owns the layout.
- Frames drawn inside the same view as the content itself, or into the background — they can't be separated from the content.
- Hiding a frame can shift the layout. That depends on how the app is built.
- If the target app is already running (a resident app, for example), launching it may not pick up the new mode. Force-stop the app first, then press the launch button.
This module is provided "as is", without any warranty. Use it at your own risk. The author takes no responsibility for any damage or malfunction caused by using this module.
Apache License 2.0.
Ideas inspired by MinMinGuard (GPL-3.0) and uBlock Origin (GPL-3.0); no code from either is included. libxposed is Apache License 2.0.
Peek a boo
アプリ内の選択した View を周りの枠ごと消す LSPosed モジュールです。 ルールの作成も編集も設定アプリでできます。
Pab は広告ブロッカーではなく、「枠除去」のモジュールです。 広告を止めるのは通信側ツールの仕事です。Pab はその後に残る 枠 — 広告がブロックされた後の空き枠、宣伝カードなど、 ユーザーが選んだ枠 — を消します。何を消すかはユーザー次第で、 Pab が「広告かどうか」を判断しません。
開発発想元は 2 つです。View を枠ごと消すのは MinMinGuard、 画面上で要素を選ぶのは uBlock Origin の要素ピッカーです。 コードは自前実装です。Kotlin + Modern Xposed API (libxposed) 102。
- API 102 対応の LSPosed フレームワーク
- Android 10 (API 29) 以上
- Pab アプリへの「すべてのファイルへのアクセス」許可 (Download 内のルールファイルの読み書きに使います)
- APK をインストールし、LSPosed でモジュールを有効化します。
- 枠を消したいアプリをスコープに入れます。
- 対象アプリを開きます。ルールがまだ無いアプリは
キャプチャモードで開きます:
- すべての View に色枠が付きます。
- タップした場所の候補がタップのたびに切り替わります。
- 音量上で、表示中の候補を 1 件追加します。
- 音量下で保存して終了します。
- 次回起動から、保存したルールに合う View が枠ごと消えます。
- Pab アプリを開くとスコープ内のアプリだけが並びます。 アプリをタップするとルールの編集(1 行に 1 ルール)や、 「キャプチャモードで起動」ができます。既存のルールは消えず、 キャプチャでは最初から選択済みになります。
スクロールした先にだけ出てくる枠は、その場でキャプチャする 方法もあります。設定画面の「フローティングモードで起動」を 押すと、対象アプリに小さな「キャプチャ」ボタンが出た状態で 立ち上がります。枠のある場所までスクロールしてボタンを押すと、 その画面のままキャプチャモードに入ります。ボタンが出るのは その起動の 1 回限りで、アプリの画面が全部閉じたら終わります。 通常の起動ではボタンは出ません。
何も選ばずに保存してもかまいません。そのアプリは以後ふつうに 開きます (キャプチャにもならず、何も消えません)。
- ルールは
Download/Pab/<パッケージ名>.txtにあります。 ファイルを作るのは対象アプリ内のフックで、Pab アプリは 編集だけを行います。 - キャプチャで保存したルールには、クラス名の後ろに View の
サイズが付きます(例:
android.widget.TextView@1200x150)。 消えるのはそのサイズの View だけで、同じクラス名の他の表示は 消えません。サイズの無いルールはクラス名だけで判定します。 - スコープに入れて起動した瞬間に落ちるアプリ (PairIP の検知 によるもの) は対応できません。
- Compose は AndroidComposeView に全ての要素が配置されている ので対応できません。ただし Compose の中に AndroidView で埋め込まれた 広告 (View 製) は消せますが、箱の場所と大きさは Compose 側の レイアウトが握っているため空白は残ります。
- コンテンツ本体と同じ View の中に描かれる枠や、下地に描き 込まれた枠は、本体と切り分けられないため対象外です。
- 枠を消すとレイアウトが崩れることがあります (アプリ側の レイアウト次第です)。
- 対象アプリがすでに起動している場合 (常駐型など) は、起動して も状態を読み直さないためモードが切り替わらないことがあります。 その場合は対象アプリを強制終了してから起動ボタンを押して ください。
使用は自己責任でお願いします。 本モジュールの使用によって生じた不具合・損害に ついて、作者は責任を負いません。
Apache License 2.0。
発想の参考は MinMinGuard (GPL-3.0) と uBlock Origin (GPL-3.0) ですが、どちらのコードも含みません。 libxposed は Apache License 2.0 です。