All projects

Mobile · Android

InstaReel Blocker

A small Android app that skips sponsored videos in Instagram Reels on its own. It works through Android's accessibility service: it reads what's on screen and, when it finds an ad label, swipes to the next video.

  • No root
  • No internet permission
  • No data collection
  • Kotlin
  • Android 8.0+
  • AccessibilityService
  • GitHub Actions
An illustration, not a screenshot: when the visible reel carries an ad label, the service swipes up to the next one.

How it works

The service listens for window-change and scroll events from Instagram and scans the visible part of the screen in a single pass.

  1. Is this the Reels player?

    First it checks for the full-screen Reels viewer: the viewer's view id (such as clips_viewer) or like/comment/share buttons stacked vertically on the right edge. In the main feed those buttons sit horizontally, so ads in the feed don't trigger it.

  2. Is the visible video an ad?

    Then it looks for the ad label. The label sometimes arrives cut off (“Spon…”), so it matches by prefix instead of whole words. Labels are defined in several languages, including Sponsorlu, Sponsored, Gesponsert, Patrocinado and Ücretli ortaklık, and ad buttons such as “Profili Ziyaret Et” and “Şimdi Al” serve as a backup signal.

  3. Only what's really on screen

    Instagram preloads the previous and next videos off screen. Only nodes that are isVisibleToUser and intersect the screen are scanned, so an ad in the next video never makes it skip the normal video you're watching.

  4. Swipe, then check again

    An ad triggers an upward swipe through dispatchGesture. Events during the swipe are ignored, and a few check scans are scheduled after it, so back-to-back ads are skipped one by one. If something goes wrong, it stops after 6 skips in a row and waits for a normal video.

res/xml/accessibility_service_config.xml
<accessibility-service
    android:accessibilityEventTypes="typeWindowContentChanged|typeWindowStateChanged|typeViewScrolled"
    android:accessibilityFlags="flagDefault|flagRetrieveInteractiveWindows|flagReportViewIds"
    android:canPerformGestures="true"
    android:canRetrieveWindowContent="true"
    android:notificationTimeout="100"
    android:packageNames="com.instagram.android,com.instagram.lite"
    … />

Privacy by design

The service is bound to com.instagram.android and com.instagram.lite in its configuration, so Android won't let it read any other app's screen. The app has no internet permission, needs no root and collects nothing.

The home screen shows whether the service is on and how many ads it has skipped while running; that counter lives only in memory.

Setup

Install the ready-made APK, or build it yourself.

  1. Install the APK

    Download it from GitHub Releases and install it; you'll need to allow installs from unknown sources.

  2. Turn on the service

    Open the app, tap “Erişilebilirlik Ayarlarını Aç” (open accessibility settings), find InstaReel Blocker in the list and turn it on.

  3. Open Reels

    Go to Reels in Instagram; sponsored videos are skipped from then on.

If the service keeps stopping

Some devices, such as Xiaomi (HyperOS) and Samsung, stop the service in the background. Lock the app in the recent apps list and set its battery optimisation to “No restrictions”.

Build it yourself

You need Android Studio, or JDK 17 with Android SDK 34. The debug APK ends up in app/build/outputs/apk/debug/.

Shell
./gradlew assembleDebug

Release builds read keystore/signing.properties, which isn't in the repo, and shrink code and resources with R8; ./gradlew bundleRelease makes a Play Store bundle. The APKs on Releases are built by a GitHub Actions workflow.

Known limitations

Instagram is a trademark of Meta Platforms, Inc. This project isn't affiliated with Meta or Instagram.

More projects