PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Android On TP2 (http://forum.ppcgeeks.com/forumdisplay.php?f=179)
-   -   Patch that enables home button support in XDAndroid (http://forum.ppcgeeks.com/showthread.php?t=136169)

manekineko 10-28-2010 11:29 PM

Patch that enables home button support in XDAndroid
 
Update:
For now at least, the best patch to use to enable home button support is the one made by F22 on XDA that maps End to Home.
For more info see this post:
http://forum.ppcgeeks.com/showthread...60#post2007660

Old Info:

This is an alternative kernel and rootfs branch from the 11/3 kernel and rootfs that enables the power button to register in Android as the home button.

Using the stock version, even if the end button is mapped to act as home in the Spare Parts program, it will still not work for long press (which in Android brings up a recently used program list for multitasking convenience) and for programs that use the home button to do stuff (such as alternative launchers like Launcher Pro and ADWLauncher).

It is intended that whenever significant progress is made to the kernel/rootfs, that an updated version of this patch will be released.

Last update: 11/9 Available attached to this post
Changes:
Fixed wifi

Instructions for installing:
The patch includes 3 files.
Rename zImage-XYZ to simply 'zImage' and copy it over your old zImage in andboot.
Rename rootfs-XYZ to just 'rootfs.img' and copy it to your andboot folder over your old rootfs.img.
Copy modules-XYZ as is to your andboot folder, and you can delete your old modules file that was already there. Do not rename this file!

natemcnutty 10-28-2010 11:54 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by manekineko (Post 1983536)
I was wondering if any kindly dev could share some advice on what modifications would be necessary in order to create a fork that re-enables the home button as the top button?

I'm (one of the few?) that is using Android on my TP2 full-time as my primary phone, and I really find myself missing the ability to multi-task using the home button, as well as to see home screen previews in ADW launcher.

If it's feasible only to make changes to the infrequently modified zImage file, such that it's not something I have to deal with often, I'm mulling over forking and maintaining a version that works the original way that maximizes functionality.

Unfortunately, zImage is the one that is most updated. I think you meant rootfs which only handles injecting the keyboard drivers. I am fairly certain the rest of the control is still handled on the kernel side of things.

As far as I can tell, it looks like it was just this commit that changed it: Commit in linux-msm in Linux on Qualcomm's MSM - Gitorious

You could try cloning the linux-msm git, revert those changes, and compile your own zImage. You can follow my guide to build your environment (just note you only need to clone prebuilt and linux-msm): http://forum.ppcgeeks.com/tp2-androi...beginners.html

Once you have got to the point where you cloned it and everything is downloaded, use this command:
Code:

git revert --no-commit 6c41ca69
Whenever you want to update, just use git-pull. If you see that msm-gpio-keys.c gets updated during git-pull, you may need to check and see what has changed since you are no longer up-to-date on that file.

manekineko 10-29-2010 01:07 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by natemcnutty (Post 1983554)
Unfortunately, zImage is the one that is most updated. I think you meant rootfs which only handles injecting the keyboard drivers. I am fairly certain the rest of the control is still handled on the kernel side of things.

As far as I can tell, it looks like it was just this commit that changed it: Commit in linux-msm in Linux on Qualcomm's MSM - Gitorious

You could try cloning the linux-msm git, revert those changes, and compile your own zImage. You can follow my guide to build your environment (just note you only need to clone prebuilt and linux-msm): http://forum.ppcgeeks.com/tp2-androi...beginners.html

Once you have got to the point where you cloned it and everything is downloaded, use this command:
Code:

git-revert --no-commit 72dd73e
Whenever you want to update, just use git-pull. If you see that msm-gpio-keys.c gets updated during git-pull, you may need to check and see what has changed since you are no longer up-to-date on that file.

You're right, I did mistype and meant the rootfs. I don't think I'm really up to keeping a kernel branch up to date.

Around when they changed the kernel, Stine also made this commit to rootfs:
commit 0ede780
Author: Bryan Stine
Date: Wed Oct 20 17:24:35 2010 -0400
Update rhod keymaps for new power button scancode

Is it possible to do something in keymaps to alter the effect of the power button scancode?

natemcnutty 10-29-2010 02:11 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by manekineko (Post 1983585)
You're right, I did mistype and meant the rootfs. I don't think I'm really up to keeping a kernel branch up to date.

Around when they changed the kernel, Stine also made this commit to rootfs:
commit 0ede780
Author: Bryan Stine
Date: Wed Oct 20 17:24:35 2010 -0400
Update rhod keymaps for new power button scancode

Is it possible to do something in keymaps to alter the effect of the power button scancode?

I'd have to test and see if the rootfs change is also required, but I do know that reverting the kernel change is required. Using an older rootfs will not fix the kernel change.

arrrghhh 10-29-2010 10:35 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
I'm thinking about taking this up with Mr. Stine. It's kinda wacky since our physical buttons wouldn't match, but in Android I think this makes the most sense...

End Call Button = HOME - including long press for HOME
Power Button = END CALL then POWER

Everything else can be left the same. Mute Button = SEARCH would be cool too, but only until we get the speakerphone sorted out :p

Unfortunately there is no one good solution that's going to make everybody happy - because the phone was designed for WinMo, and not all RHODs have the same keys. AT&T RHODs have a PTT key, and evidently not all RHODs have the mute button... So whatever we end up doing, someone will dislike it. However, it seems more logical to use what native Android devices use in Android, rather than what we're used to in WinMo. It'll all be a lot easier/clearer methinks when we reach the Vogue level - and the development is at a point where haret is no more :D

butler360 11-01-2010 09:58 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Hope this gets going!

--WARNING, MY OPINION FOLLOWS, FLAME SHIELD ACTIVATED--

Honestly, if a user is capable enough to unlock their TP2, flash a custom ROM, and install and configure Android, aren't they smart enough to figure out the mapping of the home and power buttons?

--FLAME SHIELD DEACTIVATED--

arrrghhh 11-01-2010 10:23 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by butler360 (Post 1985921)
Honestly, if a user is capable enough to unlock their TP2, flash a custom ROM, and install and configure Android, aren't they smart enough to figure out the mapping of the home and power buttons?

Do you mean like having a userland option to flip between button maps? Cuz that's never going to happen.

I know you put it around your flame shield, I'm not trying to flame. It's just that I didn't get what you mean - because changing the button mapping by hand isn't so straightforward as you can see. In addition, adding a userland option is going to require changing the Android base, which isn't going to happen.

Again, not meant to flame you in any way.

I really do wish there was a 'best' option here. But all the options suck - because either the buttons match and we lose functionality, or they don't match whatsoever and have all the functionality back...

So I'm still holding out & hoping for the zoombar to be used. Then we'd have a few more buttons at our disposal.

butler360 11-01-2010 10:28 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Haha, no, I don't see any flaming going on in your message.

What I mean is having the buttons the way they were before as the default. The way in which we get the recent programs list. And my point is that given how far a user has to go to even get into Android in the first place, having two buttons be a little different in Android shouldn't be that confusing/hard to figure out for them.

arrrghhh 11-01-2010 10:35 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Oh trust me, I feel your pain. But unfortunately they have err'd on the side of user-friendliness over functionality. Which is where most things have to err nowadays, unless you're Cisco :p

josidhe 11-02-2010 12:11 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
I would argue they aren't even erring on the side of user-friendliness, since so many users are so opposed to the loss of functionality, which is only justified by a handful of people who think the feature is pointless.

This is a loss of functionality as well as a reduction in user-friendliness. The simple fact is that Rhodium phones have redundant buttons. Recasting one of them confuses nobody.

Heck, arguments could be made that power and recent programs go hand in hand. Just look at desktop PCs and Ctrl-Alt-Delete. A well-established key combo that was originally a soft reset, but evolved in some instances to provide access to the Task Manager. If desktop Windows already established, natively, a connection between running programs and power control, then this very loose argument of mine can do the same, and you can classify the backlight key as Home.

manekineko 11-02-2010 02:01 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by natemcnutty (Post 1983604)
I'd have to test and see if the rootfs change is also required, but I do know that reverting the kernel change is required. Using an older rootfs will not fix the kernel change.

Ouch. Oh well, so much for that. I can't maintain an entire kernel branch.

Any idea what the rootfs change was for if the kernel change on its own was the only necessary and sufficient condition to changing the keymapping?

Is there any way that the kernel could be altered to push the way the power button is handled into the rootfs the same as keyboard keys?

Want2ride 11-02-2010 10:53 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by josidhe (Post 1986001)
I would argue they aren't even erring on the side of user-friendliness, since so many users are so opposed to the loss of functionality, which is only justified by a handful of people who think the feature is pointless.

This is a loss of functionality as well as a reduction in user-friendliness. The simple fact is that Rhodium phones have redundant buttons. Recasting one of them confuses nobody.

QFT!!!

I just want to mutil task! Unless I am missing something the only way to do that is back ALL the way to the home screen(which can be MANY key presses)

Losing this feature has made me go back to using Windows as without the ability to multi-task I feel like I'm using a I-phone :( Which I am very ashamed to say, as I was just bragging about how much better the TP2 w/android on it is...

If no one can hint on a way to multi-task I guess I will have to revert back...

EDIT- I did just find that I can remap the home key to end key, which helps, but only a little bit. From what I've seen there is no way(easy) to remap the long-press, please correct me if I'm wrong

arrrghhh 11-02-2010 11:32 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
There is no way to remap long press without hacking the rootfs and the kernel.

Just keep your phone back if it's really that big of a deal!!!!!

There, hopefully that settles it.

fishingmedic 11-02-2010 03:42 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
I think I found a way to do it!!! I'm gonna sign up for C and C++ classes and learn the role of developer, and then in my spare time work on a labor of love and get the freaking button fixed for everyone!!! I should be ready in a few years.... Honestly, if it's that much of a PITA for people, do something usefull and learn to code and do it yourself. I would personally love to have the functionality back, but the fact remains that no pissing and moaning by anyone is gonna change it, unless the developers want it done, and it appears they don't, so let it go. If you want full functionality, go get an Evo, Epic, D2, Incredible, etc, there are plenty out there to choose from. I can't at this point get a full droid and I still love my TP2 so I'm happy with whatever the developers come out with. If I don't like it, no one is forcing me to use it. Does the change make me smile and feel all warm and fuzzy inside, not really, but am I gonna piss and moan on a forum about it, while basically telling the developers who give up their free time to do this for nothing that they screwed up the port??? Not a chance in hell. Honestly if it was me doing the developing, I'd say the hell with it, don't want it, I'll keep the files to myself. The phone was made w/ WM on it. Because of guys like these developers, we're able to not only flash the phones to different ROMs, different radios, put different OS's on them, do all sorts of crap to make them just the way we want it. How bout a little respect for them and for all they've done for us so far. If they gave up on the project tomorrow, I'd still show them some thanks and appreciation for what they've given us to date!

natemcnutty 11-02-2010 05:09 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by fishingmedic (Post 1986429)
I think I found a way to do it!!! I'm gonna sign up for C and C++ classes and learn the role of developer, and then in my spare time work on a labor of love and get the freaking button fixed for everyone!!! I should be ready in a few years.... Honestly, if it's that much of a PITA for people, do something usefull and learn to code and do it yourself. I would personally love to have the functionality back, but the fact remains that no pissing and moaning by anyone is gonna change it, unless the developers want it done, and it appears they don't, so let it go. If you want full functionality, go get an Evo, Epic, D2, Incredible, etc, there are plenty out there to choose from. I can't at this point get a full droid and I still love my TP2 so I'm happy with whatever the developers come out with. If I don't like it, no one is forcing me to use it. Does the change make me smile and feel all warm and fuzzy inside, not really, but am I gonna piss and moan on a forum about it, while basically telling the developers who give up their free time to do this for nothing that they screwed up the port??? Not a chance in hell. Honestly if it was me doing the developing, I'd say the hell with it, don't want it, I'll keep the files to myself. The phone was made w/ WM on it. Because of guys like these developers, we're able to not only flash the phones to different ROMs, different radios, put different OS's on them, do all sorts of crap to make them just the way we want it. How bout a little respect for them and for all they've done for us so far. If they gave up on the project tomorrow, I'd still show them some thanks and appreciation for what they've given us to date!

Fortunately, you don't really have to learn any programming to revert the change thanks to the magic of git. As I promised, I am working on creating the kernel exactly as it is for the main thread with just the button mapping reverted.

Since I am on NAND at the moment, I have no way to test this. I will be posting a zImage/modules here in about an hour when I get back from my meeting (unless it runs short or long).

arrrghhh 11-02-2010 05:22 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by natemcnutty (Post 1986493)
Fortunately, you don't really have to learn any programming to revert the change thanks to the magic of git. As I promised, I am working on creating the kernel exactly as it is for the main thread with just the button mapping reverted.

Since I am on NAND at the moment, I have no way to test this. I will be posting a zImage/modules here in about an hour when I get back from my meeting (unless it runs short or long).

Indeed. What I'm curious about is going forward. How difficult is it going to be to maintain two trees? I guess since the changes are simple/trivial, it won't be too difficult...

Perhaps git is smart enough to pull a commit each time there's an update. I'll let you work that magic nate ;) Thanks again bro.

fishingmedic 11-02-2010 05:53 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by natemcnutty (Post 1986493)
Fortunately, you don't really have to learn any programming to revert the change thanks to the magic of git. As I promised, I am working on creating the kernel exactly as it is for the main thread with just the button mapping reverted.

Since I am on NAND at the moment, I have no way to test this. I will be posting a zImage/modules here in about an hour when I get back from my meeting (unless it runs short or long).

That sounds like a plan, I just wonder if I can get a refund on my programming classes I signed up for, lol. I appreciate you taking the time to do this stuff, as although you may seem to think it's a piece of cake, I for one don't, and truly appreciate all that you and the others are doing. I can perform some surgical type procedures out in the field to save lives, but I'd be better off building a rocketship to go to mars than to try to do what you guys are doing!

natemcnutty 11-02-2010 06:27 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by arrrghhh (Post 1986503)
Indeed. What I'm curious about is going forward. How difficult is it going to be to maintain two trees? I guess since the changes are simple/trivial, it won't be too difficult...

Perhaps git is smart enough to pull a commit each time there's an update. I'll let you work that magic nate ;) Thanks again bro.

