0

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?

Siamak
  • 1,689
  • 1
  • 17
  • 26
  • 1
    *We are working on a device guard application for rooted android devices.* sounds like a oxymoron to a certain degree. But beyond that, I would actually surprised if you can enable such functionality. Because *if* that would be possible, people could write a virus that like bricks your device, by blocking *any* input. – GhostCat Apr 19 '21 at 12:19
  • You're right. I've updated the question. I know it should not possible normally but a device admin is not a normal application. see this https://stackoverflow.com/a/24474059/4799599 – Siamak Apr 19 '21 at 12:30

0 Answers0