Skip to content

Releases

USB Debug Guard v0.1.6

Choose a tag to compare

@Nongfsq Nongfsq released this 25 Oct 23:03
8001923

USB Debug Guard v0.1.6

No network permission in the F-Droid build

The F-Droid build leaves out the in-app update check, so nothing in it uses the network. It now drops the INTERNET permission too, as suggested during F-Droid review. The GitHub build keeps the permission for Check updates. Guard behavior and Root safety are unchanged.

  • Version advanced to versionCode 7.

Validation

  • aapt2 dump badging: the F-Droid APK lists no INTERNET permission; the GitHub APK still does.
  • Two builds of the F-Droid APK from separate fresh clones are byte-identical before signing.
  • API 36 emulator instrumentation: 4 tests.
  • API 36 emulator: the F-Droid APK installs, launches to the main screen without crashing, and the system lists no INTERNET grant.

Install

Both APKs are signed with the v0.1.3+ release key and install directly over v0.1.3 or later.

  • usb-debug-guard-v0.1.6.apk: the GitHub build, with the in-app update check.
  • usb-debug-guard-v0.1.6-fdroid.apk: the reproducible F-Droid build, without the update check or network permission.

USB 调试守护 v0.1.6

F-Droid 版不再申请网络权限

F-Droid 版不包含应用内检查更新,没有任何功能会联网。应 F-Droid 审核建议,这一版连 INTERNET 权限也去掉了。GitHub 版仍保留该权限,供“检查更新”使用。守护功能和 Root 安全机制不变。

  • 版本提升为 versionCode 7。

验证

  • aapt2 dump badging:F-Droid 版 APK 不再列出 INTERNET 权限,GitHub 版仍然保留。
  • 从两个独立的全新 clone 分别构建 F-Droid 版 APK,签名前逐字节一致。
  • API 36 模拟器 instrumentation:4 项测试。
  • API 36 模拟器:F-Droid 版 APK 可以安装,启动到主界面没有崩溃,系统也没有授予 INTERNET 权限。

安装

两个 APK 都使用 v0.1.3 起的发布密钥签名,可以直接覆盖安装 v0.1.3 及之后的版本。

  • usb-debug-guard-v0.1.6.apk:GitHub 版,包含应用内检查更新。
  • usb-debug-guard-v0.1.6-fdroid.apk:可复现的 F-Droid 版,不含检查更新,也不申请网络权限。

USB Debug Guard v0.1.5

Choose a tag to compare

@Nongfsq Nongfsq released this 25 Sep 17:01
3af26b9

USB Debug Guard v0.1.5

Smaller APK

Release builds now use R8 code and resource shrinking, as requested during F-Droid review. The APK drops from about 12.6 MB to 1.1 MB. Guard behavior and Root safety are unchanged.

  • Version advanced to versionCode 6.

Validation

  • Local JVM/static regression script and Android lint (0 errors).
  • API 35 emulator instrumentation: 4 tests.
  • R8 release builds tested on an emulator. The UI loads, the foreground service starts, a Root request that is denied opens the safety circuit without crashing, and the GitHub build's Check updates still reaches GitHub Releases.

Install

Both APKs are signed with the v0.1.3+ release key and install directly over v0.1.3 or v0.1.4.

  • usb-debug-guard-v0.1.5.apk: the GitHub build, with the in-app update check.
  • usb-debug-guard-v0.1.5-fdroid.apk: the reproducible F-Droid build, without the update check.

USB 调试守护 v0.1.5

更小的 APK

应 F-Droid 审核要求,正式版改用 R8 压缩代码和资源,APK 从约 12.6 MB 降到 1.1 MB。守护功能和 Root 安全机制不变。

  • 版本提升为 versionCode 6。

验证

  • 本地 JVM/静态回归脚本和 Android lint(0 个错误)。
  • API 35 模拟器 instrumentation:4 项测试。
  • 在模拟器上测试了 R8 压缩后的正式版:界面正常加载,前台服务正常启动;Root 请求被拒绝后安全熔断正常开启,没有崩溃;GitHub 版的“检查更新”仍能访问 GitHub Releases。

安装

两个 APK 都使用 v0.1.3 起的发布密钥签名,可以直接覆盖安装 v0.1.3 或 v0.1.4。

  • usb-debug-guard-v0.1.5.apk:GitHub 版,包含应用内检查更新。
  • usb-debug-guard-v0.1.5-fdroid.apk:可复现的 F-Droid 版,不含检查更新。

