ECLIPTIC Reference Kiosk provisioning

Reference

Kiosk provisioning

Locks a fleet tablet to the cockpit so a passenger cannot leave the app, the lockscreen advertisements never appear, and the tablet cannot reboot into an OS update mid-event — and, because the cockpit is set as the device's Home app, it relaunches itself after a reboot or power loss.

Why device owner, and why a factory reset

Escapable?Survives reboot?Kills lockscreen?Needs reset?
Screen pinningYes, back + recentsNoNoNo
Lock task as device ownerNoYesYesYes

Screen pinning tells the user how to leave. That is fine for a demo and useless for a tablet strangers will poke all week.

Device owner can only be set on a device with no accounts configured, which in practice means straight after a factory reset. That is the entire reason the reset is needed — it is not superstition, the dpm command refuses otherwise.

Steps, per tablet

  1. Factory reset. Settings → General management → Reset → Factory data reset.
  2. Skip account sign-in during setup. This is the step that matters. If an Amazon or Google account gets added, dpm will refuse and you have to reset again. Skip Wi-Fi too if it pushes you toward signing in; add it afterwards.
  3. Enable developer options and ADB (Settings → About tablet/phone → Software information → tap Build number ×7, then Developer options → USB debugging).
  4. Install and provision:
    adb install -r app-debug.apk
    adb shell dpm set-device-owner \
      org.pureagave.zodiac.control/.kiosk.ZodiacDeviceAdminReceiver
    Success prints Active admin set to component {...}.
  5. Launch the app. It locks itself on resume.
Provision with a release-signed APK, not a per-machine debug build

A device-owner app cannot be uninstalled and can only be updated by an APK signed with the same key, so a tablet provisioned with one laptop's debug keystore can never be moved to a release build (or any other machine's debug build) without a factory reset. Use a release APK from a stable, backed-up keystore for anything that stays in the fleet; app-debug.apk is fine only for a throwaway test tablet.

Runtime permissions are pre-granted

A device owner does not auto-grant runtime permissions, and once engage() disables the status bar and enters lock task there is no way for anyone to reach Settings to grant one that is missing. So engage() pre-grants the app's own requested set (requiredCockpitPermissions): ACCESS_FINE_LOCATION always, plus BLUETOOTH_CONNECT / BLUETOOTH_SCAN on API 31+ (the Samsungs). It grants nothing beyond what the manifest already declares and the app already asks for.

Auto-relaunch after a reboot

A kiosked tablet relaunches the cockpit by itself after a reboot or power loss — the failure the fleet can least afford is a mounted display sitting on the stock (ad) launcher until someone finds and taps the app. Android blocks a BOOT_COMPLETED receiver from starting an activity in the background, but it always launches Home at boot, so engage() makes the cockpit the device's Home app (a persistent preferred Home, so no chooser appears), and the cockpit's onResume() then re-enters lock task. Keyguard is already disabled, so nothing stands between power-on and the cockpit.

The Home capability rides a normally-disabled alias

It is an <activity-alias> (KioskHomeActivity) that engage() enables and the exit code disables again — so a non-provisioned device is never offered as a launcher, exactly like every other kiosk policy here being a no-op without device owner. Device-owner-only, so it cannot be exercised in CI; verify it by rebooting a provisioned tablet.

Verify

adb shell dumpsys device_policy | grep -i "device owner"
adb logcat -d | grep "kiosk:"                # "kiosk: locked to org.pureagave..."
adb logcat -d | grep "kiosk: pre-granted"    # lists ACCESS_FINE_LOCATION (+ Bluetooth on a Samsung)

Verify auto-relaunch — the whole point of the Home step. After provisioning, adb reboot and confirm the cockpit comes back on its own with no tap (a Samsung delivers Home a couple of minutes after boot — be patient):

adb reboot
adb shell dumpsys window | grep -i mCurrentFocus   # -> org.pureagave.zodiac.control/.MainActivity
adb logcat -d | grep "kiosk: set as preferred Home"

mCurrentFocus on the cockpit (not the stock launcher) after a cold boot is the pass. This is the one check CI can never do — do it on a test tablet before trusting the fleet to recover unattended.

Getting back out

There is no adb un-provision on the shipped build: dpm remove-active-admin throws SecurityException (it only works on a testOnly APK, which the fleet is not), and a device-owner app cannot be uninstalled. So there are exactly two ways out:

  1. The hidden exit code — primary, no reset. On the running cockpit, tap the two hidden right-edge corners — bottom-right, then top-right, alternating, six taps total — each within 2 s of the last. The app un-provisions itself: it leaves lock task, gives Home back to the stock launcher (clears the persistent preferred Home and disables the KioskHomeActivity alias), and relinquishes device owner, so the tablet is unlocked and can be serviced, updated or uninstalled.
  2. Factory reset — fallback. If the app is wedged and will not take the code, a reset is the only other way; it wipes the tablet and you re-provision from step 1.
Verify the exit code on a test tablet first

The device-owner path cannot be exercised in CI, so an on-device dry-run is the only real check: provision one, enter the code, confirm dumpsys device_policy shows no device owner. Provision the fleet only once the build is settled.

Fire tablets cannot be kiosked

Measured 2026-08-18 on both Fire HD 10s

Established by exhausting every option on a 9th-gen KFMAWI (API 28) and an 11th-gen KFTUWI (API 30). Fire OS ships com.amazon.parentalcontrols as a profile owner baked into the OS image, and a profile owner blocks dpm set-device-owner outright. It is unremovable without root: it survives a factory reset and an online deregister, dpm remove-active-admin throws SecurityException: non-test admin, and pm uninstall --user 0 fails with DELETE_FAILED_INTERNAL_ERROR.

The Samsungs (S9+, A54) have no profile owner and provision cleanly. So the passenger Fires get neither the kiosk nor the auto-relaunch after reboot. The options for them: run unlocked (accept the ad lockscreen and a manual tap after each power-cycle), lighter screen-pinning (escapable, no auto-relaunch), or swap the passenger displays for non-Fire Android tablets.

Which tablets should get it

DeviceKiosk?Why
S9+ hero dashboardYesSamsung, provisions cleanly; mounted, worth it
A54 driver phoneProbably notKiosk means no maps, no phone, no camera on that device — a lot to give up on the one screen the driver might genuinely need something else from
Passenger FiresCannotFire OS's built-in profile owner blocks dpm set-device-owner (above). Run unlocked or use screen-pinning
XCover beaconNoIt is headless already; kiosk buys nothing

Gotchas

Do not rename ZodiacDeviceAdminReceiver or the KioskHomeActivity alias

Renaming or deleting ZodiacDeviceAdminReceiver breaks provisioning on every already-provisioned tablet, and the only fix is another factory reset. The class is intentionally empty so there is never a reason to touch it. The same caveat applies to the KioskHomeActivity <activity-alias>: KioskController references it by string, so a rename breaks auto-relaunch on already-provisioned tablets silently — the manifest name and the string must stay in lockstep.

Resolved since — the three former open items
  • The signing trap (provisioning with a per-machine debug APK) is now documented above.
  • The escape hatch is the hidden six-tap exit code, shipped and verified in the 2026-08-13 audit fix.
  • Automatic OS updates are disabled through setSystemUpdatePolicy rather than the ota_disable_automatic_update key that API 34 rejects.

Converted from
docs/KIOSK.md