Unlock phone with optical joystick? - Droid Incredible General

After searching I discovered this thread:
h t t p: / /forum.xda-developers.com/showthread.php?t=703539
What would need to be done to port this to the Incredible? I'd really like to be able to unlock the phone with the optical joystick (without using a 3rd party app, they don't work consistently).
Thanks for any info.

i would also love this feature in a rom if possible

We had the same idea i just started a thread on the same subject i'll delete mine if i get an answer. I believe I can get this to work I just don't know where to locate the keypad file on the incredible.

The keypad.kl file or are you talking about something else? I tried modifying the keypad.kl file but that doesn't do it.

I was talking about the keypad file i'm trying to edit it also right now.

It won't work. I was able to edit the file and get the settings to stick but my understanding is that file is for physical keyboards. I read somewhere (can't remember where) that it would need to be a kernel update to enable this setting.

well i can verify that editing the keypad file doesn't work. this was my first attempt at editing a file myself i got really excited when I found that other post about remapping the keypad because i hate using the power button. it was fun trying

Did you guys push the file over when you were in your phone or in recovery, if you did it when you are in the phone, nothing will stick.

I did it in recovery, before we even had unrevoked2 tool. I did this: renamed the original file and used cat /sdcard/incrediblec-keypad.kl > /system/usr/keylayout/incrediblec-keypad.kl to create the edited file in the correct directory. The changes stick after a reboot but hitting the joystick doesn't wake the phone.
The joystick seems to be controlled by a kernel setting, not this file.

I'd love to be able to do this, because the front buttons are much more accessible than the power button.

My change definitely took because the power button wouldn't work after I edited the file so I had to revert back to original file.

Wouldn't it be possible to have the power button work normally but also assign the wake function to the optical button as well?

Yes but it would require a kernel setting change. I have no clue how to modify kernels.

Related

How unlock bad lock screen?

Use Nook with MIUI. Today apply new theme, and after reboot can't unlock, because control elements of new lock screen (button or else) out of screen.
Can i unlock nook? Via adb may be?
Butuzz said:
Use Nook with MIUI. Today apply new theme, and after reboot can't unlock, because control elements of new lock screen (button or else) out of screen.
Can i unlock nook? Via adb may be?
Click to expand...
Click to collapse
I'be had this problem on multiple occasions and the last time found the best solution. If you use a program like Android Commander on your computer and look through /data, there is a file somewhere called "lockscreen" with no file extension. I can't for the life of me remember the exact location. Anyways, if you rename that file, it'll default back to the system lockscreen. There might be a couple different "lockscreen" files. If one doesn't work, fix it and move on to the next. If I have the chance today ill find the exact location.
Sent from my HERO200 using XDA App
ajrty33 said:
I'be had this problem on multiple occasions and the last time found the best solution. If you use a program like Android Commander on your computer and look through /data, there is a file somewhere called "lockscreen" with no file extension. I can't for the life of me remember the exact location. Anyways, if you rename that file, it'll default back to the system lockscreen. There might be a couple different "lockscreen" files. If one doesn't work, fix it and move on to the next. If I have the chance today ill find the exact location.
Click to expand...
Click to collapse
Android Commander use adb for communicate with, but i don't see nook in list of adb devices. May be USB debugging switched off on my nook. ((

[Q] Compiling an ICS Keypad Fix?