USB Debug Guard v0.1.4

Choose a tag to compare

@Nongfsq Nongfsq released this 25 Sep 00:38
13ad411

USB Debug Guard v0.1.4

F-Droid release

This release prepares USB Debug Guard for F-Droid. Guard behavior and Root safety are unchanged from v0.1.3.

  • Adds F-Droid store metadata in English and Simplified Chinese.
  • Adds the -PupdateCheck=false Gradle property. F-Droid builds use it to hide the in-app update check, because F-Droid delivers updates itself.
  • APKs no longer embed Google's encrypted dependency metadata block.
  • README shows the logo and an F-Droid badge.
  • Version advanced to versionCode 5.

Install

Both APKs are signed with the v0.1.3+ release key documented in docs/RELEASE.md, so v0.1.4 installs directly over v0.1.3.

  • usb-debug-guard-v0.1.4.apk: the GitHub build, with the in-app update check.
  • usb-debug-guard-v0.1.4-fdroid.apk: the reproducible F-Droid build, without the update check. F-Droid verifies that its own build matches this file and then publishes it with this signature, so F-Droid and GitHub builds can update each other.

USB 调试守护 v0.1.4

F-Droid 上架版本

本版本为上架 F-Droid 做准备,守护功能和 Root 安全机制与 v0.1.3 相同。

  • 新增 F-Droid 商店资料,支持英文和简体中文。
  • 新增 -PupdateCheck=false Gradle 属性。F-Droid 构建会用它隐藏应用内检查更新,因为 F-Droid 自己负责推送更新。
  • APK 不再包含 Google 的加密依赖信息块。
  • README 显示 logo 和 F-Droid 图标。
  • 版本提升为 versionCode 5。

安装

两个 APK 都使用 docs/RELEASE.md 记录的 v0.1.3 起的发布密钥签名,可以直接覆盖安装 v0.1.3。

  • usb-debug-guard-v0.1.4.apk:GitHub 版,包含应用内检查更新。
  • usb-debug-guard-v0.1.4-fdroid.apk:可复现的 F-Droid 版,不含检查更新。F-Droid 会确认自己构建的结果与此文件一致,然后直接发布带本签名的这个文件,因此 F-Droid 版和 GitHub 版可以互相覆盖更新。

USB Debug Guard v0.1.3

Choose a tag to compare

@Nongfsq Nongfsq released this 03 Aug 08:38

USB Debug Guard v0.1.3

Signing-key migration: v0.1.3 cannot be installed directly over v0.1.2. Disable the guard and confirm display restoration, uninstall v0.1.2, then install v0.1.3 and grant Root again. Releases from v0.1.3 onward use the new certificate documented in docs/RELEASE.md.

Safety release

This release repairs the Root failure loop from v0.1.2 and adds a user-initiated update check.

  • Checks the official GitHub Releases API only when the user taps Check updates.

  • Opens the fixed official release page when a newer version is available; it never silently downloads or installs APKs.

  • Advances the repaired build to versionCode 4 so it cannot be confused with incident build v0.1.2.

  • Tracks the direct su PID and the privileged command-shell PID, terminates the known process tree on timeout, and reports destroy-failed whenever a known process cannot be confirmed exited.

  • Preserves the original display snapshot as a crash-consistent transaction until restoration succeeds.

  • Uses fail-fast Root command chains and a named, validated settings-capture protocol.

  • Limits explicit Root recovery to one persisted attempt per circuit incident after a short cooldown.

  • Keeps the service and warning state alive when display restoration fails.

  • Treats only Android USB data-state broadcasts as USB connectivity; charging alone no longer activates protection.

  • Refreshes the UI from lifecycle and preference events instead of a background two-second loop.

  • Requires emulator-only explicit serial selection in tools/install.ps1.

  • Excludes Root safety preferences from backup and device transfer, and pins the Gradle distribution checksum.

Validation

  • Local JVM/static regression script: 42 tests.
  • Android 16/API 36 emulator instrumentation: 4 tests.
  • Six-minute AVD trigger burst: 71 rounds / 284 actions with no Root call growth after the first denial.
  • Two deep-idle interval checks with the Root diagnostic count remaining at one.
  • Android lint, debug/release build, zip alignment, APK Signature Scheme v2/v3, certificate, and SHA-256 verification pass.

No test APK was installed on the incident OnePlus 11.


