ShizuStore

Mixer (1)

farizanjum

1.0 · GitHub

Download APK
Audio Android 10+ 9 months ago Proprietary
66 ShizuStore
2k GitHub
44 Stars
55 MB Size

More about this app

Per-app volume overlay intercepting hardware keys

Mixer (1)

Per-app volume control for Android, designed with Nothing OS aesthetics.

Mixer (1) intercepts hardware volume button presses and displays a custom overlay that allows independent volume control for each currently playing audio application. It uses Shizuku for privileged access without requiring root.

mixer(1)-banner

Table of Contents


Features

  • Per-App Volume Control: Adjust the volume of individual applications independently
  • Volume Overlay: Custom overlay appears when volume buttons are pressed, replacing or supplementing the system volume UI
  • Auto-Apply Volume: Volume settings persist across song changes and new audio players within the same app
  • Real-time Detection: Uses AudioPlaybackCallback for immediate detection of new audio streams
  • Nothing OS Design: Black and red color scheme inspired by Nothing Phone aesthetics
  • No Root Required: Uses Shizuku for privileged operations without root access
  • Volume Persistence: Remembers volume levels for each app by UID
  • Logarithmic Volume Curve: Natural-feeling volume control that matches human hearing perception

Requirements

Requirement Details
Minimum Android Version Android 10 (API 29)
Target Android Version Android 14 (API 34)
Shizuku Required, version 11 or higher
Permissions Overlay permission, Accessibility Service

Tested Devices

  • Nothing Phone (2a) running Android 15 / Nothing OS
  • Should work on any device running Android 10 or higher with Shizuku support

Installation

  1. Install Shizuku and start the Shizuku service
  2. Install Mixer (1) APK
  3. Follow the setup wizard:
    • Grant Shizuku permission when prompted
    • Enable the Accessibility Service for volume key detection
    • Grant overlay permission
  4. Press a hardware volume button to see the overlay

How It Works

Mixer (1) uses a multi-layered approach to achieve per-app volume control:

1. Audio Session Detection

The app uses AudioManager.getActivePlaybackConfigurations() to enumerate all currently active audio players. Each AudioPlaybackConfiguration represents an audio stream from an application.

2. Privileged Access via Shizuku

Because Android sanitizes UID and player proxy information when accessed from regular app processes, Mixer (1) runs a UserService in Shizuku's privileged shell process (UID 2000). This allows access to:

  • AudioPlaybackConfiguration.getClientUid() - Identifies which app owns the audio stream
  • AudioPlaybackConfiguration.getPlayerProxy() - Returns the IPlayer interface for volume control

3. Volume Control via IPlayer

The IPlayer.setVolume() hidden API is used to set the internal volume multiplier (0.0 to 1.0) for each audio player. This is the same API used by MIUI's "Adjust media sound in multiple apps" feature.

4. Volume Key Interception

An Accessibility Service monitors volume key events. When detected, it triggers the overlay display and routes volume changes through the custom UI.

5. Real-time Callback

AudioManager.registerAudioPlaybackCallback() provides real-time notifications when new audio players start or stop. This allows immediate application of saved volume settings to new streams.


Comparison with Similar Projects

Feature Mixer (1) VolumeManager AudioHQ
Root Required No No Yes
Shizuku Required Yes Yes No
Minimum Android Android 10 Android 10 Android 7
Volume Control Method IPlayer.setVolume() IPlayer.setVolume() Native AudioFlinger patches
Volume Persistence Yes (per UID) No Yes
Auto-apply to New Streams Yes Yes Yes
Volume Key Override Yes (Accessibility) Yes (Accessibility) No
Custom Overlay Yes Yes No (in-app UI only)
App Detection Shizuku UserService Shizuku direct Root shell
Design Style Nothing OS Material You Material Design
Open Source Yes Yes Yes

Key Differences

vs VolumeManager (yume-chan)

Both projects use the same underlying IPlayer.setVolume() API via Shizuku. The main differences are:

  • Mixer (1) persists volume settings per UID and auto-applies them to new audio players
  • Mixer (1) uses a Shizuku UserService to access privileged AudioPlaybackConfiguration data, while VolumeManager may use different approaches
  • Design philosophy: Mixer (1) targets Nothing OS aesthetics, VolumeManager uses Material You

vs AudioHQ (Alcatraz323)

AudioHQ requires root access and uses native AudioFlinger patches for volume control. This provides more complete control but requires a rooted device. Mixer (1) achieves similar results without root by using Shizuku and the IPlayer API.


Limitations

  1. Native Audio Engines: Some games and apps using OpenSL ES, AAudio, or audio middleware (FMOD, Wwise) may not respond to volume changes. The IPlayer API only controls audio streams that go through Android's Java audio APIs.

  2. Volume Reading: The IPlayer API is write-only. Volume set by one app is not reflected in another app reading the volume.

  3. Screen Recording: Audio captured by screen recording may not reflect per-app volume changes, as recording may capture audio before the volume multiplier is applied.

  4. Shizuku Dependency: Shizuku must be running for the app to function. If Shizuku stops, per-app volume control will not work.


Building from Source

Prerequisites

  • Android Studio Hedgehog or newer
  • JDK 17 or higher
  • Android SDK 34

Build Steps

# Clone the repository
git clone https://github.com/farizanjum/mixer-1.git
cd mixer-1

# Build debug APK
./gradlew assembleDebug

# Build release APK
./gradlew assembleRelease

APK output locations:

  • Debug: app/build/outputs/apk/debug/app-debug.apk
  • Release: app/build/outputs/apk/release/app-release-unsigned.apk

Project Structure