So I've been flashing the newest Shift Deck ICS prebeta ROMs, and I've always had to flash a separate keypad fix (that I found on XDA) for the physical keyboard to correct some of the keys. No big deal. However, even with the keypad fix, there are still some keys that are wrong, very minor keys, but I'd like to change them just for my OCD's sake. I thought to myself, "why not just open up the keypad fix .zip file and take a look inside, maybe you can change them yourself!"
Subsequently, I found a "speedy-keypad.kcm" file that had exactly what I was looking for, all the keys mapped out with their base, shift, caps lock, and alt values that I could change. "Easy," I thought. I changed the values and zipped the folders back up. I tried to flash the new .zip from recovery, and the installation aborted. So, from what I understand, you can't just zip the folders up, you have to compile it somehow and probably sign the package, newb mistake.
I've done some Googling but I can't find an obvious solution. Does anyone have a guide on how to compile things like this for a tech savvy person who has never developed Android software? I have the Android SDK, for what its worth. I would post this in the Development subforum, but I've been a long-time lurker and don't have sufficient access yet.
tl;dr I want to compile my own physical keypad fix for the HTC Evo Shift 4G on Ice Cream Sandwich (via Shift Deck ICS PreBeta). How do I go about doing this?
Thank you!
TimeBomb006 said:
So I've been flashing the newest Shift Deck ICS prebeta ROMs, and I've always had to flash a separate keypad fix (that I found on XDA) for the physical keyboard to correct some of the keys. No big deal. However, even with the keypad fix, there are still some keys that are wrong, very minor keys, but I'd like to change them just for my OCD's sake. I thought to myself, "why not just open up the keypad fix .zip file and take a look inside, maybe you can change them yourself!"
Subsequently, I found a "speedy-keypad.kcm" file that had exactly what I was looking for, all the keys mapped out with their base, shift, caps lock, and alt values that I could change. "Easy," I thought. I changed the values and zipped the folders back up. I tried to flash the new .zip from recovery, and the installation aborted. So, from what I understand, you can't just zip the folders up, you have to compile it somehow and probably sign the package, newb mistake.
I've done some Googling but I can't find an obvious solution. Does anyone have a guide on how to compile things like this for a tech savvy person who has never developed Android software? I have the Android SDK, for what its worth. I would post this in the Development subforum, but I've been a long-time lurker and don't have sufficient access yet.
tl;dr I want to compile my own physical keypad fix for the HTC Evo Shift 4G on Ice Cream Sandwich (via Shift Deck ICS PreBeta). How do I go about doing this?
Thank you!
Click to expand...
Click to collapse
Easiest way to do this is simply pull the speedy-keypad.kcm file. Keep the original unmodified keypadfix.zip. Make your edits to the file and using 7zip open the original keypadfix.zip then overwrite the previous speedy-keypad.kcm (drag and drop). So basically just replace the old speedy-keypad.kcm with your modified one with the same name but use 7zip not winzip. Winzip by default incorrect compression in my experience.
Sent from my PG06100 using xda premium
Cool, I'll give that a try, although I probably should have mentioned I'm on OS X, so I just use the built-in compression utility. Follow-up to come!
EDIT: How would I associate '.com' with a key? I see some keys have Unicode characters attached to them, but I don't know how I'd get .com in there. The following code doesn't work, at least for me:
key PERIOD {
label, number: '.'
base: '.'
shift: '>'
ctrl, alt, meta: '.com'
}

Trying to change menu button to app switcher (Hyperdrive)q

I'm running the hyperdrive rom and would like to change the menu button to the recent apps button, and the longpress home to google now like S5. I found an xposed module that does this but only for the note 3. Anyone have a solution for this?
Jaydawgx7 said:
I'm running the hyperdrive rom and would like to change the menu button to the recent apps button, and the longpress home to google now like S5. I found an xposed module that does this but only for the note 3. Anyone have a solution for this?
Click to expand...
Click to collapse
I can change the menu key to recent apps but not sure about longpress home.
Using a root File Explorer open generic.kl in system/user/keylayout with a text editor.
Go to key 139 and replace 'MENU' with 'APP_SWITCH'. Reboot and you're done.
For google now it should just be a matter of finding the appropriate key.
marxses said:
I can change the menu key to recent apps but not sure about longpress home.
Using a root File Explorer open generic.kl in system/user/keylayout with a text editor.
Go to key 139 and replace 'MENU' with 'APP_SWITCH'. Reboot and you're done.
For google now it should just be a matter of finding the appropriate key.
Click to expand...
Click to collapse
Thanks for getting me in the right direction here. However, when I alter the generic.kl file at all, both capacitive buttons quit working after a reboot. I tried replacing the altered file with a backup i made, rebooted, and they still don't work. The only way to restore function of the buttons is to reflash the rom. Any idea as to why? This seemed like an easy change.... (also tried editing the file via notepad++ on the pc with the same result)
Jaydawgx7 said:
Thanks for getting me in the right direction here. However, when I alter the generic.kl file at all, both capacitive buttons quit working after a reboot. I tried replacing the altered file with a backup i made, rebooted, and they still don't work. The only way to restore function of the buttons is to reflash the rom. Any idea as to why? This seemed like an easy change.... (also tried editing the file via notepad++ on the pc with the same result)
Click to expand...
Click to collapse
What file explorer are you using? ES explorer?
After editing and especially if you're pasting in a back up you need to make sure the files permissions are set to rw-r--r--
I personally used the text editor from Rom Tool Box Lite . Make sure there aren't any extra spaces and there should be no # in front of the key.
I just remapped and put them back to normal a few times and I'm not having any problems.
Let me know how you get on.
marxses said:
What file explorer are you using? ES explorer?
After editing and especially if you're pasting in a back up you need to make sure the files permissions are set to rw-r--r--
I personally used the text editor from Rom Tool Box Lite . Make sure there aren't any extra spaces and there should be no # in front of the key.
I just remapped and put them back to normal a few times and I'm not having any problems.
Let me know how you get on.
Click to expand...
Click to collapse
Thanks! I was using ES file Explorer... I don't know what happened amongst text editors, but the rom tool box text editor did the trick... I appreciate your time and patience. Now it's time to figure out how to change long press home to Google now... Thanks again
Jaydawgx7 said:
Thanks! I was using ES file Explorer... I don't know what happened amongst text editors, but the rom tool box text editor did the trick... I appreciate your time and patience. Now it's time to figure out how to change long press home to Google now... Thanks again
Click to expand...
Click to collapse
All good, glad you got it sorted.
Another option is home2shortcut it uses double tap instead of long press, just tried it for kicks and it works really well, quite snappy

Help! Tried remapping my headphone button and now my power button doesn't work.

I'm on the stock rom and I tried following this guy but I'm too dumb to figure out how do anything passed installing a ROM. So instead of following that guy, I tried doing the Nexus 4 method in the link. I probably made a stupid mistake so that's on me. I copied the just the generic.kl file using ES File Explorer and pasted it into a folder outside the system files. I made another copy of the file and started editing one. I pasted the edited generic.kl file back into the root location and restarted my phone. Nothing happened except now my power button doesn't operate correctly. It doesn't wake or put my phone to sleep. What makes this worse is my Knock-On is sorta broken because I dropped my phone so I have to tap about 30~ times to get it to function once. I tried copying the backup I made back into the folder but it didn't change anything. What can I do that isn't a factory reset? Would a factory reset even work? I'm only rooted, no unlocked bootloader.

[GUIDE] [ROOT] How to make your headset buttons be recognized by the Operating System

This guide will show you how to make a custom keyboard layout file so your OS will correctly recognize your headset buttons. Other guides have focused on modifying the generic.kl file, but this guide will show you how to make the keyboard layout file specific for your headset device.
You will need to be rooted to use all of the tools and install the file.
For background information, please google "android keyboard layout file" The first hit should be an android developer page about keyboard layout files. (I'm not able to post links)
I'm using a Xiaomi Mi Max and a Xiaomi headset with three buttons, but the guide should work for any combination of phone or headset.
1. Download keytest.apk (you'll need to google it or look for it on github)
Open the app, plugin your headset and press the buttons. The most important information given is the scanCode. Write down the scanCode for each button.
These are the numbers I had:
Top Button = 257
Middle Button = 226
Bottom Button = 258​2. Download Kernal Adiutor from the play store.
Open Kernal Adiutor and go to the input tab. At the bottom of the list of input devices you should see something related to your sound card and hopefully see a Button Jack and Headset Jack.
I saw this device listed: msm8976-tashalite-snd-card Button Jack
Your device will probably have a different name.​3. Create the .kl file.
a. Naming of the file.
The naming of the file is very crucial and must be exactly as listed in the Kernal Adiutor. Mine was: msm8976-tashalite-snd-card_Button_Jack.kl
Spaces should be replaced with underscores and it does appear to be case sensitive.
b. Contents of the file.
The file only needs to have 3 lines:
Code:
key 257 MEDIA_PREVIOUS
key 226 HEADSETHOOK
key 258 MEDIA_NEXT
4. Install the file.
The file needs to be installed at /system/usr/keylayout using a root explorer. For example: ES Explorer, Total Commander. ​
5. Reboot
6. Download Jays Headset Control or Headset Button Controller or any of the other headset controller apps from the Play Store. The app will recognize the MEDIA_PREVIOUS and MEDIA_NEXT and you can give the button presses additional functions, even beyond the functions found in MiUI.
Edit: If you don't want to use a third party app, you can create the file so the top and bottom button control the volume directly.
Code:
key 257 VOLUME_UP
key 226 HEADSETHOOK
key 258 VOLUME_DOWN
scurrvy2020 said:
4. Install the file.
The file needs to be installed at /system/usr/keylayout using a root explorer. For example: ES Explorer, Total Commander. ​
Click to expand...
Click to collapse
and don't forget to check permissions on your .kl file they must be -rw-r--r-- and o root g root
Thank you so much! I searched for hours for a solution to my problem that my Xiaomi headset control buttons do not function properly on my Mi Max device running Lineage OS until I found this. This really rescued me out of great disappointment as I use the headset alot and Lineage OS is really nice that apart from the problem mentioned above that really upsets me . I don't know it is the OS or my headset that is the problem but it is fixed now. Btw the the second post about setting the permissions is crucial as well, I tried 2 times not realizing that I had to do that, and of course it didn't work. Thank you so much guys. I wish you a nice day! :good:
Hi.. I follow your steps but still I failed to recognize my headset button on my Mi Max running RR rom N.
And I would like to ask you about your 2nd post
"and don't forget to check permissions on your .kl file they must be -rw-r--r-- and o root g root"
Can you please explain this on an easy way. Thanks
enzy29 said:
Hi.. I follow your steps but still I failed to recognize my headset button on my Mi Max running RR rom N.
And I would like to ask you about your 2nd post
"and don't forget to check permissions on your .kl file they must be -rw-r--r-- and o root g root"
Can you please explain this on an easy way. Thanks
Click to expand...
Click to collapse
Ok i used for this ES File Explorer
i.imgur.com/3POnumx.png (can't post image now)
I'm Mi Max 2 user and tried to use this method on it. I tried with HavocOS 2.4 and HavocOS 2.9 unofficial. It doesn't work. Keytest recognizes vol up and down buttons when I press them (code for vol up and down is 114 and 115 respectively), but after creating file nothing happens. Permissions for file are correct. File created in Solid Explorer. What can be the solution? What I'm doing wrong?

Categories

Resources