USB 调试守护 v0.1.3

**签名密钥迁移:**v0.1.3 不能直接覆盖安装 v0.1.2。请先关闭守护并确认显示设置已恢复,卸载 v0.1.2,再安装 v0.1.3 并重新授予 Root。v0.1.3 起使用 docs/RELEASE.md 记录的新证书。

安全修复版本

本版本修复 v0.1.2 的 Root 失控循环,并新增用户主动检查更新功能。

  • 仅在用户点击“检查更新”时查询官方 GitHub Releases API。

  • 发现新版本后只打开固定的官方发布页,不会静默下载或安装 APK。

  • 版本提升为 versionCode 4,避免与事故版本 v0.1.2 混淆。

  • 跟踪直接 su PID 和特权命令 shell PID;超时后清理已知进程树,任何无法确认退出的进程都会记录为 destroy-failed。

  • 将原始显示设置快照作为崩溃一致事务保存到恢复成功为止。

  • Root 命令改为失败即停止,并使用带字段名且严格校验的设置采集协议。

  • 每次熔断事故只允许一次持久化的显式 Root 恢复尝试,并设置短暂冷却期。

  • 显示设置恢复失败时保持服务和告警状态。

  • 仅将 Android USB 数据状态广播视为 USB 连接;单纯充电不再激活保护。

  • UI 改用生命周期和偏好变化事件刷新,不再后台每两秒轮询。

  • tools/install.ps1 强制指定模拟器序列号并拒绝真实设备。

  • Root 安全偏好不参与备份或设备迁移,并固定 Gradle 分发包校验和。

验证

  • 本地 JVM/静态回归脚本:42 项测试。
  • Android 16/API 36 模拟器 instrumentation:4 项测试。
  • AVD 6 分钟集中触发:71 轮、284 个动作,第一次拒绝后 Root 调用数不增长。
  • 两次 deep-idle 间隔检查,Root 诊断数始终为 1。
  • Android lint、debug/release 构建、zip alignment、APK Signature Scheme v2/v3、证书和 SHA-256 验证通过。

未在事故 OnePlus 11 上安装测试 APK。

USB Debug Guard v0.1.2

Choose a tag to compare

@Nongfsq Nongfsq released this 04 Jun 08:29

USB Debug Guard v0.1.2

Language and Android icon compatibility release.

Highlights

  • Adds an in-app language setting: follow system, English, or Simplified Chinese.
  • Adds Android 13+ app locale integration through locale_config.
  • Keeps a fallback locale wrapper for pre-Android 13 devices.
  • Fixes the Android adaptive icon structure by separating a vector background layer from the foreground layer.
  • Keeps the verified USB-C logo geometry while fitting it inside the adaptive icon safe zone.

Build And Compatibility

  • App version: 0.1.2 (versionCode 3)
  • Package: io.github.nongfsq.usbdebugguard
  • Built with: Android Gradle Plugin 9.2.1, Kotlin 2.4.0, Compose BOM 2026.05.01
  • Android SDK: compileSdk 36, targetSdk 36, minSdk 26
  • Verified device: OnePlus CPH2723, Android 15/API 35, arm64, Linux 6.6 Android kernel

The APK remains a universal Android package. It is not split by CPU architecture or Android kernel version. Compatibility still depends mostly on the rooted Android environment: su, settings, input, USB/ADB reporting, SELinux policy, and OEM lock-screen behavior.

Install

Download the APK from this release and install with:

adb install -r usb-debug-guard-v0.1.2.apk

If you installed a local debug build before, Android may reject this release APK as an update because debug and release builds use different signing keys. In that case, uninstall the debug build first or keep using tools/install.ps1 for local debug builds.

Verification

  • Debug and release Gradle builds pass.
  • APK signature verification passes.
  • Android badging shows versionName=0.1.2, versionCode=3, minSdk=26, targetSdk=36.
  • Device install verified on the connected Android 15 test phone.
  • Privacy scan confirms no local paths, personal identifiers, credentials, signing keys, or old package names are committed.

USB 调试守护 v0.1.2

语言设置和 Android 图标兼容性版本。

重点

  • 新增应用内语言设置:跟随系统、English、简体中文。
  • 通过 locale_config 接入 Android 13+ 应用语言能力。
  • 为 Android 13 以下设备保留本地化 context fallback。
  • 修复 Android adaptive icon 架构,将 vector 背景层和前景层分离。
  • 保留已验证的 USB-C logo 几何,同时放入 adaptive icon 安全区。

