sakuradairong
f5dd61a83b
refactor: Result → AppResult, DomainTypes, cleanup, and other improvements
...
- Replace kotlin.Result with AppResult across all transports and operations
- Introduce DomainTypes (PackageName, AppInfo) for type safety
- Add AppError sealed hierarchy for structured error handling
- Add SELinuxUtil for SELinux context restoration
- Add values-sw600dp and dimens.xml for tablet layout support
- Sync progress UI refactoring in BackupFragment/RestoreFragment
- BinaryResolver per-binary cache fix
2026-06-04 21:21:17 +08:00
sakuradairong
84306b2e89
feat: add SMB domain field, progress callbacks for restore, kotlin-serialization plugin
2026-06-01 14:44:05 +08:00
sakuradairong
d6116d7de0
refactor: 用 RemoteTransport 替代 rclone 后端,修复多项稳定性问题
...
## 架构重构
- 删除 rclone 二进制 (librclone.so, ~72MB),用 RemoteTransport 接口替代
- 新增 WebdavTransport (sardine-android) / SmbTransport (SMBJ) 直接协议实现
- 本地临时仓库 + restic 操作 + 双向递归同步的模式替代 rclone serve
## 关键修复
- syncToRemote 失败不再静默吞掉,正确返回错误
- init 修复 needsDownload=false 导致上传脏数据
- init exitCode=1 后验证 snapshots 确保仓库可用
- forget 操作补全 backendShare 参数
- WebDAV 404 检测使用 SardineException.statusCode 替代字符串匹配
- ResticBinary.prepare() 双重检查锁定避免主线程重复磁盘 IO
- HOME/XDG_CACHE_HOME 环境变量消除 restic cache 警告
## 远端同步优化
- 新增 3 次指数退避重试 (1s/2s/4s),覆盖 DNS/超时/5xx 等瞬时错误
- href 精确比较过滤 WebDAV 目录自引用条目,消除 76+ 冗余 PROPFIND 请求
- MAX_RECURSE_DEPTH 3 限制递归深度
- 根目录 404 视为致命错误,子目录 404 安全跳过 (FileNotFoundException)
## UI 改进
- PackageListAdapter 从 AppInfo 读取 label,优先显示应用名,回退包名
- AppScanner.resolveLabels() 使用 PackageManager 批量解析,无需 root
- ConfigFragment 后端 URL 实时预览,字段显隐联动
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-23 23:21:10 +08:00
006c598f14
init: Android backup GUI project
2026-04-07 14:46:51 +08:00