Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,143 Members 52,214 Now Online
XDA Developers Android and Mobile Development Forum

[guide] remap headset button to work with ultra

Tip us?
 
Pannam
Old
(Last edited by Pannam; 26th January 2014 at 03:35 PM.)
#1  
Senior Member - OP
Thanks Meter 20
Posts: 111
Join Date: Nov 2012
Default [guide] remap headset button to work with ultra

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

0.MAKE BACKUP OF SYSTEM!
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)
6.search 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

8.now 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
10.Reboot
11.Configure buttons as per your wish

Hope its helpful.
The Following 8 Users Say Thank You to Pannam For This Useful Post: [ Click to Expand ]
 
blueether
Old
#2  
blueether's Avatar
Senior Member
Thanks Meter 967
Posts: 2,371
Join Date: Jan 2011
Location: Te Awamutu, New Zealand

 
DONATE TO ME
good post, but probably should be in themes and apps section with the other Mods?
Charles
Alcatel One Touch "easy" -> Nokia 1110i -> Alcatel ame-408 -> Motorola Razr v3 -> Huawei u8100 -> Sony Xperia Z-Ultra

ROM:- Carbon
Kernel:- Pimped Kernel

Thankyou to all those that have donated to me over 2014.
The Following User Says Thank You to blueether For This Useful Post: [ Click to Expand ]
 
ps000000
Old
#3  
ps000000's Avatar
Senior Member
Thanks Meter 41
Posts: 445
Join Date: Sep 2011
Location: Nonthaburi / Bangkok
I am very interesting

I have generic headphone button with mic

only Play/Pause button work

(Back/Next button dont work)
Galaxy Note 10.1 (2014) P601 3G & Google Nexus 5 D821 LTE

My history
Android - Galaxy S2 (i9100T) , Dell Streak 5 , Tab 7 Plus (P6200L) , Galaxy Nexus (Maguro), Note 2 (N7100) , Galaxy S4 (i9505), Galaxy Mega 6.3 (i9205) , Galaxy Note3 (N9005) , Xperia Z Ultra (C6833)
iOS - iPhone 4 - 16GB , iPhone 4S - 16GB , iPhone 5 - 16GB , iPad 3 - WiFi - 16GB
Windows Phone - Lumia 920

My PC - i5-2500K + Asus HD7970TOP + water cooling
My Lap - Macbook Pro 15" Late 2011 - i7 2760QM + HD 6770M
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes