Jump to content


Photo

Powerbutton doesn't work

- - - - -

  • Please log in to reply
12 replies to this topic

#1
honigfisch

honigfisch

    Enthusiast

  • Members
  • PipPipPip
  • 166 posts
  • Devices:ZTE Skate
  • Twitter:@-
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, 08 March 2014 - 08:20 PM.

  • 0

#2
ilsang06200

ilsang06200

    Regular

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

  • 0

#3
honigfisch

honigfisch

    Enthusiast

  • Members
  • PipPipPip
  • 166 posts
  • Devices:ZTE Skate
  • Twitter:@-
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

  • 0

#4
honigfisch

honigfisch

    Enthusiast

  • Members
  • PipPipPip
  • 166 posts
  • Devices:ZTE Skate
  • Twitter:@-
Push

  • 0

#5
MadNinja

MadNinja

    Newbie

  • Members
  • Pip
  • 22 posts
  • Devices:ZTE Skate (OMC)

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, 15 March 2014 - 11:18 PM.

  • 0

#6
honigfisch

honigfisch

    Enthusiast

  • Members
  • PipPipPip
  • 166 posts
  • Devices:ZTE Skate
  • Twitter:@-
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

  • 0

#7
MadNinja

MadNinja

    Newbie

  • Members
  • Pip
  • 22 posts
  • Devices:ZTE Skate (OMC)

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.


  • 0

#8
honigfisch

honigfisch

    Enthusiast

  • Members
  • PipPipPip
  • 166 posts
  • Devices:ZTE Skate
  • Twitter:@-
Ok thanks anyway :)

  • 0

#9
H3ROS

H3ROS

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,926 posts
  • Gender:Not Telling

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, 16 March 2014 - 05:57 PM.

  • 0
BNqXLPC.pnghIMMF2y.png
If you like my ROM's then please consider a donation. A lot of time and effort went into them. Thank you.

My blog website: codeshed.co.uk

#10
honigfisch

honigfisch

    Enthusiast

  • Members
  • PipPipPip
  • 166 posts
  • Devices:ZTE Skate
  • Twitter:@-
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?

  • 0

#11
H3ROS

H3ROS

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,926 posts
  • Gender:Not Telling

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.


  • 0
BNqXLPC.pnghIMMF2y.png
If you like my ROM's then please consider a donation. A lot of time and effort went into them. Thank you.

My blog website: codeshed.co.uk

#12
honigfisch

honigfisch

    Enthusiast

  • Members
  • PipPipPip
  • 166 posts
  • Devices:ZTE Skate
  • Twitter:@-
Thanks a lot H3ROS :-)

  • 0

#13
C3C0

C3C0

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 3,179 posts
  • Gender:Male
  • Location:Slovakia (Bratislava)
  • Devices:Nexus 5
The problem is. When device is in deep sleep, the only way to wake it up is by power button. It's a hardware "limitation".

  • 0
Links to my stuff: SlimBean (Android 4.2.2), RootBox (CM/AOKP/PA mix 4.2.2), ParanoidJelly2 (AOSPA 4.2.2), ParanoidJelly (JB), ParanoidAndroid (ICS), MokeeOS (GB), CM7.2 (GB), SKatie (GB), SwedishSnow (GB), Kernels
If you like my contribution to Android community, click donate button on my page at: http://ceco.sk.eu.org
Please, do not use personal conversation to solve your problems. Use forum - its power is often underestimated. If I can't help somebody else will certainly try to. Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users