Related
This fix allows you to use the one button or middle button on your headsets. You will be able to pause/start music answer/hangup phone for Samsung Galaxy S II and other phones using Gingerbread that the headset buttons may no longer work on.
I spent way too much time on this, so I figured I would share a how to for all of you.
You WILL need to Root your phone. I’ve found what I think is the best/easiest way of doing this. This Root process WILL NOT flash or change your OS.
Step 1:
Root your phone with DooMLoRD fantastic ‘Easy Root Toolkit’ link http://forum.xda-developers.com/showthread.php?t=1321582 you can read the 27 plus page link like I did or just trust me it works great. I rebooted the phone before running the install I used his V2 on the first page. Download his DooMLoRD_v2_ROOT-zergRush-busybox-su.zip <NEW> from the link on the first page. Again his process DOES NOT flash your phone as other rooting processes with ODIN will. He also has an unRoot.
Step 2:
Install one of the file managers I use Linda File Manager and/or File Expert from the market.
Install a texted editor I use Text Edit from the market.
Install a terminal emulator I use Android Terminal Emulator from the market.
Install Jays Headset Control. (This app is no longer available from the market for the SGS2. Compatibility issues stemming from the improper coding the sec_jack.kl file. The developer of Jays Headset is kind enough to post a link to app, see link at the bottom of this post.)
Step 3:
Open the terminal emulator
(To bring up the soft keyboard hit the menu button then the toggle soft keyboard “the menu button is at the bottom left of the SGS2” ) now type and enter the following commands:
cd /sdcard
mkdir fixbutton
cp /system/usr/keylayout/sec_jack.kl /sdcard/fixbutton/sec_jack.kl
cd /sdcard/fixbutton
ls
You should see the sec_jack.kl file.
To make a backup of the original type and enter the following command:
cp /system/usr/keylayout/sec_jack.kl /sdcard/fixbutton/sec_jack.kl.bkp
(if you have this problem where the i to turns into an I in the mkdir command the work around is type mkdi then hit the menu key and the toggle soft keyboard twice then enter the r)
Hit the home button
Step 4:
Open Linda File Manager
Hit SD Card
Scroll to fixbutton directory hit it
Hit the sec_jack.kl
Select Text Edit
It will look like this:
key 163 MEDIA_NEXT WAKE
key 165 MEDIA_PREVIOUS WAKE
key 226 SEND_END WAKE
change SEND_END to HEADSETHOOK
And add
key 164 MEDIA_PLAY_PAUSE WAKE
hit menu key then save.
It should look like this
key 163 MEDIA_NEXT WAKE
key 164 MEDIA_PLAY_PAUSE WAKE
key 165 MEDIA_PREVIOUS WAKE
key 226 HEADSETHOOK WAKE
Step5:
Find the mount point of /system . On my SGS2 its /dev/block/mmcblk0p9
Open Terminal Emulator and type and enter the following command (this is just a display command):
mount
The /system mount point is in the middle. If you click on the attachment below you will see a display from my SGS2, in the middle of the display on line 14 is the mount point
/dev/block/mmcblk0p9 /system ext4 ro,realtime,battier=1,data=ordered 0 0
The mount point is the first part of that line, on my SGS2 its:
/dev/block/mmcblk0p9
Other phones will be different, so write it down.
Step 6:
Remount /system in read write mode and copy the modified kl file back. (Click Allow for the su command when it pops up). If your mount point is different then /dev/block/mmcblk0p9 replace your mount point in the mount command below.
Open the terminal emulator and enter the following commands:
su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cp /sdcard/fixbutton/sec_jack.kl /system/usr/keylayout/sec_jack.kl
hit the back button power off and power on
Step 7:
Open Jays Headset Controller
Choose Advanced
Hit Button Actions
Change Phone options right side of Click and Hold to Answer and End call
Change Headset options left side of Click and Hold to whatever you want (I like Play/Pause)
Enjoy, Click and Hold button for a second or 2 this will
Startup Music Player / Pause / Start / Music / Answer / Hangup phone calls
That’s it, if this helps you give me a thumbs up and send money to the people that created the software that helps you!
Another tip, to save a lot of battery life, every time you reboot the phone hit Settings>Applications>Running services then hit DRM content > stop > ok, turn your display down to under 50%
Jays software can be found here http://forum.xda-developers.com/showpost.php?p=20033923&postcount=86
Now in a Flashable zip file
Made by ravizzle....thank you
Ok so i made a flashable zip of this mod. Op feel free to add this to the first post. Thanks for the mod in the first place!
Instructions:
1)Download zip
2)Flash in cwm
3)download "Jays headset control"
4)open Jays headset control app~ choose advanced~ button actions~ change phone options next to "click and hold" to answer and end call ~ change options on music icon next to "click and hold" to desired actions (OP used for pause/play, i personally use it to skip to next track.)
5) Enjoy!
if you have any problems or instructions are unclear please let me know and i will try to correct them.
Attached Files Headset button mod-signed.zip here or at the bottom of this post
/*
Anyone using a Custom ROM can use this code for the sec_jack.kl file, it will allow for more options working:
key 226 HEADSETHOOK WAKE
key 164 HEADSETHOOK WAKE #V2 Hardware support
key 163 MEDIA_NEXT WAKE
key 165 MEDIA_PREVIOUS WAKE
key 168 MEDIA_REWIND WAKE #V2 Hardware support
key 208 MEDIA_FAST_FORWARD WAKE #v2 Hardware support
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
key 107 ENDCALL WAKE
key 113 MUTE WAKE
key 231 CALL WAKE
key 248 HEADSETHOOK WAKE
key 76 HEADSETHOOK WAKE
Thanks for the awesome work. Gonna try it out.
Does dbl click skip to next track? If not, Any way to get that?
Sent from my Galaxy S2
ravizzle said:
Thanks for the awesome work. Gonna try it out.
Does dbl click skip to next track? If not, Any way to get that?
Sent from my Galaxy S2
Click to expand...
Click to collapse
Thanks for the thanks, let me know how it goes if you have any questions post em I'll be checking. Well you can skip tracks also but then you can't pause/start its one or the other. I'm just really happy I got this to work with pause/start answer/hangup with a long press. I may try again to get the next/previous to work, along with pause/start but my time is valuable and I need to make money like everyone else. Being an independent systems programmer having no real knowledge of phones software and just being a hack. I spent the whole day on this stupid phone problem..lol. I'd really would like to have next/previous double and triple press. I was hoping that the new OS Ice Cream due to hit the SGS2 sometime next year would address this issue, but I doubt they will fix it.
/* Glenn
Glenn54 said:
Thanks for the thanks, let me know how it goes if you have any questions post em I'll be checking. Nope, I'm just really happy I got this to work with pause/start answer/hangup with a long press. I may try again to get the next/previous to work, but my time is valuable and I need to make money like everyone else. Being an independent systems programmer having no real knowledge of phones software and just being a hack. I spent the whole day on this stupid phone problem..lol. I'd really would like to have next/previous double and triple press, but I was hoping that the new OS Ice Cream due to hit the SGS2 sometime next year would address this issue, that's been like this for a long time, I doubt they will fix it though.
/* Glenn
Click to expand...
Click to collapse
Can i do this fix over any rom or do i have to use doomlord's easy root kit?
currently running calkulin's rom v1.1
And thanks for your efforts. you definently got the wheels turning.
donp2700 said:
Can i do this fix over any rom or do i have to use doomlord's easy root kit?
currently running calkulin's rom v1.1
And thanks for your efforts. you definently got the wheels turning.
Click to expand...
Click to collapse
If your phone is rooted you can start with Step 2
Welcome!
Glenn54 said:
If your phone is rooted you can start with Step 2
Welcome!
Click to expand...
Click to collapse
I entered "mkdir /fixbutton"
and got
mkdir failed for /fixbutton, read-only file system
Did i miss somthing?
donp2700 said:
I entered "mkdir /fixbutton"
and got
mkdir failed for /fixbutton, read-only file system
Did i miss somthing?
Click to expand...
Click to collapse
sorry i fixed the doc it should be mkdir fixbutton without the /
Glenn54 said:
do you have a SGS2?
did you cd / to your are your sdcard?
Click to expand...
Click to collapse
yes and yes
E4GT
running calkulins rom.
donp2700 said:
yes and yes
E4GT
running calkulins rom.
Click to expand...
Click to collapse
try it without the / just mkdir fixbutton sorry
Glenn54 said:
try it without the / just mkdir fixbutton sorry
Click to expand...
Click to collapse
sorry but iam not understanding how step 5 and 6 work. how do i find the mount point and remount? Im fairly new to this.
donp2700 said:
sorry but iam not understanding how step 5 and 6 work. how do i find the mount point and remount? Im fairly new to this.
Click to expand...
Click to collapse
open the terminal emulator and enter
mount
click on the attachment above you will see in the middle of the display line 14
/dev/block/mmcblk0p9 /system ext4 ro,realtime........
the mount point is the first part of that line, on my SGS2 its
/dev/block/mmcblk0p9
This didn't work for me. I tried 3 different headsets. The center buttons don't activate anything. Thanks for your work though.
Glenn54 said:
try it without the / just mkdir fixbutton sorry
Click to expand...
Click to collapse
IT WORKS!!!!!!
Forget my previous noob questions, i figuered it out and you are a genius!!!!!!!!
I dont care much for pausing and answering calls from the HS button, so i simply chose the next track option under long click on the headset controller app.
It works and i cant understand why no one has figured this out already. Thank you for your work, much appreciated.
dtruong23 said:
This didn't work for me. I tried 3 different headsets. The center buttons don't activate anything. Thanks for your work though.
Click to expand...
Click to collapse
Are you sure all the commands worked? With Linda File Manager you can look at the sec_jack.kl file
Open up Linda
Hit My Phone
Hit Enter to the Alert
Scroll down and hit system
Scroll down and hit usr
Hit keylayout
hit sec_jack.kl
Scroll down and hit Text Edit
It should look like this
key 163 MEDIA_NEXT WAKE
key 164 MEDIA_PLAY_PAUSE WAKE
key 165 MEDIA_PREVIOUS WAKE
key 226 HEADSETHOOK WAKE
Oh I thought I put that in the Step 4 I left out
Add
key 164 MEDIA_PLAY_PAUSE WAKE
I'll fix the doc now, please try it again sorry this will and does work!
donp2700 said:
IT WORKS!!!!!!
Forget my previous noob questions, i figuered it out and you are a genius!!!!!!!!
I dont care much for pausing and answering calls from the HS button, so i simply chose the next track option under long click on the headset controller app.
It works and i cant understand why no one has figured this out already. Thank you for your work, much appreciated.
Click to expand...
Click to collapse
Oh Great! your welcome just give me a thumbs up and enjoy
If this works for you can just post a 'It worked for me' and give me a thumbs up. Thanks!
Also, I'm sure this would work for other phones/devices not just the SGS2. The sec_jack.kl file and the mount point would be a different name on other devices. If you send a dir of your /system/usr/keylayout/ directory someone should be able to tell you what file to use.
/* Glenn
Any way to make this a flashable mod?
Sent from my Galaxy S2
ravizzle said:
Any way to make this a flashable mod?
Sent from my Galaxy S2
Click to expand...
Click to collapse
I'm sure the MOD makers can do this. This procedure is pretty easy to follow and I think a little safer then flashing!
It works now!!! I guess I needed that key 164 entry. Thanks so much.
Glenn54 said:
Are you sure all the commands worked? With Linda File Manager you can look at the sec_jack.kl file
Open up Linda
Hit My Phone
Hit Enter to the Alert
Scroll down and hit system
Scroll down and hit usr
Hit keylayout
hit sec_jack.kl
Scroll down and hit Text Edit
It should look like this
key 163 MEDIA_NEXT WAKE
key 164 MEDIA_PLAY_PAUSE WAKE
key 165 MEDIA_PREVIOUS WAKE
key 226 HEADSETHOOK WAKE
Oh I thought I put that in the Step 4 I left out
Add
key 164 MEDIA_PLAY_PAUSE WAKE
I'll fix the doc now, please try it again sorry this will and does work!
Click to expand...
Click to collapse
it worked for me without that extra line. What would the diffrence be with the additional command?
and do i have to redo steps 5 and 6 after edit or can i just edit the sec_jack.kl file and save?
I'm using CM 7.2.0 fxp 111.When i press circle it acts as the back button in some games.Is there any fix for this?
The circle acts as a back button everywhere, even in your launcher. The developer probably didn't remap the keys correctly.
I know that in the stock rom, you can edit /system/usr/keylayout/keypad-zeus.kl to say "key 305 BUTTON_B" instead of "key 305 BACK ALT WAKE_DROPPED". It probably would work on CM too. Just make sure all permissions stay the same
jacklebott said:
I know that in the stock rom, you can edit /system/usr/keylayout/keypad-zeus.kl to say "key 305 BUTTON_B" instead of "key 305 BACK ALT WAKE_DROPPED". It probably would work on CM too. Just make sure all permissions stay the same
Click to expand...
Click to collapse
Thank you so much, this is very useful to know. I can even remap the ridiculous order of the Android buttons.
jacklebott said:
I know that in the stock rom, you can edit /system/usr/keylayout/keypad-zeus.kl to say "key 305 BUTTON_B" instead of "key 305 BACK ALT WAKE_DROPPED". It probably would work on CM too. Just make sure all permissions stay the same
Click to expand...
Click to collapse
This worked, o acts as o rather then back in Virtua Tennis now, thanks!
Could someone put up a set by step noob tutorial for this fix?
Sent from my R800x using XDA
Good question, Can one just edit this file while the OS is loaded or does this have to be done a diff way or with a CWM script?
1. Download "File Manager" from the Market, or other file manager that has root access. Go to File Manager's Settings and enable "Root Explorer" and "Mount System Folders".
2. Go to folder "/system/usr/keylayout/", copy file "keypad-zeus.kl" and paste it in folder "/mnt/sdcard". At this point, make a back up of the file if necessary.
3. Tap and hold on file "keypad-zeus.kl" and open it with any text editor.
4. In Text Editor, change the contents of the directional and game buttons mapping as follows:
# BTN_Y, BTN_B, BTN_A, BTN_X,
key 308 BUTTON_X WAKE_DROPPED
key 305 BUTTON_A WAKE_DROPPED
key 304 BUTTON_B WAKE_DROPPED
key 307 BUTTON_Y WAKE_DROPPED
If you're using ICS rom that has the directional buttons rotated 90* to the left (Up becomes Right), make these changes:
# KEY_UP, KEY_LEFT, KEY_RIGHT, KEY_DOWN
key 103 DPAD_LEFT WAKE_DROPPED
key 105 DPAD_DOWN WAKE_DROPPED
key 106 DPAD_UP WAKE_DROPPED
key 108 DPAD_RIGHT WAKE_DROPPED
Click to expand...
Click to collapse
5. Save the changes in Text Editor. Copy file "keypad-zeus.kl" back to folder "/system/usr/keylayout/", overriding the old file.
6. Tap and hold on file "keypad-zeus.kl", select Permissions. Set the permission to:
Owner: Read/Write
Group: Read only
Others: Read only
7. Reboot the phone.
Note: You can't edit the file "keypad-zeus.kl" directly from the system folder, you need to copy it to the sdcard, since the text editor do not have root access to save the changes. (Unless you're using the app Root Explorer.)
Ok here is how I did it. (Thanks eksasol btw for your long version hehe but I didnt see it before I started saying Ill figure it out myself hehe)
So I edited the file, which is attached. Download it, unzip it, save the keypad-zeus.kl to your SDcard on your phone. Then in market use Root Explorer or ES File Manager (Which is free!)
Open Es File Manager, goto settings, Enable Up to Root folder, then scroll down and enable Root Explorer and Mount File System.
Then from there you can navigate to your SD card storage, tap and hold to copy the keypad-zeus.kl file then navigate to the /system/usr/keylayout/ folder, hit menu, operations, paste. It will ask you if you want to merge the file. You hit ok.
Then once done, can close out, reboot and vola, All is working!
What I can 100% confirm this is handy for. No longer will O in minecraft try to open the game menu. Your emulators MAY need to be remapped as well since before it mapped the hardware key to "back"
Hope this helps out.
Mysticales said:
Ok here is how I did it. (Thanks eksasol btw for your long version hehe but I didnt see it before I started saying Ill figure it out myself hehe)
So I edited the file, which is attached. Download it, unzip it, save the keypad-zeus.kl to your SDcard on your phone. Then in market use Root Explorer or ES File Manager (Which is free!)
Open Es File Manager, goto settings, Enable Up to Root folder, then scroll down and enable Root Explorer and Mount File System.
Then from there you can navigate to your SD card storage, tap and hold to copy the keypad-zeus.kl file then navigate to the /system/usr/keylayout/ folder, hit menu, operations, paste. It will ask you if you want to merge the file. You hit ok.
Then once done, can close out, reboot and vola, All is working!
What I can 100% confirm this is handy for. No longer will O in minecraft try to open the game menu. Your emulators MAY need to be remapped as well since before it mapped the hardware key to "back"
Hope this helps out.
Click to expand...
Click to collapse
How is this better??
The UP / Down now = Left / Right ...?
Mysticales said:
Open Es File Manager, goto settings, Enable Up to Root folder, then scroll down and enable Root Explorer and Mount File System.
Then from there you can navigate to your SD card storage, tap and hold to copy the keypad-zeus.kl file then navigate to the /system/usr/keylayout/ folder, hit menu, operations, paste. It will ask you if you want to merge the file. You hit ok.
Then once done, can close out, reboot and vola, All is working!
Click to expand...
Click to collapse
Oh my, i missed a step, pasted your file but root explorer erased mine without merging, buttons are inactive after reboot, only d-pad remains
FPlusPS3 said:
How is this better??
The UP / Down now = Left / Right ...?
Click to expand...
Click to collapse
Um.. not sure what is going on for you, but I am not having that issue. Considering that wasnt even touched. Its just like above with the edits, its just changing 1 mapping from back to be the button instead.
Edit: Ok see your other post, So you only have D-pad working? That doesnt sound right either. Does the root explorer keep the file permissions on it? I know with ES file explorer, it mounted the system files, then I replaced the file, closed out rebooted, no issues. What XP model do you have and what rom?
---------- Post added at 10:31 AM ---------- Previous post was at 10:18 AM ----------
Eskasol, Why change Dpad_Center to Button_A?
Also something else was brought up that is a good question.
gene_wildhart said:
Ah! Now we are getting somewhere! According to the Sony developer documentation, the "O" button is mapped to BACK ALT, which is what DosBox Turbo expects to see. With it re-mapped to BUTTON_B, I suspect the mapping in DosBox Turbo will no longer be able to recognize the 'O' button. Just curious, what is the reason for changing the mapping from what Sony defaulted it to?
Click to expand...
Click to collapse
This is indeed a good question, so on stock roms, is this still showing as BACK ALT or is it showing up as Button_B?
Before everyone starts assuming what the normal is supposed to be now.
Edit: Ok according to a user. Stock rom shows it as "BACK ALT" while some other roms show it as "Button_B" So now the question is, what are we supposed to believe?
Mysticales said:
Ok according to a user. Stock rom shows it as "BACK ALT" while some other roms show it as "Button_B" So now the question is, what are we supposed to believe?
Click to expand...
Click to collapse
I am 100% positive the stock rom uses "BACK ALT" (seeing as I'm using it), but it can be changed to "BUTTON_B" and still work. It may have been modded roms that people saw "BUTTON_B" without changing it themselves. I have used all the stock R800x and R800i roms, and got that result
---------- Post added at 07:27 PM ---------- Previous post was at 07:23 PM ----------
garcimak said:
Oh my, i missed a step, pasted your file but root explorer erased mine without merging, buttons are inactive after reboot, only d-pad remains
Click to expand...
Click to collapse
You messed up the file's permissions when you removed, then put the new file there. By simply overwriting the file, the permissions should stay correct. The correct permissions are rw,r,r (644)
Just for reference, my file is for X = Dpad_Center and O = Button_B
However seems after all the posts we did and some research, BACK ALT is what we should use. Unless we get a rom dev to add a toggle option to change the mapping for us. (Or an app to do this)
i tried to remap xperia play buttons on WWF95 becuase the "O" button always takes me to close dosbox app but now both "O" and "X" aint working.
this is the order:
# BTN_Y, BTN_B, BTN_A, BTN_X,
key 308 BUTTON_X WAKE_DROPPED
key 305 BUTTON_A WAKE_DROPPED
key 304 BUTTON_B WAKE_DROPPED
key 307 BUTTON_Y WAKE_DROPPED
what should i do to get this buttons to work properly?
thanks.
It should be in the order of "Y,B,A,X" not "X,A,B,Y" that's why
this is the default CM7 setup:
# BTN_Y, BTN_B, BTN_A, BTN_X,
key 308 BUTTON_Y WAKE_DROPPED
key 305 BACK ALT WAKE_DROPPED
key 304 DPAD_CENTER WAKE_DROPPED
key 307 BUTTON_X WAKE_DROPPED
i have changed to this:
# BTN_Y, BTN_B, BTN_A, BTN_X,
key 308 BUTTON_Y WAKE_DROPPED
key 304 BUTTON_B WAKE_DROPPED
key 305 BUTTON_A WAKE_DROPPED
key 307 BUTTON_X WAKE_DROPPED
now non of the buttons are working.
what is the right setup?
thanks.
Does the file have the correct permissions? RW,R,R or 644
yes, rw-r--r--
Just remember if push comes to shove, look at my post, use that zip and method to restore your file. Or edit it, then use the method. Just keep in mind however. remapping the buttons will work for apps/games/emulators that allow for custom mapping. However games/apps that DONT will prob not work as most devs code it to be "BACK ALT" not "BUTTON_B" ok? Thats why after we had a big discussion on this, we all decided to keep it as BACK ALT and to tell devs of any issues we found due to the O button.
Hi
If someone prefer "Recent apps" action instead of search button, you must do 7 steps:
1. Download any text editor from market, for example Ted (text editor)
https://play.google.com/store/apps/...GwsMSwxLDEsImZyLnhnb3VjaGV0LnRleHRlZGl0b3IiXQ..
2. Open Root Explorer (or other app like this) and go to /system/usr/keylayout
3. Set permissions to read and write.
4. Open file ****-touchscreen.kl with text editor.
5. Change the line:
Code:
key 217 SEARCH WAKE_DROPPED
to
Code:
key 217 APP_SWITCH WAKE DROPPED
6. Save.
7. Reboot.
Warning!
****- I don't know what it is in other ROMs but in ParanoidAndroid it is cy8c, so in PA this file's name is cy8c-touchscreen.kl
After change it should look like this:
Code:
key 102 HOME WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 217 APP_SWITCH WAKE_DROPPED
If I helped, you can click "Thanks" I won't be angry
I found this file in sense 2.1 ROM
Do you think it could work ?
Sent from my HTC Wildfire S A510e using xda app-developers app
Mazer.one said:
I found this file in sense 2.1 ROM
Do you think it could work ?
Sent from my HTC Wildfire S A510e using xda app-developers app
Click to expand...
Click to collapse
Try it but make a backup of this file before you will edit it or change it back to SEARCH
Besides, i think in Sense 2.1 recent apps are in a pulldown status bar.
Edit: It won't work. Changing anything in marvel-keypad.kl won't change it. I know because i tried in CM9, but maybe it works in sense
I did the change an now my power button don't work lol.
Search button is still search
But i changed good values
Sent from my HTC Wildfire S A510e using xda app-developers app
Mazer.one said:
I did the change an now my power button don't work lol.
Search button is still search
But i changed good values
Sent from my HTC Wildfire S A510e using xda app-developers app
Click to expand...
Click to collapse
I have no idea why your power button doesn't work
Unpack your rom.zip on PC, go to system/usr/keylayout , copy marvel-keypad.kl to your SD card and then replace "original" marvel-keypad.kl with this changed. It should work. If not, you should reinstall ROM
I re-edit the file, but now is there à way to restart by command, like reboot ?
Edit 1: volume buttons don't work too
Strange
Maybe it's because i edited the file with text editor from root explorer ?
I added spaces between SWITCH and WAKE instead "tab" ? I don't know !
Edit 2: i rebooted with link2sd, everything works fine now.
Sent from my HTC Wildfire S A510e using xda app-developers app
If you hold the phone on the left hand and find difficulty to reach the back button (small hand). Here the solution i found from this thread:
1) Root phone
2) Using a root file explorer, navigate to /system/usr/keylayout.
3) Open the file Generic.kl
4) Make the following change:
LOCATE line
Code:
# key 139 MENU WAKE_DROPPED"
REPLACE with
Code:
# key 158 MENU WAKE_DROPPED"
LOCATE line
Code:
# key 158 BACK WAKE_DROPPED"
REPLACE with
Code:
# key 139 BACK WAKE_DROPPED"
Thanks pulser_g2 for the awesome mode.
If you guys want, there's also an option to turn off the button lights in your settings. That way your (now) back button wont light up with the menu icon.
Any chance we could also get the code to make the MENU to do the same as RECENT_APPS?
thanks for this
worked perfectly and exactly what i was after
now i can use the note left handed easier
How do we edit the file? For example, Solid Explorer can open the file, but it appears we need a text editor to edit it.
http://forum.xda-developers.com/showthread.php?t=850464
Does GB modify system? I have systemless root and Xposed and wanted to know if it will remain OK with GB. Thx.
Device: OnePlus 3
Android 6.0.1
Familotel said:
Does GB modify system? I have systemless root and Xposed and wanted to know if it will remain OK with GB. Thx.
Device: OnePlus 3
Android 6.0.1
Click to expand...
Click to collapse
looking for the answer from some experts here too...
Am using systemless xposed n root. And GB work fine
Xposed modules never modify any system files - that's the principle of Xposed! You can always uninstall modules, and then always everything is as before!
Most options in GB work fine -however the QuickSettings section and the hardware button functions have issues.
HoTsHoT89 said:
Most options in GB work fine -however the QuickSettings section and the hardware button functions have issues.
Click to expand...
Click to collapse
what is issue with hardware buttons?.
May be i can help you
JumboMan said:
what is issue with hardware buttons?.
May be i can help you
Click to expand...
Click to collapse
Configuring long press or double press for the hardware buttons in GB does not work for me. I can only change them in the Settings menu which has limited choices.
Are you able to change them via GB?
HoTsHoT89 said:
Configuring long press or double press for the hardware buttons in GB does not work for me. I can only change them in the Settings menu which has limited choices.
Are you able to change them via GB?
Click to expand...
Click to collapse
You have to edit Generic.kl file located at system/usr/keylayout.
You have to edit key 127,139,158,580.
Add VIRTUAL to this key.
for example -
original - key 158 BACK
Modified - key 158 BACK VIRTUAL
==
edit this file with any root enabled file explorer (e.g Root explorer,solid explorer).
Apply proper permissions (0644) to file and reboot the phone.
Now you can assign any custom shortcut to any hardware key through GravityBox.
mysky911 said:
looking for the answer from some experts here too...
Click to expand...
Click to collapse
I installed it, but when an OTA came, it knew i was rooted.
JumboMan said:
You have to edit Generic.kl file located at system/usr/keylayout.
You have to edit key 127,139,158,580.
Add VIRTUAL to this key.
for example -
original - key 158 BACK
Modified - key 158 BACK VIRTUAL
==
edit this file with any root enabled file explorer (e.g Root explorer,solid explorer).
Apply proper permissions (0644) to file and reboot the phone.
Now you can assign any custom shortcut any hardware key through GravityBox.
Click to expand...
Click to collapse
Thank you for the explanation.
As I understand from your previous posts, modifying the file, hence modifying /system will break OTAs. On my phone, /system is still untouched - is it possible to keep a backup for the Generic.kl file and restore the original backup for the OTA installation to work again when a new OTA arrives?
HoTsHoT89 said:
Thank you for the explanation.
As I understand from your previous posts, modifying the file, hence modifying /system will break OTAs. On my phone, /system is still untouched - is it possible to keep a backup for the Generic.kl file and restore the original backup for the OTA installation to work again when a new OTA arrives?
Click to expand...
Click to collapse
No.
once you mounted /system partition rw, OTA will fail even if you have not done anything thing with system partition.
There are apps (search for button remaper in play store) which don't requires root to change shortcuts of hardware buttons
Familotel said:
Does GB modify system? I have systemless root and Xposed and wanted to know if it will remain OK with GB. Thx.
Device: OnePlus 3
Android 6.0.1
Click to expand...
Click to collapse
No it doesn't. It won't modify your system files.
To disable all tweaks:
Just disable (uncheck) it from xposed module list and all tweaks will be disabled.
JumboMan said:
You have to edit Generic.kl file located at system/usr/keylayout.
You have to edit key 127,139,158,580.
Add VIRTUAL to this key.
for example -
original - key 158 BACK
Modified - key 158 BACK VIRTUAL
==
edit this file with any root enabled file explorer (e.g Root explorer,solid explorer).
Apply proper permissions (0644) to file and reboot the phone.
Now you can assign any custom shortcut any hardware key through GravityBox.
Click to expand...
Click to collapse
Thanks a lot for this useful informations! (I also hit Thanks btw)
minigreen said:
Most options in GB work fine -however the QuickSettings section and the hardware button functions have issues.
Click to expand...
Click to collapse
GB messes badly with quick settings.
For hardware button function see my reply here http://forum.xda-developers.com/showpost.php?p=68477822&postcount=8
I just got a OP3 and have also noticed problems with the quick settings.
I dont know if I broke it by attempting to modify in GB but I can't seem to modify my quick settings properly from either GB or the OnePlus settings anymore.
Unticking "NFC" for instance in either settings isn't making it go away. No way around this, eh?
NinetoFive said:
I just got a OP3 and have also noticed problems with the quick settings.
I dont know if I broke it by attempting to modify in GB but I can't seem to modify my quick settings properly from either GB or the OnePlus settings anymore.
Unticking "NFC" for instance in either settings isn't making it go away. No way around this, eh?
Click to expand...
Click to collapse
quick settings don't work properly on GB.
JumboMan said:
You have to edit Generic.kl file located at system/usr/keylayout.
You have to edit key 127,139,158,580.
Add VIRTUAL to this key.
for example -
original - key 158 BACK
Modified - key 158 BACK VIRTUAL
==
edit this file with any root enabled file explorer (e.g Root explorer,solid explorer).
Apply proper permissions (0644) to file and reboot the phone.
Now you can assign any custom shortcut to any hardware key through GravityBox.
Click to expand...
Click to collapse
i tried it on my oneplus 3t and it works great. thanks a lot!
JumboMan said:
You have to edit Generic.kl file located at system/usr/keylayout.
You have to edit key 127,139,158,580.
Add VIRTUAL to this key.
for example -
original - key 158 BACK
Modified - key 158 BACK VIRTUAL
==
edit this file with any root enabled file explorer (e.g Root explorer,solid explorer).
Apply proper permissions (0644) to file and reboot the phone.
Now you can assign any custom shortcut to any hardware key through GravityBox.
Click to expand...
Click to collapse
is there any way on nougat to reasign hardware keys with new functions with this trick? without gravitybox ofc since xposed isnt released yet for nougat.
MarcTremonti said:
is there any way on nougat to reasign hardware keys with new functions with this trick? without gravitybox ofc since xposed isnt released yet for nougat.
Click to expand...
Click to collapse
no