feat: Add Factory Reset Protection (FRP) policy support

Aperta
#104 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@Keidevk ci sta già lavorando.

Dal 21/10/2026.

  • #115 di @Keidevk — aperta

Valutazione

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

Direzione di ricerca

Start with the Android device agent and the policy schema in proto/registry.md; trace how existing policy fields reach the device policy controller. Check the Android API level requirements for FactoryResetProtectionPolicy.Builder and how current policies are tested. Done means authorized Google Account Numeric IDs can be configured and applied on Android 11+; the optional dashboard field is a follow-up.

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

Descrizione

enhancement help wanted
Area

Device agent (Android)

The problem

When managing Android devices in enterprise or SMB environments, devices wiped via hard reset (e.g., recovery mode or unauthorized factory reset) get locked by default FRP unless a pre-existing local account is known.

In self-hosted or small business setups, IT admins often lack Google Workspace / Enterprise infrastructure to handle FRP dynamically. Currently, MDMesh does not expose or enforce setFactoryResetProtectionPolicy, leaving wiped devices either soft-locked to a former employee's personal account or completely unprotected if no strategy is defined.

Proposed solution

Introduce support for the factoryResetProtection configuration policy field in MDMesh:

Schema & Config:

Add factoryResetProtection under policy configuration (proto/registry.md).

Allow taking a list of authorized Google Account Numeric IDs (adminAccountIds) as a non-boolean configuration key.

Device Policy Controller (DPC / Agent):

Implement setFactoryResetProtectionPolicy using FactoryResetProtectionPolicy.Builder for Android 11+ (API level 30+).

Apply the supplied numeric Google Account IDs to the device, ensuring that any wiped device can be unlocked using designated admin Google accounts.

UI / Dashboard (Optional / Follow-up):

Provide an input field in the policy editor to accept and validate lists of 21-digit Google Account Numeric IDs.

Alternatives considered

Manual Device Wiping: Relying solely on remote wipe commands sent from the MDM console. While remote wipes bypass FRP, it does not cover unauthorized physical resets (e.g., via hardware buttons/recovery mode).

Google Workspace Only (EFRP): Restricting FRP management to enterprise-managed domain accounts. Using numeric Google Account IDs directly via Android's native policy API allows both standard @gmail.com accounts and Workspace accounts to function seamlessly in self-hosted deployments.

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.