webOS Nation Forums >  webOS Devices >  Palm Pre and Pre Plus > How to permanently change the qwertz/azerty/qwerty keyboard mapping
How to permanently change the qwertz/azerty/qwerty keyboard mapping
  Reply
Like Tree2Likes

 
Thread Tools Display Modes
Old 10/19/2009, 09:25 AM   #1 (permalink)
Developer
 
rwhitby's Avatar
 
Posts: 10,568
I have worked out how to permanently (but reversibly) change the token programmed into the Pre at manufacturing time which tells it which hardware keyboard layout the device has.

I have tested this technique on the German webOS 1.1.3 firmware flashed onto a Sprint CDMA Pre, and have been able to turn the normally qwerty keyboard into a qwertz or azerty mapping. The same technique will work on any Pre running any firmware version to convert any keyboard layout to any other keyboard layout. This technique persists across OTA webOS updates, and even persists across using Palm's official webOS Doctor. The technique is reversible by simply applying it again with a different value. Note that the technique requires you to completely erase the phone (just like the webOS Doctor does), but is not considered dangerous because it uses Palm's own webOS Doctor to perform the modification in a very controlled way.

I'll post the technical details of the technique here tomorrow (it's past 1am here already, and I've been working on this for the last 6 hours straight). Note that it requires the use of the Meta-Doctor, with some manual modifications to various files in the middle of it's operation, and the resulting executable is not redistributable (cause it contains Palm files) so anyone who wants to do this must do the technique for themselves. In the future, it should be possible for someone to turn this into an end-user tool, and the information will be freely shareable for anyone to do so. It is in a very raw and linux-command-line-only state right now.

If you want to show your thanks, please feel free to .

The technique will be fully written up in this thread tomorrow irrespective of donations, since I do not believe in information being held to ransom. The kernel of the technique involves modifying the castle.xml file in the webOS Doctor to overwrite the KEYoBRD token when the doctor is used to reflash the Pre.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals

Last edited by rwhitby; 10/19/2009 at 09:31 PM.
rwhitby is online now   Reply With Quote
Old 10/19/2009, 09:31 AM   #2 (permalink)
Editor Emeritus
 
Dieter Bohn's Avatar
 
Posts: 4,869
Excellent news, Rod.

PreCentral is donating the full amount for the GSM Pre right now.
__________________
Dieter Bohn is offline   Reply With Quote
Old 10/19/2009, 09:49 AM   #3 (permalink)
Developer
 
rwhitby's Avatar
 
Posts: 10,568
Due to such a generous act by PreCentral, I'm staying up even later to post some more info.

You need to change the KEYoBRD token to 'z' (qwerty), 'y' (qwertz) or 'w' (azerty).

The easiest way to do this is to use the WebOS Internals Meta-Doctor (you can get that from git.webos-internals.org, and you need a Linux box on which to run it).

Just run:

"make CARRIER=wr unpack patch"

Then modify build/.../webOS/castle.xml, adding the following line in the appropriate place:

<Val name="KEYoBRD" action="overwrite" value="z"/>

Then run:

"make CARRIER=wr pack"

and use the resulting doctor .jar file in build/... to reflash your Pre.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is online now   Reply With Quote
Old 10/19/2009, 09:55 AM   #4 (permalink)
Member
 
Posts: 392
This is fantastic news - well done Rod!!

I guess we'll now start seeing lots of people German Pre exports?? I would seriously consider importing one to the UK if this method is safe and tried & tested - seems to be the case!
Quote:
Originally Posted by rwhitby View Post
It is in a very raw and linux-command-line-only state right now.
...Rod, whenever you do get the chance, please write up the technique and steps in as simple terms as possible, some of us are not as technical as you may hope!

EDIT: too late! ----------------------------------------------------------------

1] I guess without a Linux box it is not possible to follow your steps?
2] I am hoping post #3 means something to someone!! - who can translate!
c_man is offline   Reply With Quote
Old 10/19/2009, 09:58 AM   #5 (permalink)
Developer
 
rwhitby's Avatar
 
Posts: 10,568
Quote:
Originally Posted by c_man View Post
This is fantastic news - well done Rod!!

I guess we'll now start seeing lots of people German Pre exports?? I would seriously consider importing one to the UK if this method is safe and tried & tested - seems to be the case!

...Rod, whenever you do get the chance, please write up the technique and steps in as simple terms as possible, some of us are not as technical as you may hope!

EDIT: too late!
I've posted the technique to the developers mailing list, where you can be sure it will be tested by others. People in the IRC channel will likely test it overnight too. Once that has all happened, hopefully we can automate it somewhat for Linux users, and then maybe even get an end-user tool in place.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is online now   Reply With Quote
Thanked by cecemf, c_man
Old 10/19/2009, 10:26 AM   #6 (permalink)
Developer
 
rwhitby's Avatar
 
Posts: 10,568
Here is the full log of performing the meta-doctor operation:

First you clean out the directory from previous runs:
Code:
rwhitby@ubuntu:/srv/tools/meta-doctor$ make clobber
rm -rf build
Then you unpack and patch the doctor with the standard changes:
Code:
rwhitby@ubuntu:/srv/tools/meta-doctor$ make CARRIER=wr unpack patch
rm -rf build/pre-p100eww-wr-1.1.3
mkdir -p build/pre-p100eww-wr-1.1.3
cp downloads/webosdoctorp100eww-wr-1.1.3.jar build/pre-p100eww-wr-1.1.3/webosdoctorp100eww-wr-1.1.3.jar
( cd build/pre-p100eww-wr-1.1.3 ; \
                unzip webosdoctorp100eww-wr-1.1.3.jar META-INF/MANIFEST.MF resources/webOS.tar )
Archive:  webosdoctorp100eww-wr-1.1.3.jar
  inflating: META-INF/MANIFEST.MF
  inflating: resources/webOS.tar
mkdir -p build/pre-p100eww-wr-1.1.3/webOS
tar -C build/pre-p100eww-wr-1.1.3/webOS \
                -f build/pre-p100eww-wr-1.1.3/resources/webOS.tar \
                -x ./nova-cust-image-castle.rootfs.tar.gz \
                ./nova-installer-image-castle.uImage ./castle.xml ./installer.xml
gunzip -f build/pre-p100eww-wr-1.1.3/webOS/nova-cust-image-castle.rootfs.tar.gz
mkdir -p build/pre-p100eww-wr-1.1.3/rootfs
tar -C build/pre-p100eww-wr-1.1.3/rootfs \
                -f build/pre-p100eww-wr-1.1.3/webOS/nova-cust-image-castle.rootfs.tar \
                -x ./usr/palm/applications/com.palm.app.firstuse ./usr/lib/ipkg/info ./md5sums
touch build/pre-p100eww-wr-1.1.3/.unpacked
rm -f build/pre-p100eww-wr-1.1.3/.patched
mv build/pre-p100eww-wr-1.1.3/rootfs/md5sums build/pre-p100eww-wr-1.1.3/rootfs/md5sums.old
[ -d patches/pre-p100eww-wr-1.1.3 ]
( cd patches/pre-p100eww-wr-1.1.3 ; cat com.palm.app.firstuse.patch ) | \
        ( cd build/pre-p100eww-wr-1.1.3/rootfs ; patch -p0 )
patching file usr/palm/applications/com.palm.app.firstuse/app/controllers/app-assistant.js
patching file usr/palm/applications/com.palm.app.firstuse/appinfo.json
mkdir -p build/pre-p100eww-wr-1.1.3/rootfs/var/luna/preferences
touch build/pre-p100eww-wr-1.1.3/rootfs/var/luna/preferences/ran-first-use
mkdir -p build/pre-p100eww-wr-1.1.3/rootfs/var/gadget
touch build/pre-p100eww-wr-1.1.3/rootfs/var/gadget/novacom_enabled
for app in com.palm.app.firstuse ; do \
          ( cd build/pre-p100eww-wr-1.1.3/rootfs ; \
            find ./usr/palm/applications/$app -type f | xargs md5sum ) \
              > build/pre-p100eww-wr-1.1.3/rootfs/usr/lib/ipkg/info/$app.md5sums.new ; \
          ./scripts/replace-md5sums.py \
            build/pre-p100eww-wr-1.1.3/rootfs/usr/lib/ipkg/info/$app.md5sums.old build/pre-p100eww-wr-1.1.3/rootfs/usr/lib/ipkg/info/$app.md5sums.new \
              > build/pre-p100eww-wr-1.1.3/rootfs/usr/lib/ipkg/info/$app.md5sums ; \
          rm -f build/pre-p100eww-wr-1.1.3/rootfs/usr/lib/ipkg/info/$app.md5sums.old build/pre-p100eww-wr-1.1.3/rootfs/usr/lib/ipkg/info/$app.md5sums.new ; \
        done
Overwriting md5sum for ./usr/palm/applications/com.palm.app.firstuse/appinfo.json
Overwriting md5sum for ./usr/palm/applications/com.palm.app.firstuse/app/controllers/app-assistant.js
( cd build/pre-p100eww-wr-1.1.3/rootfs ; \
          find ./usr/palm/applications/com.palm.app.firstuse ./usr/lib/ipkg/info -type f | xargs md5sum ) \
            > build/pre-p100eww-wr-1.1.3/rootfs/md5sums.new
./scripts/replace-md5sums.py build/pre-p100eww-wr-1.1.3/rootfs/md5sums.old build/pre-p100eww-wr-1.1.3/rootfs/md5sums.new > \
                                     build/pre-p100eww-wr-1.1.3/rootfs/md5sums
Overwriting md5sum for ./usr/lib/ipkg/info/com.palm.app.firstuse.md5sums
Overwriting md5sum for ./usr/palm/applications/com.palm.app.firstuse/appinfo.json
Overwriting md5sum for ./usr/palm/applications/com.palm.app.firstuse/app/controllers/app-assistant.js
rm -f build/pre-p100eww-wr-1.1.3/rootfs/md5sums.old build/pre-p100eww-wr-1.1.3/rootfs/md5sums.new
sed -i.orig -e '/<Volume id="var"/s|256MB|2048MB|' build/pre-p100eww-wr-1.1.3/webOS/castle.xml
rm -f build/pre-p100eww-wr-1.1.3/webOS/castle.xml.orig
touch build/pre-p100eww-wr-1.1.3/.patched
This is the point at which you edit the castle.xml file in build/pre-p00eww-we-1.1.3/webOS/castle.xml ...

Then you pack the modified doctor ready for use:
Code:
rwhitby@ubuntu:/srv/tools/meta-doctor$ make CARRIER=wr pack
rm -f build/pre-p100eww-wr-1.1.3/.packed
tar -C build/pre-p100eww-wr-1.1.3/rootfs \
                -f build/pre-p100eww-wr-1.1.3/webOS/nova-cust-image-castle.rootfs.tar \
                --delete ./usr/palm/applications/com.palm.app.firstuse ./usr/lib/ipkg/info ./md5sums
( cd build/pre-p100eww-wr-1.1.3/rootfs ; mkdir -p ./usr/palm/applications/com.palm.app.firstuse ./usr/lib/ipkg/info ./var/luna/preferences ./var/gadget )
tar -C build/pre-p100eww-wr-1.1.3/rootfs \
                -f build/pre-p100eww-wr-1.1.3/webOS/nova-cust-image-castle.rootfs.tar \
                -r ./usr/palm/applications/com.palm.app.firstuse ./usr/lib/ipkg/info ./var/luna/preferences ./var/gadget ./md5sums
gzip -f build/pre-p100eww-wr-1.1.3/webOS/nova-cust-image-castle.rootfs.tar
tar -C build/pre-p100eww-wr-1.1.3/webOS \
                -f build/pre-p100eww-wr-1.1.3/resources/webOS.tar \
                --delete ./nova-cust-image-castle.rootfs.tar.gz ./castle.xml ./installer.xml
tar -C build/pre-p100eww-wr-1.1.3/webOS \
                -f build/pre-p100eww-wr-1.1.3/resources/webOS.tar \
                -r ./nova-cust-image-castle.rootfs.tar.gz ./castle.xml ./installer.xml
( cd build/pre-p100eww-wr-1.1.3 ; \
                zip -d webosdoctorp100eww-wr-1.1.3.jar META-INF/MANIFEST.MF META-INF/JARKEY.* resources/webOS.tar )
deleting: META-INF/MANIFEST.MF
deleting: META-INF/JARKEY.SF
deleting: META-INF/JARKEY.RSA
deleting: resources/webOS.tar
sed -i.orig -e '/^Name: /d' -e '/^SHA1-Digest: /d' -e '/^ /d' -e '/^\n$/d' \
                build/pre-p100eww-wr-1.1.3/META-INF/MANIFEST.MF
( cd build/pre-p100eww-wr-1.1.3 ; \
                zip webosdoctorp100eww-wr-1.1.3.jar META-INF/MANIFEST.MF resources/webOS.tar )
  adding: META-INF/MANIFEST.MF (deflated 82%)
  adding: resources/webOS.tar (deflated 5%)
touch build/pre-p100eww-wr-1.1.3/.packed
rwhitby@ubuntu:/srv/tools/meta-doctor$
At this point, your modified doctor .jar file is in the build/pre-p100eww-we-1.1.3 directory.

Note that this can be done for CARRIER=bellmo and CARRIER=sprint too (which will cause it to use the 1.2.1 doctor).

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals

Last edited by rwhitby; 10/19/2009 at 04:38 PM.
rwhitby is online now   Reply With Quote
Thanked by cecemf, pegass
Old 10/19/2009, 11:03 AM   #7 (permalink)
Member
 
SirWill's Avatar
 
Posts: 439
Quote:
Originally Posted by rwhitby View Post
Due to such a generous act by PreCentral, I'm staying up even later to post some more info.

You need to change the KEYoBRD token to 'z' (qwerty), 'y' (qwertz) or 'w' (azerty).


and use the resulting doctor .jar file in build/... to reflash your Pre.

-- Rod
Rod, while I have no use for a GSM pre as I love my phone and Sprint here in the states, I have to give you props and say YOU ARE THE MAN!
SirWill is offline   Reply With Quote
Old 10/19/2009, 11:55 AM   #8 (permalink)
Member
 
Posts: 91
Quote:
Originally Posted by SirWill View Post
Rod, while I have no use for a GSM pre as I love my phone and Sprint here in the states, I have to give you props and say YOU ARE THE MAN!
seconded, I also have no use for this particular technique but just wanted to show my support for all the great things you've done for the pre community. I liked my stock pre, I LOVE my WebOS Internals/Preware modified pre. Donation on the way.

p.s. Will this gsm phone be usable in your neck of the woods or does it operate on different bands? I'd hate to see you get yet ANOTHER pre that you can't even fully use. Thanks again for all your hard work.
jcross22 is offline   Reply With Quote
Thanked By: pegass
Old 10/19/2009, 01:32 PM   #9 (permalink)
Member
 
Posts: 17
rwhitby - big thank you for looking at this issue. That is amazing that there are ppl like you out there

If you need help with purchasing German Pre, just say a word. I live in Germany and can help with logistics and/or activation.

Pegass

Last edited by pegass; 10/19/2009 at 01:40 PM. Reason: typoo
pegass is offline   Reply With Quote
Old 10/19/2009, 01:58 PM   #10 (permalink)
Member
 
Posts: 392
Quote:
Originally Posted by rwhitby View Post
have been able to turn the normally qwerty keyboard into a qwertz or azerty mapping.-- Rod
Okay, time for a silly question.
Is any physical modification required, and if so, how easy would that be... If not, then post mapping, will pressing the 'y' key show up as a 'z' ? (assuming QWERTZ --> QWERTY conversion)
c_man is offline   Reply With Quote
Old 10/19/2009, 03:48 PM   #11 (permalink)
Developer
 
rwhitby's Avatar
 
Posts: 10,568
Quote:
Originally Posted by c_man View Post
Okay, time for a silly question.
Is any physical modification required, and if so, how easy would that be... If not, then post mapping, will pressing the 'y' key show up as a 'z' ? (assuming QWERTZ --> QWERTY conversion)
No pyhsical modification is required, but you can use a paintbrush on the letters if you like :-)

Yes, once the token is changed, pressing the 'y' key on a german keyboard will show up as 'z'.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is online now   Reply With Quote
Old 10/19/2009, 04:16 PM   #12 (permalink)
Member
 
Posts: 38
thanks Rod what you are doing is amazing
i personally dont mind the QWERTZ keyboard but if you guys are in need of someone to test i dont mind doing it at all
i can recommend a good ebay seller for the pre in case you didnt find one.
keep up the good work
deadsoul is offline   Reply With Quote
Old 10/19/2009, 04:39 PM   #13 (permalink)
Developer
 
rwhitby's Avatar
 
Posts: 10,568
Quote:
Originally Posted by jcross22 View Post
p.s. Will this gsm phone be usable in your neck of the woods or does it operate on different bands? I'd hate to see you get yet ANOTHER pre that you can't even fully use.
My understanding is that it will be fully usable.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is online now   Reply With Quote
Old 10/19/2009, 04:41 PM   #14 (permalink)
Developer
 
rwhitby's Avatar
 
Posts: 10,568
Quote:
Originally Posted by deadsoul View Post
thanks Rod what you are doing is amazing
i personally dont mind the QWERTZ keyboard but if you guys are in need of someone to test i dont mind doing it at all
i can recommend a good ebay seller for the pre in case you didnt find one.
keep up the good work
A colleague from freesmartphone.org is purchasing the phone for me, checking it for dead pixels etc, and then shipping it to Australia.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is online now   Reply With Quote
Old 10/19/2009, 04:42 PM   #15 (permalink)
nak
Member
 
Posts: 44
You developers never cease to amaze me. Thanks a lot, Rod. Well done for taking on this project.
nak is offline   Reply With Quote
Old 10/19/2009, 05:11 PM   #16 (permalink)
Member
 
Kyusaku's Avatar
 
Posts: 1,477
I'm guessing these are hard coded layouts. So no chance for Dvorak I assume.
Kyusaku is offline   Reply With Quote
Old 10/30/2009, 02:27 PM   #17 (permalink)
Member
 
