FORUMS

What Do You Think About Fingerprint Scanners?

More and more phones are featuring fingerprint scanners, and with many promising … more

What’s Next for Samsung and Its Flagships?

If we were to say that the Galaxy S6 was a leap of faith made by Samsung, we … more

The Ultimate Showcase of dBrand Skins

In the search for ways to protect, accessorize, and personalize; a user has many options. One … more

Huawei’s Rapid Rise to Third Place in the Smartphone Race

Huawei has quickly grown to become one of the world’s biggest … more

[HOWTO] Assign other buttons to show unlock screen

142 posts
Thanks Meter: 0
 
By pina_, Senior Member on 18th May 2010, 06:21 PM
Post Reply Subscribe to Thread Email Thread
Has anyone already found a way to display the lockscreen using another button then the power on/off button? I can't get used to the new unlocking method. On my Hero, I just had to press a button to see the lockscreen and I even could press a button twice to unlock it.

I guess it should be possible with rooted phones? But I don't know how ofc...


Solution:

You need to edit the file bravo-keypad.kl in /system/usr/keylayout
Open the file in a text editor, you'll see something like this:

Code:
key 102   HOME
key 139   MENU              
key 158   BACK
key 217   SEARCH

key 107   ENDCALL           WAKE_DROPPED
key 116   POWER             WAKE_DROPPED

key 115   VOLUME_UP         WAKE
key 114   VOLUME_DOWN       WAKE
You'll have to put the string 'WAKE_DROPPED' behind the button you wish to use to unlock. It has been set on POWER and ENDCALL by default.

You need to pull the file first via recovery, edit it, then push it back to your phone. You can only do this via the recovery, not via programs like Root Explorer!

Go into recovery, then type in the following commands:

Windows:
  • adb-nilezon shell mount /system
  • adb-nilezon pull /system/usr/keylayout/bravo-keypad.kl c:\
  • edit bravo-keypad.kl to your liking
  • adb-nilezon push c:\bravo-keypad.kl /system/usr/keylayout/bravo-keypad.kl
  • adb-nilezon shell reboot

Mac:
  • ./adb-mac shell mount /system
  • ./adb-mac pull /system/usr/keylayout/bravo-keypad.kl
  • edit bravo-keypad.kl to your liking
  • ./adb-mac push bravo-keypad.kl /system/usr/keylayout/bravo-keypad.kl
  • ./adb-mac shell reboot

many thanks to RedDragCZ and ritdaw!
Last edited by pina_; 16th June 2010 at 10:30 PM.
 
 
18th May 2010, 07:13 PM |#2  
Junior Member
Thanks Meter: 0
 
More
Needs just a little tweak of the "/system/usr/keylayout/bravo-keypad.kl" file, adding the "WAKE_DROPPED" to the end of the line of some other key with which you want to be able to wake up your phone.
Currently, I'm using it this way:
Code:
key 102   HOME
key 139   MENU              WAKE_DROPPED
key 158   BACK
key 217   SEARCH

key 107   ENDCALL           WAKE_DROPPED
key 116   POWER             WAKE_DROPPED

key 115   VOLUME_UP         WAKE
key 114   VOLUME_DOWN       WAKE
Pressing the MENU button now shows the lockscreen and doubletapping it unlocks the device.

Quote:
Originally Posted by pina_

I guess it should be possible with rooted phones?

You are right, you need to have root access to your phone to apply this patch.
18th May 2010, 08:00 PM |#3  
OP Senior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by RedDragCZ

Needs just a little tweak of the "/system/usr/keylayout/bravo-keypad.kl" file, adding the "WAKE_DROPPED" to the end of the line of some other key with which you want to be able to wake up your phone.
Currently, I'm using it this way:

Code:
key 102   HOME
key 139   MENU              WAKE_DROPPED
key 158   BACK
key 217   SEARCH

