Related
MobileMute is a little program that allows you to mute/unmute phone calls via a hardware button. It will also launch any other program of choice if a call is not in progress (that way your hardware button doesn't get wasted). I had searched for this functionality for while without much luck. So, I decided to write a quick little app to do it for me.
For those of you who had used the first version of this, you may have noticed the slight delay when running the program. This was because it was designed to start, do its thing, and then exit. That being said, it took a second for the program to initialize on startup which resulted in a delay.
I have changed this version to try to figure out what button you have it mapped to. If it can figure that out, it will stay active listening for future pushes to that button. If it can't figure out what button is mapped, it will act just like the first version (which is still functional, just with a slight delay).
I have also added a simple configuration utility for changing the settings (located in Program Files/itsallwright/MobileMute).
I originally developed this for my Kaiser, therefore it was originally posted in the Kaiser section. But, since it can work on other devices, I am posting the new version here. The only problem is that different devices have different button IDs. I will post some instructions for getting your button IDs on the devices that the default Kaiser button IDs don't work for.
I didn't test this version for as long as I tested the original. So if you have any weird problems with it, please let me know.
Original version is posted here http://forum.xda-developers.com/showthread.php?t=386810
Edit: Added MobileMute_v2.1 which adds support for more devices and Kaisers with non-standard ROMS.
Enjoy,
Jay
Button IDs
Here are some instructions to help find the button IDs.
If you do not have Visual Studio or another spy program, I saw a post here http://forum.xda-developers.com/showthread.php?t=251955 that might be able to help.
1) Open Spy Program and connect to device
2) Expand "Desktop Window"
3) Expand all child windows titled "Phone" (or whatever your "Phone" title is)
4) Locate the "Phone" window that has a child named "Mute" (or whatever your "Mute" text may be). If you can't find the correct Phone window, it is possible that is hasn't been started since the last reboot. To start it, make a quick call until you get the call status and hang up. Now you should be able to locate the window.
5) The next steps should be made while you are on a call, so make a call to Voicemail, yourself, or a patient friend . After the call is connected, make sure you are on the "Call Status" screen (the one that has the mute button on the screen).
6) Highlight the "Phone" window found previously and click the Messages button to view messages for that window. You will probably see messages continually being posted to the window.
7) Click "Menu" at the bottom and then click "Mute" (Note: do not click the "Mute" button on the screen as that will not give us the information we need.)
8) Click "Menu" at the bottom and then click "Unmute" (Same note as above applies)
9) Disconnect the call. The message window should stop getting messages.
10) In the message window, find all messages titled "WM_COMMAND" (there should only be 2)
11) The WPARAM value of the first WM_COMMAND message is the "Mute" button ID (Put it into a calculator to convert it to a decimal number)
12) The WPARAM value of the second WM_COMMAND message is the "Unmute" button ID
If you do find your IDs and confirm they work, please post them here with your device and ROM info to save others with that device the trouble.
Thanks,
Jay
just use volume up/down to mute incoming calls...
zuNN said:
just use volume up/down to mute incoming calls...
Click to expand...
Click to collapse
If I'm not mistaken the purpose of this app is not to mute the ringer during an incoming call but to mute the mic during an active call. Also when not in a call it will launch your app of choice so when not in a call you're not occupying an otherwise usable button.
jhw549 said:
If I'm not mistaken the purpose of this app is not to mute the ringer during an incoming call but to mute the mic during an active call. Also when not in a call it will launch your app of choice so when not in a call you're not occupying an otherwise usable button.
Click to expand...
Click to collapse
That is exactly what it is for. It is very usefull if you have to attend a lot of conference calls where you are not required to participate 100% of the time.
Jay
zuNN said:
just use volume up/down to mute incoming calls...
Click to expand...
Click to collapse
This won´t work with my Kaiser with M-Diamond 1.4 ROM.
MobileMute_v2 with HTC Fuze
I have tried version MobileMute_v2 with the HTC Fuze and it does not appear to work. It will launch the program defined in the settings when not on a call, but will not mute the call, when launched while on a call.
I am launching this from the PTT button through the methods described in another thread. I created a shortcut short_ptt.lnk, which launches this application.
I have also navigated directly to the executable and run it while on a call and get identical results.
I am going to uninstall version 2 and try installing version 1.
HTC Fuze and MobileMute
I have now tested the original with the HTC Fuze with similar unsuccessful results.
sounds like a great app ill give it a go on my hermes tonight. thanks for sharing!
JVH3 said:
I have tried version MobileMute_v2 with the HTC Fuze and it does not appear to work. It will launch the program defined in the settings when not on a call, but will not mute the call, when launched while on a call.
I am launching this from the PTT button through the methods described in another thread. I created a shortcut short_ptt.lnk, which launches this application.
I have also navigated directly to the executable and run it while on a call and get identical results.
I am going to uninstall version 2 and try installing version 1.
Click to expand...
Click to collapse
This is most likely because the Fuze button ID for Mute/Unmute is different then the Kaiser.
Have you tried using the steps above to get your button IDs?
-Jay
Mobile Mute and Fuze
I had also tried running the executable directly, not through the remap of the PTT key.
I did that to elliminate the possibility of it being a mapping to a key issue.
This does assume it works when run directly and not from a key.
I suppose it is possible that an exeception is thrown when the program checks what key was pressed to launch it, if there was not key pressed to start it.
As is, with the Fuze, the touch screen has on screen buttons for Mute and Speaker Phone.
I have remapped the long_ptt to Voice Command and the short_ptt to {"\Windows\ctlpnl.exe" cplmain 1} which gives you the lock screen so I can quickly change the timeout. I like it to lock quickly when not running GPS, but not lock at all when running GPS, but this last paragraph is not related to Mobile Mute, other than I no lnger have an available button to map it to.
JVH3 said:
I had also tried running the executable directly, not through the remap of the PTT key.
I did that to elliminate the possibility of it being a mapping to a key issue.
This does assume it works when run directly and not from a key.
I suppose it is possible that an exeception is thrown when the program checks what key was pressed to launch it, if there was not key pressed to start it.
As is, with the Fuze, the touch screen has on screen buttons for Mute and Speaker Phone.
I have remapped the long_ptt to Voice Command and the short_ptt to {"\Windows\ctlpnl.exe" cplmain 1} which gives you the lock screen so I can quickly change the timeout. I like it to lock quickly when not running GPS, but not lock at all when running GPS, but this last paragraph is not related to Mobile Mute, other than I no lnger have an available button to map it to.
Click to expand...
Click to collapse
Check in "/Program Files/itsallwright/MobileMute" for an ErrorLog file. If that file exists and has info, post the contents and I will see if I can figure out what went wrong.
Since it does launch the program you have configured when not in a call, the program at least initializes. If it also launches the program when you are in a call then it can't find the "Phone" window or the "ConnectedText" value. If it appears to do nothing while you are in a call, then it is likely that the Button IDs are wrong.
-Jay
Fuze
A friend of mine with a Fuze let me check it out and I determined why it does not work.
The dialer on the Fuze has Mute/Unmute buttons on the screen, but the buttons do not have text (I suspect it uses seperate Mute/Unmute images instead). That being said, MobileMute determines the Mute State of a call based on the text value of the Mute/Unmute buttons. Therefore, it does not know what command to send.
I am trying to figure out a way to work around this, but in the meantime, I am sorry to say the Fuze is unsupported.
Just as a fyi... the Mute/Unmute button IDs for the Fuze are the same as the Kaiser (21408/21409)
I'll keep you posted on my progress with supporting this device.
-Jay
Trying to use this app on my Mogul/Titan without success. I set it up on the button that would normally be conn mgr, went into cfg and set it to \windows\connmgr.exe
When I go to use the button I get a wait icon, the program launches and hides (still visible in Task Mgr). Opening manually works equally well (not at all).
The tools in the 2nd post don't work ("Class not registered" error).
While in a call the application launches (with a massive delay I might add) then performs its functino properly and mutes the call, no delays after initial launch.
There is no error log in the program's folder.
Help?
jhw549 said:
Trying to use this app on my Mogul/Titan without success. I set it up on the button that would normally be conn mgr, went into cfg and set it to \windows\connmgr.exe
When I go to use the button I get a wait icon, the program launches and hides (still visible in Task Mgr). Opening manually works equally well (not at all).
The tools in the 2nd post don't work ("Class not registered" error).
While in a call the application launches (with a massive delay I might add) then performs its functino properly and mutes the call, no delays after initial launch.
There is no error log in the program's folder.
Help?
Click to expand...
Click to collapse
The initial start of MobileMute does have a delay. That is the reason I created v2 that will stay running. If MobileMute shows in task manager after you run it, then it found the hardware button you have it assigned to and is listening for future presses of that button. Since it does Mute/Unmute the calls, the program is functioning as designed.
As for running "\windows\connmgr.exe". I also cannot run that program (even manually). I don't think it is an app to be used that way. Are you sure you don't actually want to run "\windows\CommManager.exe"?
-Jay
Heh.... umm... oops >.<
That's rather embarassing lol... You're completely right, I picked the wrong exe. It works 100% perfectly now.
I just wish it would hide completely and not show up in my tasks list... I have a tendancy to hit that kill all button rather than pick them out one by one.
thanks. this is a good idea... i'll be using it.
v2.1 with Fuze support
itsallwright said:
A friend of mine with a Fuze let me check it out and I determined why it does not work.
The dialer on the Fuze has Mute/Unmute buttons on the screen, but the buttons do not have text (I suspect it uses seperate Mute/Unmute images instead). That being said, MobileMute determines the Mute State of a call based on the text value of the Mute/Unmute buttons. Therefore, it does not know what command to send.
I am trying to figure out a way to work around this, but in the meantime, I am sorry to say the Fuze is unsupported.
Just as a fyi... the Mute/Unmute button IDs for the Fuze are the same as the Kaiser (21408/21409)
I'll keep you posted on my progress with supporting this device.
-Jay
Click to expand...
Click to collapse
Well, it turns out that the Fuze isn't the only device with that dialer. I recently found a ROM (Phoenix v2) that has touch flo and a similar dialer to the Fuze. I put that ROM on my Kaiser to reproduce this issue on my own.
After quite a bit of research and learning, I found a way to detect the Mute state of a call via TAPI. The Mute/Unmute button text is no longer needed.
I have no way to test with an actual Fuze, but I am pretty confident it will work now. I have added the new version to the original post.
-Jay
I've got v2.1 loaded. Detection on Fuze works, the registry shows mute/unmute id's 21408/21409. I'm using the short_PTT.lnk method. When I press PTT, I can see the titlebar flash 'MoblieMute' text.... but the mic does not mute.
jpn621 said:
I've got v2.1 loaded. Detection on Fuze works, the registry shows mute/unmute id's 21408/21409. I'm using the short_PTT.lnk method. When I press PTT, I can see the titlebar flash 'MoblieMute' text.... but the mic does not mute.
Click to expand...
Click to collapse
When you are not in a call, does it open the configured program (BubbleBreaker by default). Also, if you look in task manager, is MobileMute listed?
-Jay
My lock screen was working fine (I would press the red button and it would lock it... same as stock)...then I accidentally installed dinik lock screen and uninstalled it,..now my HD2 does this - when I press the red button it locks it, but its not the lock screen anymore -it shows the last screen I had open and it says "unlock" on the bottom left...now the problem is when I press any button (even on accident) it unlocks it -leaving me calling and pressing things I dont even know about while the phone is in my pocket...
anyone else with this issue? any know how I can get it back to how it used to be without any dramatic changes (such as re installing the rom, hard reset etc...?
edit: I reinstalled the dinik lockscreen and it works...but I miss the stock lockscreen, maybe I will try looking for the stock lockscreen cab file to see if that works....but I dont understand -it must have uninstalled it automatically when I first installed the dinik lockscreen.
Check to see if \HKCU\ControlPanel\Keybd\DeviceKeyLock and DeviceLockWhenSuspend are set to 1 in the registry.
Dave
I uninstalled S2U2 and now mine is missing as well.
dmattox said:
Check to see if \HKCU\ControlPanel\Keybd\DeviceKeyLock and DeviceLockWhenSuspend are set to 1 in the registry.
Dave
Click to expand...
Click to collapse
Yes they both are set to 1.
Please elaborate this for me...
I wanted to get rid of the lock functionality, so I set them to 0. I hoped yours had gotten switched, but having 1 is correct. So its another issue.
Dave
erebusting said:
-it shows the last screen I had open and it says "unlock" on the bottom left...now the problem is when I press any button (even on accident) it unlocks it -leaving me calling and pressing things I dont even know about while the phone is in my pocket...
Click to expand...
Click to collapse
yea ive seen this. annoying, cos as you noted any hard button unlocks it.
Happened to me when i was messing with the LS_LockScene_480x800.cpr file, guess it got corrupted.
Heres an original. unzip it, drop it in windows/lockscreen and soft reset.
samsamuel said:
yea ive seen this. annoying, cos as you noted any hard button unlocks it.
Happened to me when i was messing with the LS_LockScene_480x800.cpr file, guess it got corrupted.
Heres an original. unzip it, drop it in windows/lockscreen and soft reset.
Click to expand...
Click to collapse
thank you...
samsamuel said:
yea ive seen this. annoying, cos as you noted any hard button unlocks it.
Happened to me when i was messing with the LS_LockScene_480x800.cpr file, guess it got corrupted.
Heres an original. unzip it, drop it in windows/lockscreen and soft reset.
Click to expand...
Click to collapse
I cannot find this directory ? Nevermind sorry, I found it through my phone, but from my PC's side I could not find it.... ?
on the pc you need to open file manager click tools folder optionssecond tab (not at a pc so can't say exactly what it says) and tick show hidden files and folders, un tick hide file extensions, tick show projected operating system files.apply, and choose apply to all folders. now you will see everything.
to be honest its really slow browsing the phones windows folder from the pc. I just copy to sd card then move it from the phone.
Someone told me that if you go to settings and scroll down to about. If it says LEO70 your market place isnt gunna work. But you can change something in the registry to fix it and change the name. If this is true, how do i do it? Can someone link me to a thread or a video.
TrevorMcCauley said:
Someone told me that if you go to settings and scroll down to about. If it says LEO70 your market place isnt gunna work. But you can change something in the registry to fix it and change the name. If this is true, how do i do it? Can someone link me to a thread or a video.
Click to expand...
Click to collapse
Thats all true. Everything you need to know is found in the first sticky post up top... theres tutorials on activating it in there.
All you need is this tutorial..
http://forum.xda-developers.com/showthread.php?t=912218
I recommend using TOMS Deployer to send the xaps to phone.
http://forum.xda-developers.com/showthread.php?t=908300&page=2
Hi. download this XBMOD,file deployer. Unzip and put on you desktop. Now start up your application Deployer (or Toms Deployer). Make sure phone is not in sleep mode. When the application deployer on your desktop has finished deploying, then go to the menu screen on your phone. You must have Touchxplorer still in there? If not put that in as well. OK here goes, Scroll to near the bottom until you can see XBMOD.Files.Deployer. Now tap that with your finger, it will open up, you can now see the CustClear.provxml, OK. Right now using the back arrow key on your mobile,push once and now you are in the menu again.OK now push the TouchXplorer, you will see yellow files there. You need to open my documents (Tap it twice), then you need to open the My Ringtones folder(Tap it twice). Can you see the CustClear.provxml file (Yes) OK now touch that until highlighted. then at the bottom of that screen, use your finger to push it up, or touch that 3 little full stops... scroll until you see the copy option. Now touch the copy. OK Just use the back arrow key again (Twice) until you come back to My Device. Scroll it up a bit until you see the yellow Windows folder. Now tapit twice untilthat opens.It will take a bit of time, but once you see it open with yellow files, then go to the bottom of you screen and tap the 3 little ... again. scroll until you see paste.OK Hit the paste, Thats it. Back out of the settings using the back arrow button. go to the about screen, and it should now show HTC HD7 T9292. If so then you have Cracked it.(IF not, do it again slower this time?) now go to hotmail and try logging in. It should fail, and then you touch the error message, it now shows the activation screen. now put the codes in, re log into your account..Job Done.
russpattaya said:
Hi. download this XBMOD,file deployer. Unzip and put on you desktop. Now start up your application Deployer (or Toms Deployer). Make sure phone is not in sleep mode. When the application deployer on your desktop has finished deploying, then go to the menu screen on your phone. You must have Touchxplorer still in there? If not put that in as well. OK here goes, Scroll to near the bottom until you can see XBMOD.Files.Deployer. Now tap that with your finger, it will open up, you can now see the CustClear.provxml, OK. Right now using the back arrow key on your mobile,push once and now you are in the menu again.OK now push the TouchXplorer, you will see yellow files there. You need to open my documents (Tap it twice), then you need to open the My Ringtones folder(Tap it twice). Can you see the CustClear.provxml file (Yes) OK now touch that until highlighted. then at the bottom of that screen, use your finger to push it up, or touch that 3 little full stops... scroll until you see the copy option. Now touch the copy. OK Just use the back arrow key again (Twice) until you come back to My Device. Scroll it up a bit until you see the yellow Windows folder. Now tapit twice untilthat opens.It will take a bit of time, but once you see it open with yellow files, then go to the bottom of you screen and tap the 3 little ... again. scroll until you see paste.OK Hit the paste, Thats it. Back out of the settings using the back arrow button. go to the about screen, and it should now show HTC HD7 T9292. If so then you have Cracked it.(IF not, do it again slower this time?) now go to hotmail and try logging in. It should fail, and then you touch the error message, it now shows the activation screen. now put the codes in, re log into your account..Job Done.
Click to expand...
Click to collapse
Great little tutorial, but i still cannot change the model to HD7 I have done these steps over a dozen times and cannot change the model tried resetting phone re-installing zune - locking/ unlocking again- any thoughts? any other way to do it?
russpattaya said:
Hi. download this XBMOD,file deployer. Unzip and put on you desktop. Now start up your application Deployer (or Toms Deployer). Make sure phone is not in sleep mode. When the application deployer on your desktop has finished deploying, then go to the menu screen on your phone. You must have Touchxplorer still in there? If not put that in as well. OK here goes, Scroll to near the bottom until you can see XBMOD.Files.Deployer. Now tap that with your finger, it will open up, you can now see the CustClear.provxml, OK. Right now using the back arrow key on your mobile,push once and now you are in the menu again.OK now push the TouchXplorer, you will see yellow files there. You need to open my documents (Tap it twice), then you need to open the My Ringtones folder(Tap it twice). Can you see the CustClear.provxml file (Yes) OK now touch that until highlighted. then at the bottom of that screen, use your finger to push it up, or touch that 3 little full stops... scroll until you see the copy option. Now touch the copy. OK Just use the back arrow key again (Twice) until you come back to My Device. Scroll it up a bit until you see the yellow Windows folder. Now tapit twice untilthat opens.It will take a bit of time, but once you see it open with yellow files, then go to the bottom of you screen and tap the 3 little ... again. scroll until you see paste.OK Hit the paste, Thats it. Back out of the settings using the back arrow button. go to the about screen, and it should now show HTC HD7 T9292. If so then you have Cracked it.(IF not, do it again slower this time?) now go to hotmail and try logging in. It should fail, and then you touch the error message, it now shows the activation screen. now put the codes in, re log into your account..Job Done.
Click to expand...
Click to collapse
I still did all of that and it didnt work.
Zedbed, Trevor,
I might be wrong about it showing before registering? Try registering, and see if it has changed. No problem if it shows you LEO7, as you have not used up your activation key.
Give that a try and let me know, and i will change my posting.
Russ
russpattaya said:
Zedbed,
I might be wrong about it showing before registering? Try registering, and see if it has changed. No problem if it shows you LEO7, as you have not used up your activation key.
Give that a try and let me know, and i will change my posting.
Russ
Click to expand...
Click to collapse
Ive already registered and typed in my activation key and still said LEO70.
TrevorMcCauley said:
Ive already registered and typed in my activation key and still said LEO70.
Click to expand...
Click to collapse
Did you do the guide I linked you to?
Hard reset your phone and do everything in the guide form begining to end, Do not skip and do not do it on your current setup.
Start a fresh.
To hard reset hold volume up/down when you see the 1234 on magldr and keep holding them till the DFT screen has changed to white screen with instructions.
TrevorMcCauley said:
I still did all of that and it didnt work.
Click to expand...
Click to collapse
You may be using the wrong custclear.provxml file! The same thing happened to me and I couldn't change LEO70 to HD7 until I went to this thread http://forum.xda-developers.com/showthread.php?t=911579 download the toolkit that's in the first link you see, and used the XBMODDeployer.xap that's in the toolkit.
Copy to ringtones, copy to Windows folder in WP7 & use Connection Setup to provision as usual. Only by doing these steps will you be able to see HD7 when you go to the about screen. If that doesn't work, hard reset and try again.
staypaidtre said:
You may be using the wrong custclear.provxml file! The same thing happened to me and I couldn't change LEO70 to HD7 until I went to this thread http://forum.xda-developers.com/showthread.php?t=911579 download the toolkit that's in the first link you see, and used the XBMODDeployer.xap that's in the toolkit.
Copy to ringtones, copy to Windows folder in WP7 & use Connection Setup to provision as usual. Only by doing these steps will you be able to see HD7 when you go to the about screen. If that doesn't work, hard reset and try again.
Click to expand...
Click to collapse
That's the tutorial I used before. But I just did a hard reset and did the process over, and now it works Thank you all very much!
russpattaya said:
Zedbed, Trevor,
I might be wrong about it showing before registering? Try registering, and see if it has changed. No problem if it shows you LEO7, as you have not used up your activation key.
Give that a try and let me know, and i will change my posting.
Russ
Click to expand...
Click to collapse
This worked for me.. Thanks for that Great post.
Neil.
russpattaya said:
Hi. download this XBMOD,file deployer. Unzip and put on you desktop. Now start up your application Deployer (or Toms Deployer). Make sure phone is not in sleep mode. When the application deployer on your desktop has finished deploying, then go to the menu screen on your phone. You must have Touchxplorer still in there? If not put that in as well. OK here goes, Scroll to near the bottom until you can see XBMOD.Files.Deployer. Now tap that with your finger, it will open up, you can now see the CustClear.provxml, OK. Right now using the back arrow key on your mobile,push once and now you are in the menu again.OK now push the TouchXplorer, you will see yellow files there. You need to open my documents (Tap it twice), then you need to open the My Ringtones folder(Tap it twice). Can you see the CustClear.provxml file (Yes) OK now touch that until highlighted. then at the bottom of that screen, use your finger to push it up, or touch that 3 little full stops... scroll until you see the copy option. Now touch the copy. OK Just use the back arrow key again (Twice) until you come back to My Device. Scroll it up a bit until you see the yellow Windows folder. Now tapit twice untilthat opens.It will take a bit of time, but once you see it open with yellow files, then go to the bottom of you screen and tap the 3 little ... again. scroll until you see paste.OK Hit the paste, Thats it. Back out of the settings using the back arrow button. go to the about screen, and it should now show HTC HD7 T9292. If so then you have Cracked it.(IF not, do it again slower this time?) now go to hotmail and try logging in. It should fail, and then you touch the error message, it now shows the activation screen. now put the codes in, re log into your account..Job Done.
Click to expand...
Click to collapse
Thanks for the guide too
Also run connection setup once you have finished it all. This executes the prox file. Go to HTC apps to download the connection setup app
Sent from my HTC HD2 using XDA App
Hi, I activated my phone using an official code. However I am still not able to unlock the device. This might be a stupid question, but Is it nesecary to unlock the phone in order to change the name using xbmod deployer and download apps from the market.
Because without unlocking I was at least able to use live mail.
I'm not sure this is the right subforum for this, but I was coming here to ask how to do this before I figured it out for myself. So I figured I should post about it in case I forget what I did.
I just switched to a shiny new G2, and I'm using the one-button earphones that came with my Nexus S 4G. This is actually the third set of such headphones (I keep breaking and replacing them), so I refuse to have them not work on my rooted but otherwise stock G2.
When I first plugged them in to the G2, it was configured so that the button would control the phone function: one press would open my call history, a double press would redial, and a hold would start up voice dialer. On the Nexus S 4G, the buttons controlled my media player, so that's what I want them to do here.
I tried various button remapping tools like the JAYS Headset Control app, but none of them would take precedence over the default LG actions.
Instead, I modified this approach from the Nexus 4, and changed the key code for the button from the one that the voice dialer controls were intercepting (HEADSETHOOK) to something else (MEDIA_NEXT).
What I did:
1. Have root and install Busybox (for vi).
2. Get a root shell on the device.
Code:
$ adb shell
[email protected]:/ $ su
[email protected]:/ #
3. Mount /system as read-write:
Code:
[email protected]:/ # mount -o rw,remount /system
4. Edit the default Android keyboard layout to swap the HEADSETHOOK and MEDIA_NEXT keys.
Code:
[email protected]:/ # vi /system/usr/keylayout/Generic.kl
Press "i" to enter insert mode. Move around with the arrow keys.
Change:
Code:
key 163 MEDIA_NEXT
to:
Code:
key 163 HEADSETHOOK
And also change:
Code:
key 226 HEADSETHOOK
to:
Code:
key 226 MEDIA_NEXT
Press Escape, and then press Shift + Z twice to save and quit.
5. Reboot your device for the changes to take effect.
6. Now the button on your single-button headset is the equivalent of the "down" or "next" button on a three-button headset. To configure it, install JAYS Headset Control or a similar application. Chose the three-button headset instead of the one-button headset, and configure the third button to do everything you want your button to do.
7. Enjoy your customizable button!
Sweet! Not having my headset button work for audio was my biggest issue with the G2.
I followed the instructions above, but instead of swapping "key 163 MEDIA_NEXT" I swapped "key 164 MEDIA_PLAY_PAUSE". This caused the default behavior to be "Play/Pause".
I tried using JAYS Headset Control and it works great. Thanks for the find!
Oh my gosh! I've been looking everywhere for this solution. Thank you so much!
My dilemma was that I want to be able to use the headset buttons because I listen to music and switch tracks frequently while walking around the university. Only the Android KitKat ROMs worked for me, but the problem with those ROMs is that GPS has locking problems and/or doesn't work at all.
Thanks for this, it was helpful for me also. Like Myzur I've also used MEDIA_PLAY_PAUSE instead of MEDIA_NEXT.
I had a quick go with the "Headset Button ControllerTrial" app for some extended functionality, but it kept switching from Rhapsody to LG's music app. This was before I saw the comment about configuring things as if it were a 3 button headset, so I'll play around with this some more (and will probably also try the JAYS app). But even as-is, just the ability to play/pause is a very nice improvement over stock behavior (honestly, who uses their phone more for making calls than listening to music.. ).
doesnt work
For some reason this doesnt work with the LG G2 Sprint version, is there any other solution?
pabel101 said:
For some reason this doesnt work with the LG G2 Sprint version, is there any other solution?
Click to expand...
Click to collapse
My phone is LG G2 on Sprint (LS980), and it actually does work for me.
Since my above post, I have actually changed the mapping again to MEDIA_NEXT, and I'm using the Headset Button Controller app (https://play.google.com/store/apps/details?id=com.kober.headsetbutton). The actions in the controller app are all set under "Right button actions" (so exactly according to step 6 in the OP..).
I think any app that will let you configure things for a 3rd/right button should work. The JAYS one is free, but as I recall it asked for a permission I wasn't comfortable with, and I ended up with Kober's app instead, which I think was $2 and to me well worth it (you can barely get a coffee for that these days..). There is a free trial.
This setup works great for music controls (play/pause, next/previous, volume control), but it doesn't seem call control (answer/hangup, mute etc.) is totally working. For me this is mostly about music controls, so I'm not too worried about the call controls and haven't looked into fixing that so far.
By the way, I found out a modified Generic.kl file is enough to cause updates to fail (for ZVC anyway), so you'll want to keep a copy of the original to restore for cases like that.
If you still can't get it to work, what exactly is happening for you, and what app are you using? Did you map MEDIA_NEXT, or MEDIA_PLAY_PAUSE? The Headset Button Controller app I'm using (free trial also) has a troubleshooting feature where it displays the button presses it sees on screen, whether it takes action on it or not, which could be useful to figure things out.
doesnt work
ChoppedLiver said:
My phone is LG G2 on Sprint (LS980), and it actually does work for me.
Since my above post, I have actually changed the mapping again to MEDIA_NEXT, and I'm using the Headset Button Controller app (https://play.google.com/store/apps/details?id=com.kober.headsetbutton). The actions in the controller app are all set under "Right button actions" (so exactly according to step 6 in the OP..).
I think any app that will let you configure things for a 3rd/right button should work. The JAYS one is free, but as I recall it asked for a permission I wasn't comfortable with, and I ended up with Kober's app instead, which I think was $2 and to me well worth it (you can barely get a coffee for that these days..). There is a free trial.
This setup works great for music controls (play/pause, next/previous, volume control), but it doesn't seem call control (answer/hangup, mute etc.) is totally working. For me this is mostly about music controls, so I'm not too worried about the call controls and haven't looked into fixing that so far.
By the way, I found out a modified Generic.kl file is enough to cause updates to fail (for ZVC anyway), so you'll want to keep a copy of the original to restore for cases like that.
If you still can't get it to work, what exactly is happening for you, and what app are you using? Did you map MEDIA_NEXT, or MEDIA_PLAY_PAUSE? The Headset Button Controller app I'm using (free trial also) has a troubleshooting feature where it displays the button presses it sees on screen, whether it takes action on it or not, which could be useful to figure things out.
Click to expand...
Click to collapse
Im sooooo confused by this but is it possible for you to screen shot your settings for Generic.kl? im sorry for the late reply
pabel101 said:
Im sooooo confused by this but is it possible for you to screen shot your settings for Generic.kl? im sorry for the late reply
Click to expand...
Click to collapse
The whole file is over 400 lines long, so a bit too long to fit in a screenshot. There are only 2 lines that you will need to touch however, and they will look like this when you are done with them:
Code:
key 163 HEADSETHOOK
key 226 MEDIA_NEXT
Note that these lines are not next to each other, but they are easy enough to find as they are pretty much ordered by key "number" as you can see.
Sorry if I made things sound confusing.. the steps in the OP are maybe more clear, and exactly what you need to do to get Generic.kl modified the way mine is. Feel free to ask if you need more help/clarification though.
playpause
ChoppedLiver said:
The whole file is over 400 lines long, so a bit too long to fit in a screenshot. There are only 2 lines that you will need to touch however, and they will look like this when you are done with them:
Code:
key 163 HEADSETHOOK
key 226 MEDIA_NEXT
Note that these lines are not next to each other, but they are easy enough to find as they are pretty much ordered by key "number" as you can see.
Sorry if I made things sound confusing.. the steps in the OP are maybe more clear, and exactly what you need to do to get Generic.kl modified the way mine is. Feel free to ask if you need more help/clarification though.
Click to expand...
Click to collapse
ok i did what you said and now my middle button Just skips to next track is that alright?
pabel101 said:
ok i did what you said and now my middle button Just skips to next track is that alright?
Click to expand...
Click to collapse
Yes, this means the re-mapping of the button worked. Now you can use one of the headset control apps to program the button as you please (remember this button is now acting as the "next" or right button, so program as such).
But, you say "middle button" - do you have a 3 button headset? If yes, I think you could have left the mapping alone, and programmed either of the left/right buttons, or both. Not really sure of the best and most functional approach in this case, I've never had anything other than a single button headset. I would think with 3 buttons, if all 3 are supported, you can have some more flexibility.
If you do have a 3 button headset, but only the middle button is supported by Android at all (apparently YMMV depending on the make/model among other things), then ignore everything I just said, keep the mapping as-is, and just program the one working button as you like - still as if it were the right button.
headset
ChoppedLiver said:
Yes, this means the re-mapping of the button worked. Now you can use one of the headset control apps to program the button as you please (remember this button is now acting as the "next" or right button, so program as such).
But, you say "middle button" - do you have a 3 button headset? If yes, I think you could have left the mapping alone, and programmed either of the left/right buttons, or both. Not really sure of the best and most functional approach in this case, I've never had anything other than a single button headset. I would think with 3 buttons, if all 3 are supported, you can have some more flexibility.
If you do have a 3 button headset, but only the middle button is supported by Android at all (apparently YMMV depending on the make/model among other things), then ignore everything I just said, keep the mapping as-is, and just program the one working button as you like - still as if it were the right button.
Click to expand...
Click to collapse
Just to be more specific these are the headphones im using http://www.amazon.com/Samsung-Repla...m-Headset/dp/B007C5S3AU/ref=pd_bxgy_cps_img_y
Help
I really want to do this but I am clueless on what to do. Where do I input this code? The build prop? I don't usually mess with stuff to much but his has been bugging me for a while. Thanks in advance
Ghost_Killer811 said:
I really want to do this but I am clueless on what to do. Where do I input this code? The build prop? I don't usually mess with stuff to much but his has been bugging me for a while. Thanks in advance
Click to expand...
Click to collapse
The file to edit is /system/usr/keylayout/Generic.kl. Of course you need a rooted device to be able to edit it; also you need to mount the system partition read/write (it is mounted read-only during normal operation).
The first post of this thread has the exact instructions on how to do this. Have you tried to follow those steps?
One thing I might add - you will want to keep a copy of the un-edited, original Generic.kl file, because you will typically need to restore it to the original before applying firmware updates. Make a new copy of the original file after every firmware update, since the firmware update sometimes modifies it.
ChoppedLiver said:
The file to edit is /system/usr/keylayout/Generic.kl. Of course you need a rooted device to be able to edit it; also you need to mount the system partition read/write (it is mounted read-only during normal operation).
The first post of this thread has the exact instructions on how to do this. Have you tried to follow those steps?
One thing I might add - you will want to keep a copy of the un-edited, original Generic.kl file, because you will typically need to restore it to the original before applying firmware updates. Make a new copy of the original file after every firmware update, since the firmware update sometimes modifies it.
Click to expand...
Click to collapse
Thanks for the help. I tried reading the instructions, but I got confused. When it says to make a root shell and then gives the code, do I put it somewhere specific in the file or just anywhere.
Having purchased the nvidia shield back at launch, one of the main things that bothered me about it's design was the lack of a few buttons, namely a menu button and select button, instead we got a button that opened nvidia's tegra zone, something easily accessible from a launcher and a volume button which again wasn't something I needed to constantly access.
So i ended up editing some of the .kl files and using an xposed tweak called gravity box to tune things a bit
I changed the nvidia button to act as a menu button with the .kl files, and the volume button to act as a select button
with gravity box i changed the menu button's long press function to call up the power menu to restore that function to how the shield comes, and set the back button when long pressed to call up the volume control
also keep in mind if you don't use xposed with gravity box to tweak the keys after they've been changed you will have difficulty shutting down the shield properly as the nvidia button of course acts as the power button when held down longer, it of course still powers up the device either way, and will hard power the device off if held for several seconds, still setting up gravity box feels like the best way
now for the moga controller, while you can make it function in a usable state with tincore or game keyboard, and in fact those both still come in very handy for touch emulation, I didn't want to always have those apps running when i wanted standard button presses, when the controller would go to sleep it would take time to get re detected so i wanted a little more convenience, I think this also should make it work with the built in console mode touch emulation, though I haven't tested that
the HID mode on it would have the select button as a back button, and the shoulder buttons didn't seem to work unless an app specifically supported the controller
So i added a few .kl files for that as well, not sure which of the 3 gets called as they're all duplicates in function, but presumably the device ID one should be the default, but i added the other 2 in case it doesn't for some reason
these .kl files should be put in /system/usr/keylayout
root is required and obviously backup the files that get replaced for the shield, the moga ones should not have existing files and match the permissions to the other files that're in the folder
I've tested these moga files on an LG phone on 4.2.2 and the shield on 4.3
I've included a backup of the original files for 4.3 for the shield in the zip, but no idea if they'd be different under Kitkat though I don't see why they would be
ciphray said:
Having purchased the nvidia shield back at launch, one of the main things that bothered me about it's design was the lack of a few buttons, namely a menu button and select button, instead we got a button that opened nvidia's tegra zone, something easily accessible from a launcher and a volume button which again wasn't something I needed to constantly access.
So i ended up editing some of the .kl files and using an xposed tweak called gravity box to tune things a bit
I changed the nvidia button to act as a menu button with the .kl files, and the volume button to act as a select button
with gravity box i changed the menu button's long press function to call up the power menu to restore that function to how the shield comes, and set the back button when long pressed to call up the volume control
also keep in mind if you don't use xposed with gravity box to tweak the keys after they've been changed you will have difficulty shutting down the shield properly as the nvidia button of course acts as the power button when held down longer, it of course still powers up the device either way, and will hard power the device off if held for several seconds, still setting up gravity box feels like the best way
now for the moga controller, while you can make it function in a usable state with tincore or game keyboard, and in fact those both still come in very handy for touch emulation, I didn't want to always have those apps running when i wanted standard button presses, when the controller would go to sleep it would take time to get re detected so i wanted a little more convenience, I think this also should make it work with the built in console mode touch emulation, though I haven't tested that
the HID mode on it would have the select button as a back button, and the shoulder buttons didn't seem to work unless an app specifically supported the controller
So i added a few .kl files for that as well, not sure which of the 3 gets called as they're all duplicates in function, but presumably the device ID one should be the default, but i added the other 2 in case it doesn't for some reason
these .kl files should be put in /system/usr/keylayout
root is required and obviously backup the files that get replaced for the shield, the moga ones should not have existing files and match the permissions to the other files that're in the folder
I've tested these moga files on an LG phone on 4.2.2 and the shield on 4.3
I've included a backup of the original files for 4.3 for the shield in the zip, but no idea if they'd be different under Kitkat though I don't see why they would be
Click to expand...
Click to collapse
I supposed that ir just a copy paste and remplace the files for the ones on the zip right ?, thanks for the info i agree with you, i hate the tegra zone button, nice idea man
what bothers me is that in some Gameloft Shooters like Nova 3 you aim and shoot with the bumpers instead triggers.
you think there is a way to change that without ****ing up other games?
psycho1200 said:
I supposed that ir just a copy paste and remplace the files for the ones on the zip right ?, thanks for the info i agree with you, i hate the tegra zone button, nice idea man
Click to expand...
Click to collapse
yes replace the existing files for the shield, the permissions should stay the same, just make sure they match the other files in that folder
what bothers me is that in some Gameloft Shooters like Nova 3 you aim and shoot with the bumpers instead triggers.
you think there is a way to change that without ****ing up other games?
Click to expand...
Click to collapse
if you swap them via this method it would change it for all games, something like tincore or gamekeyboard would let you switch for just 1 game, as they have profiles
Thanks!
Just wanted to say that I love having the select button useful in HID mode again, thank you so much as I had no idea how those layouts got set!
ciphray said:
yes replace the existing files for the shield, the permissions should stay the same, just make sure they match the other files in that folder
if you swap them via this method it would change it for all games, something like tincore or gamekeyboard would let you switch for just 1 game, as they have profiles
Click to expand...
Click to collapse
tried. Tincore doesn't do such thing and gamekeyboard does not detect the analog triggers.
nex86 said:
tried. Tincore doesn't do such thing and gamekeyboard does not detect the analog triggers.
Click to expand...
Click to collapse
if you're refering to the moga controller
if you use the .kl files from here that will make gamekeyboard detect the analog triggers, the reason game keyboard doesn't see them is they get assigned a random generic axis each time if they're undefined in one of the kl files
tincore is tricky to get used to how to setup, and a number of it's addons need to be purchased
it sets 2 different buttons to the triggers, both analog and digital, i think one set comes up as buttondead and as gas brake, make sure you set both of them, the profiles also need to be created while the game is loaded in the background if you want it to auto load with that game, otherwise it'll remove the profile when the game starts if you have auto profile switching enabled
No I was refering to the Shield Controller, not Moga.
nex86 said:
tried. Tincore doesn't do such thing and gamekeyboard does not detect the analog triggers.
Click to expand...
Click to collapse
I have the same exact issue - want to use triggers instead of bumpers. Can someone here either explain how to map the triggers or just upload a profile that already does?
delt31 said:
I have the same exact issue - want to use triggers instead of bumpers. Can someone here either explain how to map the triggers or just upload a profile that already does?
Click to expand...
Click to collapse
So I got it to work.
open tincore then minimize,
open NOVA or MC and then volume start volume and select open TKM editor
then scroll all the way down and under L1 and L2 select disable on the drop down
for R2 and L2 select click button joy 0
Then press check button then name the new profile and you're good. Make sure the profile is activated in order for it to work.
Only catch was that I had to pay in order for the new functionality to work. 2.75 well worth it now that I can use triggers for zoom and shoot!
Not recognizing the KL files after updating image
So I have a nexus 5 and was running the factory 4.4.2 image and these KL files worked great (the moga files). After updating to the new 4.4.3 image the device doesn't seem to load them. Anyone have any ideas? It's almost as though it doesn't know those files were put there, but I copied them over from a directory in the /sdcard with root explorer and updated the permissions just like I did originally.
Only oddities I can think of is that the OTA failed (I rooted but didn't flash the team win bootloader so OTA's could still work, update did work on my wifes rooted nexus 5) for me so I had to download the factory image and flashed the update without the -w flag so that it would keep my user partition.
tridium said:
So I have a nexus 5 and was running the factory 4.4.2 image and these KL files worked great (the moga files). After updating to the new 4.4.3 image the device doesn't seem to load them. Anyone have any ideas? It's almost as though it doesn't know those files were put there, but I copied them over from a directory in the /sdcard with root explorer and updated the permissions just like I did originally.
Only oddities I can think of is that the OTA failed (I rooted but didn't flash the team win bootloader so OTA's could still work, update did work on my wifes rooted nexus 5) for me so I had to download the factory image and flashed the update without the -w flag so that it would keep my user partition.
Click to expand...
Click to collapse
So after doing some more research it seems that the product code wasn't the same anymore. instead of 0dad it was 6271, so after renaming the vendor specific file to incorporate the correct product code, it worked again for me. I don't know enough about things to know why that would have changed, but before that rename it was just using the Generic.kl as it was before.
I got the code it wanted by adb shelling into the device and running a dumpsys input. One of the lines under the Moga had it's vendor and product code in it.
tridium said:
So after doing some more research it seems that the product code wasn't the same anymore. instead of 0dad it was 6271, so after renaming the vendor specific file to incorporate the correct product code, it worked again for me. I don't know enough about things to know why that would have changed, but before that rename it was just using the Generic.kl as it was before.
I got the code it wanted by adb shelling into the device and running a dumpsys input. One of the lines under the Moga had it's vendor and product code in it.
Click to expand...
Click to collapse
that's definitely interesting that the device portion would change, the triggers still work as analog? even windows gives the vendor id and device id as the 0dad one, only thing that comes to mind is maybe the newer version of android is seeing some other piece of hardware in the controller before the HID device and using that since the vendor portion isn't changing
ciphray said:
that's definitely interesting that the device portion would change, the triggers still work as analog? even windows gives the vendor id and device id as the 0dad one, only thing that comes to mind is maybe the newer version of android is seeing some other piece of hardware in the controller before the HID device and using that since the vendor portion isn't changing
Click to expand...
Click to collapse
Yeah, very weird. The only thing I can think of that I've done is that I have taken the controller apart. I was trying to see if there was any way i might make some adjustments to the d-pad. But other than taking the case apart and having the board being a bit on the free side for a bit, I didn't end up doing anything to the controller. It works fine as well, so I doubt anything I did could have changed that code.
Can the long press back button behavior be changed?
Would altering the kl files somehow make it possible to alter the long press behavior of the back button? When streaming Fallout 4, the Select button is the Back button on the controller. In the game you long press Select to bring up the workbench menu. As it is now, long pressing the button brings up the share menu on the tablet. The menu for taking screenshot and recording gameplay etc. I want to disable that somehow or change it from long pressing the back button.
Is that possible?