• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [GUIDE] Prevent Home Button From Waking Phone

quickdraw996

Well-Known Member
My phones home button tends to wake up my phone when I don't want it to, especially in my pocket, causing unnecessary battery drain and possible emergency dials (I've nearly dialed 911 in my pocket). If you have the same issue and want a fix, this guide is for you.

For: Rooted LG VOLT on stock ROM. (Procedure should be very similar for any custom ROMs like CM11/CM12)

Needed: Root browser such as ES File Explorer(FREE) or Root Browser(PAID).

*****I AM NOT IN ANY WAY RESPONSIBLE FOR ANYTHING YOU DO TO YOUR PHONE, SUCH AS BRICKING IT, FOLLOWING THIS GUIDE*****

It is optional but recommended that you make a backup of your phone first via TWRP or CWM, just in case

1. Grant your file explorer superuser access.

2. Backup File
1.A. - Navigate to "/system/usr/keylayout"
1.B. - Copy gpio-keys.kl
1.C. - Paste gpio-keys.kl to a safe place
OR SEE ">>>" under sub-step "2.D."

3. Edit File
2.A. - Navigate back to "/system/usr/keylayout"
2.B. - Open gpio-keys.kl
2.C. - Make it editable if need be (this option is found in top right of ES File Explorer, within the menu dropdown)
2.D. - Find the line hi-lighted in the attached picture below ("key_102HOME____WAKE")(underscore = spaces)
>>>If you did not copy the file to a safe place, add a blank line to the very top of the document, add a "#" and then copy the line to the top of the file after the "#"
(Looks like = "#key_102HOME____WAKE")(underscore = spaces)
2.F. - Hilight and delete the word WAKE and *****ALL OF THE SPACES AFTER HOME/BEFORE WAKE. DO NOT DELETE/COMMENT OUT THE ENTIRETY OF THE ORIGINAL LINE, UNLESS YOU WANT A HOME BUTTON THAT DOES NOTHING. ALSO DO NOT COMMENT OUT THE PART BEFORE "WAKE" UNLESS YOU WANT A HOME BUTTON THAT DOES SOMETHING ELSE!!!!!*****
Screenshot_2015-02-09-09-24-09.png

4. Save File

5. Reboot Phone

6. Enjoy!
 
Last edited:
Has anyone tried it?

If so, let me know how it went, curious to see:

1. If it worked perfectly or were there any issues,
2. How you like it,
3. If there is anything in the guide that could be improved.

Your feedback is greatly appreciated!
 
"#" comments out right? Can it be inserted mid-line? If "#" comments out, Why are not all of the lines beginning with a "#"?

I am unsure of anymore specifics because I am unsure of the language this is in. I know some BB Code, HTML 5, CSS, and a little bit of C++ (going to try and learn javascript, java, python, and more detailed C++, like graphics), and I know how to comment in all of them and XML but I'm not 100% sure on how to in this "key layout" file.

But what markup language is this? (I'm ASSUMING this is a markup language, and not a programming language, but I've been wrong before...)
 
Last edited:
"#" comments out right? Can it be inserted mid-line? If "#" comments out, Why are not all of the lines beginning with a "#"?

I am unsure of anymore specifics because I am unsure of the language this is in. I know some BB Code, HTML 5, CSS, and a little bit of C++ (going to try and learn javascript, java, python, and more detailed C++, like graphics), and I know how to comment in all of them and XML but I'm not 100% sure on how to in this "key layout" file.

But what markup language is this? (I'm ASSUMING this is a markup language, and not a programming language, but I've been wrong before...)
It's not a markup language.

Its very likely being used by a shell script (that is its own language) to read in the tuples to set the named parameters.

In shell scripts, # does indeed denote a comment and can be added to the end of a line.

Never try it for parameter files, you're likely to get bad behavior.

I'd strongly recommend following the OP instructions to the letter.

If you must preserve a copy, then copy and comment out the entire original line. This parameter file clearly respects full line comments. Place the commented line at the top along with the others.

Or just follow the OP instructions and bookmark this page.
 
It's not a markup language.

Its very likely being used by a shell script (that is its own language) to read in the tuples to set the named parameters.

In shell scripts, # does indeed denote a comment and can be added to the end of a line.

Never try it for parameter files, you're likely to get bad behavior.

I'd strongly recommend following the OP instructions to the letter.

If you must preserve a copy, then copy and comment out the entire original line. This parameter file clearly respects full line comments. Place the commented line at the top along with the others.

Or just follow the OP instructions and bookmark this page.

Thanks for the alternate method for backing up the original line. I am going to update the OP accordingly.

EDIT: OP is updated.
 
Last edited:
Quick update...if you comment out the whole line, the home button stops working completely. Couldn't open recents, or switch back to launcher from another app. Just deleting 'WAKE' works though.
 
Quick update...if you comment out the whole line, the home button stops working completely. Couldn't open recents, or switch back to launcher from another app. Just deleting 'WAKE' works though.

Any suggestions on how I can make that clearer than it currently is in the OP?
 
Not sure how it can be clearer than what I said. Commenting out the line disables the home button completely.
 
Is it possible to comment out "wake"?
No, don't do that.

Just tried it ( key_102HOME#____WAKE) will remap the home button to something else that I am unsure of what it is, it seems like it makes the home button hilight things like how an arrow key on a physical keyboard would.
 
Is it possible to comment out "wake"?
No, don't do that.

Just tried it ( key_102HOME#____WAKE) will remap the home button to something else that I am unsure of what it is, it seems like it makes the home button hilight things like how an arrow key on a physical keyboard would.
I don't know how I could have been more clear to not do that either. :D

Next time, save yourself some trouble and trust me - this ain't my first rodeo. :)
Never try it for parameter files, you're likely to get bad behavior.

I'd strongly recommend following the OP instructions to the letter.
Cheers. ;)
 
I don't know how I could have been more clear to not do that either. :D

Next time, save yourself some trouble and trust me - this ain't my first rodeo. :)

Cheers. ;)

Had to restore a backup that was made before I had done this mod, so I thought I would give it a shot so I could tell them specifically what will happen.

What is this type of file? Is it a linux shell script? Like, what would I type into Google to learn this?

EDIT: OP is now updated ;)
 
Last edited:
Back
Top Bottom