A minimalist Android app that blocks short-form video content on YouTube and Instagram, helping you stay focused and reduce doomscrolling.
- 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
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.
| Platform | Detected Element |
|---|---|
| YouTube Shorts | reel_watch_fragment_root |
| Instagram Reels | clips_viewer_view_pager |
- Clone this repository
- Open in Android Studio
- Build and install on your device
- Grant Accessibility Service permission
- Open Deaction app
- Tap "Enable Protection"
- Find "Deaction" in the Accessibility Services list
- Enable the toggle
- Return to the app and configure which platforms to block
| 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.
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
./gradlew assembleDebugThe APK will be at app/build/outputs/apk/debug/app-debug.apk
- Add the package name to
accessibility_config.xml - Create a detection function in
DeactionService.kt - Add a toggle in
MainActivity.kt
Use adb shell uiautomator dump while viewing the content you want to block, then search the XML for unique identifiers.
- Language: Kotlin
- UI: Jetpack Compose + Material 3
- Min SDK: 26 (Android 8.0)
- Target SDK: 35
MIT License - Feel free to modify and distribute.
Take back control of your attention.