1

I am developing a custom Android ROM and I have a trouble with a force shutdown.

In devices that do not have a removable battery a long press (over 10s) of shutdown button should shutdown the device.

In my ROM this always happens, but the device sometimes enters a strange fastboot state, where you have to again long press power button to exit it.

I dont have a clue where is this feature implemented and would really appreciate some directions. I dont even know if I should search in kernel or userspace.

Martin Tramšak
  • 607
  • 1
  • 7
  • 12

2 Answers2

1

After some digging into the code, I have found relevant information in the kernel. I am using Snapdragon 410 chipset and all I had to do was change the device tree files. Specifically I had to change the configuration of the pm8916 power IC. It was set to warm restart after 10s, but I changed it to shutdown.

In the end it was very specific question.

Martin Tramšak
  • 607
  • 1
  • 7
  • 12
0

You probably have to look into a bootloader code and disable the fastboot key combination.

Bartosz J
  • 178
  • 4