yashsingh1/xdaforums huggingface dataset:
[Touch Pro2, Tilt 2 Android Development] Bombenbach:
First of all, my fix doesn't change the default behaviour of the buttons. My problem was, that Power button didn't work at all, making me use Back button all the time. So my fix only makes it work again.

What you're asking about is probably swapping Power and End buttons. Well, that can be done too, of course. The problem is that Android doesn't differentiate between sleep and end call, e.g. these two functions always has to be performed by the same button. Thus, swapping Power and End will indeed allow you to use Power button for sleep/wake but you'll also have to end calls with the Power button only. End button will then work only as Home/Recent apps.

I've found a thread about this, in which devs argue that ending calls with Power button would greatly confuse most users. I can understand that, but nevertheless I also can tell you how to change this. It's actually quite easy. All you have to do is go to /init.etc/keymaps/ (rootfs.img) and modify the appropriate kl-file:

rhod100_[uk/de/fr/it/nordic]_navi_pad.kl

or

tilt2_navi_pad.kl

depending on you Rhodium model

there you'll find the following lines:

key 102 HOME WAKE # Power button
key 107 ENDCALL WAKE_DROPPED

changing them to

key 107 HOME WAKE # Power button
key 116 ENDCALL WAKE_DROPPED

should do the trick (at least it in my case on rhod100_de). I replace 102 by 116 because on my Rhodium the Power button's keycode is 116 and not 102. It might be the case that on other Rhodiums it's still 102 although I'm not quite sure about that. Anyway, either 116 or 102 should definitely work.

I don't know how you guys usually modify your rootfs.img but as a Linuxer I simply mount it with

sudo mount rootfs.img /mnt -o loop

do the changes and then unmount it with

sudo umount /mnt

P.S. Somehow I must admit that ending a call with Power button is very convenient. :D
[Touch Pro2, Tilt 2 Android Development] snalbansed:
I see. It looks like you are using a relatively old rootfs, ie after they swapped the power and home buttons, but before they fixed the power button correctly. So next time you update your rootfs, you should find that bit works already.

The current rootfs file for the German rhod100 has the lines as follows:

key 116 POWER WAKE
key 107 ENDCALL WAKE_DROPPED

I'll still have a play with the keymap though!
[Touch Pro2, Tilt 2 Android Development] Bombenbach:
Oh. Well, I downloaded my rootfs just a few days before the current release came so I thought that it's still quite recent. My bad. Anyway, you should be able to switch the buttons back just by switching 116 and 107.
[Touch Pro2, Tilt 2 Android Development] snalbansed:
I have had a play with adding HOME to the key 107 line in addition to the other two commands, but it didn't work. I was hoping to be able to regain the Home key long press functionality. Oh well.

On the other hand, I have now added | (pipe) to the Fn Z key press, which will be useful when using ssh. Also, I was going to add tab for the same reason, but I discovered that it is already mapped to Fn space, so I didn't need to!
[Touch Pro2, Tilt 2 Android Development] Bombenbach:
Somehow that's strange. I've just updated to the latest rootfs (XDAndroid2.2Froyo.110110.rar) and am using the latest kernel (3.11.2010) and in my rootfs I still have

key 102 HOME WAKE # Power button
key 107 ENDCALL WAKE_DROPPED

which means that Power button does nothing at all. If I change this to

key 107 HOME WAKE # Power button
key 116 ENDCALL WAKE_DROPPED

I basically get all what I want: Power Button becomes sleep/wake/end call and End button is Home. Long pressing it gives me the list of the recent apps.

Can it be that you're using some other rootfs?
[Touch Pro2, Tilt 2 Android Development] Bieka:
Hey Bombenbach,

is your ä, ö and ü working correctly now with your modified keymap? Always writing big, sucks ;)

If the Funcion is well, how can i replace the old one?! With rootexplorer i can replace the old file but no change to the old problems :(.
[Touch Pro2, Tilt 2 Android Development] snalbansed:
I haven't tried, but if you replace it when running Android then reboot, does it not work?
[Touch Pro2, Tilt 2 Android Development] Bombenbach:
As I've already said in my first post, with my modified keyboard all umlauts work fine including capital letters.

I replaced the file by mounting rootfs.img on the SD card in Linux. This way everything is persistent.

Maybe you can't edit rootfs.img when running Android, like you tried with rootexplorer. Unfortunately, I'm not really familiar with Android file permissions or rootexplorer, so I can't tell another way to replace the file except of using a Linux distro for that.
[Touch Pro2, Tilt 2 Android Development] Bieka:
Hey Bombenbach,

of course i read your posts but i thought you explored other ways to replace this file ;). I've got a Kubuntu version installed and tried to change the files inside the .img files but i wasn't able to open then. I must say that my Linux knowledge is not that good ;).