OK, anyone want to test out this and let me know. Edit: Didn't work. Trying something else :(

arrrghhh 11-02-2010 06:38 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by natemcnutty (Post 1986547)
OK, anyone want to test out this and let me know: http://dl.dropbox.com/u/11790134/test1.zip

Doesn't work for me... POWER is still POWER...

Redoin the steps, make sure I didn't screw anything up.

viperlox 11-02-2010 06:39 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Tested with rhod400 on neopeek vaniljeclair. The buttons act as they did before, both power and hangup buttons put the phone to sleep. Long press on both bring up the shutdown menu as well. I can install and retest on xdandroid if it makes a difference. I wanna say thanks for giving this a shot, it has bothered me to since the change lol

fishingmedic 11-02-2010 06:51 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Tested on rhod400, no change.

natemcnutty 11-02-2010 06:56 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Damn, was hoping to get away with not having to do the rootfs as well. Gimme a little bit to test. Flashing back over to Wince right now.

arrrghhh 11-02-2010 07:00 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by natemcnutty (Post 1986575)
Damn, was hoping to get away with not having to do the rootfs as well. Gimme a little bit to test. Flashing back over to Wince right now.

Bah! Ah well dude take your time.

viperlox 11-02-2010 07:44 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Tested again with a fresh install of the latest reference and the 20101015 rootfs (as far as i can tell before the button switching commits). It made no difference still 2 power buttons.

