10 Commits

Author SHA1 Message Date
RainySY
73aff16a99 docs: add GitNexus guides and optimization reports 2026-06-17 03:27:52 +08:00
sakuradairong
a3355d07e4 fix(core): 完善备份功能 - 增量跳过/外部数据/force-stop/取消修复
Phase 1: 基础架构
- app_details.json 元数据增强 (apk_version/Ssaid/permissions/Size/keystore/time)
- 备份前 force-stop 进程,确保数据库一致性
- 新增 Android/data 外部数据备份+恢复 (backupExternalData/restoreExternalData)

Phase 2: 增量优化
- APK 版本增量跳过 (对比 versionCode)
- 数据大小增量跳过 (对比旧 Size)

Phase 3: 完整度
- 路径防呆检查 (拒绝 Android/ 目录内备份)
- ! 前缀解析打通 (appList.txt 过滤)

修复:
- ResticStreamBackup: CancellationException 重新抛出
- ResticStreamBackup: Producer 添加 force-stop
- RestoreOperation: OBB/外部数据 SELinux context 修复
- ResticStreamBackup: 修复预存编译错误 (AppError.Config/AppError.Cancelled)
2026-06-09 15:41:50 +08:00
sakuradairong
7b34b565a9 feat(streaming): Phase 1 — BackupConfig.useStreaming 开关 + ResticStreamBackup 骨架 + ResticWrapper 分流 2026-06-08 16:54:44 +08:00
sakuradairong
818faefa86 release: v1.15
修复: 备份异常 EPERM (Operation not permitted) 导致整个备份中断
- BackupOperation: 检查 mkdirs 返回值,writeText 异常时优雅降级而非抛出
- BackupScreen: 增加异常完整堆栈记录和智能提示(EPERM/EACCES)
2026-06-08 14:18:28 +08:00
sakuradairong
f854569414 release: v1.13
- 更新版本号到 1.13 (versionCode 14)
- 更新 GitNexus 索引统计(1614 symbols / 4022 edges / 139 flows)
- 移除 viewBinding、无用依赖(fragment-ktx/viewpager2/constraintlayout)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 19:06:36 +08:00
sakuradairong
7e98e0f78e refactor: replace staging sync with REST bridge and add streaming backup
Phase 1: REST bridge
- New ResticRestBridge (NanoHTTPD) implementing restic REST protocol
- New RestBridgeRunner lifecycle manager (withBridge pattern)
- ResticEnvResolver: buildLocalEnv/buildBridgeEnv split
- ResticWrapper: syncManager → bridgeRunner, propagate cacheDir
- 5 sub-modules (Backup/Restore/SnapshotOps/Maintenance/RepoInit):
  unified local/bridge branching
- Delete RemoteSyncManager.kt (231 lines removed)
- Clean RemoteTransport companion (only create() remains)
- Remove getTempRepoDir, cleanup(), onSyncProgress/ByteSyncProgress

Phase 2: Streaming backup
- New StreamingBackup with FIFO orchestration
- ResticBackup.backupStdin() with --stdin mode
- ResticCommandRunner.runResticWithStdin() (API 24 compat)
- BackupFragment: space detection + auto-switch to streaming

Code quality fixes:
- OOM protection: stream blob bodies to temp files
- API compat: manual stdin piping (no redirectInput API 26)
- Build: 0 errors, 0 warnings, lint 0 errors, all 53 tests pass
2026-06-05 14:11:52 +08:00
sakuradairong
80b84f6cff refactor: migrate to libsu root shell with unified exec interface
Replace custom persistent su process management (Mutex-guarded
process, InputStream/OutputStreamReader) with libsu's Shell.cmd.

RootShell.kt changes:
- Remove: process lifecycle, mutex, stdin/stdout/stderr management,
  execBinary/execStreaming, sentinel health-check pattern
- Add: libsu Shell.getShell()/Shell.cmd() with structured timeout,
  single public exec() method returning ShellResult
- Keep: shellEscape() extension, ensureSession(), ShellResult data class

Caller changes:
- WifiManager.kt: add return-value checks for mkdir, chown, chmod;
  mark best-effort wifi reload as intentionally unchecked

Supporting:
- app/build.gradle: add libsu 6.0.0 dependency
- AGENTS.md / CLAUDE.md: update GitNexus index stats
2026-06-01 17:27:26 +08:00
sakuradairong
13e33995cc chore: update AGENTS.md and CLAUDE.md metadata 2026-06-01 16:05:46 +08:00
sakuradairong
4e525f5ce0 fix: SMB signing configurable, WebDAV 50MB limit, i18n cleanup 2026-06-01 15:45:45 +08:00
sakuradairong
b84dd4082c feat: add project config files and restic sub-module extraction 2026-06-01 14:43:05 +08:00