I tried to replace the files inside with droid explorer. I could explore and replace both existing *.kcm.bin files inside the folders "/init.etc/keymaps/" and "/etc/keymaps/" but after the reboot I started to write a sms just to test if i could type ä,ö and ü but there was no change before the replacement :(. So did you know any further folders where i can replace these files? Or must i replace them in the *.img files as Bombenbach said to make a permanent result?!

@Bombenbach are you running the newest kernel (11/3) on your Rhodium100_de? I still search for a reason why my and other Rhodiums are freezing with kernels newer then 10/23 (1st). The funny thing is, i got auto backlight in the first kernel although it was just announced for the second kernel ;).

Best regards

Bieka
[Touch Pro2, Tilt 2 Android Development] snalbansed:
Extract bombenbach's kcm.bin file to your home directory. I have used ~/ below to represent your home directory (~/ will expand to /home/username/ automatically)

Work out from the automounted SD card what the path is to your rootfs.img. Or put a copy in your home directory. Either way, substitute appropriately below.

Open a shell/command line in kubunu

mkdir rootfsimg
sudo mount path-to-rootfs.img ~/rootfsimg -o loop
sudo cp ~/rhod100_de_microp-keypad.kcm.bin ~/rootfsimg/init.etc/keymaps/
sudo umount rootfsimg

sudo is linux speak for 'Do what I tell you, don't argue', so don't abuse it!

Hope that helps.

Edit: I just remembered that I think when I did this, I needed to reset the permissions and/or ownership of the new file.

ls -l ~/rootfsimg/init.etc/keymaps

will indicate if the permissions or ownership look wrong.

'chmod' is the command to change permissions, and 'chown' is the command to change ownership. Both will require sudo in this instance, but I can't give you the full command without knowing what they were supposed to be!
[Touch Pro2, Tilt 2 Android Development] Bombenbach:
I guess you should try it this way. If it still won't work, I'll take a further look at it.

Yes and it actually runs pretty well. As far as freezing is concerned, I guess there might be more differences between different Rhodium flavours then we are aware of, like the hardware of two different Rhod100_de's is not completely identical.

While I was still devving on Rhobuntu there also were always people who complained about freezes and crashes whereas others claimed that they had no problems whatsoever.

But that is just a speculation.
[Touch Pro2, Tilt 2 Android Development] Bieka:
Hey,

first of all thanks snalbansed and Bombenbach for your help. I started Kubuntu and tried your way. The Sudo command is explaind very funny ;) of course i know this command from debian on my VServer ;). Some commands are in my brain but very unsorted. I'm just happy that i rent the server with a friend who knows Linux better then me ;). But back to Topic.

I have done all what you explained, but first thing i saw when I umount the rootfsimg is that the img file only got a filesize of 1.6MB and not 15 MB. I copied it to my card and started Android but after some text flying by in the bootsequence i just can read that he found an error and restarts in 3...2...1...reboot.

So the easy way should be that i find out what i made wrong but with this fast flying text, it is impossible.

I just tested again replacing the file with root explorer. This time i discovered a mysterious thing. When i delete the kcm.bin file go out of the folder and come back to it, it is just there. So i think, this was just temporarly deleted. I don't know if i am the only one with this "problem" but this is just curious.

So before posting thousands of sites full of noob questions i just wanted to ask if someone can upload a modified version with this file in it and meanwhile i teach myself in Linux ;).

Otherwise, if someone has another clue. Just as replacing the file in the img with an application in windows like a Zip Folder, i am all ears. ;)
[Touch Pro2, Tilt 2 Android Development] Bombenbach:
Here is a modified rootfs.img from XDAndroid2.2Froyo.110110.rar

Modifications:

- replace rhod100_de_microp-keypad.kcm.bin

- switch Home and End on Rhodiums (as described by me in this thread)
[Touch Pro2, Tilt 2 Android Development] snalbansed:
I guess within Android, this might be considered to be ROM?

Once mounted, you can use cd and ls to work your way round the img, less to see the contents of files and nano to edit them. You could also use the file explorer in kubuntu to do the job (again, once mounted), but I think you will need the file explorer to run as root. In Gnome/Ubuntu, you would type gksudo nautilus and nautilus (the Gnome file explorer) will start with root permissions. I can't remember the kde equivalent off the top of my head. If you can do it this way, you'll also be able to check/fix permissions etc with a right click - properties.
[Touch Pro2, Tilt 2 Android Development] Bieka:
Hey Bombenbach,