构建与兼容性

  • App 版本:0.1.2 (versionCode 3)
  • 包名:io.github.nongfsq.usbdebugguard
  • 构建工具:Android Gradle Plugin 9.2.1,Kotlin 2.4.0,Compose BOM 2026.05.01
  • Android SDK:compileSdk 36,targetSdk 36,minSdk 26
  • 已验证设备:OnePlus CPH2723,Android 15/API 35,arm64,Linux 6.6 Android 内核

APK 仍然按通用 Android 包发布,不按 CPU 架构或 Android 内核版本拆分。兼容性仍主要取决于已 root 的 Android 环境:su、settings、input、USB/ADB 状态上报、SELinux 策略和 OEM 锁屏行为。

安装

下载本 release 的 APK 后运行:

adb install -r usb-debug-guard-v0.1.2.apk

如果设备上之前安装过本地 debug 构建,Android 可能会因为 debug 和 release 签名不同而拒绝覆盖安装。遇到这种情况请先卸载 debug 版本,或者继续使用 tools/install.ps1 安装本地 debug 构建。

验证

  • Gradle debug 和 release 构建通过。
  • APK 签名验证通过。
  • Android badging 显示 versionName=0.1.2、versionCode=3、minSdk=26、targetSdk=36。
  • 已在连接的 Android 15 测试手机上验证安装。
  • 隐私扫描确认没有提交本机路径、个人标识、凭据、签名密钥或旧包名。

USB Debug Guard v0.1.1

Choose a tag to compare

@Nongfsq Nongfsq released this 04 Jun 07:51

USB Debug Guard v0.1.1

Branding refresh release.

Highlights

  • Replaces the launcher and documentation logo with the new USB-C port mark.
  • Synchronizes the Android adaptive icon and notification icon with the new geometry.
  • Updates README and Chinese README wording to describe the new visual identity.
  • Keeps the same root-only behavior and compatibility model as v0.1.0.

Build And Compatibility

  • App version: 0.1.1 (versionCode 2)
  • Package: io.github.nongfsq.usbdebugguard
  • Built with: Android Gradle Plugin 9.2.1, Kotlin 2.4.0, Compose BOM 2026.05.01
  • Android SDK: compileSdk 36, targetSdk 36, minSdk 26
  • Verified device: OnePlus CPH2723, Android 15/API 35, arm64, Linux 6.6 Android kernel

The APK remains a universal Android package. It is not split by CPU architecture or Android kernel version. Compatibility still depends mostly on the rooted Android environment: su, settings, input, USB/ADB reporting, SELinux policy, and OEM lock-screen behavior.

Install

Download the APK from this release and install with:

adb install -r usb-debug-guard-v0.1.1.apk

If you installed a local debug build before, Android may reject this release APK as an update because debug and release builds use different signing keys. In that case, uninstall the debug build first or keep using tools/install.ps1 for local debug builds.

Verification

  • Debug and release Gradle builds pass.
  • APK signature verification passes.
  • Android badging shows versionName=0.1.1, versionCode=2, minSdk=26, targetSdk=36.
  • Privacy scan confirms no local paths, personal identifiers, credentials, signing keys, or old package names are committed.

USB 调试守护 v0.1.1

品牌视觉更新版本。

重点

  • 将启动图标和文档 logo 替换为新的 USB-C 端口标识。
  • Android 自适应图标和通知图标同步到新的几何系统。
  • 更新英文 README 和中文 README 中的视觉说明。
  • Root-only 行为和兼容性模型与 v0.1.0 保持一致。

构建与兼容性

  • App 版本:0.1.1 (versionCode 2)
  • 包名:io.github.nongfsq.usbdebugguard
  • 构建工具:Android Gradle Plugin 9.2.1,Kotlin 2.4.0,Compose BOM 2026.05.01
  • Android SDK:compileSdk 36,targetSdk 36,minSdk 26
  • 已验证设备:OnePlus CPH2723,Android 15/API 35,arm64,Linux 6.6 Android 内核

APK 仍然按通用 Android 包发布,不按 CPU 架构或 Android 内核版本拆分。兼容性仍主要取决于已 root 的 Android 环境:su、settings、input、USB/ADB 状态上报、SELinux 策略和 OEM 锁屏行为。

安装

下载本 release 的 APK 后运行:

