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

オープン
#196 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, kotlin

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Java
スター
44
フォーク
25
平均マージ
1日 13時間
マージ済み PR(30日)
80

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MDMesh-app/MDMesh のほかの issue

MDMesh-app/MDMesh の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。