yashsingh1/xdaforums huggingface dataset:
[Samsung Epic 4G Touch] ravizzle:
Ok finally tried the mod, it works great with both headphones that I tried.

If we can figure out double click to skip then that would be even more amazing.

Sent from my Galaxy S2
[Samsung Epic 4G Touch] donp2700:
FYI

This fix works great with power amp which has a headset control feature built in. Even after i uninstalled the headset controller app (which expired on me). Doesnt seem to answer calls or end them though.
[Samsung Epic 4G Touch] Glenn54:
did you do this part in Step 7:

Open Headset Button Controller Trial

Click Enable Headset Button and Use specified music app check on

Hit to Center button actions

Hit Long click

Set Default command to Play / Pause

Set when ringing to Answer call

Set when a call is active to end call

:cool:
[Samsung Epic 4G Touch] Glenn54:
I read in some posts that in the ATT version the Headset works just fine. Can anyone get me a dir of the /system/usr/keylayout and a list of what's in each file of the ATT version. if you need directions on how to do that let me know.

:cool:
[Samsung Epic 4G Touch] ravizzle:
Ok i got a directory from the att galaxy s2 skyrocket. It is attached. let me know if this helps or if you need something more.
[Samsung Epic 4G Touch] Glenn54:
Thanks I'll play with this today!:cool:

does the att galaxy s2 skyrocket work with headsets?
[Samsung Epic 4G Touch] dtruong23:
I replaced the sec_jack.kl file and it registers quad click of the center button. Let me know if you get volume and double click to skip track.

Sent from my Epic device.
[Samsung Epic 4G Touch] Glenn54:
wow I haven't used this for few days and the headset controller app expired on me also...lol!
[Samsung Epic 4G Touch] ravizzle:
Here are the sgs2 international, and sgs2 tmobile version keylayouts. maybe they are different and will help us even more.
[Samsung Epic 4G Touch] Glenn54:
I uninstalled and reinstalled it and it seems to still work. I also tied Jays Headset still only long press works!:confused:
[Samsung Epic 4G Touch] Glenn54:
Thank you, I looked and they all seem to be mostly the same except for the sec_jack
[Samsung Epic 4G Touch] Glenn54:
OK I did a little work on this today using CATLOG by Nolan Lawson

I see these errors when I do a LONG CLICK:

error loading keycharmap file '/system/usr/keychars/sec_jack.kcm.bin' hw.keyboards.327684.devname='sec_jack'

Using default keymap: /system/usr/keychars/qwerty.kcm.bin

I looked in /system/usr/keychars and guess what I see no 'sec_jack.kcm.bin' in there.

Can someone look at some other devices and see if they have this file /system/usr/keychars/sec_jack.kcm.bin

I also have switched from using Headset Button Controller to Jays Headset since it does the same thing in advanced mode, it's free and I don't have to uninstall/install every few days. If someone needs instruction on how to use it I guess ask.

:cool:
[Samsung Epic 4G Touch] uptotibet:
dev work on this isn't finished

thanks for your contributions. here are my observations so far. i followed your tutorial and sure enough it works, but the magnitude of functionality is limited.

this mod only seems to enable partial functionality of the center button on 3-button controllers.

the "center button" functionality which is enabled is what the headset button should be calling "click and hold" or possibly "long click". the app categories of "single click" and "long click" appear to work, but there doesn't seem to be any gesture difference between the two categories.

there are a few things at play here. it could be the headset button app's issue, it could be the work-around fix, it could be poweramp music player, or it could be any unknown factors. having tried many different things i don't think this is "user error".

this repair is severely limited in its functionality. i don't know what needs to be repaired to regain all of the functionality, but we should continue working on this to develop it further.
[Samsung Epic 4G Touch] ravizzle:
I looked at the other phone's keychars file and it has it. i am attaching the skyrocket gs2 keychar file.
[Samsung Epic 4G Touch] Glenn54:
Wow that's great! did you copy to your phone and test it?
[Samsung Epic 4G Touch] Glenn54:
I don't see sec_jack.kcm.bin

:confused:
[Samsung Epic 4G Touch] spiicytuna:
So it seems that the vibrant has this file as per this source on github:

https://github.com/CyanogenMod/android_device_samsung_vibrant/blob/froyo/full_vibrant.mk (see line 87)