natemcnutty 11-02-2010 08:09 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by viperlox (Post 1986615)
Tested again with a fresh install of the latest reference and the 20101015 rootfs (as far as i can tell before the button switching commits). It made no difference still 2 power buttons.

Thanks, I'm looking at the other commits to the kernel right now as well. Didn't think the rootfs had anything to do with it, but seemed like everyone was saying it was changed in there too :P

natemcnutty 11-02-2010 08:40 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
I think my stupid script actually updated back over the revert I did... I fixed the script and am compiling again right now. It's actually commit 6c41ca69 that I believe needs to be undone.

Here's test #2. Got pulled away from my desk, so I haven't had a chance to test yet, so good luck :smile:

http://dl.dropbox.com/u/11790134/test2.zip

viperlox 11-02-2010 08:49 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
YES! That one seems to work! Power button takes me home, long press gets me recently used menu, and the hang up button puts it to sleep. I deleted data.img and used the latest rootfs for first boot. I'll keep using it for a while to check for side effects.

natemcnutty 11-02-2010 09:15 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by viperlox (Post 1986668)
YES! That one seems to work! Power button takes me home, long press gets me recently used menu, and the hang up button puts it to sleep. I deleted data.img and used the latest rootfs for first boot. I'll keep using it for a while to check for side effects.

Glad to hear. And there should be 0 side effects unless the devs make some major changes to not use PWRK anymore, and even if that happens, you'll just lose the button functionality and nothing more.

viperlox 11-02-2010 09:39 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
I didnt think there should be but im not as smart at the way this works as i wish i was lol. I just happy i could finally contribute to something even if it is just testing.

arrrghhh 11-02-2010 11:55 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Hrm, I can't seem to get this to work. Now my power button just does literally nothing. Tried blazn, ref, new data.imgs... not sure what's the deal.

viperlox 11-03-2010 12:16 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by arrrghhh (Post 1986790)
Hrm, I can't seem to get this to work. Now my power button just does literally nothing. Tried blazn, ref, new data.imgs... not sure what's the deal.

hmm, thats odd. I have it working on both the latest reference as well as the neopeek eclair build.

natemcnutty 11-03-2010 12:34 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by arrrghhh (Post 1986790)
Hrm, I can't seem to get this to work. Now my power button just does literally nothing. Tried blazn, ref, new data.imgs... not sure what's the deal.

Just checking, what rootfs are you running? It's been one of those crazy weeks for me, so sorry I haven't had time to thoroughly test like I normally do.

arrrghhh 11-03-2010 12:39 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by natemcnutty (Post 1986818)
Just checking, what rootfs are you running? It's been one of those crazy weeks for me, so sorry I haven't had time to thoroughly test like I normally do.