adb install -r usb-debug-guard-v0.1.1.apk

如果设备上之前安装过本地 debug 构建,Android 可能会因为 debug 和 release 签名不同而拒绝覆盖安装。遇到这种情况请先卸载 debug 版本,或者继续使用 tools/install.ps1 安装本地 debug 构建。

验证

  • Gradle debug 和 release 构建通过。
  • APK 签名验证通过。
  • Android badging 显示 versionName=0.1.1、versionCode=2、minSdk=26、targetSdk=36。
  • 隐私扫描确认没有提交本机路径、个人标识、凭据、签名密钥或旧包名。

USB Debug Guard v0.1.0

Choose a tag to compare

@Nongfsq Nongfsq released this 04 Jun 07:33

USB Debug Guard v0.1.0

Initial open-source release of USB Debug Guard.

Highlights

  • Root-only Android guard for long USB debugging sessions.
  • Default behavior turns the screen off while keeping ADB reachable.
  • Optional dim-awake fallback for devices that need the display awake.
  • Material 3 interface with English and Simplified Chinese strings.
  • Original SVG logo, Android adaptive launcher icon, and monochrome notification icon.
  • No Device Admin, no network permission, no analytics, no uploaded logs.

Build And Compatibility

  • App version: 0.1.0 (versionCode 1)
  • Package: io.github.nongfsq.usbdebugguard
  • Built with: Android Gradle Plugin 9.2.1, Kotlin 2.4.0, Compose BOM 2026.05.01
  • Android SDK: compileSdk 36, targetSdk 36, minSdk 26
  • Verified device: OnePlus CPH2723, Android 15/API 35, arm64, Linux 6.6 Android kernel

The APK is intended as a universal Android package. It is not released separately for different CPU architectures or Android kernels. Compatibility depends mainly on the rooted Android environment: su, settings, input, USB/ADB reporting, SELinux policy, and OEM lock-screen behavior.

Install

Download the APK from this release and install with:

adb install -r usb-debug-guard-v0.1.0.apk

Then open USB Debug Guard on the device, grant root when prompted, and enable the guard.

If you installed a local debug build before, Android may reject this release APK as an update because debug and release builds use different signing keys. In that case, uninstall the debug build first or keep using tools/install.ps1 for local debug builds.

Verification

  • Debug and release Gradle builds pass.
  • APK signature verification passes.
  • Manifest/source check confirms no Device Admin usage.
  • Privacy scan confirms no local paths, personal identifiers, credentials, signing keys, or old package names are committed.

USB 调试守护 v0.1.0

USB 调试守护的首个开源版本。

重点

  • 面向长时间 USB 调试的 root-only Android 守护工具。
  • 默认行为是在保持 ADB 可访问的同时关闭屏幕。
  • 提供低亮常亮备用模式,适配必须保持显示唤醒的设备。
  • Material 3 界面,支持英文和简体中文。
  • 原创 SVG logo、Android 自适应启动图标、单色通知图标。
  • 不使用设备管理器,不申请联网权限,不收集统计,不上传日志。

构建与兼容性

  • App 版本:0.1.0 (versionCode 1)
  • 包名:io.github.nongfsq.usbdebugguard
  • 构建工具:Android Gradle Plugin 9.2.1,Kotlin 2.4.0,Compose BOM 2026.05.01
  • Android SDK:compileSdk 36,targetSdk 36,minSdk 26
  • 已验证设备:OnePlus CPH2723,Android 15/API 35,arm64,Linux 6.6 Android 内核

APK 按通用 Android 包发布,不按不同 CPU 架构或 Android 内核拆分。兼容性主要取决于已 root 的 Android 环境:su、settings、input、USB/ADB 状态上报、SELinux 策略和 OEM 锁屏行为。

安装

下载本 release 的 APK 后运行:

adb install -r usb-debug-guard-v0.1.0.apk

然后在设备上打开 USB 调试守护,授予 root 权限并启用守护。

如果设备上之前安装过本地 debug 构建,Android 可能会因为 debug 和 release 签名不同而拒绝覆盖安装。遇到这种情况请先卸载 debug 版本,或者继续使用 tools/install.ps1 安装本地 debug 构建。

验证

  • Gradle debug 和 release 构建通过。
  • APK 签名验证通过。
  • Manifest 和源码检查确认没有使用设备管理器。
  • 隐私扫描确认没有提交本机路径、个人标识、凭据、签名密钥或旧包名。