yashsingh1/xdaforums huggingface dataset:
[Sprint HTC EVO 4G LTE] runandhide05:
ok so here is what you need to do to get the home key to long press recent apps, basically take the system UI and look at /res/layout/navigatin_bar.xml on line 13 and 26 which is the home key remove

systemui:keyRepeat="false"

and that will allow long press home to launch the recent apps,

now the hard part, since there is not deodex rom for your phone yet its not likely you can do this and be able to recompile the apk sence i have yet to see any apktool be able to recompile a odex apk successfully

hope that helps, and if you already knew all this... my bad.

also if you do figure out how to decomp and rebuild the apk you may want to either remove the line for the menu or just set the dip to 0 to remove it when the system calls for the menu now that u will have the recent key call the menu ( you will see the menu key at like 10 reffered to as @drawable/navigation_bar_item_bg

happy hacking buds

---------- Post added at 12:59 AM ---------- Previous post was at 12:57 AM ----------

unfortunately there is no way to have the keylayout call seprate key events for long/short press, its just one or the other.

you can find all the key events here

http://developer.android.com/reference/android/view/KeyEvent.html

edit: i have kitchen deodexing the rom now... we will see what ican get done for u guys

FYI i am working blind as i do not have this device

2nd Edit: the deodexing is throughing a bunch of errors, il work on this later...

also i dont see a stock system dump, any one want to do one for me, thanks
[Sprint HTC EVO 4G LTE] timothydonohue:
just throwing this in there...

1) directory is /system/usr/keylayout/

(notice it isnt user, it's usr. just a linux thing)

2) attached is the modified file. push to /sdcard2/ via adb, then copy over via a file explorer with root, or use whatever modification suits you best for getting it into the correct file location.

3) if you eff it up, here's the original as well. take the 'bak' part out before you copy or push or whatever you do to replace.

both of the files are .zip files. all you need to do is rename them to .kl. do not unzip them, they're not zipped, it's so i could attach them with what xda allows.

edit: thanks regnier for the footwork.
[Sprint HTC EVO 4G LTE] lordcyrus:
I wish I could do a bit more to help, but this is one of my favorite threads right now. Glad to see the hivemind is pretty unanimous on this.
[Sprint HTC EVO 4G LTE] Beherrschen:
How about long press multitask (which would now be menu) for search or voice search?
[Sprint HTC EVO 4G LTE] RegnierD:
Long presses require editing the android.policy.jar.

This means the file has to be deodexed and decompiled. I'm looking into proper deodexing as well. Tomorrow I'll be able to spend most of the day fixing this.
[Sprint HTC EVO 4G LTE] wvufan:
I don't have my phone yet (out for delivery now... yeah), but I'd be happy to assist with testing or dev. PM me if you need anything.
[Sprint HTC EVO 4G LTE] RegnierD:
Alright, I found the tools I need to properly decompile the two files, so now it's all about the build environment and whether or not I'll need to learn how to edit smali. Tomorrow's gonna have a pretty big learning curve for me. :o
[Sprint HTC EVO 4G LTE] runandhide05:
Care to share those tools?
[Sprint HTC EVO 4G LTE] timothydonohue:
Search. it's your friend. Here's one of a million threads

http://xdaforums.com/showthread.php?t=1612483&highlight=editing+smali
[Sprint HTC EVO 4G LTE] runandhide05:
Been there done that. Thought he had found a way to edit odex file since he mentioned the two files... jesus christ why is everyone on xda such assholes

Here I am not even owning this phone and trying to help u guys out sinse I've been doing all this stuff on the gnex sinse its release...

Don't want my help. Fine do it yourselves
[Sprint HTC EVO 4G LTE] RegnierD:
Yeah. I'm on my phone, so gimme a sec to find the links. I'm about to head to work, but when I'm done at 11pm (EST), it's go time. :)

I'll update this post with the links.
[Sprint HTC EVO 4G LTE] smw6180:
Ignore it. This phone seems to have brought out an inordinate number of morons. Hopefully it'll die down in a week or so.

Neither the Evo 3D forums nor the OG Evo forums were this bad.
[Sprint HTC EVO 4G LTE] OMJ:
editing smali is the easy part (Notepad++), knowing what to edit is the hard part, lol

