ADB provisioning
Use when QR scanning at factory setup is unavailable — common on Telpo and custom kiosk builds. Install the agent over USB, set device owner, then sync enrollment.
Prepare the device
- Factory reset (no Google account, no prior device owner).
- Enable Developer options → USB debugging.
- Connect USB; accept the RSA fingerprint prompt on the device.
- Run Play Protect helper if sideload is blocked:
scripts/disable-play-protect-adb.bat
adb devices
Expect exactly one device in device state (not unauthorized).
Install the agent APK
Download mdm-agent.apk or copy from the server at storage/app/mdm/mdm-agent.apk.
adb install -r mdm-agent.apk
Set device owner
Must run on a device with no accounts and no existing device owner. This grants Device Owner to the Capnis DPC.
adb shell dpm set-device-owner com.capnis.mdm/.AdminReceiver
Success message: Success: Device owner set to … AdminReceiver. If it fails, factory reset and retry before adding any account.
Pass enrollment token
Create an enrollment profile in Admin → Enrollment and copy the enrollment token from the profile (or QR JSON payload).
Option A — launch with extras (if supported by your build):
adb shell am start -n com.capnis.mdm/.MainActivity \ --es enrollment_token YOUR_ENROLLMENT_TOKEN \ --es server_url https://capnis.one
Option B — post-provision sync: Open the Capnis MDM agent on device, enter server URL https://capnis.one, and complete registration when prompted. The agent calls POST /api/device/register.
Verify
- Device appears in Devices with package
com.capnis.mdm. - Agent version 3.0.1 (23).
- Heartbeat and policy sync within a few minutes.