feat(android): Android 应用内自动更新与 release JNI 修复(基于 beta 重迁)#704
Open
HKLHaoBin wants to merge 2 commits into
Open
feat(android): Android 应用内自动更新与 release JNI 修复(基于 beta 重迁)#704HKLHaoBin wants to merge 2 commits into
HKLHaoBin wants to merge 2 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 17, 2026
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Contributor
Author
|
Codex 审查结论: 我已按完整实现链路审查 #704。基于当前 HEAD 审查覆盖:
已验证:
边界:
担保结论:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
摘要
Fixes #677
将
feat/android-auto-update的能力以 squash 方式重迁到当前beta(1.3.10-3),保留 beta 侧 IPC 拆分、overlay destroy 通知、Android context 空指针保护、APK 200 MB 下载上限、剪贴板还原辅助函数等修复;并修复多useAutoUpdate()实例共享android-update:progress导致非发起方误入下载/安装 UI 的问题。本 PR 取代 #664(旧分支基于过时 beta,无法快进合并)及 #666 中捆绑的 Android 更新部分;#653 历史润色将单独开 PR。
修复 / 新增 / 改进
updateChannel与AutoUpdateGate对齐;高级页 Beta 开关 + 自动更新开关;关于页 / 高级页分别手动查 Stable / Beta;Android 检查到新版本后可自动下载并打开系统安装器。updater_logic.rs(manifest URL、版本比较、单测);Androidupdater.rs拉取 GitHub Release manifest、minisign 校验、系统安装器安装;保留 APK 200 MB 下载上限。UPDATER_PUBKEY_B64与tauri.conf.json同步;installApk返回false时向前端报错;新增check-android-updater-pubkey.mjs与 CI 检查。Build.SUPPORTED_ABIS改读 static field;无障碍状态改 JNI 直读Settings.Secure;release APK 为 JNI 入口加@Keep/@JvmStatic;overlay 仅START_RECORDING在 API 26+ 使用startForegroundService,前台失败则取消录音;保留onDestroy中nativeNotifyOverlayDestroyed()。SettingRow;useAutoUpdate实例级androidDownloadActiveRef隔离进度事件,避免 Gate / 手动按钮串扰。workflow_dispatch在 keystore secrets 齐全时构建 signed release APK;否则回退 unsigned debug 并写 job summary。兼容
npm run check:android-updater-pubkey,公钥与tauri.conf.json不一致时构建失败。测试计划
npm run buildnpm run check:android-updater-pubkeycargo metadata --manifest-path openless-all/app/src-tauri/Cargo.toml --filter-platform aarch64-linux-android --format-version 1 --no-deps --lockedgit diff --checkadb install -r+ Stable/Beta 手动检查 + 后台 Gate 进度弹窗隔离PR Type
Enhancement, Bug fix
Description
Port Android auto-update to beta
Fix JNI crashes and overlay service issues
Add CI signed release APK support
File Walkthrough
6 files
Fix overlay foreground service selection and accessibility JNIAdd @Keep annotations for JNI methodsAdd @Keep annotations for JNI objectFix foreground service failure handlingAdd @Keep annotationAdd @Keep and @JvmStatic annotations15 files
Add updater_logic module declarationRefactor updater to use shared helpersAdd pure updater helpers with testsAdd autoInstallAndroid option and isolate progressEnable Android auto-install in background checksAdd Android auto-update and beta toggle i18nAdd Android auto-update and beta toggle i18nAdd Android auto-update and beta toggle i18nAdd Android auto-update and beta toggle i18nAdd Android auto-update and beta toggle i18nAdd Android auto-update toggle sectionRestructure Beta toggle with separate rowUse explicit channel labels for manual checksInclude AutoUpdateSection in Advanced tabAdd script to validate pubkey consistency4 files
Update UpdateChannel and autoUpdateCheck docsUpdate UpdateChannel and autoUpdateCheck docsDocument in-app updater behaviorAdd updater module docs3 files
Support signed release builds on workflow_dispatchAdd Android updater pubkey check stepAdd check:android-updater-pubkey script