Skip to content

Auto USB v1.0.0

Choose a tag to compare

@Shuos118 Shuos118 released this 21 Nov 16:41
· 6 commits to main since this release
Immutable release. Only release title and notes can be modified.

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.exec calling convention mismatch (a function passed as opts → never calls back)

  • KernelSU only returns the last stdout line → state was swallowed; switched to a single-line protocol

  • state called svc, 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_PROFILE at boot

  • service.sh exiting took the whole process group down → switched to setsid

  • 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-binary did not validate the module id

  • update-binary packaging permissions

  • cfg_set built values with sed incorrectly; a corrupt config silently disabled the module

  • svc/settings had no timeout; norm depended on paste

  • INSECURE_ADB default changed from 1 to 0

  • build.py output 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

  1. Download from Releases
  2. Flash it in your manager
  3. Reboot
  4. 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 60

Auto 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 + 前端

安装

  1. 从Releases下载
  2. 在管理器里刷入
  3. 重启
  4. 打开 WebUI 选模式

命令速查

su -c autousbctl status
su -c autousbctl lock on ptp
su -c autousbctl lock off
su -c autousbctl log 60