Android Kiosk Mode on Rockchip Devices (Lock Task, Device Owner, Boot to App)
Turn a Rockchip Android board into a single-purpose kiosk: device-owner provisioning, lock-task mode, booting straight into your app, and what to bake into the ROM instead.
Rockchip boards are everywhere in signage, POS terminals and HMIs, and most of those run a single Android app full-screen. There are two layers to this: app-level kiosk (works on any Android image) and ROM-level kiosk (when you control the SDK build).
App-level: device owner + lock task
- Add a
DeviceAdminReceiverto your app and declare it in the manifest with a device-admin XML policy. - On a freshly reset device (no accounts added), make your app the device owner:
adb shell dpm set-device-owner com.example.kiosk/.AdminReceiver - In your app, whitelist it for lock task and start it:
val dpm = getSystemService(DevicePolicyManager::class.java) val admin = ComponentName(this, AdminReceiver::class.java) dpm.setLockTaskPackages(admin, arrayOf(packageName)) startLockTask() - Declare your activity as a HOME launcher (
android.intent.category.HOME+DEFAULT) so it starts at boot, and set it as the persistent preferred activity withdpm.addPersistentPreferredActivity(...).
In lock-task mode the status bar, recents and home are blocked. Use setLockTaskFeatures() to re-enable only what you need.
ROM-level: bake it into the Rockchip SDK
When you build the Android image yourself you can go further:
- Ship your app as a privileged system app (
PRODUCT_PACKAGESin your device makefile) and remove the stock launcher. - Hide the navigation bar and status bar by default through product overlays or system properties exposed by your SDK version.
- Set the default rotation, density and disable the lock screen in
device/rockchip/<product>/configs. - Auto-power-on after power loss is usually a PMIC or board setting, so check the hardware design as well.
Checklist for production kiosks
- Watchdog: restart the app if it dies (the HOME launcher role does most of this).
- OTA: sign your update packages and test A/B or recovery updates before shipping.
- Disable USB debugging in production builds (
ro.adb.secure=1, user build). - Display: confirm HDMI/LVDS/eDP timings in the kernel DTS for your panel; Android cannot fix a wrong panel timing.
오류를 발견했거나 추가할 내용이 있나요? 개선 제안하기.