From 2e98705f585422859621e4ce3637f3b95fed3a18 Mon Sep 17 00:00:00 2001 From: Yule Date: Thu, 9 Apr 2026 09:22:20 +0800 Subject: [PATCH] =?UTF-8?q?doc:=20=E6=96=87=E6=A1=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NOTE.txt | 102 +++++++++++++++++++++++++++++++++------------------ README.md | 95 ++++++++++++++++++++++++++++++----------------- README_en.md | 97 ++++++++++++++++++++++++++++++------------------ 3 files changed, 190 insertions(+), 104 deletions(-) diff --git a/NOTE.txt b/NOTE.txt index 43b2545..0babd53 100755 --- a/NOTE.txt +++ b/NOTE.txt @@ -1,50 +1,82 @@ ------------- 🌸🌸🌸 ------------ +======================================= + LuminPro V2.2 — 日用屏幕亮度强化 + 作者: 酷安@Yule +======================================= -嗨~亲爱的伙伴!感谢你选择本喵的【日用屏幕亮度强化 (LuminPro V2.1)】ฅ^•ﻌ•^ฅ -本喵会努力帮你让屏幕更亮更清晰,但为了守护你和设备的安全,请花几分钟认真阅读以下内容哦~ +感谢你使用 LuminPro!在开始使用前,请仔细阅读以下内容。 ------------- 🐾【使用约定】🐾 ------------ +--------------------------------------- +【使用约定】 +--------------------------------------- -1. 授权小贴士 -本喵由 Yule 精心开发,你可以自由使用、修改和分享喵~ -但请遵守法律法规,并保留本喵的版权小尾巴(开发者信息不能删掉哦!(๑>ᴗ<๑)) +1. 版权声明 + 本模块由 Yule 开发,你可以自由使用与分享,但请保留开发者信息, + 且须遵守相关法律法规,不得用于商业用途。 -2. 免责小贴士 -本喵目前是「测试版小萌新」,可能存在未知小bug~ -开发者无法对设备损伤、数据丢失或系统罢工负责, -请确认你已做好「自己承担风险」的准备啦!( •́ω•̀ ) +2. 免责声明 + 本模块按"现状"提供,不附带任何明示或暗示的保证。 + 开发者对因使用本模块导致的设备损伤、数据丢失或系统故障不承担责任。 + 使用即代表你已了解并接受相关风险。 -3. 风险说明书(超重要!) -使用前请默念三遍:「我接受这些可能性!」 -🔸 卡顿警告:亮度过高时,设备可能会累到「卡成PPT」! -🔸 发热警告:屏幕努力发光时,设备可能会变成暖宝宝🔥 -🔸 屏幕衰老:长期高亮度会让屏幕「提前长皱纹」甚至烧屏呢(T▽T) -🔸 电量告急:亮闪闪的代价是电量咻咻掉~记得随身带充电宝! +3. 风险说明 + ⚠ 发热与耗电:长期维持峰值亮度会显著增加设备发热与功耗。 + ⚠ OLED 烧屏:高亮度会加速 OLED 面板老化,严重时导致永久性残影。 + ⚠ 系统干预:部分设备在高亮度下可能触发系统降频或热保护机制。 + 请根据实际使用场景合理配置,切勿超出硬件安全范围。 ------------- 🌼【使用小窍门】🌼 ------------ +--------------------------------------- +【功能说明】 +--------------------------------------- -1. 原生底层监听 -本喵 V2.1 起已进化为 inotifyd 事件驱动,~零后台耗电,只有你滑亮屏幕时才会默默出力! +1. inotifyd 底层监听 + 模块采用 inotifyd 事件驱动,仅在亮度节点文件变化时响应, + 无后台轮询,对电量影响极小。 -2. KernelSU WebUI 支持 -告别繁琐的配置文件修改!你只需在 KernelSU 管理器中点击模块配置,即可可视化调整「前台触发亮度」、「峰值亮度」和「休眠时间」。 +2. 守护进程 + daemon.sh 持续监视 inotifyd 进程的存活状态,进程意外退出时 + 自动重启,确保监听链路不中断。 -3. 平滑亮度过渡 -亮度提升已经过精心打磨,提供 50 步毫秒级顺滑过渡,保护眼睛绝不突兀。(๑•̀ㅂ•́)و✧ +3. WebUI 可视化配置 + 在 KernelSU 管理器的模块设置中可调整所有参数,保存后立即生效: + · 前台最大亮度 — 触发提升的亮度阈值 + · 峰值最大亮度 — 提升后的目标硬件亮度 + · 调整步数 — 平滑过渡的步进数(默认 50 步) + · 休眠时段 — 不触发提升的时间范围(格式 HHMM-HHMM) + · 亮度节点路径 — 非标准设备可自定义 sysfs 路径 -4. 时间管理大师 -配置 WebUI 中的「休眠时间」(如 1900-0600),夜间不瞎眼,保证睡眠质量!🌙 +4. 智能跳过 + 以下情形模块会自动跳过本次提升: + · 系统自动亮度已开启 + · 正在播放 HDR 内容(可配置) + · 当前前台应用在黑名单中 + · 处于配置的休眠时段内 -5. 温度安全区 -请在10°C~35°C环境使用,太冷太热都会让设备「闹脾气」!使用中记得检查设备发热和电量状况。 +5. 应用黑名单 + 在 WebUI「应用」页面管理黑名单,支持按包名搜索和 Activity 精确匹配。 ------------- 🌟【最后的小星星】🌟 ------------ +6. 一键峰值触发 (Action) + 通过管理器的「操作」按钮或 action.sh 可即时将亮度拉至峰值; + 再次触发则恢复原始亮度。 -本喵的使命是让你的屏幕更清晰明亮, -但风险与效果并存,请务必做好权衡与准备~ +7. 日志管理 + WebUI「日志」页面支持按 INFO / WARN / ERROR 过滤, + 并可一键复制或导出日志文件至 /sdcard。 -遇到问题欢迎通过 WebUI 面板查看运行日志, -我会摇着尾巴努力帮你解决遇到的问题! -感谢你的包容与支持,一起加油吧!ヾ(≧∇≦)ヾ +--------------------------------------- +【安装步骤】 +--------------------------------------- ------------- 🌸🌸🌸 ------------ +1. 在支持 KernelSU WebUI 的管理器中刷入本模块 ZIP。 +2. 按照音量键向导完成亮度校准。 + (若已有旧版配置,按音量上键直接跳过即可继承原设置) +3. 重启设备生效。 +4. 在管理器模块设置页面调整参数,保存后立即生效。 + +--------------------------------------- +【遇到问题?】 +--------------------------------------- + +请在 WebUI 日志页面导出运行日志,附带日志内容至社区反馈, +以便开发者定位并修复问题。 + +======================================= \ No newline at end of file diff --git a/README.md b/README.md index c0485e1..395f5e0 100755 --- a/README.md +++ b/README.md @@ -1,51 +1,78 @@
-# 日用屏幕亮度强化 (LuminPro) +# LuminPro — 日用屏幕亮度强化 -中文简体 丨 [English](https://github.com/YuleBest/LuminPro/blob/main/README_en.md) +**中文简体** 丨 [English](https://github.com/YuleBest/LuminPro/blob/main/README_en.md) -让你的 Android 设备随时可以使用高亮度显示屏幕内容 -*基于 KernelSU WebUI + 事件驱动架构* +让你的 Android 设备随时可以突破前台亮度上限,将屏幕提升至硬件峰值 +*基于 KernelSU WebUI + inotifyd 事件驱动架构*
-## 模块介绍 -本模块旨在让你的 Android 设备随时可以使用高亮度显示屏幕内容。无论设备当前亮度如何,只要满足设定的前台触发亮度条件,模块便会自动且平滑地提升屏幕亮度至硬件支持的峰值状态,确保你在强光室外也能获得清晰的显示效果。 +## 模块介绍 -## V2.1 核心特性一览 +无论当前屏幕亮度如何,只要触发亮度超过设定阈值,LuminPro 便会自动且平滑地将屏幕提升至硬件支持的峰值亮度,确保你在强光户外也能获得清晰的显示效果。模块采用 `inotifyd` 底层文件事件驱动,零轮询、零空转,配合 KernelSU WebUI 提供完整的可视化配置与状态监控。 -- **零耗电的底层监听 (inotifyd)** - 彻底告别传统的死循环和轮询检测耗电。LuminPro 全新采用底层的 `inotifyd` 事件驱动架构,仅在屏幕亮度文件发生修改的瞬间响应,最大程度节省你的设备电量。 +## V2.2 核心特性 -- **现代化的 KernelSU WebUI 参数配置** - 不再需要手动修改枯燥的 `CONFIG.prop` 文本文件!打开 KernelSU 管理器的模块设置,你可以在舒适的暗色可视化面板中实时调节各项亮度参数: - - `前台最大亮度`:触发亮度提升的源阈值。 - - `峰值最大亮度`:亮度触发后提升到的极致目标值。 +- **零耗电底层监听 (inotifyd)** + 彻底告别死循环与轮询。仅在亮度节点文件发生变更的瞬间响应,守护进程 (`daemon.sh`) 负责持续监视 inotifyd 进程稳定性,确保监听链路永不中断。 -- **护眼级平滑亮度提升** - 亮度瞬间跃升不仅刺眼,还十分突兀——我们为你设计了专属的高刷新率 50 步亮度微调顺滑过渡算法,让屏幕提亮效果更显柔和。 +- **KernelSU WebUI 可视化配置** + 在管理器的模块设置页面中,通过暗色面板实时调整所有参数,保存后**立即生效**,无需重启: + - `前台最大亮度` — 触发提升的亮度阈值 + - `峰值最大亮度` — 提升后的目标硬件亮度 + - `调整步数` — 平滑过渡的步进数(默认 50 步) + - `休眠时段` — 指定不触发提升的时间范围(如 `2200-0700`) + - `亮度/最大亮度节点路径` — 支持自定义设备 sysfs 路径 + - `inotify 监测事件` — 自定义 inotifyd 触发事件类型 -- **勿扰休眠时段** - 在 WebUI 中随时指定休眠时间段(例如 `1900-0600`)。在设定的夜间休息时间内,模块服务将静默休眠,不再打扰你的睡眠。 +- **平滑亮度过渡** + 毫秒级 50 步步进算法,避免亮度瞬间跃升带来的视觉不适。步数可在 WebUI 中自由调整。 -- **实时掌控模块状态** - 支持通过前端面板直接获取监控系统的核心参数,包含了当前界面的实时亮度、底层拉起的在运行 PID 服务状态,并可以随时抓取详细的运行日志供开发者分析。 +- **智能跳过机制** + 以下情况模块将自动跳过本次提升,避免干扰正常使用: + - 系统自动亮度已启用 + - 当前正在播放 HDR 内容(可配置) + - 当前前台应用在黑名单中 + - 处于配置的休眠时段内 -## 模块工作流程 -1. **安装期自定义校准** - - 通过音量键互动脚本,主动测定你设备通用的 `前台亮度阈值` 及 `硬件峰值亮度`,同时支持无缝继承旧版设定的配置以跳过多余校准。 -2. **事件监听阶段** - - 启动完毕后,`inotifyd` 会作为背景挂起精准监控屏幕亮度的物理底层节点文件变动。 -3. **防抖与步进调整机制** - - 取代了早期版本的参数紊乱,当前在用户手动横滑亮度控制条停止响应后,算法会经过安全延时后计算准确的终点步进结果点亮屏幕。 +- **应用黑名单** + 在 WebUI 的「应用」页面中管理黑名单,支持按包名搜索、Activity 精准匹配。黑名单内的应用处于前台时,模块不执行亮度提升。 -## 安装方法 -1. 在支持 WebUI 标准的管理器环境框架下安装本模块的 ZIP 包。 -2. 在音量键安装向导中进行简单的第一步初始化按键确认校准(如果已有旧版配置按音量加直接跳过即可)。 +- **一键峰值触发 (boost.sh)** + 通过管理器的「操作」按钮或 `action.sh` 快捷开关,可即时将亮度拉至峰值;再次触发则恢复原始亮度。 + +- **实时状态监控与日志** + WebUI 状态页实时显示当前亮度值、inotifyd 运行 PID 及服务状态。日志页支持按 `INFO` / `WARN` / `ERROR` 等级过滤,并可一键复制或导出到 `/sdcard`。 + +## 配置项说明 + +| 配置项 | 说明 | 默认值 | +|---|---|---| +| `ui_max_bri` | 前台触发阈值(UI 亮度值) | `0`(需手动校准)| +| `max_bri` | 峰值目标亮度 | `0`(需手动校准)| +| `steps_num` | 亮度过渡步数 | `50` | +| `sleep_time` | 休眠时段,格式 `HHMM-HHMM` | 空(禁用)| +| `auto_bri_sleep` | 自动亮度开启时跳过 | `1`(启用)| +| `display_hdr_sleep` | HDR 内容时跳过 | `0`(禁用)| +| `log_max_size` | 日志文件大小上限(KB) | `512` | +| `now_bri_file` | 当前亮度节点路径 | 标准 panel0 路径 | +| `max_bri_file` | 最大亮度节点路径 | 标准 panel0 路径 | +| `blacklist_apps` | 黑名单包名/Activity 列表 | `[]` | +| `inotify_events` | inotifyd 监测事件 | `c` | + +## 安装方法 + +1. 在支持 KernelSU WebUI 的管理器中刷入模块 ZIP。 +2. 在音量键安装向导中完成亮度校准(若已有旧版配置,按音量上键直接继承跳过)。 3. 重启设备生效。 -4. 如需调整参数,只需在管理器中进入模块设置页面进行更改,点击保存**立即生效**。 +4. 在管理器模块设置页调整各项参数,点击保存立即生效。 -## 注意事项 -- **长亮降频与烧屏警告**:长期处于高压力的激发峰值亮度,将指数级增加设备的耗电与发热水平,可能会导致设备卡顿并不可逆转地增加 OLED 屏幕烧屏老化几率。 -- 请确保写入参数数值为你的设备安全范围内的数据,避免超出你硬件屏幕能承受的上限。 -- 只有确保你在完全理解高亮度带来的体验和危害下,方可能长期启用。功能出现阻断或者其他 BUG 时,请自行保存 WebUI 日志通过社区回馈解决。 \ No newline at end of file +## 注意事项 + +> ⚠️ **OLED 烧屏与发热警告** +> 长期维持峰值亮度会显著加剧 OLED 屏幕老化与烧屏风险,并大幅增加设备发热与耗电。请根据使用场景合理配置,切勿超出设备硬件安全范围。 + +- 确保填写的亮度数值在设备硬件支持的安全范围内。 +- 遇到问题时,请通过 WebUI 日志页导出运行日志后反馈至社区。 \ No newline at end of file diff --git a/README_en.md b/README_en.md index b2a25ec..ed6fb4a 100644 --- a/README_en.md +++ b/README_en.md @@ -1,51 +1,78 @@ -
+
# LuminPro -[中文简体](https://github.com/YuleBest/LuminPro/blob/main/README.md) 丨 English +[中文简体](https://github.com/YuleBest/LuminPro/blob/main/README.md) 丨 **English** -Enable your Android device to display content at boosted brightness anytime -*Based on KernelSU WebUI + Event-Driven Architecture* +Break past the Android foreground brightness cap and push your screen to its hardware peak — anytime +*Powered by KernelSU WebUI + inotifyd Event-Driven Architecture*
-## Module Introduction -This module allows your Android device to constantly utilize boosted brightness for screen content display. When manually adjusting brightness over a designated threshold limit, the module automatically and smoothly elevates the screen brightness parameter to its maximum hardware-driven state, ensuring clear readability even in strong outdoor daylight. +## Overview -## V2.1 Core Features +LuminPro monitors the system brightness sysfs node via `inotifyd`. Whenever the current brightness exceeds a configured threshold, it smoothly ramps the display up to the hardware maximum — ideal for outdoor readability. A resident daemon (`daemon.sh`) keeps the listener alive, and the full KernelSU WebUI lets you tune every parameter without a reboot. -- **Zero Drain Background Monitoring (inotifyd)** - Say goodbye to infinite loops and heavy active polling overhead. LuminPro natively utilizes an event-driven `inotifyd` listener to respond *only* when the brightness sysfs node alters, fundamentally preserving your device's overall battery life. +## V2.2 Core Features -- **Modernized KernelSU WebUI** - No more manual text editing in generic config files! Simply tap the module settings inside your KernelSU manager to seamlessly adjust options directly in a tailored Dark Mode interface: - - `Foreground Max Brightness`: The original UI threshold dragging point that initiates the brightness boost. - - `Peak Maximum Brightness`: The extreme and ultimate targeted hardware brightness your screen will soar to. +- **Zero-Overhead Event Listener (inotifyd)** + No polling loops, no background spin. LuminPro reacts only when the brightness node file changes. A companion daemon process continuously watches the `inotifyd` listener and restarts it if it ever dies, guaranteeing an unbroken monitoring chain. -- **Smooth Step Transitions** - Abrupt, rigid jumps in brightness ruin visual coherence. LuminPro operates via an embedded millisecond-level, 50-step computation curve that scales backlight inputs naturally and sequentially. +- **KernelSU WebUI Configuration** + Adjust all settings visually inside the module's settings page. Changes take effect **immediately** — no reboot required: + - `Foreground Max Brightness` — UI brightness threshold that triggers a boost + - `Peak Max Brightness` — hardware brightness value to ramp up to + - `Transition Steps` — number of steps for smooth ramping (default: 50) + - `Sleep Hours` — time range to suppress boosts (e.g. `2200-0700`) + - `Brightness / Max-Brightness node paths` — custom sysfs paths for non-standard devices + - `inotify Event Types` — which inotifyd events to watch -- **Sleep & Quiet Hours** - You do not need a blinding torch in bed. Tweak quiet night hours (e.g., `1900-0600`) locally via the WebUI. During your configured timeframe, the module enters a silent hibernation ensuring your retinas and sleep remain undisturbed. +- **Smooth Step Transition** + Millisecond-level 50-step interpolation prevents jarring brightness jumps. The step count is configurable. -- **Live Status & Direct Logs Dashboard** - Capture crucial runtime performance status at a glance. Attain realtime active backlight parameters, executing daemon service PIDs, and direct service logs dynamically straight from the integrated UI. +- **Smart Skip Logic** + The module automatically skips boosting when: + - System adaptive brightness is active + - HDR content is detected on screen (configurable) + - The foreground app is on the blacklist + - The current time falls within the configured sleep range -## Operations Workflow -1. **Initial Calibration Setup** - - Employs minimal physical volume-key prompts during ZIP installation to read and memorize your device’s specific maximum limitations. Users upgrading smoothly bypass calibration logic if previous files are preserved. -2. **Event Tracking Mode** - - Submits a background `inotifyd` observer attaching safely without looping variables toward the standard Android illumination logic path. -3. **Debounce Optimization Engine** - - Interacting with display slider changes will safely debounce over sub-second timers, avoiding computational race-conditions. It acknowledges exactly where your sliding ends prior to activating iterative hardware boosts. +- **App Blacklist** + Manage a package / Activity blacklist directly in the WebUI "Apps" tab. Search by package name, pick specific activities, and the module stays hands-off whenever a blacklisted app is in the foreground. -## Quick Installation Instructions -1. Flash the packaged module ZIP directly through any framework manager backing WebUI specification features. -2. Walk through standard volume physical key verification presses (you may easily skip recalibrations extending old module environments by just pressing Volume+). -3. Soft reboot to engage operations. -4. If parameters or constraints require tweaking, manipulate values across the internal interface view. All operations are **persisted instantly**. +- **Instant Peak Boost (boost.sh)** + Trigger a one-shot peak brightness via the manager's Action button or `action.sh`. A second tap restores the original brightness. -## Vital Precautions -- **OLED Burn-in & Escalated Thermal Warning**: Persistently overriding and enforcing intensive display peak loads aggressively drives heat emissions up. Doing so vastly skyrockets irreversible UI ghosting & OLED burn-in permanent issues respectively. -- Verify entered tuning numbers remain securely governed matching acceptable values on your manufacturer's specific screen limit boundaries to avert hardware blackout glitches. -- Acknowledge inherent hazards prior to extended utilization. If irregular phenomena transpire, inspect native system output records over the built-in front-end log pane. \ No newline at end of file +- **Live Status & Log Dashboard** + The WebUI status page shows real-time brightness, the active inotifyd PID, and service state. The log page supports level filtering (`INFO` / `WARN` / `ERROR`) and lets you copy or export logs to `/sdcard` with one tap. + +## Configuration Reference + +| Key | Description | Default | +|---|---|---| +| `ui_max_bri` | Foreground brightness trigger threshold | `0` (requires calibration) | +| `max_bri` | Target peak brightness value | `0` (requires calibration) | +| `steps_num` | Ramp transition steps | `50` | +| `sleep_time` | Sleep range, format `HHMM-HHMM` | empty (disabled) | +| `auto_bri_sleep` | Skip when adaptive brightness is on | `1` (enabled) | +| `display_hdr_sleep` | Skip during HDR playback | `0` (disabled) | +| `log_max_size` | Log file size cap (KB) | `512` | +| `now_bri_file` | Current brightness sysfs node path | standard panel0 path | +| `max_bri_file` | Max brightness sysfs node path | standard panel0 path | +| `blacklist_apps` | Blacklisted packages / activities | `[]` | +| `inotify_events` | inotifyd event mask | `c` | + +## Installation + +1. Flash the module ZIP in any KernelSU-compatible manager that supports WebUI. +2. Follow the volume-key calibration wizard during installation. Press Volume Up to inherit an existing configuration and skip recalibration. +3. Reboot to activate. +4. Open the module settings page in your manager to adjust parameters. All changes are applied instantly on save. + +## Warnings + +> ⚠️ **OLED Burn-in & Thermal Warning** +> Sustained peak brightness significantly accelerates OLED panel aging and burn-in, and substantially increases device heat output and power draw. Use responsibly and ensure all values stay within your hardware's safe operating range. + +- Double-check that configured brightness values do not exceed your device's hardware limits. +- If issues occur, export the runtime log from the WebUI and include it when reporting to the community. \ No newline at end of file