Sooo I got curious and downloaded a vibrant nightly and no go on the file in the keychars directory. So then I went looking for a full on vibrant rom to see if it had the file. Downloaded Darksys 9.3 and lookie at what I found... see attached.

I too would like to get my 3-button headset going...so I'll be playing too.
[Samsung Epic 4G Touch] ravizzle:
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" from market

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.
[Samsung Epic 4G Touch] japper88:
Thanks for making the flashable mod. I am going to try this after I get off work.

UPDATE: so I couldn't wait, and I installed the zip on my phone and the jay control app. And it works. Thanks OP for figuring out the commands and thanks ravizzle for making the zip file.

Now only if the single click double click triple click etc. functions would work...
[Samsung Epic 4G Touch] Glenn54:
Thanks for getting this! I put that file on my phone and I get the same result without any errors, only still only click-hold works! This is better then what we had before I started this adventure! :cool:

Thanks to all the contributors!!
[Samsung Epic 4G Touch] Kcyen18:
Hey Rav,

Nice work!

It works well!!

Is there anyway to make a 3 button headset work? (Klipse S4i)
[Samsung Epic 4G Touch] spiicytuna:
Yeah I had the same result. There's gotta be a way to make the 3-buttons and/or multiclick setups work...
[Samsung Epic 4G Touch] Glenn54:
After all of this work I think this deserves one bump from me!

:cool:

I really think it should be moved to the General and pined!!

:o
[Samsung Epic 4G Touch] svtisland:
This mod doesn't work with Ubermusic

I am using Ubermusic and the mod only allows to 'pause/play' even though I have the hold button to 'skip'.
[Samsung Epic 4G Touch] ravizzle:
Have u tried any other music players to see if it does it with just uber or does it on other players as well

Sent from my Galaxy S2
[Samsung Epic 4G Touch] pcmedics911:
I can't install the zip file

keep getting in CWM an everification error. There's no toggle option to turn it off / on.

Any ideas?

Thank you
[Samsung Epic 4G Touch] psych2l:
I've installed the zip in the op and followed the instructions but all I get when I click and hold is the Vlingo popup. Any advice? :confused:
[Samsung Epic 4G Touch] ravizzle:
Try reflashing because that is the stock result.

Sent from my Galaxy S2
[Samsung Epic 4G Touch] ravizzle:
Try redownloading the zip and retrying. Let me know if that still doesn't work

Sent from my Galaxy S2
[Samsung Epic 4G Touch] nyeazyone:
Installed and the only action it registers is click and hold. no single click, no triple click. Using the iBeats.
[Samsung Epic 4G Touch] svtisland:
Double click to skip works!!!!!!!!!!!!!!!!!

All of sudden double click to skip and single click to hold/play works on my E4GT!!!!

Only change i've made is that I installed Caulkin's v2.0 rom that incorporated new EK02. I am not sure if EK02 addressed the problem of headset control or a fluke of combined random things did some magic...... I am afraid of doing anything that may mess up the headset control. I am keeping just as it is..

Guys try yours and share how yours work on which rom.
[Samsung Epic 4G Touch] spiicytuna:
Anyone else experience this?
[Samsung Epic 4G Touch] ravizzle:
As of now this is all that is working. Apparently ek02 fixes this but that need to be confirmed by multiple ppl b4 we know for sure

Sent from my Galaxy S2
[Samsung Epic 4G Touch] Glenn54:
Over 2,500 people read this and it only helped 14 people....can't be...the thanks button has a thumbs up with the word thanks if this helps to get your headset button working a thanks would be nice...thanks! :cool:
[Samsung Epic 4G Touch] bman55:
What did you do?!?!

INTERNET MONEY!
[Samsung Epic 4G Touch] donp2700:
I flashed calkulin's rom v 2.0 and EK02 modem. I did not test button funtions before i flashed headset zip so i dont know how much help this post will be without the trial and error, but i can pause/play, skip songs, raise and lower volume, answer calls. and even launch apps with jays headset controller. single, double, triple and hold clicks all work. E4GT is now Perfect!!!!!

Also works with poweramp headset functions.

Thanks to everyone who contributed.

Everyone getting their thank you button pressed in this thread!

oh and iam using the bose headset with one button.
[Samsung Epic 4G Touch] ravizzle:
Ok so I think it is ek02 that fixed it. I will flash ek02 now without the headset mod and see if it works. May be not even necessary anymore!

