Fix debug bundle temp file creation on Android

Use app-provided cache directory for os.CreateTemp instead of
os.TempDir() which resolves to /data/local/tmp/ on Android — a
directory not writable by regular apps.

Thread TempDir through GeneratorDependencies -> BundleGenerator and
MobileDependency -> EngineConfig so the Android client can pass its
cache directory from PlatformFiles.CacheDir().
This commit is contained in:
Zoltán Papp
2026-04-14 18:38:26 +02:00
parent 4eed459f27
commit b3178255c0
6 changed files with 18 additions and 3 deletions

View File

@@ -140,6 +140,7 @@ type EngineConfig struct {
ProfileConfig *profilemanager.Config
LogPath string
TempDir string
}
// EngineServices holds the external service dependencies required by the Engine.
@@ -1095,6 +1096,7 @@ func (e *Engine) handleBundle(params *mgmProto.BundleParameters) (*mgmProto.JobR
StatusRecorder: e.statusRecorder,
SyncResponse: syncResponse,
LogPath: e.config.LogPath,
TempDir: e.config.TempDir,
ClientMetrics: e.clientMetrics,
RefreshStatus: func() {
e.RunHealthProbes(true)