Skip to content

fix: reliably disable account authenticators before device owner retry#74

Merged
TripleU613 merged 1 commit into
mainfrom
codex/fix-mdm-installation-process
Nov 3, 2025
Merged

fix: reliably disable account authenticators before device owner retry#74
TripleU613 merged 1 commit into
mainfrom
codex/fix-mdm-installation-process

Conversation

@TripleU613
Copy link
Copy Markdown
Contributor

Summary

  • broaden the account authenticator discovery to parse account dumps and map known types to packages
  • add operator-facing logs around the temporary disable/reenable cycle and wait for authenticator teardown
  • ensure packages are re-enabled for user 0 after the device owner command retry

Testing

  • npm run build

https://chatgpt.com/codex/tasks/task_e_6907f82fb60083259a48c3fbf95e08c4

@TripleU613 TripleU613 merged commit 4f4364c into main Nov 3, 2025
@TripleU613 TripleU613 deleted the codex/fix-mdm-installation-process branch November 3, 2025 00:37
@ys770
Copy link
Copy Markdown

ys770 commented Nov 3, 2025

I used a command like this: out="$(dpm set-device-owner com.your.mdm/.admin.AdminReceiver 2>&1)" || { if echo "$out" | grep -q "already some accounts"; then echo "⚠️ Accounts found — temporarily disabling..."; pkgs=$(dumpsys account | sed -n 's/.*ComponentInfo{\([^/]*\)\/.*/\1/p' | sort -u); for p in $pkgs; do echo "Disabling $p"; pm disable-user --user 0 "$p"; done; echo "🔁 Retrying device owner set..."; dpm set-device-owner com.tripleu.qinmdm/.admin.AdminReceiver; echo "✅ Re-enabling previously disabled packages..."; for p in $pkgs; do pm enable "$p"; done; else echo "❌ Device owner failed — unknown error:"; echo "$out"; fi; }

sorry excuse the emoji's (chatgpt...)
did the job for me

TripleU613 added a commit that referenced this pull request Jan 15, 2026
…rocess

fix: reliably disable account authenticators before device owner retry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants