Jump to content

Powerbutton doesn't work


Guest honigfisch

Recommended Posts

Guest honigfisch

Hey guys my powerbutton doesnt work properly when i press the button nothing happens I can only unlock the phone when i apply more pressure on the button Is there any possibility of changing the function of the powerbutton so i can use for example the volume down button as the powerbutton? Anybody got an idea how to resolve this problem?

Edited by honigfisch
Link to comment
Share on other sites

Guest ilsang06200

use button remapper, you can change power button instead another button. search on net, install apk. but you need to root your skate.

Link to comment
Share on other sites

Guest honigfisch

Maybe it is possible to change it totally without an app

System/usr/keylayout

There are some files but i dont know what i should change

Link to comment
Share on other sites

Guest MadNinja

I think it depends on android version, so you probably should mention your OS version, is it generic or custom rom and so on :)

From what I know (which is not allot), the key functions and button bindings are described in default or generic.kl. in this file you can check the button numbers and functions for power and volume down buttons, and there should be a second file describing hardware keys only, in my case it's called skate_keypad.kl (my current ROM is CM11 Android 4.4), and I think in that file you should change the volume down key function from VOLUME_DOWN to POWER.

Here is how the file looks on my device:

key 158   BACK              WAKE_DROPPED
key 139   MENU              WAKE_DROPPED
key 102   HOME              WAKE

key 115   VOLUME_UP         WAKE
key 114   VOLUME_DOWN       WAKE
key 116   POWER             WAKE
key 142   POWER             WAKE

key 226   HEADSETHOOK       WAKE_DROPPED

I suppose changing key 114 VOLUME_DOWN WAKE to key 114 POWER WAKE should make the volume down key wake the device, but I have not tested it, just a theory you could try :)

Good luck!

 

..::Edit::..

I've just changed key 102 HOME WAKE to key 102 CALCULATOR WAKE, rebooted the phone and now the Home button launches the Calculator app, so it should work :)

Edited by MadNinja
Link to comment
Share on other sites

Guest honigfisch

Thanks for your answer - i have found that out too.

But i dont like this idea of changing powerbutton to volume down

My question: is it possible to change the function of the powerbutton to home+volume down

So that you press these two buttons instead of the powerbutton. Than i could use the other hardware keys too without changing their function

i

Link to comment
Share on other sites

Guest MadNinja

That's going to be difficult, key combinations and long press functions are in the jar files in framework folder i think... you will have to decompile, change and recompile them. Since i don't really know java, I can't help you there :)

Good luck!

 

P.S.

I might be wrong off course, but that's where I think these settings are.

Link to comment
Share on other sites

Guest H3ROS

Keep in mind that that's only useful for when you've already got Android booted. The on switch can't be remapped so that it can actually turn the phone on.

 

Edited by H3ROS
Link to comment
Share on other sites

Guest honigfisch

I know - unfortunately it isnt possible to remap it totally - it only works if the phone is turned on and i think it is much harder to remap it to 2 keys

Do you have an idea how to do that H3ROS?

Link to comment
Share on other sites

Guest H3ROS

I know that the menu code is within android.policy.jar, so if the function to detect the key press is also there then I might be able to patch it.

 

If nobody can link to the java code then I'll take a look when I've got a little more time.

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.