Sent from my Galaxy S2
[Samsung Epic 4G Touch] ravizzle:
Ok just confirmed. You need both ek02 AND headset mod + jays control and EVERYTHING works!

Here's my set up:

Calkin 2.0 rom and kernel (don't have to be on ek02 modem, I'm on eg31)

Flashed headset mod and installed jays control

Dbl,, triple single click all work.

I'm using beats by Dre studios w/control talk (one button)

Sent from my Galaxy S2
[Samsung Epic 4G Touch] Glenn54:
Hey ravizzle,

What does this rom and kernel look like and what does it have and doesn't have versus the stockrom and kernel?!
[Samsung Epic 4G Touch] ravizzle:
U can be on any ek02. Stock ek02 should be just fine. For differences in calkins rom just check his thread in development section.

Sent from my Galaxy S2
[Samsung Epic 4G Touch] japper88:
That is freaking awesome! I am tempted to get ek02 now! Just waiting for a 2.3.6 compatible nociq patch!
[Samsung Epic 4G Touch] ravizzle:
Calks 2.0 has ciq removed.

Sent from my Galaxy S2
[Samsung Epic 4G Touch] ravizzle:
Also glenn54 the long way to do the mod with terminal emulator is unnecessary. if someone doesn't want to flash the zip all they have to do is replace the sec jack file with the modified one. U can just post the modded file and they can move it to the directory using root explorer or other app. Will cut down on the current long processes.

Sent from my Galaxy S2
[Samsung Epic 4G Touch] bman55:
So physical (-) and (+) volume bottons work?

INTERNET MONEY!
[Samsung Epic 4G Touch] japper88:
Thanks for the tip. I just installed Calkulin's new EK02 rom and used the flashable headset button fix with the jay controller app and... IT WORKS (plus no CIQ!)

All the single double triple clicks, it all works great! Even the weird double click and hold to increase volume etc. Now I just need to figure out how I went to set it up!
[Samsung Epic 4G Touch] bman55:
Do volume (-) and (+) om the headphones themselves work?

GalaXy S ll ROMSB 1.9.8r @ 1200x720 ;D
[Samsung Epic 4G Touch] japper88:
Sorry no idea. My headset only has 1 button. But you can set it so a click/long press combo can increase or decrease the volume.
[Samsung Epic 4G Touch] kash26:
little more detail please

i'm very new to all this. Can I get the ability for multiple clicks without flashing a new ROM and kernel, i want to keep the stock ROM. And what is EKO2?
[Samsung Epic 4G Touch] japper88:
EK02 is a leak of the update that Sprint is coming out with our rom (mostly small tweaks, but Android 2.3.6, the phone shipped with Android 2.3.4).

It appears that the multiple clicks only work on roms based off of EK02. So as of right now you can't get the multiple click functions with just the rom that shipped with the phone.
[Samsung Epic 4G Touch] kash26:
perfect. thanks for your help.
[Samsung Epic 4G Touch] mikeman_2002:
Jays Headset Control APK

Can someone upload the Jays Headset Control apk? When I search for the app in the Android Market, it says that my device (Epic 4G Touch) is incompatible. I can't figure out another way to get the app.

I have installed Caulkin's ROM and the Headset Fix ZIP, so I just need the Jays Headset Control app in order to get this working.

Thanks in advance!
[Samsung Epic 4G Touch] tvkanters:
Developer of JAYS Headset Control here.

You're right that we've excluded the Epic 4G Touch from the compatibility list as by default, it isn't. I've talked it over with JAYS, though, and we've decided to make an exception for you guys and offer the app through other means than the Market.

You can download the file here: http://tvkdevelopment.com/other/JAYSHeadsetControl.rar

The password for the RAR is: xda-developers

Enjoy.
[Samsung Epic 4G Touch] japper88:
You guys are awesome. I totally plan to get a pair of the a-JAYS One+ when I save up enough money.
[Samsung Epic 4G Touch] mikeman_2002:
Many, many thanks to everybody else who helped put this fix together, especially to Glenn54 for the original fix and tvkanters for providing the JAYS app.

