Repository navigation
Testing with an Emulator
An Android emulator is the easiest way to test the Device Owner features, because a fresh AVD has no accounts — so set-device-owner works instantly, no factory reset needed.
You only need a JDK, the command-line tools, the emulator, and a system image.
# 1. JDK 17 (any distro) and Android command-line tools on PATH
# Lay out: <sdk>/cmdline-tools/latest/bin/sdkmanager
# 2. Install packages — use a GOOGLE APIS image (NOT a Play image):
sdkmanager "platform-tools" "emulator" \
"platforms;android-30" \
"system-images;android-30;google_apis;x86_64"Use
google_apis, notgoogle_apis_playstore. Play-Store images ship a Google account/GMS that blocksadb dpm set-device-owner. Thegoogle_apisimage allows Device Owner over ADB.
A lighter API level (e.g. 30 / Android 11) boots faster on weak hardware and still supports every policy CORE MDM uses.
avdmanager create avd -n coremdm_test \
-k "system-images;android-30;google_apis;x86_64" -d pixel_5
emulator -avd coremdm_test -no-snapshot -no-boot-anim -gpu swiftshader_indirectOn Windows, launch the emulator as a detached process (e.g. PowerShell Start-Process) so it doesn't die with the shell.
Wait for boot:
adb wait-for-device
adb shell getprop sys.boot_completed # "1" when readyadb install -r app-release.apk
adb shell dpm set-device-owner com.core.mdm/.MdmDeviceAdmin
adb shell dpm list-owners # verifyOpen the app, sign in (email/password works with no Google account), and it enrolls — it now shows in the console as a Device Owner device.
# watch MDM logs
adb logcat -v time MdmCommandService:* DeviceRegistry:* AppPolicyManager:* *:S
# screenshot
adb exec-out screencap -p > shot.png
# is a policy applied? e.g. hidden app
adb shell dumpsys package <pkg> | grep -m1 hidden
# content filter VPN up?
adb shell settings get secure always_on_vpn_app # -> com.core.mdm
adb shell dumpsys connectivity | grep -o tun0-
Device Owner apps can't be force-stopped ("Ignoring request to force stop protected package"). To restart the service, reboot the emulator (
adb reboot) or open the app's activity. - The installed-app inventory uploads on service start — if the console's Installed Apps tab is empty, reboot/relaunch and reopen the tab.
- Emulators block ICMP ping; test connectivity with the validated-network capability in
dumpsys connectivity, not ping. - First boot is slow on low-end CPUs (minutes). That's normal.
Enrollment, the command queue + cancel, the Firestore rules, the installed-app inventory, app hide/suspend, enforced PIN, reboot, and the content-filter VPN auto-authorization — all without touching a real phone.
CORE MDM — Repository · Console · Releases · Beta
Getting started
Using it
- Web Console Guide
- Commands and Command Queue
- Policies Reference
- App Management
- Content Filter and DNS
- Kiosk Mode
- PIN and Security
- Enrollment and Provisioning
How it works
Operations
Help