On ref I'm running 10.29 (newest) and on blazn I was one rootfs back... 10.23.

Is there a special one I should be using...?

natemcnutty 11-03-2010 12:49 AM

Wirelessly posted (Opera/9.80 (Windows Mobile; Opera Mini/5.1.21594/21.529; U; en) Presto/2.5.25 Version/10.54)

Quote:

Originally Posted by arrrghhh
Quote:

Originally Posted by natemcnutty (Post 1986818)
Just checking, what rootfs are you running? It's been one of those crazy weeks for me, so sorry I haven't had time to thoroughly test like I normally do.

On ref I'm running 10.29 (newest) and on blazn I was one rootfs back... 10.23.

Is there a special one I should be using...?

I really don't think it should matter. But that's the only thing I can think of. Will try to get some testing done when I get back home. Wife's been keeping me busy all evening.

arrrghhh 11-03-2010 12:51 AM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by natemcnutty (Post 1986833)
I really don't think it should matter. But that's the only thing I can think of. Will try to get some testing done when I get back home. Wife's been keeping me busy all evening.

lol that's usually a good thing ;) I'm online if you do get some free time.

manekineko 11-03-2010 06:30 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Quote:

Originally Posted by arrrghhh (Post 1986790)
Hrm, I can't seem to get this to work. Now my power button just does literally nothing. Tried blazn, ref, new data.imgs... not sure what's the deal.

I'm seeing the same on my Rhod400 on reference with latest rootfs and your test2 kernel files and a new data.img. Power button isn't doing anything.

arrrghhh 11-03-2010 07:21 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
It appears viperlox has the same phone as us (RHOD400), I wonder why it's working for him...? Or maybe he's misunderstanding. I dunno.

Nate, have you tested it? Does it work on your 500?

viperlox 11-03-2010 08:04 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
I dont believe im misunderstanding, the power button on top is working as the home button, and the end call button is working as the sleep button with the test2 kernel. my process last night was i already had the neopeek installed on my sd card, i replaced the zimage and modules with the first test, it didnt work obviously. i then copyed the andboot folder from the latest reference to my sd card and tryed with that... i then replaced the rootfs with the 201015 i believe it was, deleted the data.img and tried again. When test2 was ready i replaced the rootfs to the original, deleted data.img and tried with test 2 and thats when it worked. So i cleared my ext2 and linux swap reinstalled neopeek and used test 2 with that it worked there too. Maybe something to do with neopeek on the card at the same time? Hope you guys can understand all this chickenscratch...

Rhod400 from uscc

edit: ok i looked again to make sure, the rootfs in the 11/1/2010 release of reference shows date modified of 9/17. That is the one i used, sooo it looks to me like the commits in the newer rootfs' has something to do with it too.

natemcnutty 11-03-2010 10:15 PM

Wirelessly posted (Opera/9.80 (Windows Mobile; Opera Mini/5.1.21594/21.529; U; en) Presto/2.5.25 Version/10.54)

Quote:

Originally Posted by arrrghhh
It appears viperlox has the same phone as us (RHOD400), I wonder why it's working for him...? Or maybe he's misunderstanding. I dunno.

Nate, have you tested it? Does it work on your 500?

I will br later tonight when I get home. At 38 hours and only 3 days into the week... ughhh

Plasma_Cannon 11-03-2010 10:44 PM

Re: What modifications are necessary to create a fork that re-enables the home button
 
Tested it and it works greats.

Thanks


All times are GMT -4. The time now is 05:51 AM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0