I flashed Caulkulin's EK02 2.0 ROM, installed the Headset Button Fix ZIP, and installed JAYS. Now I have one/two/three press functions for my headset button. Thank you very much everyone. I know that the headset button isn't a huge deal, but it's something that I had missed after switching from an iPhone to the E4GT. Now if I can only get the "Listen To" feature of Voice Search to automatically start playing an artist/song/album...
[Samsung Epic 4G Touch] Glenn54:
I would bet with Calkin ROM (or any other modified ROM that works with this device), that if you replace sec_jack.kl with the following code everything would work including the volume buttons and maybe without Jays:

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

:cool:

Glenn
[Samsung Epic 4G Touch] JohnCorleone:
Curious to see if this works...
[Samsung Epic 4G Touch] Glenn54:
give it a try and let me know!

:cool:
[Samsung Epic 4G Touch] Glenn54:
Thank you for posting this great software!:cool:
[Samsung Epic 4G Touch] JohnCorleone:
Exactly as posted in Terminal Emulator?
[Samsung Epic 4G Touch] Glenn54:
Yes, use the same procedure on page one but use this code instead for file sec_jack.kl:

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

You could copy and paste this code into Text Edit and save it to the SD Card or connect the phone to your PC and save this code to the SD card using notepad.

Then copy that file with the procedure on page one, or you can use Root Explorer to copy it if you have that software.
[Samsung Epic 4G Touch] hutchinj:
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

Keeps saying cp not found
[Samsung Epic 4G Touch] ravizzle:
Ok I tried this, and it gets pause/play double click to skip, and long press working now, but triple click and click hold combos don't work.

We are getting pretty close, thanks glenn. I prefer with jays headset control atm, especially because you can easily modify what you want button click to do from defaults

Sent from my Galaxy S2
[Samsung Epic 4G Touch] JohnCorleone:
Thanks for testing. I got sidetracked by work (damn priorities) but I am watching this thread closely because it sounds like you are close Glenn!
[Samsung Epic 4G Touch] Glenn54:
You can use ES File Explorer to copy the files or use ravizzle flash mod.

can you post a dir of your sdcard showing the fixbutton directory?
[Samsung Epic 4G Touch] Glenn54:
That helps.....yes Jays app is really nice.....we just need someone to check to see if the volume buttons work with this setup.....:cool:

Can you answer/hangup/mute phone calls without Jays? This is a phone after all and since I need my phone 24/7 I can't be flashing ROMS.
[Samsung Epic 4G Touch] hutchinj:
What does cp stand for?
[Samsung Epic 4G Touch] ravizzle:
Copy

Sent from my Galaxy S2
[Samsung Epic 4G Touch] japper88:
Damn I dunno what I did but the button's don't all work anymore...

single click plays/pauses

triple click fast fowards

double click does nothing

long press opens up the stock music player

Everything was working properly when I had Calk 2.0 (EK02 based) and Overstew's 1.9.1 ICS theme.

Now I am on Calk 2.0.1a and Overstew's 1.9.2 ICS theme...

Maybe over the weekend I will do a full wipe and install everything one by one.

But play/pause and fast forward is better than nothing.
[Samsung Epic 4G Touch] ravizzle:
Op u may want to add this to the first post so ppl can find this easily
[Samsung Epic 4G Touch] japper88:
Sweet, I did a full wipe and flashed everything again (calk 2.0.1a and overstew's ics theme 1.9.2+associate mods) then flashed the headset zip in the op then installed the jays headset controller app and... everything worked again with the stock music app using jays headset control app default advance settings!
[Samsung Epic 4G Touch] geo1378:
doesn't work on epic 4g touch

I give up on trying to get this to work. it says on android market that the epic 4g touch is not compatible with jays headset app and won't let me install it. i have no directory called system on my android internal memory or sd card. i am running caulks rom 2.0 or whatever its called.
[Samsung Epic 4G Touch] japper88:
The people from Jays kindly posted the apk file in this thread, you can just dl and install it...

the post is here:

http://xdaforums.com/showpost.php?p=20033923&postcount=86
[Samsung Epic 4G Touch] geo1378:
thanks

thanks yes i just saw that and got jays headset app but nothing is working. i will go back and see what i missed but having no luck. headphone button just brings up call history for some reason.
[Samsung Epic 4G Touch] japper88:
I had that same exact problem before, but after doing a clean install of a rom after wiping (instead of installing rom on top of another rom, etc.) I got everything to work. What set up are you using rom/theme, etc.)?
[Samsung Epic 4G Touch] geo1378:
I am using caulks rom 2.0. just installed it the other day so whichever of his newest ones is out is the one I'm on
[Samsung Epic 4G Touch] japper88:
Did you install Calk's 2.0.1a on top of 2.0? When I was on 2.0 everything worked fine, but then it got all borked when I just installed 2.0.1a on top. So I did a full wipe and installed 2.0.1a again then did the steps from the OP and it all worked again.
[Samsung Epic 4G Touch] mikeman_2002:
I had the same problem where the button would bring up call history. As the previous poster said, install a clean copy of caulk's ROM (I used 2.0). It didn't work when I just installed his ROM on top of my old one. Then flash the Headset Fix ZIP and install Jays. I had the same problems as you but got it to work, so hopefully you can too.
[Samsung Epic 4G Touch] dontbanmebro:
ya

