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

Abierto
#196 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
android, kotlin

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Java
Estrellas
44
Forks
25
Merge medio
1 d 13 h
PR fusionados (30 d)
80

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MDMesh-app/MDMesh

Todos los issues de MDMesh-app/MDMesh

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.