thanks for the uploaded rootfs.img. In the meantime i did it and got the rootfs.img changed as described. ;) Again a very big thanks to you and your work!!! Finally typing an e-mail is a real pleasure and didn't looks like my Capslock is brocken for only Ü Ö and ä ;).

Also a big thank to snalbansed for your patience ;). You were right with your expect that my failure were the rights. I started sudo dolphin so i could replace the file in init.etc and do a sudo umount rootfsimg. Suprise suprise it worked ;).

So now for the next quest ;) Is it possible to map some keys on Keyboard to Applications, Functions or like winmo a board of signs. Or isn't there equivalent in Android to that?

Best Regards

Bieka
[Touch Pro2, Tilt 2 Android Development] F22:
looking for a volunteer

I've been working on updating the keymaps & layouts for those rhodiums that have keymap source files available and I've noticed that there isn't a source file available for the German rhod100. Judging by the activity in this thread, there appears to be quite a bit of interest in the German keymap. I was thus wondering if someone who speaks German and has a German rhodium would be interested in making a kcm source file for inclusion into the official rootfs that everyone can use.

If someone is willing to make the file, I can provide the sources for the T-Mobile US Rhod 210 and the Nordic version of the Rhod 100 from the XDAndroid repo as examples/templates. I can also compile it for you if you don't already have the kcm compiler. If it works well and people are happy with it, I'll roll it into the keymap update that I plan to submit to the rootfs git in the near future. This way you won't have to add it in again yourself every time the rootfs gets updated.
[Touch Pro2, Tilt 2 Android Development] snalbansed:
So what is the proper way to do this? Both of us have edited the binary file to add the German letters in the correct case for Bombenbach, and I added a | onto Fn Z!

The text files refer to a rhod100 pdf to explain how one should do these things - do you have a copy?
[Touch Pro2, Tilt 2 Android Development] F22:
Making a Keymap Source

I don't have the rhod100 pdf unfortunately. The only links I found to it are dead. I worked from google's documentation and the existing kcm sources instead. Google's online documentation may be found here. I've also attached two of the source files that I mentioned earlier.

In a nutshell, the key layout (.kl) file matches the scan code sent when pressing the keys with a keycode. Those keycodes are then assigned characters in the keymap source (.kcm), which for faster speed, gets compiled into a keycode map binary (.kcm.bin).

So if you press the Q key, the scancode 16 will be sent. That 16 gets matched to the keycode Q in the .kl file. What it prints on the other hand is determined by what's in the various columns of the .kcm.bin. You've just been editing the binary directly instead of editing the plain text source file.

Note: I've given the .kcm's I've attached a .txt suffix so that the forum would allow me to upload them.
[Touch Pro2, Tilt 2 Android Development] snalbansed:
Cool, that makes more sense. Thanks!

I'll leave it to Bombenbach to respond to the rest of your question about the German phone.
[Touch Pro2, Tilt 2 Android Development] F22:
Other Missing Rhodium Key Maps

Snalbansed, I see that you're in the UK. The German keymap isn't the only one lacking a source. We don't have the source file for the UK, FR or IT versions of the keymap either in the repo. So if you (or anyone else) should happen to be interested in creating a source file for one or more of the others, I'd be happy to work with you on getting it into XDAndroid so you don't have to add it in by hand every time you update to a new rootfs.

As far as the ability to map the End Call to Home/Recent Apps is concerned, I will be submitting a patch to address that issue in the near future.
[Touch Pro2, Tilt 2 Android Development] Bombenbach:
Hi F22,

although I can't promise to provide a German keymap soon (my theoretical physics assignments are getting harder every week :mad:) I'm indeed interested. Do you happen to have a kcm compiler or could you describe how to get/compile it? This would make testing and debugging much easier compared to uploading a new keymap and asking you to compile it everytime.
[Touch Pro2, Tilt 2 Android Development] F22:
The kcm compiler is available as part of Google's AOSP. So if you compile android's source code, you get kcm as part of the deal. Google's AOSP is a beast of a download however, and takes forever to compile. I'll attach a copy to this post to save you some time. It was compiled on 64 bit Ubuntu.
[Touch Pro2, Tilt 2 Android Development] Bombenbach:
Hi F22,

