Support scoped storage to fix downloads on API >= 29
context
- in !7 (merged) we blocked all usage of Scoped Storage (https://source.android.com/devices/storage/scoped) -- apparently inadvertently? -- in an attempt to block usage of
AndroidDownloadManager
, which is known to cause proxy bypasses - as of Android API 29, downloads will not work without Scoped Storage, causing bug reports such as fenix#40192 (closed)
- we might actually prefer to use scoped storage, as it provides superior privacy guarantees by preventing other applications from being able to access files downloaded by tor browser (legacy external storage permissions are therefore slated to expire: http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/tpo/applications/fenix/-/issues/40159)
- scoped storage does not in fact use
AndroidDownloadManager
, alleviating concerns about proxy bypass, - scoped storage does use
MediaStore
, which tracks some metadata about what files TBA downloads, creating some concerns around browsing history leakage - Thus, we want to consider adopting Scoped Storage to fix bugs and increase privacy, while ensuring it is safe to do so
changes
- here, we re-enable Scoped Storage, and analyze its usage of
MediaStore
to ensure it does not unacceptably violate security guarantees against leaking browser history to the OS
dependencies
- resolves but first raised in fenix#40192 (closed)
Edited by aguestuser