Skip to content

destinations: Telegram kind check, local Mirror path, companion consent file - #21

Open
ash-iir wants to merge 4 commits into
VD171:mainfrom
ash-iir:up-destinations
Open

ash-iir wants to merge 4 commits into
VD171:mainfrom
ash-iir:up-destinations

Conversation

@ash-iir

@ash-iir ash-iir commented Nov 19, 2026

Copy link
Copy Markdown

What

Destination fixes: folder and /data/adb backups are refused for a Telegram destination with a clear error (ERR_TG_KIND) instead of failing later, a local Mirror gets an absolute, allowed destination path, and the Google Drive companion writes its consent result only inside its own files dir.

One commit per fix, so any of them can be dropped on its own. Each line links the draft PR on my fork that has the full write-up and repro for that fix.

  • worker: refuse folder and /data/adb backups to a Telegram destination (details)
  • worker: give a local Mirror an absolute, allowed destination (details)
  • companion: only write the consent result inside the app's files dir (details)

Checklist

  • The project banner header is present on every new/changed source file. (no new files)
  • Code and comments are in English; no em/en-dashes.
  • If a UI label changed, all lang/<code>.json and README.<code>.md were updated. (msg_err_tg_kind added to en.js, en.json and every <code>.json; no README text changes)
  • No real feature (SELinux/uid-gid/modes preservation, etc.) was weakened.
  • Commits are signed off (git commit -s).
  • Tested on a rooted device/emulator (note which). Not tested on a rooted device or emulator. Checked with sh -n, mksh -n, busybox sh -n and shellcheck -s sh (no new warnings), small mksh/busybox repro scripts per fix, and the tools/screenshots Playwright mocks (en and ar) for WebUI changes.

Notes

The companion change (Kotlin) was not compiled here.

The five grouped PRs (restore safety, scheduler, destinations, WebUI fixes, performance) merge cleanly together in any order; I checked that combining all of them gives the same tree as my test build.

Telegram stores one archive per app backup and telegram-pull restores
only those. A folder or /data/adb backup to Telegram failed at upload
time, after the local copy was written, and could not have been pulled
back. Refuse it right after the destination is resolved with
ERR_TG_KIND, and add the matching English message.

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
(cherry picked from commit 98798e3)
The default local destination has no path, so Mirror mode wrote to and
restored from "vdbackup" relative to the worker's cwd. Default it to
.mirror in the user's backups dir, and refuse a local Mirror path that
fails safe_local_dest, as a full backup's local copy already does. A
failed APK sync now also fails the mirror instead of being ignored.

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
(cherry picked from commit 3069978)
ConsentActivity is exported so root can start it, which means any app can
start it too and pick the result path. Accept only a consent.* file
directly in filesDir, which is what the WebUI passes. Fix the README
example, which pointed at /data/adb (not writable by the app).

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
(cherry picked from commit 26971c9)
Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant