Repository navigation
Auto USB v1.0.0
Auto USB v1.0.0
Major update
Module refactor
Changelog
-
Module refactor
-
Daemon PID path was wrong → always "stopped"
-
Execution failures were treated as "disabled"; "disabled" was also shown when no host was available
-
ksu.execcalling convention mismatch (a function passed asopts→ never calls back) -
KernelSU only returns the last stdout line → state was swallowed; switched to a single-line protocol
-
statecalledsvc, stalling 2.2 s → binder-free fast path -
WebView cached the old
script.js→ timestamped cache-busting -
Added an enable switch
-
Fixed the "host did not respond" error
-
Fixed the "uid=0" error
-
The daemon reset the user-selected composition to
OFF_PROFILEat boot -
service.shexiting took the whole process group down → switched tosetsid -
No locking around start/stop → double instances; PID reuse could kill an unrelated process
-
No retry when applying failed; kept rewriting blindly when the composition was unreadable
-
Uninstall did not restore
usb config/adb_enabled -
update-binarydid not validate the module id -
update-binarypackaging permissions -
cfg_setbuilt values withsedincorrectly; a corrupt config silently disabled the module -
svc/settingshad no timeout;normdepended onpaste -
INSECURE_ADBdefault changed from 1 to 0 -
build.pyoutput path, zip permission bits, CRLF issues
Features
-
Five modes with one-tap locking
-
ADB turns on when the cable is plugged in and off when it is unplugged
-
MIUIX-style WebUI with light/dark themes
Support
| Item | Requirement |
|---|---|
| Manager | Magisk / KernelSU / APatch |
| Android | 8.0 (API 26) and above |
| Architecture | Any — pure shell + front-end |
Install
- Download from Releases
- Flash it in your manager
- Reboot
- Open the WebUI and pick a mode
Command reference
su -c autousbctl status
su -c autousbctl lock on ptp
su -c autousbctl lock off
su -c autousbctl log 60Auto USB v1.0.0
重大更新
模块重构
本次更新日志如下
-
模块重构
-
守护进程 PID 路径写错 → 永远「已停止」
-
执行失败被当成「已停用」;无宿主也显示停用
-
ksu.exec 调用约定不兼容(函数当 opts → 永不回调)
-
KSU 只回 stdout 最后一行 → 状态被吞,改单行协议
-
state 调 svc 卡 2.2 秒 → 改无 binder 快路径
-
WebView 缓存旧 script.js → 加时间戳
-
新增启用开关
-
解决 host did not respond 报错
-
解决 uid=0 报错
-
开机把用户选的组合改回 OFF_PROFILE
-
service.sh 退出带走进程组 → 改 setsid
-
启停无锁会双实例;PID 复用误杀
-
应用失败不重试;读不到组合还每秒乱改
-
卸载不还原 usb config / adb_enabled
-
update-binary 不校验 module id
-
update-binary 打包权限
-
cfg_set 用 sed 拼值错误;坏配置会静默关模块
-
svc/settings 无超时;norm 依赖 paste
-
INSECURE_ADB 默认 1 → 改 0
-
build.py 输出路径 zip 权限位 CRLF 问题
功能
-
五种模式一键锁定
-
插线自动开启 adb,拔线关闭
-
MIUIX 风格 WebUI,支持深浅色切换
支持
| 项目 | 要求 |
|---|---|
| 管理器 | Magisk / KernelSU / APatch |
| Android | 8.0 (API 26) 及以上 |
| 架构 | 不限,纯 shell + 前端 |
安装
- 从Releases下载
- 在管理器里刷入
- 重启
- 打开 WebUI 选模式
命令速查
su -c autousbctl status
su -c autousbctl lock on ptp
su -c autousbctl lock off
su -c autousbctl log 60