ShizuStore

Spotify Ad Skipper

sihooney

1.0 · GitHub

Download APK
Audio Android 9+ 5 months ago Proprietary
97 ShizuStore
2.1k GitHub
15 Stars
9 MB Size

More about this app

Watches Spotify notifications and auto-skips ads by restarting playback, using Shizuku to relaunch from background.

Spotify Ad Skipper

A native Android application that automatically detects and bypasses Spotify advertisements using Shizuku API.

Overview

Spotify Ad Skipper monitors Spotify notifications in the background. When an advertisement is detected, it closes Spotify (emulating manual swipe-to-close), relaunches it, and sends a play intent - all automatically.

Features

  • Automatic Ad Detection: Monitors Spotify notifications for "Advertisement"
  • Queue Preservation: Emulates manual close to preserve Spotify's queue state
  • Reliable Relaunch: Uses Shizuku to bypass Android 15 background launch restrictions
  • Auto-Play: Sends play intent after relaunch to resume playback
  • Battery Efficient: Passive notification listener with zero CPU usage when idle
  • Privacy Focused: No data collection, storage, or transmission
  • Samsung Optimized: Tested on Samsung One UI 7.0

Requirements

  • Android 9.0 (API 28) or higher
  • Spotify App: Official Spotify app installed
  • Shizuku App: Required for relaunching from background (Download)

Quick Start

For Users

See INSTALLATION.md for complete installation instructions.

Quick summary:

  1. Install Shizuku and start the service
  2. Install Spotify Ad Skipper APK
  3. Grant three permissions (Notification, Shizuku, Battery)
  4. Done! Ads will be skipped automatically

For Developers

See PROJECT_SETUP.md for build instructions.

Quick summary:

# Build and install APK
./gradlew installDebug

# Output APK location
# app/build/outputs/apk/debug/app-debug.apk

Getting the APK

Option A: Download Pre-built (Recommended)

Option B: Build from Source

./gradlew assembleDebug
# Output: app/build/outputs/apk/debug/app-debug.apk

Documentation

Project Structure

spotify-ad-skipper/
├── app/src/main/java/com/spotify/adskipper/
│   ├── MainActivity.kt              # Permission setup UI
│   ├── SpotifyAdListener.kt         # Ad detection service
│   ├── ShizukuController.kt         # Shizuku API wrapper
│   ├── SpotifyController.kt         # Spotify lifecycle manager
│   ├── Result.kt                    # Type-safe error handling
│   ├── ShizukuStatus.kt             # Shizuku status enum
│   └── AdSkipConfig.kt              # Configuration data class
├── app/src/test/                    # Unit tests
└── app/build.gradle.kts             # Build configuration

Troubleshooting

Ads Not Being Skipped?

  1. Open Spotify Ad Skipper - verify all three checkmarks are green
  2. Open Shizuku app - verify service is running
  3. Check battery optimization is disabled
  4. Restart both apps if needed

Service Stops After Sleep?

Samsung devices:

  • Settings → Device Care → Battery → Remove app from "Sleeping apps"
  • Settings → Apps → Spotify Ad Skipper → Battery → "Unrestricted"

See INSTALLATION.md for detailed troubleshooting.

License

This project is provided as-is for educational purposes. Use at your own risk.

Disclaimer

This application is not affiliated with, endorsed by, or connected to Spotify AB or Shizuku. All trademarks are the property of their respective owners. The developers assume no liability for any consequences of using this software.

Acknowledgments

  • Shizuku by RikkaApps - Provides the privileged API access
  • Spotify - For the music streaming service
  • Android Open Source Project - For the platform and documentation
Close

How Shizuku is used

Can automatically close, force-stop and relaunch Spotify to skip ads via `IActivityManager` through Shizuku.

This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.

How this app uses Shizuku

Shizuku is used to close and relaunch Spotify from the background when an ad notification is detected, so playback can resume without the ad.

  • Close Spotify on ads: when a Spotify notification looks like an advertisement, the app closes Spotify by finishing its recent task, emulating a swipe to close, and falls back to force stopping the Spotify app with elevated privileges through Shizuku if no task is found.
  • Relaunch Spotify in background: after closing Spotify, the app relaunches Spotify from its background listener with elevated privileges through Shizuku, bypassing background launch restrictions, then sends a play command to resume music.

Android APIs or commands used

  • IActivityManager.forceStopPackage
  • IActivityManager.startActivityAsUser
  • ActivityManager.AppTask.finishAndRemoveTask

Notable details

If the Shizuku based relaunch fails, the app falls back to a normal launch intent, which may be blocked from the background on newer Android versions.

Close

Changelog

What's new for version 1.0

Previous implementation used skips after reopening Spotify after closing to play songs, which used the hourly skip quota for non-Premium accounts. This was due to improper force-close of Spotify which didn't leave enough time for Spotify to update the song queue. Delays have been added and now no longer uses skips.

Close

Permissions

5 permissions requested

  • android.permission.QUERY_ALL_PACKAGES
  • android.permission.BIND_NOTIFICATION_LISTENER_SERVICE
  • moe.shizuku.manager.permission.API_V23
  • android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
  • com.spotify.adskipper.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
Close