Skip to content

Releases: Chengdong-Yu/Glyph-Controller

Glyph Controller 1.30

Choose a tag to compare

@Chengdong-Yu Chengdong-Yu released this 16 Oct 13:21

更新内容

  • 移除 RootCommand.run() 的全局串行锁,保活操作不再阻塞短 root 命令。
  • root 探测或音量节点读取被拒绝后,在本次应用打开期间停止继续拉起 su。
  • 音量功能关闭时同步注销广播、停止动画并终止所有输入节点 reader。
  • 为 root reader 的 PID 握手增加 2 秒超时,并通过 stdin 生命周期看门狗清理强停后的 root reader。
  • 将保活脚本的常驻轮询从 1 秒调整为 5 秒,系统充电广播仍负责即时触发。
  • Release 缺少正式签名配置时直接失败,避免误传 debug 签名 APK。
  • 升级到 targetSdk 37 / versionCode 31,关闭应用数据备份并补齐 Android 12+ 数据提取规则。
  • 新增核心逻辑单元测试、Android CI、Gradle wrapper 校验和 Dependabot 更新检查。
  • 修复 Gradle 10 将移除的 Groovy DSL 旧赋值语法。

验证

  • 单元测试:6 项通过。
  • Android Lint:0 errors,0 warnings。
  • Debug 与正式 Release 构建通过,R8 压缩通过。
  • GitHub Actions build 检查通过。
  • APK 版本:1.30(31),targetSdk 37。
  • 正式签名 SHA-256:B76F383C821B6BB627038BC1165BE831EE798F48A583568EB1CCC3127512CC1D。
  • APK SHA-256:9FA838B8ABCB918FF3529FA7ECBB924CB5360290099860BCF9DF5FA64DC12B90。

Glyph Controller 1.29

Choose a tag to compare

@Chengdong-Yu Chengdong-Yu released this 16 Oct 07:06

更新内容

  • 全面重构 MIUIX 首页与 33 区 Glyph 场景编辑界面。
  • 音量键按下时立即显示音量灯环,并动态发现音量键输入节点。
  • 新增保活脚本安装、重启、移除和运行状态管理。
  • Root 未授权后暂停本次打开期间的后续 su 调用,再次打开应用时重新检测。
  • 任一音量输入 reader 失效时自动重建整组 reader。
  • 新增 macOS/Linux POSIX Gradle wrapper 与正式 release 签名配置。

验证

  • Nothing Phone (2) 实机安装与冷启动通过。
  • Android Lint:0 errors。
  • APK SHA-256:4A49101C8EB463E4AE03E196FA05AC8B1FDF2054D957BBB9B8E28AB7B1679269

Glyph Controller 1.28

Choose a tag to compare

@Chengdong-Yu Chengdong-Yu released this 11 Oct 10:09
v1.28

Rebuild UI with Miuix Compose and harden Glyph runtime

Glyph Controller 1.19

Choose a tag to compare

@Chengdong-Yu Chengdong-Yu released this 20 Sep 14:53

Glyph Controller 1.19

面向 Nothing Phone (2) 的 Glyph LED 控制器。以 root 身份直接读写 AW20036 驱动的 sysfs 节点来驱动灯带,不依赖 Nothing 官方 Glyph SDK,因此不受前台服务限制。

这是改名为 Glyph Controller、包名迁移到 com.richard.glyphcontroller、并完成 Java → Kotlin 重写之后的首个正式发布版本。

功能

全开 / 全关 — 一次写入 33 个可寻址区域的最大亮度。

充电扫光 — 插入充电器时从下往上扫一遍:感叹号竖条自底向上点亮,接着圆点、左下弧与右下弧、左右竖条、上侧弧,最后由主环收尾。逐段步进 15 ms,全亮保持 400 ms,随后渐暗熄灭。由 root 看门狗捕获充电状态上升沿触发。

通知闪光 — 新通知到达时三组灯带依次闪一次:最下方感叹号竖条 + 圆点 → 主环右上方弧段 → 相机 deco 周围两条灯带。每组亮 90 ms、组间熄 40 ms。分组摘要与常驻通知会被跳过,避免重复触发。

快捷设置磁贴 — 下拉通知栏一键全开 / 全关,状态持久化,重启后磁贴显示上次结果。

实现要点

  • 直接写 /sys/class/leds/led_strips/:operating_mode(0 灭 / 1 激活 / 2 待机)、frame_brightness(空格分隔的 33 个亮度值)、single_brightness、all_brightness
  • 33 区映射表(frame 索引 → AW20036 寄存器)集中在 RootGlyphClient.kt
  • 保活脚本由 app 自动落盘到 /data/adb/service.d/glyph_keepalive.sh(Magisk / KernelSU 开机自启目录),内含单例看门狗循环:app 进程消失则 am startservice 拉起;同时以 1 秒周期轮询 /sys/class/power_supply/battery/status 与 usb/online 捕获充电上升沿
  • 脚本幂等地为 app 加上电池白名单、RUN_ANY_IN_BACKGROUND、standby bucket 豁免与自启动权限
  • 通知监听注册通过 cmd notification allow_listener 在独立会话中完成,不与脚本安装挤在同一个 su 会话里,避免重绑监听导致安装序列被打断
  • Kotlin 重写,唯一依赖 com.google.android.material:material:1.12.0
  • 界面与资源中英双语,按系统语言自动切换

安装要求

  • Android 13(API 33)及以上

已知限制

  • release 变体与 debug 共用同一套签名,便于直接覆盖安装,不作正式分发签名使用
  • 通知闪光的节奏常量集中在 GlyphNotificationService 顶部(ON_MS / GAP_MS),充电扫光的在 ChargingSweepService 顶部(STEP_MS / HOLD_MS / FADE_MS),观感不合口味时可直接改

校验

项目 值
文件 app-release.apk
大小 1,944,807 字节(1.85 MiB)
SHA-256 E485A35B58B148F20506903E96BB5846622DB2EFE24C5A29837CFF77C3137DFE
versionCode / versionName 20 / 1.19
minSdk / targetSdk 33 / 35

English

Glyph LED controller for the Nothing Phone (2). It drives the AW20036 LEDs by reading and writing the driver's sysfs nodes directly as root, without depending on the official Nothing Glyph SDK, so there is no foreground-service restriction.

This is the first formal release after the rebrand to Glyph Controller, the migration to com.richard.glyphcontroller, and the Java → Kotlin rewrite.

Features

All-on / all-off across the 33 addressable zones in a single write. A bottom-up charging sweep on the charger rising edge: the exclamation bar lights bottom to top, then the dot, the left and right lower arcs, the left and right vertical bars, the upper arc, and finally the main ring. 15 ms per step, 400 ms hold, then a fade out. A three-stage notification flash: bottom exclamation bar + dot → upper-right ring arc → the two strips around the camera deco, 90 ms on per group with a 40 ms gap, skipping group summaries and ongoing notifications. A Quick Settings tile that toggles everything in one tap with persisted state.

Implementation

Direct writes to /sys/class/leds/led_strips/{operating_mode,frame_brightness,single_brightness,all_brightness}. A keepalive script is installed into /data/adb/service.d/glyph_keepalive.sh with a singleton watchdog loop plus 1-second charger-edge polling. Notification listener registration runs in its own shell session. Kotlin, single dependency (material:1.12.0), zh/en resources selected by system locale.

Requirements

Android 13+ (API 33).

Notes

The release variant is signed with the debug key so it can be side-loaded over an existing install; it is not a distribution signing key. Animation timing constants sit at the top of GlyphNotificationService and ChargingSweepService if you want to retune them.