app/src/main/java/com/mixer/one/
├── MainActivity.kt           # Main activity and setup UI
├── MixerApplication.kt       # Application class
├── audio/
│   ├── AudioSessionManager.kt    # Core session management and volume control
│   ├── AudioSessionDetector.kt   # Dumpsys-based fallback detection
│   └── PlayerVolumeController.kt # Local reflection fallback
├── service/
│   ├── OverlayManager.kt         # Overlay window management
│   ├── OverlayService.kt         # Foreground service for overlay
│   └── VolumeKeyService.kt       # Accessibility service for key detection
├── shizuku/
│   ├── ShizukuRepository.kt      # Shizuku permission and shell commands
│   ├── ShizukuVolumeManager.kt   # UserService client
│   ├── VolumeUserService.kt      # Privileged UserService (runs in Shizuku)
│   └── IVolumeService.kt         # AIDL interface
└── ui/
    ├── overlay/VolumeOverlay.kt  # Overlay UI composables
    ├── setup/                    # Setup wizard screens
    └── theme/                    # Nothing OS color theme

License

This project is provided as-is for educational and personal use.


Acknowledgments

  • Shizuku by RikkaApps - Privileged API access without root
  • VolumeManager by yume-chan - Inspiration and IPlayer API documentation
  • AudioHQ by Alcatraz323 - Prior art in per-app volume control
  • HiddenApiBypass by LSPosed - Hidden API access
Close

How Shizuku is used

Can show per-app volume sliders for playing apps and set each app volume via Shizuku `UserService` and shell commands.

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 lets the mixer see which apps are playing sound and control each app volume separately from the overlay.

  • Detect playing apps: the app lists active audio players with their app identity through a privileged service running under Shizuku, with dumpsys audio and dumpsys media_session output as fallback when that service has no data.
  • Identify apps by name: the UID of each player is matched to an installed package with the cmd package list packages -U shell command through Shizuku, so each slider shows the correct app name and icon.
  • Adjust per-app volume: a volume value chosen on a per-app slider is applied to that player with privileged volume control through Shizuku, including reapplying a saved level when a new player from the same app appears and setting all players of the same app together.
  • Fallback volume control: when the privileged service cannot set the level, the chosen value is applied with service call audio and cmd media.audio_flinger shell commands through Shizuku.

Android APIs or commands used

  • IAudioService.getActivePlaybackConfigurations
  • AudioPlaybackConfiguration.getPlayerProxy
  • AudioPlaybackConfiguration.getClientUid
  • AudioPlaybackConfiguration.getClientPid
  • AudioPlaybackConfiguration.getPlayerInterfaceId
  • AudioPlaybackConfiguration.getPlayerState
  • PlayerProxy.setVolume
  • ServiceManager.getService
  • IAudioService.Stub.asInterface
  • dumpsys audio
  • dumpsys media_session
  • dumpsys media.audio_flinger
  • dumpsys audio_flinger
  • dumpsys media.audio_policy
  • cmd package list packages -U
  • service call audio
  • cmd media.audio_flinger set-volume
  • cmd media.audio_flinger setVolumeForUid
  • dumpsys media.audio_flinger --set-volume

Notable details

Without Shizuku the app falls back to local detection and shows only global volume when no sessions can be resolved, per-app control is limited. Volume choices are numeric slider values applied through fixed privileged operations, not free typed shell commands.

Close

Changelog

What's new for version 1.0

Mixer (1)

Per-app volume control for Android, designed with Nothing OS aesthetics.

Mixer (1) intercepts hardware volume button presses and displays a custom overlay that allows independent volume control for each currently playing audio application. It uses Shizuku for privileged access without requiring root.


Features

  • Per-App Volume Control: Adjust the volume of individual applications independently
  • Volume Overlay: Custom overlay appears when volume buttons are pressed, replacing or supplementing the system volume UI
  • Auto-Apply Volume: Volume settings persist across song changes and new audio players within the same app
  • Real-time Detection: Uses AudioPlaybackCallback for immediate detection of new audio streams
  • Nothing OS Design: Black and red color scheme inspired by Nothing Phone aesthetics
  • No Root Required: Uses Shizuku for privileged operations without root access
  • Volume Persistence: Remembers volume levels for each app by UID
  • Logarithmic Volume Curve: Natural-feeling volume control that matches human hearing perception

Requirements

Requirement Details
Minimum Android Version Android 10 (API 29)
Target Android Version Android 14 (API 34)
Shizuku Required, version 11 or higher
Permissions Overlay permission, Accessibility Service

Tested Devices

  • Nothing Phone (2a) running Android 15 / Nothing OS
  • Should work on any device running Android 10 or higher with Shizuku support

Limitations

  1. Native Audio Engines: Some games and apps using OpenSL ES, AAudio, or audio middleware (FMOD, Wwise) may not respond to volume changes. The IPlayer API only controls audio streams that go through Android's Java audio APIs.

  2. Volume Reading: The IPlayer API is write-only. Volume set by one app is not reflected in another app reading the volume.

  3. Screen Recording: Audio captured by screen recording may not reflect per-app volume changes, as recording may capture audio before the volume multiplier is applied.

  4. Shizuku Dependency: Shizuku must be running for the app to function. If Shizuku stops, per-app volume control will not work.


Close

Permissions

9 permissions requested

  • android.permission.REQUEST_INSTALL_PACKAGES
  • moe.shizuku.manager.permission.API_V23
  • android.permission.SYSTEM_ALERT_WINDOW
  • android.permission.MODIFY_AUDIO_SETTINGS
  • android.permission.FOREGROUND_SERVICE
  • android.permission.FOREGROUND_SERVICE_SPECIAL_USE
  • android.permission.POST_NOTIFICATIONS
  • android.permission.QUERY_ALL_PACKAGES
  • com.mixer.one.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
Close