How to run Android App in Kiosk Mode, keep Safe Mode disabled and prevent the device from Hard Reset?
I have following 3 requirements for my app:
Show only specific apps to school students in the normal mode of the device. This can be possible by disabling default launcher and enabling kiosk launcher.
Disable or set the password to safe mode to avoid usage of system apps or built-in apps (youtube, video player, music app, etc.).
Restrict hard reset of a device by disabling long press of hard keys (power button, volume buttons) of a device.
I have interpreted these requirements and came up with below detailed understanding.
We can redesign the school students app to make itself a launcher app which will run in kiosk mode. That implies we will not require any other (trial version) launcher apps.
We can disable safe mode access to the system or third-party apps via the AppLock app or similar other apps. It will work only up to Android Marshmallow 6.0. But there is an Android imposed limitation – it won’t work on Nougat / Oreo devices. Alternatively, we tried to handle the power button key press for preventing the device from going into safe mode. But Android doesn't allow the access or listen to power key press from our app as per this link and various other.
IMPORTANT NOTE FOR ANDROID 7.0 (NOUGAT) AND 8.0 (OREO) - link here
As per MMGuardian App, at this time, Safe Mode Lock cannot be enabled for phones running on Android 7.0 or 8.0. If an older phone for which Safe Mode Lock was previously enabled is updated to these versions of Android, the Safe Mode Lock function will become disabled.
- We cannot prevent any device from hard reset as it is mostly done after the phone is switched off leaving the apps with no control. But there is an expensive alternative. We can use a COSU device and design a custom firmware. More details about COSU are available on below links. https://developer.android.com/work/cosu.html https://developers.google.com/android/work/requirements/cosu
Can someone help me to add more thoughts to it for me to understand this situation in more details?
Am I going in the right direction? or Have I detailed it correctly?