Sunday, January 1, 2012

Synchro Digital WM8650 Win CE to Android

Okay, so I'm visiting relatives for post-Christmas and New year's in France. Let us just say that someone bought a "Synchro Digital WM8650 Win CE". Anyway, after they saw all of Windows CE's (affectionately known as Crippled Edition) wonders or lack thereof they were jealous of the Android device(s) I was simultaneously showing off, they asking if I could look into installing Android on their WM8650.

To my surprise this Netbook has quite a large community behind, presumably because of it's lo-cost. WonderMedia has also released the kernel sources here. There is at least one (android) ROM specifically targeting the ARM 8650 SoC chipset; namely Uberoid by HcH. However, I discovered the best candidate ROM was Modroid v11 (download : release page) by Wicknix (I found it after reading this article which is mainly discussing Linux ports such as debian/ubuntu/gentoo to WM8650) so I went with it. These devices don't boot in the same way as an Intel/AMD so it's not so straight forward to dual-boot them (but I believe it is possible if you boot the second OS off the SD card, but I don't know how to do that), and, it wasn't necessary for me as the goal was to completely replace WinCE. Obviously, there is no CD drive so booting from one of those is out of the question. After doing a little research it turns out that WonderMedia (and others) can boot from the SD card so far as there is a file called "wmt_scriptcmd" in the root of the target boot volume. Any usable ROM should include this file. Everything else is as straight forward as this:

  1. Download modroid.
  2. Format an SD card (FAT32 should be fine, i.e. it worked for me) and unzip modroid to the SD-card.
  3. !!!WARNING!!! This step will erase WinCE and any data you have saved completely. Plug the SD-card into the WM8650 and watch modroid install itself. It will ask you to eject the SD-card and reboot once it is finished. 
  4. The first boot should take a little while so maybe make yourself a cup of tea.
  5. Modroid should boot into a fresh system. All done!!!
Those of you that are interested should note that the linux bootstrap (and maybe it is the same for CE) is U-boot and I believe it is possible to create custom boot scripts (I think these are the same kinds of scripts as the one shipped (wmt_scriptcmd) with the ROMs).

FINALLY, there is one last twist to my tale. My target device's keyboard was in French (skip to the end if you're not into reading all the text). Changing the language/keyboard in the Android settings simply changes the language and not the keyboard. According to some posts around on the net, this could be because these ROMs kernels have hardcoded keymaps/layouts (as opposed to linux modules) not sure how credible this is (however for those interested the solution suggested was to deflate the image add the kernel params "keypad="azerty"" and repack it). I did a little digging and it seems that libui.so is associated with the installed keylayouts (under /System/usr/keylayout) and with one of the libwmt*.so. 

Finally, I went in with the solution of making a backup copy of /system/usr/keylayout/qwerty.kl and replacing it with the keylayout "french.kl". This at least means the alphabetic characters are mapped correctly, however some of the symbols need to be refined ... I will post if and when I refine them...

**edit**

The ".kl" seem to be tab-delimited, the characters that map to keycodes are uppercase (e.g. COMMA). I'm having difficultly finding the mapping between these uppercase variables and the actual character/code which is output, I believe part of it lies in "linux/input.h" but that's not the whole story. If only I knew where the libui source was...

**edit**

Might be able to figure out which of the number keys are supposed to be mapped in french.kl. Using https://github.com/asedeno/unkcm

**edit**

ref: http://lxr.post-tech.com/source/frameworks/base/include/ui/KeycodeLabels.h
ref: http://lxr.linux.no

**edit**

spent the last couple of hours with the answer staring me in the face. rename qwerty.kcm.bin to qwerty-original.kcm.bin, and, place a copy of french.kcm.bin in place of qwerty.kcm.bin.