[guide] remap headset button to work with ultra - Sony Xperia Z 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.

good post, but probably should be in themes and apps section with the other Mods?

I am very interesting
I have generic headphone button with mic
only Play/Pause button work
(Back/Next button dont work)

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?
CyberSAD

Related

Strange Viewpad 7 issues

Hello
Got my Viewpad 7 for almost a week now.
At the beginning only the G-Sensor/Compass was making troubles - daily calibration because when using it portrait mode the display was headlong (with top side at the bottom). This is very annoying when playing games... steering left moves the car right and so (see video).
http://www.youtube.com/watch?v=7jjoDYj-Dk4
Now the last days the other more annoying problem drives me crazy:
It seems the bottom right softkey (menu key) does his own business. Just when taking the Viewpad it vibrates and shows up the menu bar or the keyboard (see video).
http://www.youtube.com/watch?v=TrfdtMYcua8
Most of the time a reboot solves the problem, but only for a few hours or "switch-ons". It happened one-time a day at the beginning, now it's nearly every 2nd time I bring it back from stand-by!
I bought the Viewpad 7 new at ComTech.de online shop.
Does anyone know that problem? Or have an idea how it can be solved?
Regards
I had the same problem with my menu soft key. I took it to the dealer and got screen+soft keys replaced through the warranty.
Sent from my HTC Sensation Z710e using XDA App
Hmm, another user here seems to have the same problem:
http://forum.xda-developers.com/showthread.php?t=1253845
Also HWVer 103 - perhaps this issue is only on pre-ITE devices?
try install custom rom... sometimes root permission make my accelerometer inversing...
I haven't rooted anything nor have I installed a custom ROM.
It's a complete unmodified stock ROM.
astuermer said:
I haven't rooted anything nor have I installed a custom ROM.
It's a complete unmodified stock ROM.
Click to expand...
Click to collapse
hardware fault i think....
I got the same problem with my settings button...
Any suggestions?
Settings button = Menu Softkey?
(the leftmost softkey when in portrait mode with softkeys at the bottom)
If yes, touchscreen/Softkeys has to be changed.
i had this problem, i found that after rooting my screen was the wrong orintation, but having cleared the devlic cache via CM twice, i now havnot got this issue for at least 4 days, so i guess its cured.... will report when i know more
Software solution
This is a solution from a user 'retrochip' from 4pda.ru forum
(Link to original post in Russian and i'm not able to post is here)
1. Root your device (can be done with Gingerbreak)
2. Find out codes for Menu button and Search button (229 and 217)
3. Edit configuration file /system/usr/keylayout/qwerty.kl (you can use RootExplorer)
In qwerty.kl:
Find text:
key 217 SEARCH WAKE_DROPPED
and change to:
key 217 MENU WAKE_DROPPED
Find text:
key 229 MENU WAKE_DROPPED
and change to (just comment it with #):
#key 229 MENU WAKE_DROPPED
Save and reboot.
Now Menu button isn't active and Search button works as a Menu button.
No annoying random popping keyboard anymore.
shuzzle said:
This is a solution from a user 'retrochip' from 4pda.ru forum
(Link to original post in Russian and i'm not able to post is here)
1. Root your device (can be done with Gingerbreak)
2. Find out codes for Menu button and Search button (229 and 217)
3. Edit configuration file /system/usr/keylayout/qwerty.kl (you can use RootExplorer)
In qwerty.kl:
Find text:
key 217 SEARCH WAKE_DROPPED
and change to:
key 217 MENU WAKE_DROPPED
Find text:
key 229 MENU WAKE_DROPPED
and change to (just comment it with #):
#key 229 MENU WAKE_DROPPED
Save and reboot.
Now Menu button isn't active and Search button works as a Menu button.
No annoying random popping keyboard anymore.
Click to expand...
Click to collapse
Nice solution. When in warranty i'll choose to fix it by replacing those parts. But when out of warranty this is one to remember!

[HELP] Home button not working on MIUI life 2.4.20 v4 (ST17i)

[HELP] Home button not working on MIUI life 2.4.20 v4 (ST17i)
Hi!
Today I've flashed MIUI life 2.4.20 v4 on my Xperia Active (ST17i) but home button is not working.
Tried reflashing, clearing cache & data, but there's some problem with the Android Configuration Assistant because it locks home button.
SOLUTION: (almost noob level)
AverageFury said:
[HELP] Home button not working on MIUI life 2.4.20 v4 (ST17i)
Hi!
Today I've flashed MIUI life 2.4.20 v4 on my Xperia Active (ST17i) but home button is not working.
Tried reflashing, clearing cache & data, but there's some problem with the Android Configuration Assistant because it locks home button.
Click to expand...
Click to collapse
1. Install a Root Explorer/Browser with which you can view and edit system files.
2. Navigate to:
system>usr>keylayout, and look for a file named as " cyttsp_key.kl "
3. Open it with a root text editor
(you need an editor with root permission for editing system files, mostly they come equipped along with the root browser)
4. Here you will find the list Capacitive touch buttons along with their functions listed
eg: for xperia active with 3 Capacitive touch buttons Back, Home, Menu it is something like this:
key 102 HOME VIRTUAL
key 139 MENU VIRTUAL
key 158 BACK VIRTUAL
5. So if your Home button is not working, you will notice the first line(key 102 HOME VIRTUAL) in missing. (102 is the button code, HOME is the function, & VIRTUAL I guess represents its a Touch Button)
6. Just add the line save the file & Restart your device, this should probably fix your problem.
Note:
1. The number the in each line after the "key" is a unique code for each button of your device, just google it to find the code & function of a particular button
2. If 1 of your hardware buttons are not working then repeat the same process with the file " pm8058-keypad.kl " in the same directory(system>usr>keylayout)
3. Make a backup of the file before you edit it.
4. You can disable a button by adding a "#" in front of the line that mentions its name/code.
eg: Change "key 139 MENU VIRTUAL" to "#key 139 MENU VIRTUAL"

Problem with home key

So far I can't post PM or message to developement board as new registered user, lets try to get answer to my problem this way
Problem and following ROM is related to Xperia GO
I downloaded, installed and started use ExtremeSecurity Stock Jelly Bean 6.2.A.1.100 European ROM http://forum.xda-developers.com/showthread.php?t=2328171. I did it as I need something to replace stock one with delays it have. I found one problem, I am unable to solve. After install and rooting I found I can't use the home key (the touch sense key under display - the one with "house"). I was trying to google and change mapping of this key and did not succeed. So I made some tests and did not move anywhere forward...
1) If I go to recovery, cwm allow me to display key numbers in some menu. Here key respond well it code as 102 (as it should)
2) If I add line like key 102 HOME WAKE to any file in /system/usr/keylayout nothing change (after editing I reboot, then put it back, so far I was not succesfull)
3) If I use any of "keypress test application" (try 3 of them) they report all keys well (back, settings, vol up/dwn power) but no report and no action for home.
There is no difference in press or long press of key. Simply no action follows.
Do you have any Idea what can be wrong?
Thanks a lot
Karel
P.S. If admins will forward it as message to munjeni or move to Developement part of forum for this ROM, please delete it here...

Fix for old headsets (earphones with one button) (non-Android dedicated) in Lollipop

Hi all,
i recently upgraded to Lollipop 5.0.2 (big mistake, I prefered KitKat, but I don't know how to downgrade).
One of the major problems for me was the fact that my headsets did not work with Headset Button Controller (or any other headset control app).
They worked just fine in Kit Kat.
I must mention that this headset earphones were from another Samsung phone (non-smartphone). But I am very satisfied with them and don't want to buy other ones.
( I also have Android-dedicated earphones, but they do not deliver the same quality (but they worked with Lollipop). I just don't want to use them)
Every time I pressed the button in order to stop/pause/volume control/answer phone, the mother****ing Google search would pop up.
I finally managed to fix this by re-mapping the keys on the keyboard layout, in order for HEADSETHOOK to be "perceived" instead of VOICE_ASSIST
First you need to root your phone (I used the King Root method, and then did a factory reset and installed SuperUser).
Then I installed SdCard fix, (which fixes the writing permissions on SD on KitKat and Lollipop) https://play.google.com/store/apps/details?id=nextapp.sdfix
After that I used the thread http://forum.xda-developers.com/nexus-4/general/guide-headset-controls-t1997277
From there I downloaded the Keytest App, and saw that my old headphones' clicks were perceived as key 582 VOICE_ASSIST instead of 226 HEADSETHOOK
The file you need to modify is in Root folder/system/usr/keylayout/Generic.kl
You will find many *.kl files there, but Generic.kl id the only one you need to modify
I sent it to my PC and modified it using WordPad.
What you need to do it find the the line for key 582 (towards the end of the file) and replace VOICE_ASSIST with HEADSETHOOK.
(Me personally I also replaced key 226 from HEADSETHOOK to VOICE_ASSIST, probably a bad decision )
Then you need to send it back to your phone and use a file explorer app to replace the one in your system.
I used Xplore (fell inlove with it since I had a Symbian Nokia). You need to give it superuser rights with write permission on read-only locations. ->Configuration -> Root access -> Superuser + mount writable (4th option). Now you can over-write the Generic.kl in /system/usr/keylayout/
After that I rebooted my phone and everything works fine.
On short presses Headset Button Controller kicks in and does what I need and on long press Google search pops up.
Hope it helps.
Delete

ALCATEL ONE TOUCH - Change Power button to Volume button

Hi all,
I really am no expert about anything to do with Android but I'm trying to change the power button to the volume button (power button is faulty). I was following this procedure that I found but I cannot locate this file:
Open root browser/ADB, go system/usr/keylayout. Look for file (like) mtk-kpd.kl The file name varies from device to device, but it normally ends with -kpd.kl/-keypad.kl.
I've got as far as the system/usr/keylayout file but there is nothing in there that looks like -kpd.kl/-keypad.kl
Anyone got any tips (or another way of doing this?). Advice much appreciated.

Categories

Resources