Skip to content
wwcorPublic

About

App to block yt shorts and ig reels

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Deaction

A minimalist Android app that blocks short-form video content on YouTube and Instagram, helping you stay focused and reduce doomscrolling.

Features

  • Block YouTube Shorts - Automatically navigates away when you open a Short
  • Block Instagram Reels - Prevents Reels from playing
  • Per-platform toggles - Enable/disable blocking for each platform independently
  • Lightweight - No background battery drain, only activates when you're in YouTube/Instagram
  • Privacy-focused - No data collection, no internet permission, works entirely offline

How It Works

Deaction uses Android's Accessibility Service to monitor the view hierarchy of YouTube and Instagram. When it detects the specific UI elements that indicate a Short or Reel is playing, it automatically performs a "back" action to exit the content.

Detection Method

Platform Detected Element
YouTube Shorts reel_watch_fragment_root
Instagram Reels clips_viewer_view_pager

Installation

  1. Clone this repository
  2. Open in Android Studio
  3. Build and install on your device
  4. Grant Accessibility Service permission

Setup

  1. Open Deaction app
  2. Tap "Enable Protection"
  3. Find "Deaction" in the Accessibility Services list
  4. Enable the toggle
  5. Return to the app and configure which platforms to block

Permissions

Permission Why
BIND_ACCESSIBILITY_SERVICE Required to detect and block Shorts/Reels

No internet permission - The app works entirely offline and doesn't send any data.

Project Structure

app/src/main/
├── java/com/example/deaction/
│   ├── MainActivity.kt       # UI with toggle controls
│   └── DeactionService.kt    # Accessibility service logic
├── res/
│   ├── xml/accessibility_config.xml  # Service configuration
│   └── values/strings.xml    # App strings
└── AndroidManifest.xml

Building

./gradlew assembleDebug

The APK will be at app/build/outputs/apk/debug/app-debug.apk

Customization

Adding more platforms

  1. Add the package name to accessibility_config.xml
  2. Create a detection function in DeactionService.kt
  3. Add a toggle in MainActivity.kt

Finding view IDs for new platforms

Use adb shell uiautomator dump while viewing the content you want to block, then search the XML for unique identifiers.

Tech Stack

  • Language: Kotlin
  • UI: Jetpack Compose + Material 3
  • Min SDK: 26 (Android 8.0)
  • Target SDK: 35

License

MIT License - Feel free to modify and distribute.


Take back control of your attention.

About

App to block yt shorts and ig reels

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages