Changing to a non-english keyboard layout [cupcake support]

Search This thread

Keychar

Member
Apr 15, 2009
47
99
I WILL NOT TAKE ANY RESPONSABILITY FOR WHAT HAPPENS TO YOUR PHONE. THIS IS AT YOUR OWN RISK. THIS IS ONLY TRIED ON VERSION 1.1, 1.5 AND 1.6 ON THE DEVELOPER PHONE.

I was fed up with having to hold a and o for my swedish chars, so couple of hours ago I decided to create a swedish layout, and here's how you can do it too. You need an unlocked android phone, such as the Dev1. I will also assume that you have and know how to use the SDK. Connect your phone to your computer and run:
Code:
adb shell
In the shell run getprop and find hw.keyboards.0.devname. This for me is trout-keypad-v3. If it's the same for you, do the following, otherwise change accordingly.
Code:
adb pull /system/usr/keychars/trout-keypad-v3.kcm.bin Desktop/
You now have a copy of the keychar-binary on your desktop, make sure to backup it. Open it in a binary editor, and you will find a file coded with an intro followed by lots of data coded as below (not documented, therefore not guarantied, but I feel pretty certain it's right, dots are 0x00):
..char.numberchar.smallchar.bigchar.smallspecial.bigspecial.(keycode+1).
For example, my A looked like:
..A.2.a.A.a.A.?.
What I want it to look like is:
..A.2.a.A.å.Å.?.
If your hex-editor allows that then congrats to you, mine didn't. What I had to do was to use a ascii-table (http://www.ascii-code.com/) and use teh hex code.
00 00 41 00 32 00 61 00 41 00 61 00 41 00 1E 00
...should therefore be...
00 00 41 00 32 00 61 00 41 00 E5 00 C5 00 1E 00

I now have å and Å on my a-button. The next button for me, Z, could be done using the exact same tactic. The fun part came with X. Notice the coding:
00 00 58 00 39 00 78 00 58 00 78 00 00 EF 35 00
The problem here is EF, which is there to make sure that there is not a ... in the middle of the char-code. What we do here is therefore to change the EF to 00 when we change the 00 before it. The result would therefore be:
00 00 58 00 39 00 78 00 58 00 F6 00 D6 00 35 00

Now let's save the file. We can send it to the device with the following code. THIS WILL REPLACE YOUR CURRENT LAYOUT.
Code:
adb root
adb remount
adb push trout-keypad-v3.kcm.bin /system/usr/keychars/
For security reasons I would recommend you to always reboot your phone after running adb remount, since this will leave your /system more vulnerable then usual.

Now we can restart the phone, and hopefully it will have a new working layout. If the layout is totally different from yours (for example alt+a is #) that means the encoding of the new file is wrong, and another layout is used. If this happens I recommend you start from the beginning, it doesn't take much time, and small errors can be avoided. You can do as above to reset your old layout:
Code:
adb root
adb remount
adb push trout-keypad-v3.kcm.bin.backup /system/usr/keychars/trout-keypad-v3.kcm.bin

My working swedish layout is attached. alt+a => å, alt+z => ä, alt+x => ö.
Hope you will appreciate this as much as I do. :)

Thanks to Joushou for all the help in #android.
 

Attachments

  • trout-keypad-v3.kcm.bin.txt
    896 bytes · Views: 475
Last edited:

i9zero

Senior Member
Mar 17, 2009
76
0
Thank you! this is fantastic. I just have to figure out how this would work with asian fonts
 

theorion

Senior Member
Mar 15, 2006
89
0
I salute you sir for this easy guide!! Though using notepad ++ i didnt even use hex view! but just chose to see through the null null crap on the screen!! Total matrixe experience! But i definetly vote to get this a sticky for easy goofing with keyboard layouts!
 

Acidnator

Member
Oct 9, 2007
29
0
Works great on Haykuro 1.5, changed a to ä and z to ö. Writing finnish on a mobile phone has never been so easy ;)

Tack ska du ha!
 

maxisma

Senior Member
May 1, 2009
1,212
43
28
Dorsten, Germany
Just modified the keypad for qwertz to work with haykuro 6hr1.
Download is in the attachment!
 

Attachments

  • trout-keypad-v3.kcm.zip
    595 bytes · Views: 402

Hamdan919

Member
May 31, 2009
11
0
Austin, TX
Hey,

If I've changed that layout will that effect the virtual keyboard layout in 1.5.
If it's not, how can I change the layout for the virtual keyboard.

regards :)
 

Keychar

Member
Apr 15, 2009
47
99
Nice to see that this is appreciated.

Hey,

If I've changed that layout will that effect the virtual keyboard layout in 1.5.
If it's not, how can I change the layout for the virtual keyboard.

regards :)
No, it will not. To change the virtual layout you have to program a new layout, or wait for someone else to do it. There are alternative virtual keyboards to download from the market. Make sure that the virtual keyboard does not have internet privileges though, since the virtual keyboard can listen to every single key you push, even on the hardware keyboard. This means that the virtual keyboard can modify the hardware keyboard though, but I haven't seen that except for a bug in a layout.
 

DJ_Spray

Senior Member
Jul 3, 2008
114
1
I don't mind programming the french layout, can you tell me where to find the default qwerty keyboard to alter for the VK?
Right now I have the french layout for the physical keyboard and just miss the VK on my jf1.51 build.

Regards
 

Keychar

Member
Apr 15, 2009
47
99
Sry for refreshing such an old Thread but i want to ask something.

Is there any way to do this, without adb?

As long as you have root. Get into your phone, write:
Code:
dd if=/system/usr/keychars/trout-keypad-v3.kcm.bin of=/sdcard/keypad

Now you can get the file off your sdcard, and do back it up. When you are ready just put it back. Before you can put it back you will have to remount your /system mount with write access. Run mount and look what is before /system. In my case the line looks like:
/dev/block/mtdblock3 /system yaffs2 ro 0 0
In my case I would therefore write:
Code:
su
mount -o rw,remount /dev/block/mtdblock3 /system
dd if=/sdcard/keypad of=/system/usr/keychars/trout-keypad-v3.kcm.bin
This should work as well as the adb method described in original post.
 

Rey-619

Senior Member
Jul 14, 2009
982
250
Villingendorf
dd if=/system/usr/keychars/trout-keypad-v3.kcm.bin of=/sdcard/keypad


-> /keypad: canot open for write: Read-only file system


I have root.

Have i type this in terminal commander? right? ore in Bootloader?
 

Keychar

Member
Apr 15, 2009
47
99
dd if=/system/usr/keychars/trout-keypad-v3.kcm.bin of=/sdcard/keypad


-> /keypad: canot open for write: Read-only file system


I have root.

Have i type this in terminal commander? right? ore in Bootloader?

You are supposed to put it into a terminal. You do have a sdcard, right? Is it mounted to the computer when you try to run the command? If it is, the unmount it and try again.
 

Rey-619

Senior Member
Jul 14, 2009
982
250
Villingendorf
mhm.... xD

Code:
$ mount
rootfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_smt_journals tmpfs rw=,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosiud,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p2 /system/sd ext3 rw,noatime,nodiratime,errors=continue,data=ordered 0 0
/dev/block//vold/179:1 /sdcard vflat rw,dirsync,nosuid,nodev noexec,uid=100,gid=1000,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8 0 0
#
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    i tryed both ^^

    damn i need the german keyboard layout xD