Skip to content

companion: only write the consent result inside the app's files dir - #6

Draft
ash-iir wants to merge 1 commit into
mainfrom
fix-companion-consent
Draft

ash-iir wants to merge 1 commit into
mainfrom
fix-companion-consent

Conversation

@ash-iir

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

Copy link
Copy Markdown
Owner

ConsentActivity is exported so root can start it with am start, which means any app can start it and choose the result path. It now accepts only a consent.* file directly in the app's filesDir, which is what the WebUI already passes (/data/data/ru.vd171.vdbackup/files/consent.<ts>). Paths are compared after canonicalFile, so /data/data vs /data/user/0 matches.

Also fixes the README example, which pointed the result at /data/adb (the app can't write there).

Testing

  • Not compiled (no Android SDK in my environment) and not tested on a device. Please build before merging.

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>
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