nice project btw....I miss the menu button!
[Sprint HTC EVO 4G LTE] 94tbird:
dont let one ass turn you off man
[Sprint HTC EVO 4G LTE] timothydonohue:
I wasn't trying to be an asshole. I've been here long enough that I'm tired of seeing people that don't use the stupid search button . Sorry, buddy.
[Sprint HTC EVO 4G LTE] brennen.exe:
Awesome, that's the exact setup I'd prefer as well.
[Sprint HTC EVO 4G LTE] runandhide05:
I search everything before I ask, I've been here long too. Maybe u should not assume everyone is a noob... I know how to decompile apks... that was not the question. I had stated that I was having errors deodexing the apks. Had u read right above a few posted u would have seen that.

So let's put our **** swinging contest to the side and continue on.

Thanks for the apology. All is good bud.
[Sprint HTC EVO 4G LTE] arozer:
OP, you have no idea how much I appreciate this.

In the back of my head, I was wishing that this was possible.

WHY THE FUK WOULD htc EVEN DO THIS? >;[
[Sprint HTC EVO 4G LTE] timothydonohue:
NP. here's your deodexed ROM, from OMJ

http://forum.ppcgeeks.com/showthread.php?p=2178971
[Sprint HTC EVO 4G LTE] cguarino:
Just a friendly word of reminder: If you use the kl file provided by timothydonohue and decide to revert using the backup kl file provided, remember to check the permissions and modify as necessary, otherwise it won't work. :)

I feel very noob-ish right now. :rolleyes:
[Sprint HTC EVO 4G LTE] runandhide05:
Thanks

---------- Post added at 03:54 PM ---------- Previous post was at 03:20 PM ----------

ok before you do ANYTHING make a backup of your SystemUI.apk and SystemUI.odex

to test this this is what you need to do.

first restore your keylayout.

second BACKUP YOUR SYSTEMUI.APK AND SYSTEMUI.ODEX

then what you will be doing is pushing this setting perms and then rebooting

if all fails you NEED to have adb setup and the backup files in that location where adb is, becasue if it fails you will likely be greated with FC of the ui

and will/may be unable to simply move/rename your backups!!

if you are not sure what you are doing DO NOT TRY IT!!!

this file should get you the following

the recent key will act as menu, and the long press home will launch recent apps. and the onscreen menu should be no more.

REMEMBER to rename/remove both systemui.apk and the systemui.odex and place it will this single apk. fix permissions (see screen shot if you forget what the correct permissions are l) then reboot and cross your fingers.

REMEMBER i do not have this device, this file is UNTESTED!!!

use at your own risk

https://www.box.com/s/f1bd50d2e7e1e3433ee5
[Sprint HTC EVO 4G LTE] mrnamster:
I agree.

Will this mod free up that wasted 15%?
[Sprint HTC EVO 4G LTE] Meanee:
So, once Menu button is available via this edit, does the menu bar disappear?
[Sprint HTC EVO 4G LTE] Techrocket9:
As I understand it, enabling the menu button and removing the menu bar are two separate fixes, but the final version of this mod should do both.
[Sprint HTC EVO 4G LTE] mlin:
This would be ideal but I'd prefer to keep the on screen menu, its just faster than long pressing.
[Sprint HTC EVO 4G LTE] RegnierD:
http://xdaforums.com/showthread.php?t=1670648

^ One X deodexing.

I'm planning on reodexing when I'm done. I like it better that way.

I'll make several different versions with different mappings, so everyone can be happy. :)
[Sprint HTC EVO 4G LTE] bobarune:
I was unfortunately unable to get this to work. It boots up fine and there are no FCs but the status bar is gone. The buttons do not operate as you described. They work the same as before.
[Sprint HTC EVO 4G LTE] runandhide05:
OK thank you for testing, no status bar= systemui not running, so although u did not see a fc it did not start so there for couldn't crash... if that make sense, thank you again for testing

( fyi yo those that r working and using the one x apktool, this is what I use, so u may need to do a little tweeking to get it to work)
[Sprint HTC EVO 4G LTE] scottspa74:
When you tried the file, were the permissions set properly (rw-r-r). Or was that included in the instructions and I missed it? My apologies if you were already on top of that.

Big thanks to everyone working on this. Can't wait for BB to real ease my Evo.

Edit: NVM Sorry, I just saw it mentioned in instructions. Huge thanks to all, though.

sent from 2yr old Evo on ICS
[Sprint HTC EVO 4G LTE] Adebayo88:
Quick question....when this its all said and done, will the menu button re-map also get rid of the 3-dot menu bar at the bottom of every app?
[Sprint HTC EVO 4G LTE] Spyderekz:
that's the plan
[Sprint HTC EVO 4G LTE] RegnierD:
Alright, ladies and gents. The real work begins now! I'll keep you guys updated as I make progress!
[Sprint HTC EVO 4G LTE] ticklemepinks:
thanks im lurking but im sooo excited for this!
[Sprint HTC EVO 4G LTE] BrianBaker:
soo ready for this..possible resent apps back to home long press and menu button back to the 3rd button...And I can not wait for those stupid 3 dots to come off of my screen..every game I have loads those stupid 3 bots on the right..

I am ready to support this developer when i see those 3 dots gone..Im also waiting to root until then..Good luck sir and can't wait to see what you do with this.
[Sprint HTC EVO 4G LTE] Andrell:
Seconded!

These were my thoughts exactly :D

Honestly, I am here checking this thread because I am very close to returning this device due to its softkey handicap.

Thanks OP! I'm glad that someone is working on ungimping this device! There's really no need to have all this great hardware if (1) accessing the necessary features is terribly inconvenient (thus eliminating any efficiency resulting from the new hardware), and (2) the usable screen area is smaller than my OG Evo when that menu button shows up! I can't believe Android/HTC F'ed up the software this badly! WTH are these people thinking!?:confused:
[Sprint HTC EVO 4G LTE] RegnierD:
I had to reconfigure my build environment. Mint 12 wasn't playing nice with the modded apktool, so I had to set up a fresh Ubuntu partition. I got everything to decompile, but am having recompile issues, so once I get those ironed out hopefully we'll be home free!
[Sprint HTC EVO 4G LTE] runandhide05:
That was the same problem I had, the apktool for the one x thru a few errors at me on rebuild as well . Good luck bud
[Sprint HTC EVO 4G LTE] BrianBaker:
possibly a weekend treat? im pumped for this..3 dots suck
[Sprint HTC EVO 4G LTE] RegnierD:
Believe me, I want this just as bad as you guys do, lol. This is a good learning experience though, and kind of fun, like Russian Roulette, but much less dangerous. You never know what to expect! Hahaha
[Sprint HTC EVO 4G LTE] wlpywd:
does ICS have a 'search' option? i'm ok with the 3-dot button if i could turn that multi-tasking button into:

search button = short press

voice search = long press

....actually, my dream would be:

1. no menu 3-dot soft button.

2. multitasking button =

short press = menu

long press = search

3. short press of camera button = voice search button

long press of camera button = default, open camera app

--
[Sprint HTC EVO 4G LTE] BrianBaker:
like posted earlier,i think this will be the norm once up and running.

Back: short = Back, long = kill current app (like Cyanogen)

Home: short = Home, long = recent apps

Multitasking: short = Menu, long = voice search (like long press search on EVO 4G)
[Sprint HTC EVO 4G LTE] wlpywd:
i saw that, your post was the one that got me to post my wish, as most of you seem to have no love for the search button.

and that camera button short-press would be awesome for voice search instead of the long press multi-task button, IMHO.

---

seriously though, three buttons instead of 4? and i know those 3 are a gift, ics wants no hardware buttons, well bully that.
[Sprint HTC EVO 4G LTE] JT114881:
Exactly what I had in mind. Excellent. This is how HTC should of made it behave in the first place...
[Sprint HTC EVO 4G LTE] RegnierD:
Camera mappings are not able to be doubled up. The .kl files.don't differentiate between the two levels unless you're in the camera app (I'm pretty sure this is the case from looking through them), which leads me to believe the camera app has some sort of enhanced button recognition. If someone who knew a hell of a lot more than I do could code it into the system, it would work.

Long press back for kill is unlikely as well. I'm pretty sure the OS has to support it. Once I get the initial release out, I'll contact ihtfp69 and see if it's not too hard to add in. But, if you're really that concerned about apps sleeping in your RAM, which is what they're supposed to do rather than being unpacked every time they're used, just use the Multitasking menu to swipe the apps up and kill them like that. It's way faster now that we can kill apps with the Multitasking menu a la ICS.

Once I'm done with the version I'm going to use, I'll make more for others. The hard part is just figuring out the long presses and recompiling.
[Sprint HTC EVO 4G LTE] BrianBaker:
I Appreciate your hard work sir...all i truly care about is getting the 3 dots off my screen lol..have you achieved that yet?
[Sprint HTC EVO 4G LTE] RegnierD:
I've tracked down the value in SystemUI to eliminate the software buttons, but I can't get the apk to recompile. That's all that's holding me back, but I don't know how to tweak apktool, so I'm SOL until one of the One X devs I've reached out to answers my pm.
[Sprint HTC EVO 4G LTE] wlpywd:
there are actually 3 camera button presses.

a 'soft press,' a 'hard press' or full down press, and a 'long press'

i think you are saying the file won't differentiate between the 'soft press' and 'hard press' except within the camera app. This makes sense to me if this is what you are talking about. the 'soft press' does like a focus, and the 'hard press' takes the pic. I don't want to change or differentiate these two, except in the camera app of course.

but the function of a 'hard press' any other time out of the camera app can be mapped, right? this is the one i'm talking about for voice search.

the 'long press' of the camera button is what opens up the camera directly, and i think this shouldn't be changed.

please clarify you meant no way between 'soft press' and 'hard press' right, and not between 'short press' and 'long press' which should be the same as the other captive buttons... no?
[Sprint HTC EVO 4G LTE] BrianBaker:
I hope one of them can help you..Just do your best man and good luck.
[Sprint HTC EVO 4G LTE] xHausx:
what kind of error message are you getting? I just had to go through all that with htc's ics framework a couple of weeks ago
[Sprint HTC EVO 4G LTE] SteelH:
Care to document and share your findings?
[Sprint HTC EVO 4G LTE] runandhide05:
Look a few pages back I stated the changes needed
[Sprint HTC EVO 4G LTE] SteelH:
Found it thanks. FYI, the EVO LTE rom has been deodexed already. So doing mods to systemui is easy.
[Sprint HTC EVO 4G LTE] runandhide05:
I know that it has, the post I was reffering to was on page three basically under Res/layout/navigation then look at the lines for the home key and remove the system false true and that will enable the long press home.

Then change the menu dip to 0.0dip and that will remove the menu from poping up.

The problem I and apparently the OP have is that the apktool used throws a bunch of errors when recompiling the apk. Hope that helps

havent had much of a chance to play with this but it will decompile the apktool.jar so that i can be adjusted for this device

http://java.decompiler.free.fr/?q=jdgui

dont have anyway to test this, but if someone want to test i may have it working...

if anyone wants

pulled (currently the only file in it)

all i need tested is that it loads and works as stock ( ie. no changes, simply de and re built)
[Sprint HTC EVO 4G LTE] SteelH:
Decompiling/recompiling ICS apks is well documented on XDA already. Look in the One X forum if you are still having errors.
[Sprint HTC EVO 4G LTE] runandhide05:
I have and that's where I got the apktool from, never had problems, however I never had and don't plan of having any HTCs, I was just trying to help out... just reminds me how much I love aosp and having source for everything
[Sprint HTC EVO 4G LTE] RegnierD:
Gahhhhhh... this is so frustrating. My Ubu terminal won't accept some of the commands through apktool. I'm gonna give it a shot in Winblows.

toddrick@Ubi:~/sdk/apktool$ ./apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL6421459638993419441.tmp, -I, /home/toddrick/apktool/framework/1.apk, -I, /home/toddrick/apktool/framework/2.apk, -S, /home/toddrick/sdk/apktool/SystemUI/res, -M, /home/toddrick/sdk/apktool/SystemUI/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL6421459638993419441.tmp, -I, /home/toddrick/apktool/framework/1.apk, -I, /home/toddrick/apktool/framework/2.apk, -S, /home/toddrick/sdk/apktool/SystemUI/res, -M, /home/toddrick/sdk/apktool/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
at java.lang.Runtime.exec(Runtime.java:610)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
... 10 more

I've gotten the System UI to decompile no prob, so clooooooooooose. Ugh

Edit: I've reached out to Fernando Sor from the Bad Seed guys (he's the one that modified apktool for the One X) to see if he can push me in the right direction, but if anyone else knows anything about these errors, please chime in! There's only one way to learn! ;)
[Sprint HTC EVO 4G LTE] RegnierD:
Yup, I'm using his modified apktool. The flag errors are normal, as is the smaller file, as apktool compresses on rebuild.

All I need to know is what I need to do to get the apk to recompile, I think. Everything else seems to be working right. I'm setting up his apktool in Win7 to see if that changes anything.
[Sprint HTC EVO 4G LTE] runandhide05:
well then i would say, a) want to test what i have? and b) here is what im using on win7 and c) i could not get ubuntu term to compile however i have win7 working(ish)