in fact we don't need any volunteers, since I've just found a Python script that can decompile kcm.bin-files :D

https://github.com/asedeno/unkcm/blob/802c4c4498bd6359e98f6b77f4c2edc302af5a45/unkcm

All credits are to Alejandro R. Sedeño who wrote this nice little tool :cool:

Anyway, I've already decompiled the German keymap und fixed the umlaut problem. No time to test it, but I guess it should work fine. Now it's up to you to decompile other bins so that you can have your source files.

BTW I've made a pic of my Rhodium's German keyboard layout (maybe for a dev's wiki or so). Hereby I proudly proclaim it to be public domain, so that everybody can do with it whatever he or she wants :p Long live FOSS!
[Touch Pro2, Tilt 2 Android Development] F22:
Excellent! I've added some additional keys to your fixed German keymap (with the help of the pic you so thoughtfully included) and have rolled it into my latest rootfs. For those interested in trying it out, it may be found here. It's the latest XDAndroid rootfs as of Nov 22, 2010 with my keymap/layout additions and your fixed umlauts baked in. Once I get all the other keyboards done (I still have 3 rhodium and 3 raph keymaps to decompile and spruce up...) I'll submit them for inclusion into XDAndroid.

BTW, for those interested, the rootfs I linked to above also has a new command line option to make your end call key behave as the home key instead, including long press opening up the recent apps list. Simply add:

b4=HOME

to the cmd_line in your startup.txt.
[Touch Pro2, Tilt 2 Android Development] snalbansed:
Using the code that Bombenbach linked to, I've done a decompile of the rhod100_uk key map. As with Bombenbach, I haven't recompiled it and checked it out though.

I have also made a slight change to add the | to the Alt Z key for terminal use.
[Touch Pro2, Tilt 2 Android Development] snalbansed:
I have now recompiled the keymap, and put it in your 20th November rootfs. All works well, including my |, except for the Ctrl key. This used to work as Ctrl, and Ctrl-c/v/x worked as expexted. However, with my decompiled and recompiled keymap it is acting as Menu :-(

Any ideas?

PS I have implemented your home startup command, and so far so good! When I get round to killing a call, which button will work? Just the power button?

__________________________

rhod100_uk XDAndroid FRX03
[Touch Pro2, Tilt 2 Android Development] snalbansed:
Just remembered - the voicemail lady doesn't mind being phoned at 00:45!

So Menu - End call is the only method? No wonder it has to kept as an opt-in! I think I'd still keep it though :-)
[Touch Pro2, Tilt 2 Android Development] F22:
Most of the American keymaps have | mapped to Alt Y, and while Bombenbach has | mapped to Alt Z, Alt Z just happens to be positionally reversed with Alt Y on the German Keyboard. So his Z key is actually our Y key. I'd also like to map { and } to Alt Z and Alt X respectively just as I've done on the American keyboards, so I hope you don't mind terribly if I move the | to Alt Y.

This is assigned in the microp .kl (key layout) file, not the .kcm (key character map). The .kl currently in the repo assigns the keycode for MENU to the scancode for the ctrl key. I haven't fixed this in either the German or the UK .kl yet. I'll fix the layouts when I add your keymap into my rootfs. It's just a matter of mapping ctrl to DPAD_CENTER instead. (Android doesn't have a keycode for ctrl defined, so many apps including terminal emulator treat DPAD_CENTER as ctrl instead.)

There is an option to have the power button do it. Click on Settings in the launcher, scroll down and select Accessibility. Then scroll down and check the box that says: "Power Button Ends Call".

Just remember that if your phone falls asleep on you during a call and you want to wake your phone up without ending your call, you can no longer hit the power button to do it. It will now not only wake your phone up, but end your call as well. If you want to just wake your phone up without ending your call, press the call button instead.
[Touch Pro2, Tilt 2 Android Development] snalbansed:
Thanks. I'm all for consistency, so go ahead and use alt Y for |. Would you think about putting [] on shift alt 9 & 0, ie on the () keys? And maybe backslash on shift alt N where / resides?

I'm glad you know what the issue with Ctrl was, and thanks for the info on end call options.
[Touch Pro2, Tilt 2 Android Development] Bieka:
I bump this thread again cause i wanted to know if the modified layout file for the german rhodium100's is now used for future rootfs by default or do i have to edit the rootfs by myself?

Cheers
[Touch Pro2, Tilt 2 Android Development] F22:
Not yet. I've been side-tracked by other projects during the holidays. There hasn't been a new rootfs since Nov. 15th, but if a new one should get pushed out before the new keymaps get committed, I'll also update the one I've made with the new keymaps that same day.
[Touch Pro2, Tilt 2 Android Development] Bieka:
Hey F22,

i forgot to thank you for your reply and also wanted to say that the modified rootfs.img you postet a few posts before works great for me. I only noticed one thing. The z and y keys are switched. So if i want to type a z, a y appears ;). In Windows i would say a typical QWERTY <-> QWERTZ Problem but in Android it's not that easy for me. Is it possible that you switch these two keys to their right places in the DE layout? Would be kind of you.