key 107   ENDCALL           WAKE_DROPPED
key 116   POWER             WAKE_DROPPED

key 115   VOLUME_UP         WAKE
key 114   VOLUME_DOWN       WAKE
Pressing the MENU button now shows the lockscreen and doubletapping it unlocks the device.

You are right, you need to have root access to your phone to apply this patch.

edit2: Edited the file, saved the file but the phone just reboots and reverts the file back to default settings...
Last edited by pina_; 18th May 2010 at 08:32 PM.
18th May 2010, 08:21 PM |#4  
Member
Thanks Meter: 0
 
More
i have some issues, after putting the edited file back into /system/usr/keylayout I reboot the phone and the file changes back to default, can you help me here?
18th May 2010, 08:22 PM |#5  
ivicask's Avatar
Recognized Contributor
Flag Zagreb
Thanks Meter: 14,168
 
Donate to Me
More
This something i wanted from moment i got phone. Couldn anyone help me to figure this file so that:
1. Disable unlock screen by pressing menu.
2. unlock screen by double pressing optical trackball.

3.Also if i get above 2 working, i would like to disable on screen slide to unlock, so that just double click on optical unlocks phone.
18th May 2010, 08:42 PM |#6  
Senior Member
Thanks Meter: 7
 
More
Awesome find, works like a charm! My biggest nightmare with the desire is turning it on by accident when I push it in my pocket. Wouldn't be keen on disabling the power button though...
18th May 2010, 08:47 PM |#7  
OP Senior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by ritdaw

Awesome find, works like a charm! My biggest nightmare with the desire is turning it on by accident when I push it in my pocket. Wouldn't be keen on disabling the power button though...

what rom are you using? It keeps rebooting each time when I edited the file. And how did you edit the file? Perhaps I have to use a different method to edit the file...?
18th May 2010, 08:53 PM |#8  
Senior Member
Thanks Meter: 7
 
More
Quote:
Originally Posted by pina_

what rom are you using? It keeps rebooting each time when I edited the file. And how did you edit the file? Perhaps I have to use a different method to edit the file...?

MCR r3.

You need to use adb when in recovery and pull a copy of the file, then edit it and push it back to the same place. You only have full rw to the system partition in recovery.

For example (using windows root tools):
  • recovery-windows.bat
  • adb-nilezon shell mount /system
  • adb-nilezon pull /system/usr/keylayout/bravo-keypad.kl c:\
  • edit bravo-keypad.kl to your liking
  • adb-nilezon push c:\bravo-keypad.kl /system/usr/keylayout/bravo-keypad.kl
  • adb-nilezon shell reboot
18th May 2010, 09:13 PM |#9  
OP Senior Member
Thanks Meter: 0
 
More
Red face
Quote:
Originally Posted by ritdaw

MCR r3.

You need to use adb when in recovery and pull a copy of the file, then edit it and push it back to the same place. You only have full rw to the system partition in recovery.

For example (using windows root tools):

  • recovery-windows.bat
  • adb-nilezon shell mount /system
  • adb-nilezon pull /system/usr/keylayout/bravo-keypad.kl c:\
  • edit bravo-keypad.kl to your liking
  • adb-nilezon push c:\bravo-keypad.kl /system/usr/keylayout/bravo-keypad.kl
  • adb-nilezon shell reboot

yeah it works! I used mac os x and it works too
18th May 2010, 09:42 PM |#10  
myth1001's Avatar
Senior Member
Flag Kuala Lumpur
Thanks Meter: 13
 
Donate to Me
More
Thanks RedDragCZ for the tweak!

Thanks ritdaw for the instructions!!

And thanks pina_ for opening the thread!

18th May 2010, 10:03 PM |#11  
Junior Member
Thanks Meter: 0
 
More
Thumbs up
I was looking no lock, but this is what i was searching for.

Thnx all!

Read More
Post Reply Subscribe to Thread

Tags
remap, set
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes