[Q] Compiling an ICS Keypad Fix? - EVO Shift 4G General

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'
}

Related

Unlock phone with optical joystick?

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.

[Q] Swype with voice icon

Has anyone ported or got a version working on the vibrant. I have seen it on the droid x and on one of the newer HTC's
If you can get me the swype apk from one of those devices i can bring it over no problem at all i just havnt found a system dump for either but to be fair i havnt really been looking.
I have been looking but posting the file has been banned. I was hoping it was possibly included in the new froyo build or perhaps some of the newer European builds. I might be able to get a copy off a droid x or evo 4g if you can pull it with titanium backup, would I be able to just straight load it up with apploader?
Thanks for all your help I am just learning so will of course have lots of questions
adm1jtg said:
I have been looking but posting the file has been banned. I was hoping it was possibly included in the new froyo build or perhaps some of the newer European builds. I might be able to get a copy off a droid x or evo 4g if you can pull it with titanium backup, would I be able to just straight load it up with apploader?
Thanks for all your help I am just learning so will of course have lots of questions
Click to expand...
Click to collapse
Ahh that is right i forgot all about that lol, if you wanna hit me up on skype or anything pm me i'll give you my info i may have it on my profile.
anyone get this working?
th3fallen said:
If you can get me the swype apk from one of those devices i can bring it over no problem at all i just havnt found a system dump for either but to be fair i havnt really been looking.
Click to expand...
Click to collapse
Here you go
http://forum.androidcentral.com/sprint-epic-4g/29804-epic-4g-system-dump.html
This has the swype version with the voice button
Eazail70x7 said:
Here you go
http://forum.androidcentral.com/sprint-epic-4g/29804-epic-4g-system-dump.html
This has the swype version with the voice button
Click to expand...
Click to collapse
There's another thread about this, but it had a non-obvious title. I posted some stuff in there, but I'll repost here as people are more likely to find it.
Get the Swype.apk from the dump, no I can't post it here for you. The Swype company has asserted their copyright and XDA won't violate it.
Open a text field and change keyboards so Swype isn't active.
adb pull /system/app/Swype.apk Swype.backup
Don't install it, just copy it over the one on your phone. I used this:
adb push Swype.apk /system/app/
Root explorer, SUFBS, etc. can do it. Yes, you need root. Just do it, it's drop dead simple.
Now, switch back to Swype keyboard using the long-press on a text field. You have a voice button. The down side I found, was that the popup window with word choices is yellow with white text. Talk about hard to read. I'll attach a MetaMorph that fixes that.
Just download my Morph, then go to the Market and download the MetaMorph application. Launch Metamorph and let it do its checks. You should have a mostly empty screen with 2 buttons at the bottom. Select "Unzip/Extract new theme". Now use the file browser to find the file you downloaded. It's probably in /sdcard/download if you downloaded in the browser. Select the ZIP and it will tell you about the morph. Just hit "apply all" at the bottom and let it do it's thing. Now your Swype popup will look stock with the black background.
Weird, I'm running Vibrant6 and the epic swype does not work as outlined here. The kb opens, but the 2 lower left and 2 lower right buttons are blank. The kb doesn't respond to input either, showing the blue error outline around the kb.
Actually, when I reverted back to the stock swype, I had the same missing buttons and lack of functionality. I then installed the epic swype (by executing the apk), uninstalled it, and the old Swype started working again.
ttabbal said:
There's another thread about this, but it had a non-obvious title. I posted some stuff in there, but I'll repost here as people are more likely to find it.
Get the Swype.apk from the dump, no I can't post it here for you. The Swype company has asserted their copyright and XDA won't violate it.
Open a text field and change keyboards so Swype isn't active.
adb pull /system/app/Swype.apk Swype.backup
Don't install it, just copy it over the one on your phone. I used this:
adb push Swype.apk /system/app/
Root explorer, SUFBS, etc. can do it. Yes, you need root. Just do it, it's drop dead simple.
Now, switch back to Swype keyboard using the long-press on a text field. You have a voice button. The down side I found, was that the popup window with word choices is yellow with white text. Talk about hard to read. I'll attach a MetaMorph that fixes that.
Just download my Morph, then go to the Market and download the MetaMorph application. Launch Metamorph and let it do its checks. You should have a mostly empty screen with 2 buttons at the bottom. Select "Unzip/Extract new theme". Now use the file browser to find the file you downloaded. It's probably in /sdcard/download if you downloaded in the browser. Select the ZIP and it will tell you about the morph. Just hit "apply all" at the bottom and let it do it's thing. Now your Swype popup will look stock with the black background.
Click to expand...
Click to collapse
Where is that other thread located? Whats the title?
I am having the same problem as the previous poster that gets the keyboard, but no swype buttons, input, or typing ability. I attempted to overwrite the swype.apk with the epic swype.apk using Root Explorer. What do I need to do differently?
iamosborne said:
I am having the same problem as the previous poster that gets the keyboard, but no swype buttons, input, or typing ability. I attempted to overwrite the swype.apk with the epic swype.apk using Root Explorer. What do I need to do differently?
Click to expand...
Click to collapse
Add another to this list. Exactly the same. It wouldn't let me push the file back
Code:
C:\Users\TJHart85\Desktop\Vib_Phone\_REPLACEMENT_FILES>adb push Swype.apk /system/app/
failed to copy 'Swype.apk' to '/system/app//Swype.apk': Permission denied
C:\Users\TJHart85\Desktop\Vib_Phone\_REPLACEMENT_FILES>adb push Swype.apk /system/app
failed to copy 'Swype.apk' to '/system/app/Swype.apk': Permission denied
I then used Root Explorer to copy the new APK to /system/app/
I then got the same keyboard as others have that doesn't accept any input.
Putting the original file back didn't make it work again either, so I'm doing a nandroid restore back to a few hours ago (luckily I replaced a few system files earlier and had decided to make a nandroid just in case).
The only non-stock part of my phone is that I have SIM-unlocked it & applied the lagfix ...lagfix makes it take forever to restore too :-(
Restarting did not make a difference.
Eazail70x7 said:
Where is that other thread located? Whats the title?
Click to expand...
Click to collapse
Something like "why can't we do this"... Not sure why they used that.
Note that I am using the EVO swype, NOT the Epic one. And you have to REPLACE the existing Swype. DO NOT USE THE PACKAGE INSTALLER. You have to place it with adb or something like root explorer should work. It must OVERWRITE the existing one. Make a backup of your Swype so you can get back to it. There should be no reason to have to restore a Nandroid with this mod.
If adb push gives you a permission denied, you have the system mounted read-only or don't have root. Try the JAC kernel, that's what I'm using, and it worked fine. I don't know or care if it works with the stock kernel, the JAC is that much better.
Can you tell me which version of the EVO swype has the speech to text feature? I have a 1.56 apk, but i believe there are more recent versions.
I am using 1.57.32.7688 from evo and it works perfectly
Wow... I have just been through the whole process of adding this to my phone and I must say I have learned a lot! So I figured i'd share for anyone who might benefit:
The main reason it was so hard for me is because I am running eugene373's vibrant7 rom and in that rom swype is removed by default. This allows you to just install the swype file (swype-evo-tts.apk) using package installer without any troubles. *BUT* It makes the Swype_No_Yellow.zip not work. This is because when swype is installed stock it's in the system/app folder but when it's just installed as a regular app it's in a different folder(data/app).
Sooo I went and taught myself how to edit .apk files! Yay!
This thread was AMAZINGLY helpfull: forum.xda-developers.com/showthread.php?t=503007
So basically I followed the steps in that thread except I moved the files in Swype_No_Yellow.zip to the corresponding folder in swype-evo-tts.apk using 7-zip. Then I used the auto-signing tool and tada! I have swype tweaked perfectly for me!
[rant] It sure would be nice if I could just post up the file I created and save y'all the trouble. But I understand the forum rules. I just think everyone coming to this forum has vibrant and has payed for swype! We sure as heck can tweak it as we please, but why can't we upload those tweaks and share amongst ourselves?! The real question is why didn't swype just include a text to speech button on the vibrant?!?! [/rant] Oh wellz
Good luck!
Yes, the morph looks for it in /system/app as that's where I told people to install it.
You could have just modified the morph xml file to point to /data/app, but understanding apk files is very useful if you want to play with the phone at this level.
tt, I've been looking with no luck for the evo swype. Got a link?
ytj87 said:
tt, I've been looking with no luck for the evo swype. Got a link?
Click to expand...
Click to collapse
I don't, sorry. I downloaded it from an XDA thread before the mods caught it. I don't think we are even supposed to link from here. Irritating.
I'd host it myself, but I don't feel like joining Cyanogen in the C&D club.
This didn't work for me I tried to use Vibrant1.zip version of swype to revert back with root explorer and that didn't work so I had to do a nandroid restore, I wouldn't try this you would think it would just work but guess not.

Dvorak mod for LatinIME

I've modified the LatinIME kbd_qwerty.xml file to use the Dvorak keyboard layout.
It seems to work pretty well on my phone, a Nexus One running Cyanogenmod 6 Nightly 203.
I backed up the original LatinIME as LatinIME.orig incase anything went wrong, and then used adb to push this to /system/app (make it writable first).
I make no guarantee that this will work for anybody else, I just know it (mostly) works for me.
I would like to be able to create my own local with this layout xml file, but I couldn't figure out at all how to do that, so I just settled with modifying the kbd_qwerty.xml file. If anybody can explain how to create another input language or local, or show me a guide on how to do it, it would be much appreciated.
Installing this will remove the qwerty layout. It will also screw up your "input languages" option in your settings. In fact, if you go to that in the options, you won't be able to use the keyboard until you reboot.
So yes, it's very buggy, but this is the first time I've ever tried to do anything in Android, so it's the best I could do. Any help on making this a finished product would be much appreciated.
Screenshot here. Still playing with the top row, might add more symbols.
184.72.239.143/mu/4ac00b2c-3b48-86f5.jpg

[think tank] disable increasing ringer (link to intl ver working)

I saw this thread and it made me gain interest in this again. I know many do not like three ringtone volume increasing.
If this is possible on the international version, we should be able to do the same right?
http://forum.xda-developers.com/showthread.php?t=759537
This would be great i hate that volume increase in ringtones. Any dev plz port this for Vibrant.
The meat of it
The meat of what they are doing appears to be in >> THIS << post, which I will quote below. If any developer that knows what they are doing wants to attempt this for the Vibrant the quoted post should give them an quick idea of its feasibility. If it looks like it is doable there is more info in the original I9000 thread that is linked in the OP.
the_ozyrys said:
Hello,
I've just found a (not easy) way to disable increasing ring.
This involves using Apk Manager to backsmali Phone.apk,
which then have to be replaced by patched version, either by root access or creation of update.zip.
Procedure:
1. Get your Phone.apk (\system\app\Phone.apk) and copy it to computer.
2. Use Apk Manager to decompile it.
3. Open folder with Phone source (<Apk Manager folder>\projects\Phone.apk\smali\com\android\phone).
4. Open file Ringer$1.smali with your favourite text editor.
5. Find line that reads:
Code:
invoke-virtual {v1, v5, v4, v3}, Landroid/media/AudioManager;->setStreamVolume(III)V
6. Delete this line, save the file.
7. Compile Phone.apk, put it back to phone.
8. Enjoy constant-volume ringtones.
Side effects:
- currently not known
- if you have problem decompiling Phone.apk, >here< is the solution
Maybe somebody will make pre-patched packages, I'm currently using JM5
so I can only provide one for this firmware.
Click to expand...
Click to collapse
are you guys talking about when someone calls you and the ringtone is like quiet almost, and then goes super loud? if so, i want that too, its annoying as hell.
xriderx66 said:
are you guys talking about when someone calls you and the ringtone is like quiet almost, and then goes super loud? if so, i want that too, its annoying as hell.
Click to expand...
Click to collapse
Yes
4 5 6 7 8 9
I will work on this tomorrow after I get off work unless someone beats me to it. This ringer volume issue has been bothering me a lot with this phone.
That would be amazing man. It would have to be incorporated into every rom (as an option)!
This thread should be en dev section.
pretty sure that is where I posted this initially..... must have been a mod moving it.
OK so this fix rrequires that use the .apk's from a deodexed rom which I don't have on hand so I will down download a few and edit the .apk's. Gonna take a bit more time than previously thought but I will get it done soon.
YetisAreReal said:
OK so this fix rrequires that use the .apk's from a deodexed rom which I don't have on hand so I will down download a few and edit the .apk's. Gonna take a bit more time than previously thought but I will get it done soon.
Click to expand...
Click to collapse
Thank you for this. Please log your work. With a good writeup and good understanding of what is going on it would be nice to see devs put this in as a option on all the deodexed ROMs.
Some good news and some bad for now. I have successfully decompiled and recompile the APK as told but no luck so far in fixing the ringtone. Ran into a similar issue that the i9000 users were with each build being different. I am testing on JL4 first with other builds to follow once I am successful. In my Phone.apk I found two lines similar to the line mentioned in the OP for the i9000 but removing either one or both has has no effect for me so I am digging deeper and trying test builds. Java isn't exactly my thing so if anyone with java know how would like to look at the decompiled script I can forward it to them.
EDIT: added the file for peer review just remove the .txt and open with any text editor.
After reading this last night, seemed easy enough, I was determined to try this. Dl'd the apkmanager, extracted my phone.apk, and began playing. Apparently, this is listed in the About/Tips/Debug (menu selection 23) inside of apk manager, you cannot decompile themed apk's, which is exactly what i was trying to do with my Ginger Clone phone.apk. Oh well, back to the drawing board, or at least something with a stock phone.apk i can play around with. Anyone have one, unthemed, from froyo (preferrably jl4 as thats the basis for the current rom I'm running) they want to post?
Br1cK'd said:
After reading this last night, seemed easy enough, I was determined to try this. Dl'd the apkmanager, extracted my phone.apk, and began playing. Apparently, this is listed in the About/Tips/Debug (menu selection 23) inside of apk manager, you cannot decompile themed apk's, which is exactly what i was trying to do with my Ginger Clone phone.apk. Oh well, back to the drawing board, or at least something with a stock phone.apk i can play around with. Anyone have one, unthemed, from froyo (preferrably jl4 as thats the basis for the current rom I'm running) they want to post?
Click to expand...
Click to collapse
Here you go stock JL4 Phone.apk, please let me know if you get this working I had no luck.
YetisAreReal said:
Here you go stock JL4 Phone.apk, please let me know if you get this working I had no luck.
Click to expand...
Click to collapse
Thx! I'll be giving it a go in the morning when I get to my pc.
Ginger Clone's of the World Unite! Via the XDA App
Epic Fail. I successfully decompiled, edited, and recompiled the APK. The exact line in the script that was linked instructions from T313C0mun1s7 was removed, script file saved, apk recompiled properly, and pushed to the phone. Rebooted phone, the stock jl4 i just edited actually works and doesn't fc on Ginger Clone R2 Final, but the ascending ringtone is still there. I'll post the edited apk if anyone is interested, but it seems to not work. I see, more research in my near future.
Edited - spoke too soon, fc's on outbound calls. Gonna try again granted I have the time this morning, if not, I might have to wait until I get back in town after the holidays to play around with this.
Edit 2 - No more fc's on outbound calls with the newly edited phone.apk, but also, still having the ascending ringer. I removed both lines in the script that echoed the linked post on page 1, tried with removing one or the other first, then both, and still the ascending ringer persists through all attempts. Hrm.
I see you ran into the exact same problems I did using JL4 stock. I am on JL5 now so I am going to test a few things on this build now in the hopes I can fix this.
YetisAreReal said:
I see you ran into the exact same problems I did using JL4 stock. I am on JL5 now so I am going to test a few things on this build now in the hopes I can fix this.
Click to expand...
Click to collapse
First of all I have no idea what I am doing. Second I am not sure of all the issues you guys are having. I am just trying to think outside the box. I found this not sure if it applies or not.
apks can be re-edited a few different ways. The easiest example is by replacing the individual files within the apk by dragging and dropping the files in a program such as 7zip or winrar. In this manner the signature of the apk isnt broken. If you must unpack the apk file then when you pack it back up you must resign the app to have in install successfully. Do a google search for Stericson's apk sign application (its over on xda forums). I usually prefer the first way, but have also done the second method and it works as well.
yetis - yeah, same place you were getting stuck. let me know what your results are for the jl5 attempt. i tried with both the jl4 stock and ginger clone apk's this morning, all with the same results.
nomad - thx for the heads up, i am admittedly a novice in the android world, but have been in IT for years and am a self professed computer geek. With the apkmanager posted earlier in this thread, it will do all of the uncompiling and decompiling for you, as well as signing and a ton of other things written into the script, all based on user choices. it does warn about signing system apps after recompile, unless you want to resign all of the other system apps. Never had a problem with the installing of the modded phone.apk, just push it to the system/app folder and reboot, and the last one i did worked flawlessly without and fc's, but did not fix the problem of the ascending ringer.
Yetis, I was over reading through the thread on this in the i9000 forums, and I dug up some information that might help us here. I'm away from my pc so can't verify any of this right now.
-Make sure the rom is deodexed.
-Delete the line that matches what was posted earlier, I think it was the first one in that script, not the one way down at the bottom, leave that one be.
-When recompiling, set the compression in apk manager to 0 (not sure how to do that without the program in front of me)
When you go to push the file, put your phone in airplane mode first, push, then reboot.
Let me know if any of this helps, good luck.
Ginger Clone's of the World Unite! Via the XDA App

[MOD]Gingerbread KBD with your custom dictionary

First of all, do not get too excited, you will still need a binary dictionary file (main.dict) to implement in the keyboard.
If you do not know how to get this, I cannot help you as I am pretty sure all the ones I know off are copyrighted.
If you on the other hand know how to find one, it is dead easy implementing the dictionary file in this keyboard.
I used the Gingerbread keyboard from LeeDroid where the &amp symbol has been fixed (with thanks to -snq).
Using 7-Zip or WinRAR, navigate to /system/app and open LatinIME.apk (still in 7-Zip or WinRAR)
Navigate to res/raw and replace the main.dict with your custom one.
Close up and flash the zip in recovery after making nandroid and toggling verification.
Remember that I am not responsible for any damage you may encounter flashing edited apks!
I have only tested this with Danish, but it should in theory work with any language.
If anyone know of any binary dictionaries that are free to use, you are welcome to post them in this thread.
If you want to contribute making one yourself, then follow the guidelines from google code:
http://code.google.com/p/softkeyboard/wiki/BinaryDictionaries
You are very welcome to post them in this thread afterwards.
Just a quick thought:
Might it be possible to use the word databae from the Hunspell project (http://hunspell.sourceforge.net/)? They are opensource. We would have to think how to transfer the data to google's format. I am very bad in scripting, but I will spend some thoughts on this.
LK
For a dutch dictionary, check this post
http://forum.xda-developers.com/showpost.php?p=11454619&postcount=203
Further details
Hi. I am also looking for a danish spell-check (for CM7 on Legend)
What is the purpose in opening the file you have uploaded and navigate to the LatinIME.apk file? When I open it, it wants to install it.
Another noob question, where to find "res/raw" directory?
Thanks in advance.

Categories

Resources