Best regards
[Touch Pro2, Tilt 2 Android Development] F22:
QWERTZ vs. QWERTY

No problem. I was already planning on releasing a new rootfs in the next day or two. I will switch the z & y keys in the German layout. Thanks for the feedback.
[Touch Pro2, Tilt 2 Android Development] Vladimir.D:
Hi guys!

I have the same problem! I was updaiting keymaps & layouts for German rhod100, but with a Russian layout.

I've edited the kcm, but i cant compile it!

Can anyone help to compile it?

Thanks!
[Touch Pro2, Tilt 2 Android Development] highlandsun:
How do you edit these keymaps? Is there a way to make the Ctrl key do its actual function? E.g., have it be recognized in ConnectBot. Right now it seems to be mapped to NUL.
[Touch Pro2, Tilt 2 Android Development] Vladimir.D:
Hi,

i've read this post) http://xdaforums.com/showthread.php?t=695936

Hope, it helps you!

BR,

Vladimir
[Touch Pro2, Tilt 2 Android Development] snalbansed:
b4=home

F22 - did you ever commit this? I have started afresh with the Reefermattness FRX04, which I'm assuming has the latest rootfs, and my b4=HOME command is ignored :( which is really annoying as I much prefer having the proper Home function on the end call button, even if it means ending calls with the menu!
[Touch Pro2, Tilt 2 Android Development] F22:
Not yet. The changes I've made are now sufficiently extensive that I will be releasing a test rootfs first for interested people to try out and provide feedback so as to ensure there are no bugs in the actual commit. The keymaps/layouts are done. The kbd determination process in the init script however was rather inefficient (There is really no need to grep /proc/cmdline over a dozen times before you get to the right kbd.) I'm finishing up a clean-up of that as I write this. I'll merge my changes with the latest rootfs commit and try to get that test rootfs out later today.

FOLLOW-UP (Jan 31st, 2011): I've posted a test rootfs with the new keymaps/layouts and the end button as home option. See this thread for details.
[Nexus One Q&A, Help & Troubleshooting] twolves14:
yea I was trying to update my facebook app in the market, but it wouldn't update. so I thought it was my custom rom. I backed up the apk in titanium backup and uninstalled it (i know i'm an idiot). I then went back to market, but facebook still won't install. and titanium didn't backup facebook.apk properly. Now I don't have a facebook app.. any help would be appreciated, such as givingme the file.
[Nexus One Q&A, Help & Troubleshooting] Jack_R1:
You have custom ROM, right?

Download it again, if you don't have it, and extract the Facebook app from there (/system/app).

In the meantime, reboot to recovery, wipe Dalvik-cache, and boot the phone. Try installing Facebook after that.
[Nexus One Q&A, Help & Troubleshooting] twolves14:
Alright, i'm downloading the rom again right now. Will wiping Dalvic Cache remove any of my data or mess anything else up?
[Nexus One Q&A, Help & Troubleshooting] Arcarsenal:
Wiping Dalvik cache won't mess you up.

Did you reboot after removing Facebook with Titanium Backup? If you don't, installation will fail from the market.

proper steps are:

Remove Facebook from system/app

reboot

Install from market

This will work with any system app that your ROM might have updated in the market
[Nexus One Q&A, Help & Troubleshooting] twolves14:
It says application not installed. I just tried the apk from the rom. I havent cleared dalvik cache yet... what do i do?

Edit: No, I didn't reboot, trying it now.
[Nexus One Q&A, Help & Troubleshooting] Jack_R1:
Before rebooting, the system still "remembers" that the app was there. You need to reboot to clean the "remains".

Clearing Dalvik-cache might also help. It doesn't mess up the data, since the cache is rebuilt on boot. It just slows down the 1st boot after it.

I just went through the same procedure with Terminal Emulator on friend's Nexus today (only that I removed the app manually, thus I needed to clear Dalvik cache entry and remove data directory by myself - I believe that if you used Titanium, it did that for you).