简体中文 | English
VolumeLockr 是一款开源免费的音量锁定工具,可对 Android 设备每个音频流的音量进行独立锁定。锁定后,即使按下物理音量键或切换音频模式,音量始终保持不变。
- 独立锁定各个音频流:媒体音量、闹钟音量、铃声 / 通知音量、通话音量
- 定时锁定 — 按时间段自动锁定音量,支持多时间段、工作日/周末模式
- 临时解锁 — 临时覆盖定时锁定 15/30/60/120 分钟
- 勿扰模式集成 — 检测铃声模式变化(静音、振动、正常)
- 仅允许降低模式 — 防止意外调高音量
- 密码保护 — 修改锁定或关闭保护需要密码验证(AES-256 加密存储)
- 最近任务隐藏 — 在多任务界面隐藏应用(基于 AppTask.setExcludeFromRecents,支持小米 / 红米 MIUI)
- 前台服务 — 应用后台运行时持续保持音量锁定
- 开机自启 — 设备重启后自动恢复锁定(60 秒延迟避开音频 HAL 初始化)
- 无广告、无追踪、无网络权限
- 支持 4 种语言:简体中文、English、Français、Русский
前往 Releases 页面 下载最新 APK 直接安装。
环境要求
- JDK 17+
- Android SDK (API 35+)
\\�ash
git clone https://github.com/xunnv/VolumeLockr.git cd VolumeLockr
./gradlew assembleDebug
./gradlew assembleRelease
adb install app/build/outputs/apk/release/app-release.apk \\
Release 签名
- 创建 release/keystore.properties(已加入 .gitignore): \\properties storeFile=release/release.keystore storePassword=你的密码 keyAlias=你的别名 keyPassword=你的密码 \\
- 将密钥文件放在 release/release.keystore
- 运行 ./gradlew assembleRelease,会自动检测并签名
- 打开应用,为每个音频流设置目标音量
- 根据提示授予"勿扰模式"访问权限(铃声模式检测需要)
- 前台服务在后台自动保持锁定
- 可在设置中开启密码保护防止他人修改
- 可在设置中隐藏最近任务(支持小米 / 红米)
| 层级 | 技术 |
|---|---|
| 语言 | Kotlin |
| UI | Material Design 3, Navigation Component |
| 依赖注入 | 手动(无框架) |
| 持久化 | SharedPreferences + EncryptedSharedPreferences |
| 构建 | Gradle (Kotlin DSL), Version Catalog |
| CI/CD | GitHub Actions (assemble + detekt + test) |
| 代码检查 | Detekt |
| 许可证 | GPL-3.0 |
欢迎提交 PR!详见 CONTRIBUTING.md,包括:
- 提交规范(Conventional Commits)
- PR 流程
- 代码风格
- 翻译指南
- 简体中文 (zh-CN):@liket
- Français (fr-FR):Jonathan Klee
- Русский (ru-RU):Jonathan Klee
想添加新的语言?请查看 CONTRIBUTING.md#translations。
本项目采用 GNU General Public License v3.0 许可证。
本 Fork 基于原作者 jonathanklee/VolumeLockr,遵循 GPL-3.0 开源协议。
VolumeLockr allows you to control your Android device volume levels and set persistent locks for each audio stream. Once locked, the volume stays fixed — even when pressing hardware buttons or switching audio modes.
- Lock individual audio streams: Media, Alarm, Ring / Notification, Call
- Scheduled volume lock — auto-lock volumes by time slot with multi-slot, weekday/weekend, and per-stream targets
- Temporary unlock — manually override schedule for 15/30/60/120 minutes
- Do Not Disturb integration — detect ringer mode changes (Silent, Vibrate, Normal)
- Lower-only mode — prevent accidental volume increases
- Password protection — require a password to change locks or disable protection (AES-256 encrypted)
- Hide from recents — remove from recent tasks (uses AppTask.setExcludeFromRecents, works on Xiaomi/Redmi)
- Foreground service — keep locks active when app is in background
- Auto-start on boot — re-apply locks after device reboot (60s delay for audio HAL init)
- No ads, no tracking, no network permissions
- Available in 4 languages: 简体中文, English, Français, Русский
Download the latest APK from the Releases page.
\\�ash git clone https://github.com/xunnv/VolumeLockr.git cd VolumeLockr ./gradlew assembleRelease adb install app/build/outputs/apk/release/app-release.apk \\
GNU General Public License v3.0
This fork is based on jonathanklee/VolumeLockr and follows the GPL-3.0 license.
