I want to understand the workings of power button and volume rockers in Android devices, which are associated with the kernel driver of these keys.

What happens in the kernel driver and boot loader when I press a physical key on a device?

1 Answer 1


The problem with understanding any physical buttons on an Android, is that they are extremely hardware dependent. Usually they're connected to some GPIO port on either the application processor (AP) or cellular processor (CP/modem), and on some devices (MTK,Qualcomm) these are combined in a SoC. In other devices, there is a separate touch screen MCU, that can also be used for some keys. So without knowing your exact hardware and its configuration, it is impossible to answer your question.

Your best chance for success in understanding, is by downloading the sources for your device/kernel and look in there, in combination with finding a service manual that also show some schematics.

EDIT: Here is one block diagram: enter image description here And here is another: enter image description here

  • I have phone with mt6589 also I have kerenel code for same so where is code of manulplating thoes keys
    – RRD
    Jul 10, 2014 at 4:30
  • As I said, it's nearly impossible to tell without a schematic. Or you can search the sources for terms related to keyboard layout/matrix, and so on. And in the worst case thay may even be proprietary code, so are not part of the sources apart as a binary FW blob.
    – not2qubit
    Jul 10, 2014 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .