Skip to content

0.92 — 修复 timer.conf 触发的安装崩溃

Choose a tag to compare

@173808933 173808933 released this 29 Nov 02:55
· 1 commit to conf-driven since this release

0.92(versionCode 93)— 修复 0.91 的安装崩溃

必须升级

0.91 上点「准备 / 开始提权」会直接失败,日志只有一行:

安装失败:
java.lang.StringIndexOutOfBoundsException: begin 6, end 5, length 10

受影响的设备:/data/local/tmp 下存在 timer.conf 的所有机器 —— 也就是
跑过一次准备的机器全部中招,等于 0.91 谁都装不上。

成因

0.91 新增的临时文件自动清理里,用

name.substring("timer.".length(), name.length() - ".conf".length())

判断 timer.<pid>.conf。但 timer.conf 本身长 10 个字符,恰好也满足
startsWith("timer.") && endsWith(".conf"),于是算出 substring(6, 5)。
而 install() 一进来就遍历目录做清理,必然扫到正在用的 timer.conf。

修复

先判 to <= from 直接返回 false —— timer.conf 是当前有效配置,
本来就不该进清理名单。

文件名 结果
timer.conf 保留(此前会崩)
timer.<pid>.conf 清理(仅当前进程那份除外)
timer.new / timer.new.<pid> 清理
timer.log / conf.d / ksud* 保留

校验值

APK     : TimerRoot-0.92.apk
size    : 3,817,467 B
sha256  : 3c19c14dfb41c594624c28da7fdfc1de5cc56973752871d56a39bebd09c2080b

已在 0.91 的用户直接覆盖安装即可,无需清数据。若之前手动删过
/data/local/tmp/timer.conf 才能勉强启动,升级后不用再删。