1

My power button has broken so I'm trying to use the volume up key as the power button instead. My phone is a rooted Sony Xperia Go ST27i running Android 4.1.2.

I've tried ButtonRemapper, but this does not work on my phone so I'm trying to do it manually.

The output of $ cat /proc/bus/input/devices contains:

Bus=0019 Vendor=0000 Product=0000 Version=0000
Name="ux500-ske-keypad"

So I thought I'd edit the /system/usr/keylayout/ux500-ske-keypad.kl file, however this file does not contain what I expected.

It has no config for a power button and contains only the two lines:

key115  VOLUME_UP   WAKE
key114  VOLUME_DOWN WAKE

So nowhere I can disable the power button (assume this is key 116 on this model?). Also neither of the volume keys work to wake my phone, so is this config file even being read?

3

Answering own question in case anybody else has the same issue.

There is another file /system/usr/keylayout/Generic.kl that contained the mapping for the power button. The Android docs say never to modify this file but I did anyway. Commenting out the power button line in this file has solved my issue (power button stuck in) and I'm now using my volume up button as the power button.

Note that I also had to remount the /system partition as read-write that I did with the excellent FX app

0

If Xposed Framework can be run on your device they you may try Xposed Additions.

  1. Under that app, choose a key to activate a trigger (a Volume key in this case) → Add a new Condition → Screen Off → tap on the new entry.

Why not retain the original function of Volume key as well?

  1. Under that entry activate Click below Double Actions → Power.

  2. Now repeat the procedure but select the condition Screen On.

  3. Also, you would want to change the Double click delay shown on button assigning window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.