Posts: 6
I have test it , with QWERTZ GSM pre... but it does not change the keyboard layout ...

are you mind to paste your build/.../webOS/castle.xml for me to test ?

I worry I have incorrect place to add entry
garyau is offline   Reply With Quote
Old 10/31/2009, 02:57 AM   #18 (permalink)
Member
 
Posts: 6
ok now ... this is my castle.xml

----------------

<?xml version="1.0" encoding="UTF-8"?>
<!-- Installer Rules for Castle Hardware -->
<TrenchCoat>
<CPU type="OMAP34xx"/>
<Flash type="mmc" alignment="524288" device="/dev/mmcblk0">
<Entry type="mbr" size="512" align="false"/>
<Entry type="bootloader" size="192KB" file="${BOOTIE}"/>
<Entry type="nvram" size="4MB">
<Section name="env" type="env" size="16KB">
<Val name="installer" value="trenchcoat"/>
<Val name="autoboot" action="delete"/>
<Val name="bootfile" action="delete"/>
<Val name="KEYoBRD" action="overwrite" value="z"/>
</Section>
<Section name="tokens" type="token" size="4KB">
<Val name="installer" value="trenchcoat"/>
<Val name="KEYoBRD" action="overwrite" value="z"/>
</Section>
<Section name="logo-boot" type="image" file="BootLogo.tga"/>
<Section name="logo-chg" type="image" file="Charging.tga"/>
<Section name="logo-badchg" type="image" file="NoPower.tga"/>
<Section name="logo-nobatt" type="image" file="NoBatt.tga"/>
<Section name="logo-badsys" type="image" file="BadSys.tga"/>
<Section name="logo-nosys" type="image" file="NoSys.tga"/>
<Section name="logo-sync" type="image" file="Sync.tga"/>
<Section name="logo-panic" type="image" file="Panic.tga"/>
<Section name="logo-disk" type="image" file="Disk.tga"/>
</Entry>
<Entry type="ext3" size="32MB" mount="/boot"/>
<Entry type="lvm" id="pv" size="*" metadatasize="1532KB" metadatacopies="2"/>
</Flash>
<VolumeGroups>
<Group name="store" pv="pv" physicalextentsize="8MB">
<Volume id="root" type="ext3" size="456MB" mount="/"/>
<Volume id="var" type="ext3" size="2048MB" mount="/var"/>
<Volume id="update" type="ext3" size="56MB" mount="/var/lib/update"/>
<Volume id="log" type="ext3" size="40MB" mount="/var/log"/>
<Volume id="media" type="fat32" size="*" mount="/media/internal"/>
<Volume id="swap" size="128MB"/>
</Group>
</VolumeGroups>
<Filesystem fstab="/etc/fstab">
<Mount device="rootfs" mount="/" type="ext3" options="ro,suid,dev,exec,auto,nouser,async,noatime" freq="1" passno="1"/>
<Mount id="var" options="noatime" freq="0" passno="0"/>
<Mount id="log" options="noatime" freq="0" passno="0"/>
<Mount id="update" options="noauto,noatime" freq="0" passno="0"/>
<Mount device="proc" mount="/proc" type="proc" options="defaults" freq="0" passno="0"/>
<Mount device="devpts" mount="/dev/pts" type="devpts" options="mode=0620,gid=5" freq="0" passno="0"/>
<Mount device="tmpfs" mount="/tmp" type="tmpfs" options="size=64M,mode=1777" freq="0" passno="0"/>
<Mount device="tmpfs" mount="/media/ram" type="tmpfs" options="defaults" freq="0" passno="0"/>
<Mount id="media" options="utf8,shortname=mixed" freq="0" passno="0"/>
</Filesystem>
<Images>
<File file="${NOVATGZ}" target="/"/>
</Images>
<PostInstall file="/sbin/tcpostflash.sh"/>
</TrenchCoat>
garyau is offline   Reply With Quote
Old 10/31/2009, 06:01 AM   #19 (permalink)
Developer
 
rwhitby's Avatar
 
Posts: 10,568
Remove the first red line, keep the second red line.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is online now   Reply With Quote
Old 11/06/2009, 04:52 AM   #20 (permalink)
Member
 
Posts: 20
Quote:
Originally Posted by rwhitby View Post
Remove the first red line, keep the second red line.

-- Rod
Firstly huge thanks to Rod for your great work... I am so impressed with this whole community!

Has anyone trialled this on an actual imported GSM QWERTZ and found that it worked? Would be great to hear your reports. Cheers.
sucklingpig is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0