Prerequisite
- ADB from Android SDK platform tools
- gmsaas command line tool
Step 1: Connect your instance to ADB
Use gmsaas CLI to connect your instance to ADB. Please refer to this article for detailed instructions.
Step 2: Root your device
Kiosk mode can only be activated if the device is rooted. To root the device, use the following adb command:
adb shell setprop persist.sys.root_access 3Then, enable root access for abd:
adb root
The adb root command will stop and restart adb. If you wish to avoid that, you can skip this
step and add "su root" after "shell" to the adb commands in the next step. For example:
adb shell su root cmd activity kiosk start
Step 3: Enable kiosk mode
Launch the application you want to lock in kiosk mode and run this command:
adb shell cmd activity kiosk startTo stop kiosk mode, use the following adb command:
adb shell cmd activity kiosk stopIn kiosk mode, the status bar is hidden and cannot be scrolled down.