WRITEUP · MOBILE · STORAGE · 2026 · @YNSMROZTAS

FileProvider, root-path

● liveclk --:--:--com.vulnapp.portal

paths.xml mapped the filesystem root. grantUriPermissions was on. Share sheet minted content:// URIs.

files // livegrant
radar--:--:--
AndroScopeFileProviderroot-pathlab
01 Problem

The provider tree started at / and grants were sticky.

02 Move

Manifest + res/xml/paths.xml on the authorized lab APK.

03 Evidence

root-path name=root path=. grantUriPermissions=true.

04 Outcome

files-path or cache-path only. Narrow the URI. Drop the grant when the sheet closes.

Summary

Lab package com.vulnapp.portal declared ${applicationId}.files as a FileProvider with grantUriPermissions=true. The path file contained <root-path name="root" path="." />. A share action in the app built a content:// URI under that authority and handed it to an implicit sheet with read-grant flags.

root-path is the device filesystem as the provider sees it, not “the pictures folder.” Combined with a grant, a receiving app that keeps the URI can ask the portal to open files the portal’s UID can open — including its own private tree — without the provider being exported.

Class: over-broad FileProvider + grant. The provider does not need to be exported. This page does not read a file.
Redacted FileProvider observer
Path set printed. Bytes not.

What AndroScope printed

[provider] ${applicationId}.files
[provider] paths.xml → root-path name="root" path="."
[provider] grantUriPermissions=true
[provider] share sheet builds content:// … under that authority

no file read on this page
mitsec@com.vulnapp.portal:

Why export=false is not the fix

Android checks provider permissions when a foreign UID talks to the provider directly. A grant attached to a URI the portal itself minted is a different door. The portal is the client of its own provider. The foreign app only holds the URI.

files-path and cache-path still need a tight path. external-path is shared storage, not an excuse for root-path.

Fix

YUNUS EMRE ÖZTAŞ · MITSEC · LAB BUILD ONLY