Files
Etienne Cordonnier ec5c55a1b9 android-tools: make adbd fs_config opt-in via PACKAGECONFIG
On non-Android builds should_use_fs_config() in adbd's
file_sync_service.cpp unconditionally returns true, so every
`adb push` destination, including paths under /data, is routed through
Android's fs_config tables. Those tables have a catch-all directory entry
for "data" (mode 0771, AID_SYSTEM) but no equivalent file entry, so a
freshly pushed directory and the file inside it end up with inconsistent
owners, and non-root/system processes can't list the directory.

On non-Android builds should_use_fs_config() now returns false by
default: adbd then honours the mode sent by the host and leaves
ownership untouched.

Add a "fs-config" PACKAGECONFIG (disabled by default) which defines
ADBD_USE_FS_CONFIG and re-enables fs_config, scoped to /system, /vendor
and /oem, for BSPs that rely on it.

Behaviour change: fs_config is no longer applied on non-Android builds
unless PACKAGECONFIG contains "fs-config".

AI-Generated: Uses Claude Code (Claude Sonnet 5.5)

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-10-09 10:01:42 -07:00
..