Enrollment without QR/NFC: manual or adb path (needed for GrapheneOS)

Aperta
#196 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, kotlin

Direzione di ricerca

Start with the agent's status screen that shows "no enrollment token available", the build-time server URL constant (currently https://mdm.example.com), and the launcher activity MainActivity in the package com.mdmesh.agent. Check how the agent reads its token and server URL at startup. Pick one of the three proposed paths, ideally agreed with a maintainer first, and test on an emulator with dpm set-device-owner. Done when a device can be enrolled with a URL and token without rebuilding the APK.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Area

Device agent (Android)

The problem

GrapheneOS has no QR/NFC provisioning in its setup wizard, so devices can only become Device Owner with adb shell dpm set-device-owner com.mdmesh.agent/.admin.AdminReceiver. After that the 0.4.0 release agent shows only a status screen: "Device ID: Enrolling… (last error: no enrollment token available)", with the server URL baked in as https://mdm.example.com. There is no way to enter the server URL or an enrollment token: no input field, no QR scanner button, and dpm set-device-owner cannot pass the provisioning extras.

Request: a manual/adb enrollment path, e.g. a screen or an intent that accepts server URL + one-time token, or a QR scanner inside the agent. For comparison, the Headwind MDM agent shows "enter server URL" and "enter device ID" dialogs with a QR button right after set-device-owner, which makes per-device adb enrollment practical.

Proposed solution

Any of these would unblock adb/GrapheneOS enrollment (the console already issues one-time tokens, so no server change should be needed):

  1. First-run screen when no token is present: "Server URL" + "Enrollment token" fields and an "Enroll" button, optionally with a QR scan button (the Headwind agent has the same URL / device ID dialogs).
  2. Or accept plain string extras on a launchable activity, so this works after dpm set-device-owner:
    adb shell am start -n com.mdmesh.agent/.MainActivity --es com.mdmesh.SERVER_URL https://... --es com.mdmesh.ENROLL_TOKEN
    (the provisioning bundle cannot be passed with am start, only plain extras).
  3. Make the server URL a runtime setting instead of a build-time constant. The published release APK ships with the https://mdm.example.com placeholder, so a self-hosted install has no way to point the agent at its server without rebuilding it.
Alternatives considered

No response

Before submitting
  • I searched existing issues and discussions for the same idea.
Lingua principale
Java
Stelle
44
Fork
25
Merge medio
1g 13h
PR unite (30g)
80

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MDMesh-app/MDMesh

Tutte le issue di MDMesh-app/MDMesh

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.