how to prevent phone hard reboot in android

217 Views Asked by At

We are working on a device guard application. The main task is to save the phone from thieves by preventing them from hard rebooting/resetting it.

This is what I have already tried, after a few days:

  • Keep the screen off
  • Dispatch random key events to confuse the key combinations coming from hardware:
ProcessBuilder("su -c input keyevent 26").start()
  • Edit keylayout(/system/usr/keylayout/qwerty.kl) file to change the functionality of Volume Down key to break the combination. I couldn't manage to modify the file due to Read-Only file system exception even with rooted devices.

Device goes rebooted in any ways!

So, Is it possible to do so?

if yes, How can I prevent the phone from hard reboot?

0

There are 0 best solutions below