[XPERIA X1 Android Development] jolkz:
A kludge to fix dead keyboard and front buttons on Xperia X1 (HTC Kovsky) running Android (CyanogenMod 6.0) without using the touchscreen:

NOTE: This is basically a touchscreen free adaptation of forum member matejdro's excellent post here. Check that post first if you want to credit someone.

Here's a (hopefully) simple and helpful Xperia X1 (HTC Kovsky) guide for binding the reloading of keyboard/button kernel modules to the long-press home action via the physical camera button. This has only been tested with CyanogenMod 6.0 build from neopeek and seandean's v4b "advanced" kernel.

WARNING!: You must be very careful with this, since reloading these kernel modules while the keyboard is still functional will most likely result in an instant reboot. In other words, if you accidentally hold the home/camera button for too long after you follow this guide, then you might reload the keyboard kernel modules unintentionally and cause a reboot. Perhaps it might reboot even if the keyboard has died, but I've been lucky. Proceed at your own risk; no guarantees whatsoever.

When the keyboard and front buttons die on Xperia X1 aka HTC Kovsky running Android, the camera button at the side is still functional and so is the power button. This keyboard malfunction is apparently a common problem with many of the kernel builds available for X1 and makes Android's 24/7 use a bit problematic.

By default the camera button seems to map to "HOME" at least on neopeek's "Only T E S T E R S [New CM6.0 Full + Barebone][29-11-2010]" Android build with seandean's v4b "advanced" kernel.

If your kernel has the keyboard support built as modules "microp-keypad" and "microp-ksc", then the keyboard can be re-enabled by reloading those kernel modules.

Of course this is just a kludge and the preferred method would be to fix this problem in the kernel(?) code. This workaround at least makes further debugging less painful when you can actually type something on the device without ssh or USB. You could resort to using the touchscreen if that feels more natural. As a side effect the camera button can't be used for anything else, but since support for X1's camera is still a bit lacking this procedure might be acceptable for now.

All the apps that we'll use here are available for free.

1) Install GScript (http://code.google.com/p/gscript-android/ or search the Market for GScript lite)

Start GScript and add a new script with "su"-privileges. You could name it e.g. "Restart keyboard".

Type this to the command field without quotes: "rmmod -rv microp-keypad; sleep 1; rmmod -rv microp-ksc; sleep 1; insmod -v /lib/modules/microp-ksc.ko; insmod -v /lib/modules/microp-keypad.ko"

2) Go to Settings > CyanogenMod settings > Input settings > Long-press home settings.

Check "Use custom application".

Press "Select custom application" and scroll down to GScript and select it.

Now choose the custom script "Restart keyboard" you just created.

Unfortunately this makes the list of recent applications unaccessible with long-press home action, but we'll fix that in the next step.

3) Since we'd still like to retain a list of recent applications, install Task Switcher (com.shisho.taskswitcher) from Market.

Now the first press of "Home" brings up a list of recent applications and 2nd press functions as default Home-action.

So even if the keyboard becomes unresponsive alongside with the front buttons, we can still use the camera button at the side of the device like this:

a) Long press to reload keyboard/button modules so that they work again

b) One click to show a list of recent applications

c) Double click to get default "Home"-action.

With this kludge, at least for me, Xperia X1 aka HTC Kovsky becomes suitable for daily use with Android.

Thanks to all the developers and testers!