fleet/server/worker
Victor Lyuboslavsky cc5b4f3947
Install Fleet android agent on device enrollment. (#36050)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35434

Feature is largely behind feature flag `FLEET_DEV_ANDROID_AGENT_PACKAGE`
Set it like: `export
FLEET_DEV_ANDROID_AGENT_PACKAGE=com.fleetdm.agent.private.victor`

Rough set up:
1. Change the applicationId of your Android app in `build.gradle.kts`:
```kt
    defaultConfig {
        applicationId = "com.fleetdm.agent.private.you"
```
2. Build a release version of your app (use dummy signing key). Build ->
Generate Signed App Bundle or APK ...
3. Get the super secret Google Play URL like: `go run
tools/android/android.go --command enterprises.webTokens.create
--enterprise_id 'XXXX'`
4. Upload your signed app.
5. Wait ~10 minutes
6. Enroll your Android device.
7. The agent should start installing pretty soon. Check your Google Play
in Work profile. Mine was pending for a while the last time I tried it
and I restarted the device before it actually started installing.

@ksykulev you can use this Android service method for "notification":
`AddFleetAgentToAndroidPolicy(ctx context.Context, enterpriseName
string, hostConfigs map[string]AgentManagedConfiguration) error`
You'll need to update `AgentManagedConfiguration` struct to define what
to send down to the device. It includes the enroll secret, so I think we
need to send it down every time just to be safe.

# Checklist for submitter

- Changes file will be updated when full feature is done.

## Testing

- [x] QA'd all new/changed functionality manually
2025-11-21 14:42:24 -06:00
..
apple_mdm.go Install setup-experience VPP apps on manually-enrolled iOS/iPadOS devices (#35906) 2025-11-19 13:34:10 -06:00
apple_mdm_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
automation_failer.go Support failing policies integrations (#5973) 2022-06-06 10:41:51 -04:00
automation_failer_test.go 🧹 friday cleanup party: substitute deprecated import of go-kit (#19774) 2024-06-17 10:27:31 -03:00
batch_activities.go Batch script cron schedule (#31808) 2025-08-14 14:44:47 -04:00
batch_activities_test.go Batch script cron schedule (#31808) 2025-08-14 14:44:47 -04:00
db_migrations.go MABM bugfix: fix the expected format of the migrated VPP token (#21761) 2024-09-03 13:23:44 -04:00
db_migrations_test.go MABM bugfix: fix the expected format of the migrated VPP token (#21761) 2024-09-03 13:23:44 -04:00
jira.go Rename team DB methods to encourage lighter-weight usage (#35572) 2025-11-12 08:09:49 -06:00
jira_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
macos_setup_assistant.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
macos_setup_assistant_test.go Skip setup experience during AxM based migrations (#32822) 2025-09-11 09:40:40 -04:00
software_worker.go Install Fleet android agent on device enrollment. (#36050) 2025-11-21 14:42:24 -06:00
software_worker_test.go Android app self service: backend support (#34711) 2025-11-13 18:10:24 -05:00
vpp_verification.go Initial support for in-house apps on iOS/iPadOS (#34802) 2025-10-28 08:33:58 -04:00
worker.go Added OTEL span for worker jobs. (#36057) 2025-11-21 11:28:47 -06:00
worker_test.go Allow worker to filter queue by job type (#31556) 2025-08-06 17:22:48 -05:00
zendesk.go Rename team DB methods to encourage lighter-weight usage (#35572) 2025-11-12 08:09:49 -06:00
zendesk_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00