heres my apktool files

https://www.box.com/s/190dc94df970c37baf66

heres the systemui ( de then re built) if u want to test it

https://www.box.com/s/a48b8dc8ec70bd3e4d71
[Sprint HTC EVO 4G LTE] RegnierD:
Now that we have a recovery and stock Rom to flash, I'll give it a go.

Thanks for the hand, not owning the device and all. Helpful lurkers are helpful. :)

Tapatalked from my shiny new HTC Evo LTE
[Sprint HTC EVO 4G LTE] runandhide05:
hey no problem, do i need to put it in a zip for u? so u can flash it easier? ( keep in mind i see the mnt locaktions in the one rom thats out there, but he says its not tested so no garenty the mounting points are correct?

and by the time i finished typing this is uploaded so if u want to test and see if this will even flash properly ( only thing in it is the apk and a test.txt to verify it pushed to correct locations) should be a file test.txt file in /data and one in /system/app just to verify then u can just delete them

heres the zip

https://www.box.com/s/9ff673a534295a88efe1

PEOPLE how are not 100% on how to undo badness stay away

(standard disclaimer)

[/end lurching] for now
[Sprint HTC EVO 4G LTE] RegnierD:
I was just gonna ADB them into place and check perms with RE.

Here is a stock deodexed rom for us, linkity.
[Sprint HTC EVO 4G LTE] runandhide05:
OK let me know the outcome
[Sprint HTC EVO 4G LTE] RegnierD:
Nope. It didn't work. I finally got Win7 to build an apk after specifying a directory (big duh on my part), but mine didn't work either. Gotta figure out what to do next. :/
[Sprint HTC EVO 4G LTE] runandhide05:
Hmm......
[Sprint HTC EVO 4G LTE] runandhide05:
Just spit ballen here.. but in the past some deodexed roms have been hastily made, may I suggest u start from scratch and do a system dump deodex it yourself and try from there.

It is possible that when the apk was deodexed there were errors that were over looked.

Again just throwing out ideas
[Sprint HTC EVO 4G LTE] RegnierD:
I'll give it a shot. I think I ended up borking things last time I tried to deodex, but maybe it'll play nice this time.
[Sprint HTC EVO 4G LTE] runandhide05:
dont take offence to this question, becasue in all honesty in a rush ive done it too but did u remember to remove/rename the odex file before rebooting?

lastly we could try to it on a odexed apk, here is the odexed apk de then re built. remember to restore the odex file from and give this a whirl

https://www.box.com/s/283bff19d1bdfdeb06e3
[Sprint HTC EVO 4G LTE] RegnierD:
Yup, I did. I'll give that a try in a moment. I just set up viperboy's stock deodexed rom from scratch on my phone. He just released it a little while ago, and everything is working there, so if that doesn't work, I'll restore my stock backup and try this.

Thanks!
[Sprint HTC EVO 4G LTE] runandhide05:
OK, keep me updated.

ok keep in mind i am no expert with editing a jar file, but i have/am messing with the apktool.jar from the onex and ive got too more to test if anyone is interested

there is one with dependencies and one without, heres if the folder you will see the two one without is in the root of the folder and the one with is in another folder labeled accordingly

wipe cache and dvlk after u push reboot straight to recovery wipe then reboot

https://www.box.com/s/5c7d0b0eb9302d923a64
[Sprint HTC EVO 4G LTE] RegnierD:
Okay, small update. I've noticed that the menu button is gone when I push my SystemUI. This may or may not be because the apk is not functioning at all, because the statusbar does not appear either. Luckily for us, Mik is on board because the Quick Settings mod is doing the same thing. I, personally (which really shouldn't mean much, because I don't know a whole lot), think that its just the way apktool recompiled SystemUI. When you recompile framework-res.apk, several of the xml files get their pointers reversed. Check through Fernando Sor's OP in his thread on the One X apktool. His code blocks in the OP will explain better than I can.

http://xdaforums.com/showthread.php?t=1601511

Edit: Nope, it's not apktool. Aamikam just fixed his SysUI Quick Settings mod, so there's something I'm doing wrong. When he has time, I'll see if I can bug him enough to where he can help out. ;)