I give up on trying to get this to work. it says on android market that the epic 4g touch is not compatible with jays headset app and won't let me install it. i have no directory called system on my android internal memory or sd card. i am running caulks rom 2.0 or whatever its called.
[Samsung Epic 4G Touch] ravizzle:
there is a link to the app in the op. the JAYS people gave an apk copy of the app to us on this site bc the app doesnt technically work with a stock epic touch without the mod.

the easiest way to install is the .zip in the op which can be flashed in cwm.

the other ways you can do this to dl the zip and pull the sec_jack.kl file from there and copy it to system-usr-keylayout using Root Explorer or Es File Explorer (with Root explorer in settings enabled)

Also i think OP should talk to the rom devs and just ask them to incorporate this mod and jays headset control right into their roms, it is just one file modification and should take like ten seconds to do and makes stuff easier
[Samsung Epic 4G Touch] mikeman_2002:
If you're running a clean install of Caulk's 2.0 ROM, you're 99% of the way there.

1) Copy the Headset Mod.zip file (linked at the bottom of the original post) onto your phone's internal memory. Boot into Recovery Mode and flash the zip file.

2) Once you've done that, download JAYSHeadset Control from the link in the original post. The password for the RAR is: xda-developers. I had the same problem of not being able to download it from the Android Market b/c of device compatibility, but the JAYS dev was kind enough to provide a direct download link.

3) Assuming you have a clean install of Caulk's ROM and that the Headset Mod.zip file flashed correctly, then the JAYS app should enable your headset button to work as advertised.

If you run into any problems, feel free to ask. The people on this board (especially the op and the JAYS developer) are quite helpful.
[Samsung Epic 4G Touch] pcmedics911:
It works!

Just installed it via clockwork mod. I installed the ek02 stock rom from android syndicate team then installed this.

Got this awesome function working. Makes the ep2 a keeper
[Samsung Epic 4G Touch] geo1378:
so got mine working just one question. has anyone gotten volume buttons to work on a three button? i have epic 4g touch, caulks newest rom, and the beats studio solo headphones. thanks
[Samsung Epic 4G Touch] donp2700:
EL13 modem not working with headset mod

Just flashed calkulin 2.5 and the EL13 modem and the headset mod and jays app is not working. button press takes me to call log. any suggestions?
[Samsung Epic 4G Touch] japper88:
Did you do a clean flash for the rom (data wipe before flash)?

I have the same problem every time I updated my rom or theme, you basically need to do a full wipe (data, cache, delvik), flash rom, then flash all mods and stuff before finally flashing the headset mod.
[Samsung Epic 4G Touch] donp2700:
I wiped dalvik and cache only and it worked. I really wasnt looking forward to full wipe so iam glad this sufficed. Thank you for ur suggestion. You definetly pointed me in the right direction.
[Samsung Epic 4G Touch] japper88:
So apparently cache and delvik wipe are all you need to do to before flashing the headset mod after any kind of rom or theme update and everything works again.

I installed a couple of rom/theme updates, and did that and it worked great. Just make sure to use the jay control app, that makes it all work!
[Samsung Epic 4G Touch] playball78:
I agree. This is a good fix, but something that enabled 3 button function would be even better.
[Samsung Epic 4G Touch] spiicytuna:
Get to fiddling around and/or researching then. . .
[Samsung Epic 4G Touch] nyc_zx10:
Does anyone know if this will work to enable full functionality for the Klipsch S4A headphones for our phones?

I've been eyeing them for a while to replace my Bose IE2's as I want headphones with controls on them but know they dont work well with the SG2.

Anyone?