Remove All Ads from XDA

[guide] remap headset button to work with ultra

355 posts
Thanks Meter: 40
By Pannam, Senior Member on 26th January 2014, 04:33 PM
Post Reply Email Thread
Hi Guys,

Sorry if this is a re post or someone else has come up with a better alternative. Hopefully then a moderator will clean this thread.

As most of us have just migrated to ultra from different models, we may have a spare headset laying round. The issue here is most of the headset is just not compatible with ultra i.e the buttons don't function as we want it to. This is a guide that may help solve that problem getting the best out of our old headset or the ones from different models

These are the steps

1. root
2.Install THIS
3.Plug in your headset, open Key test and click any button
4.Note down scancode. In my case it was 257
5.Browse to system/usr/keylayout/msm8974-taiko-mtp-snd-card_Button_Jack.kl (use rootbrowser) for HEADSETHOOK
7.change the key to what ever scancode gives i.e 257 (in my case) . It should look like this

#original: key 226 HEADSETHOOK WAKE
#changed: key 257 HEADSETHOOK WAKE change the scancode number, in my case key 257 to 226 (or the key HEADSETHOOK is assigned to)

#original: key 257 VOLUME_UP WAKE
#changed: key 226 VOLUME_UP WAKE

9. Install THIS
11.Configure buttons as per your wish

Hope its helpful.
The Following 8 Users Say Thank You to Pannam For This Useful Post: [ View ] Gift Pannam Ad-Free
26th January 2014, 08:36 PM |#2  
blueether's Avatar
Senior Member
Flag Te Awamutu, New Zealand
Thanks Meter: 1,641
Donate to Me
good post, but probably should be in themes and apps section with the other Mods?
The Following User Says Thank You to blueether For This Useful Post: [ View ] Gift blueether Ad-Free
28th January 2014, 03:18 PM |#3  
ps000000's Avatar
Senior Member
Flag Nonthaburi / Bangkok
Thanks Meter: 233
I am very interesting

I have generic headphone button with mic

only Play/Pause button work

(Back/Next button dont work)
21st September 2015, 12:00 AM |#4  
Junior Member
Thanks Meter: 0
I tried what you write with my Marshall Headphones and a Sony Xperia Z. I didnt find a file with the exact name, in my case I only found a file called apq8064-tabla-snd-card_Button_Jack.kl . In this file there are the headsethook command lines but when I try to save my changes, the system tells me "please select your SD Card first" but I am not able to select it then, it just ignores my selection. What can I do?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes