ShizuStore

Volume Manager

yume-chan

0.2 · GitHub

Download APK
Audio Android 13+ 1 year ago GPL-2.0
60 ShizuStore
48.2k GitHub
578 Stars
18 MB Size

More about this app

Control each app's volume independently

Volume Manager

IzzyOnDroid RB shield

Work in progress

Control each app's volume independently. Shizuku is used to access privileged APIs.

Requires Android 13.

Screenshot Screenshot

(Screenshot from beta version, download available from action artifacts)

Download

Latest development version can be downloaded from action artifacts.

Some hand-picked versions can also be downloaded from releases.

Usage

  1. Install and enable Shizuku
  2. Launch Volume Manager and request Shizuku permission
  3. It should automatically enable its accessibility service
  4. You can change volume either from
    1. The main interface
    2. Press any volume button and a popup should appear, completely replace the default volume popup
    3. Enable accessibility button and click the button

Compare to SoundMaster from ShizuTools

This app uses hidden API to directly change each audio stream's volume.

SoundMaster uses MediaProjection API to record audio from each app and apply post-effects.

Feature Volume Manager SoundMaster
Minimal Android version 13 10
Control volume of each app ✅ ✅
Set output device for each app ❌ 1 ✅
Change left-right balance ❌ 2 ✅
Equalizer (EQ) ❌ ✅
Control protected apps ✅ ❌ 3
Zero latency added ✅ ❌

1: There are APIs to do that, but not implemented in this app

2: There are other APIs to do that, but not implemented in this app

3: Can be worked around by patching the app

How does it work

  1. Use AudioManager#getActivePlaybackConfigurations() to get list of AudioPlaybackConfiguration.

    Each AudioPlaybackConfiguration represents a audio player, like AudioTrack and MediaPlayer

  2. Use ActivityManager#getRunningAppProcesses() and PackageManager#getApplicationInfo() to map and group AudioPlaybackConfiguration#getClientPid() to apps

  3. Use AudioPlaybackConfiguration#getPlayerProxy() and IPlayer.setVolume() to update the internal volume multiplier

  4. Use AudioManager#registerAudioPlaybackCallback() to listen for new AudioPlaybackConfigurations and apply current volume to them.

Note

This app uses the same API as MIUI's "Adjust media sound in multiple apps". Because this API can only setting volume, not reading, the volume set by one app will not be reflected in the other one.

Close

How Shizuku is used

Can control per-app volume and auto-enable its volume panel via `pm grant`, `IAudioService` and `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

Volume Manager uses Shizuku to observe playback per app, set individual app volumes, and enable its own system access.

  • Adjust per-app volume: users can set a separate volume level for each app, applied through Shizuku access to the privileged system audio service.
  • Detect playing apps: users see which apps are currently playing sound because the app maps live audio sessions to running apps through Shizuku access to privileged system services.
  • Enable volume panel itself: users get the floating volume overlay without manual setup commands because the app grants itself a system settings permission with the pm grant shell command through Shizuku and then writes secure settings to turn on its accessibility service.

Android APIs or commands used

  • pm grant
  • android.content.pm.IPackageManager
  • android.media.IAudioService
  • android.app.IActivityManager.getRunningAppProcesses
  • android.media.AudioManager.getActivePlaybackConfigurations
  • android.media.AudioManager.registerAudioPlaybackCallback
  • android.media.AudioPlaybackConfiguration.getClientPid
  • android.media.AudioPlaybackConfiguration.getPlayerProxy
  • android.media.PlayerProxy.setVolume
  • android.provider.Settings$Secure.putInt
  • android.provider.Settings$Secure.putString
  • android.provider.Settings$Secure.getString
Close

Changelog

What's new for version 0.2

  • Fix accessibility service can't be enabled automatically on some devices (#4, #9, #12)

APK built in https://github.com/yume-chan/VolumeManager/actions/runs/17017302629

Full Changelog: https://github.com/yume-chan/VolumeManager/compare/v0.1...v0.2

Close

Permissions

4 permissions requested

  • android.permission.WRITE_SECURE_SETTINGS
  • android.permission.USE_BIOMETRIC
  • moe.chensi.volume.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
  • moe.shizuku.manager.permission.API_V23
Close