# Ballbox machine ads sync Android sidecar for TCN media sync. ## Current scope - manual `Sync now` runs immediately in-app - boot start after Android boot - periodic background sync - target root default `/sdcard/TcnFolder` - managed-dir prune from manifest - best-effort reopen of main TCN app after real file changes ## Current defaults - manifest URL: `https://ballbox.app/api/machines/2601070188/ads-manifest` - target root: `/sdcard/TcnFolder` - interval: `15` minutes - main app package: `com.tcn.vending` ## Behavior - boot receiver starts service - service waits ~10s before first boot/app-start sync - service keeps running foreground and reschedules periodic sync - manual `Sync now` does not wait for the periodic queue - sync downloads changed files only - validates sha256 - prunes stale files only inside manifest `managedDirs` - if real changes were applied, sidecar tries to bring the main app to front ## Important limitation This sidecar can reliably sync files. It cannot guarantee a true process-level restart of another app without elevated privileges. Current implementation does a best-effort relaunch/open of the main app package. ## Reality target Built for kiosk-style Android machine use, not Play Store delivery. Storage permissions and target SDK are kept practical for Android 7.1.2-era hardware.