Skip to content

Remote config: Android managed configurations and OpAMP #3

Open

Description

@groupsky

Depends on #2.

Goal

Change the config without touching the phone, using standards only.

  1. Android managed configurations (app restrictions): the standard way for an MDM / EMM to push app settings. Declare the config keys in app_restrictions.xml; read them with RestrictionsManager; listen for ACTION_APPLICATION_RESTRICTIONS_CHANGED.
  2. OpAMP (spec) with the opamp-client module of opentelemetry-java-contrib (io.opentelemetry.contrib:opentelemetry-opamp-client), over WebSocket. The spike (Spike: OTel disk buffer for metrics, 24 h on HyperOS, OpAMP on Android, OTLP into VictoriaMetrics #1) showed it works on Android: it received a config, applied it and reported the hash. The server sends the config document of MVP: battery, power, boot, network, device and thermal collectors; local config; OTLP export with disk buffer #2; the app applies it, reports the effective config hash, and reports its health (version, last export time, buffer size).

Order, later wins: defaults → local file → managed configurations → OpAMP. A bad remote config (does not parse, or no endpoint) is refused, reported back, and the last good one stays.

From the spike (#1)

Done when

  • Managed configurations: tested with Android's TestDPC (or adb with a test device owner); a changed interval takes effect without a restart. Steps in the README.
  • OpAMP: against opamp-go's example server, a new config is applied, and the server shows the reported hash and health. Steps in the README.
  • A broken remote config is refused, reported, and the old one stays (test).
  • The status screen shows each value's source (default / file / managed / OpAMP).
  • wake_policy set by managed configurations and by OpAMP takes effect (test).
  • An empty remote config after a reconnect or restart keeps the last good config (test).
  • OpAMP can be turned off; when off, the app makes no OpAMP connection.

Activity

  1. groupsky commented on Nov 10, 2026

    @groupsky
    ContributorAuthor

    Not queued yet: it waits for #2 (MVP). The spike (#1) is done (2026-11-12) and #2 is queued (2026-11-13). A work job is added when #2 is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions