Android m5-rc14 on Zaurus C700

Wow! Android m5-rc14 runs on Zaurus C700!

http://d.hatena.ne.jp/steleto/20080411/1207928969 - Japanese
http://d.hatena.ne.jp/steleto/20080412/1207978273 - Japanese

Roughly translation is;
I can't believe myself. Android m5-rc14 runs on my C700! Even though I didn't port double buffer support in frame buffer driver.

What I have done is pretty much the same process with m3 porting. Build the kernel with Android patch and prepare the m5 images from SDK. That's it. Again, I haven't done anything for double buffer support.

There are some issues;
o flickering
o not tested network yet
o cursor key jumps around on Home menu
Big congratulations to steleto! Great job!

After I ported m5 to C3000 successfully, I looked into w100fb.c to check fisibility of C700. There's no mmap, so I thought it would be very difficult to port m5 to C700. But Android is way more flexible than my guess.

Current my guess is Android draws display by imageblit() if mmap() is not available. I'm discussing with steleto why m5 runs without double buffering in frame buffer driver. I'll post another article as soon as possible, if there is any progress in investigation.


posted by 安藤恐竜 at 12:14 | Comment(8) | TrackBack(0) | 日記


Touchscreen and RotateView

Quick update. I tested Pointer Location after rotating view from portrait to landscape using my RotateView.apk. It works fine. Dots appears wherever I touch on the screen. Android system takes care of not only the view style itself but also touchscreen coordinates.

It's a good news for platform developers. Just make sure that touchscreen driver generates correct absolute positions in default view, then Android system takes care of rotation.

Still there is one issue. Calibration. How and who calibrate touchscreen?
posted by 安藤恐竜 at 08:41 | Comment(0) | TrackBack(0) | 日記


Touchscreen Driver - a small improvement

Today, I found myself a bit of spare time and played with corgi_ts.c to make touchscreen better. First, I put a printk line in corgi_ts.c to see what kind of value is passed to Android. The coordinate was in landscape view, origined from top-left. The default style of Android is landscape view. It wouldn't work.

So, I wrote a small patch to swap the coordinate like this;
diff -ur linux-2.6.23/drivers/input/touchscreen/corgi_ts.c linux-2.6.23-new/drivers/input/touchscreen/corgi_ts.c
--- linux-2.6.23/drivers/input/touchscreen/corgi_ts.c 2008-03-18 18:39:56.779191359 +0900
+++ linux-2.6.23-new/drivers/input/touchscreen/corgi_ts.c 2008-03-18 19:44:02.823705338 +0900
@@ -183,11 +183,14 @@
if (!corgi_ts->tc.pressure && corgi_ts->pendown == 0)

- input_report_abs(dev, ABS_X, corgi_ts->tc.x);
- input_report_abs(dev, ABS_Y, corgi_ts->tc.y);
- input_report_abs(dev, ABS_PRESSURE, corgi_ts->tc.pressure);
- input_report_key(dev, BTN_TOUCH, corgi_ts->pendown);
- input_sync(dev);
+ if ((X_AXIS_MIN < corgi_ts->tc.y && corgi_ts->tc.y < X_AXIS_MAX) &
+ (Y_AXIS_MIN < corgi_ts->tc.x && corgi_ts->tc.x < Y_AXIS_MAX)) {
+ input_report_abs(dev, ABS_X, Y_AXIS_MAX - corgi_ts->tc.y);
+ input_report_abs(dev, ABS_Y, corgi_ts->tc.x);
+ input_report_abs(dev, ABS_PRESSURE, corgi_ts->tc.pressure);
+ input_report_key(dev, BTN_TOUCH, corgi_ts->pendown);
+ input_sync(dev);
+ }

static void ts_interrupt_main(struct corgi_ts *corgi_ts, int isTimer)
@@ -267,6 +270,18 @@
#define corgits_resume NULL

+static int corgits_open(struct input_dev *input)
+ printk("corgi_ts: open\n");
+ return 0;
+static void corgits_close(struct input_dev *input)
+ printk("corgi_ts: close\n");
+ return;
static int __init corgits_probe(struct platform_device *pdev)
struct corgi_ts *corgi_ts;
@@ -302,10 +317,13 @@
input_dev->id.version = 0x0100;
input_dev->dev.parent = &pdev->dev;

+ input_dev->open = corgits_open;
+ input_dev->close = corgits_close;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
- input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
- input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
+ input_set_abs_params(input_dev, ABS_X, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
+ input_set_abs_params(input_dev, ABS_Y, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0);

pxa_gpio_mode(IRQ_TO_GPIO(corgi_ts->irq_gpio) | GPIO_IN);
It looks OK. Pointer Location applet in Dev Tools works fine. It draws lines between dots where I tapped with a stylas pen. And pressure value is passed correctly. Red bar on the top of following image shows pressure value passed from touchscreen driver.

But. Still touchscreen works only in the first applet. If I switch to Google Map after playing with Pointer Location, touchscreen input is gone. After reboot, I tried Google Map first, touchscreen works.

Anyway, one step at a time.

posted by 安藤恐竜 at 19:23 | Comment(32) | TrackBack(0) | 日記


By the way, what red cylon is?

I often refer the startup screen of Android as "red cylon." Though I'd like to call it Knight Rider, I use "cylon" because of my respect to the gurus like;
o Dump Android emulator root filesystem (yaffs2 filesystem) - Android Developers | Google Groups
From: John Bloom
Date: Wed, 14 Nov 2007 03:42:14 -0000
-- snip --
Update: Even as I type this I'm watching the "cylon" (red moving dot) startup screen on my Zaurus.
You will be amazed if you remember that the first Android SDK was released on Nov 12. It took only a few days for them to reach to startup screen.

But I didn't know what cylon means actually. I googled and found it's a character in Sci-Fi TV program, Battlestar Galactica.
o Cylon (Battlestar Galactica) - Wikipedia

Yep. It is Cylon.

posted by 安藤恐竜 at 18:25 | Comment(2) | TrackBack(0) | 日記


RotateView for Android SDK m5-rc14/rc15

Gee. I forget to release m5-rc14/rc15 version of my RotateView.apk. Unzip following file and copy RotateView_m5/bin/RotateView_m5.apk to android-root/data/app as usual.
o RotateView_m5.tar.gz

It would be a fun thing to try to copy it while your Zaurus or emulator showing the Android Home menu. Right after copy is done, an icon pops up from nowhere.

A bit of story. The same day m5-rc14 was released, I ported my applet from m3 to m5 to see how the porting would be. Since then I work for booting Zaurus up with m5-rc14 all my spare time and totally forget about RotateView.

Cortez has already released his Android m5-rc14 installable image for C3x00, now I guess I better update RotateView too.
o Omegamoon blog - Latest Android m5-rc14 Installation Image for Zaurus SL-C3x00

posted by 安藤恐竜 at 18:15 | Comment(0) | TrackBack(0) | 日記


A better frame buffer driver for Android Zaurus

I studied Brilliant Service's mxcfb.c patch more carefully.
o Android Zaurus: Android on Armadillo - Patch for frickering

An interesting thing is set_par() returns immediately and set_par_init() is introduced. I contacted Brilliant Service and they kindly told me that FBIOPUT_VSCREENINFO in fbmem.c calls set_par() all the time. Then I looked into pxafb.c and found a bit of hardware access in set_par(). It would be problematic.

And there is another possibility of improvement. With the last patch, frame buffer is flipped between two buffers. Changing calculation of DMA address could make it dot by dot panning.

Anyway, I quickly modified the code and it works for me.
o pxafb-patches.tar.gz

Scrolling in web pages becomes way faster. And some issues in updating display are gone. I had problems in navigating on Home menu. First I thought key event issue but turned out to be display updating issue.

The tar file has two patch files.
o pxafb-doublebuffer.patch: patch against vanilla kernel (
o pxafb-oe-doublebuffer.patch: patch against OpenEmbedded linux-rp-2.6.23

pxafb-oe-doublebuffer.patch gives better idea how the implementation is. pxafb-doublebuffer.patch can be actually applied as a patch to vanilla kernel driver.

posted by 安藤恐竜 at 19:01 | Comment(0) | TrackBack(0) | 日記


Android on Armadillo - Patch for frickering

Last month I reported Brilliant Service ported Android to Armadillo-500.
o Android Zaurus: Android on Armadillo-500

It has a minor issue. Flickering. Video driver of Armadillo-500 (drivers/video/mxc/) has pan_display() function, but Brilliant Service found that implementation is not good enough. Display flickers a lot. Finally they pointed out fb_set_par() initializes IPU all the time and come up with a nice patch.

o mxcfb.c.patch
o An article regarding flickering patch (Japanese)

The original kernel source customized for Armadillo-500 can be found in Support page of Atmark Techno.

The change in Android m5-rc14, double buffering requirement, causes a bit of trouble for guys who are working with real targets. Zaurus was one of them. OMAP5912 OSK was another victim. Dirk Behme kindly let me know he also fixed an issue in omapfb_main.c.
o Android on OMAP - eLinux.org

If anyone has trouble booting Android m5-rc14 or m5-rc15 on real target, these patches might be helpful how to implement double buffering support in frame buffer driver.
posted by 安藤恐竜 at 19:26 | Comment(1) | TrackBack(0) | 日記


Improvement of double buffer

Changing DMA address in application context is too dangerous.
Today, I experimented to say schedule_work() in pan_display() instead of changing address at once.
o pxafb-doublebuffer-schedule.patch

It works for me. And it solves a long cycle frickering issue, which might be caused by timing of DMA address change.

Other than pxafb, I find my old qwerty.kl patch works on m5_rc14, too.
o Android Zaurus: Portrait/Landscape and Keycode

If you have already downloaded my SD bootable image, you can find the patched file in /media/card/rfs/system/usr/keylayout.

posted by 安藤恐竜 at 19:53 | Comment(0) | TrackBack(0) | 日記


m5_rc14 works on my Zaurus C3000

I experimented double buffer and pan in pxafb.c and it works for me. Very first time I saw the new tile menu on my Zaurus.
m5_rc14-home.png     m5_rc14-poweroption.png
Cursor keys work weird and something very funny with key board. I need to check key codes again to see how to fix it.

Anyway, this is my implementation of double buffer. Any suggestions to make it better are always welcome.
o pxafb-doublebuffer.patch

I referred this post in a mailing list to get some ideas how to implement a pan function.
posted by 安藤恐竜 at 16:43 | Comment(11) | TrackBack(0) | 日記


m5_rc14 porting - frame buffer needs double buffering and pan function

In a discussion at OESF, we reached double buffering in frame buffer driver is the key to escape from blank screen issue. Experiments by Mrflying and Cortez helped a lot.
o Porting M5rc14 To Real Hardware

Cortez made m5_rc14 run on his Zaurus finally.
o Android m5-rc14 working on Zaurus SL-C3100!

pxafb.c in vanilla kernel doesn't have double buffering and pan function. So anyone wants to port m5_rc14 to a real target, my suggestion is studying the Goldfish driver to know how implemented. Comparing fops is a place to start.

posted by 安藤恐竜 at 11:55 | Comment(2) | TrackBack(0) | 日記


Confusing issue of Android m5_rc14

I'm working on and off porting m5_rc14 to Zaurus. Yet I haven't seen anything on LCD. Just black out. In the emulator, fb0 the frame buffer device is in /dev/graphics instead of /dev like Zaurus Angstrom. Crossing fingers, I copied it to graphics directory.
# mkdir /dev/graphics
# cp /dev/fb0 /dev/graphics/fb0
# chmod 666 /dev/graphics/fb0
No luck. Still blank screen. Though fuser command and strace says that runtime and dalvikvm opens successfully /dev/graphics/fb0. Weird.

When I try to see Android log by logcat command, it says an error
/dev/log: Not a directory
Well, it is not a directory but a file in Zaurus. In the emulator, it is a directory. So I checked the source code of the logger and found
#define LOGGER_LOG_RADIO	"log_radio"	/* radio-related messages */
#define LOGGER_LOG_EVENTS "log_events" /* system/hardware events */
#define LOGGER_LOG_MAIN "log_main" /* everything else */
in include/linux/logger.h. This is really weird. logcat expects /dev/log as directory and logger driver creates log_xxx in /dev. Is there any glitches between m5_rc14 kernel and m5_rc14 Android?
posted by 安藤恐竜 at 11:16 | Comment(13) | TrackBack(0) | 日記


Android on real handset, well sort of.

A lab of Tokyo University of Technology successfully ported Android on to their handset.

Unfortunatelly most of information about this handset is written only in Japanese.
o 工科大ケータイ (Top page)
o ハードウェアの詳細 (Specification)

CPU is PXA272 running at 416MHz with 128MB RAM and 64MB Flash. LCD is QVGA 2.22 inch. Network access is IEEE802.11b wireless LAN. I/Fs are USB, CF and audio.

Basically this handset is developed for academic and educational purpose of VoIP and SIP. Supporing Android is a good idea for educational usage because Android will be an open source.

You can actually buy a set at 700 USD price tag. But No support, No software, No English, No nothing. Just a piece of hardware. If there is anyone really deadly serious about how to get one, e-mail me and I'll contact them.

posted by 安藤恐竜 at 14:12 | Comment(0) | TrackBack(0) | 日記


Android SDK m5_rc14 release

As previously announced, Google released a new version of Android SDK.

Geek news sites have some reports, like Gizmodo and Engadget. One advice for anyone trying the new SDK who alread have installd older one, read instruction carefully. You need to wipe out old data.
Then, run one of these commands:
  o Windows: emulator -wipe-data
o Linux and Mac: ./emulator -wipe-data
Wait for the emulator window to appear and to boot completely. Once it has, you may close the window and proceed.
Without wipe-data, you can not play with new API Demos.

These images are captured from the emulator. Home, image list view and 3D transition. New GUI APIs!
Screenshot-Android Emulator-m5-rc14-home.png    Screenshot-Android Emulator-m5-rc14-list.png    Screenshot-Android Emulator-m5-rc14-3dtrans.png

OK, that's emulator thing. Let's move on to Android Zaurus, my interest.

I've tried to boot the new Android image on my Zaurus. No luck yet. I've taken a diff between latest kernel source and previous one, then apply it as a patch in Angstrom development environment to make a matching latest kernel. No happy yet. I found binderdev.ko can not be built as module anymore. It should be built in tightly to the kernel as well as android_power.

By looking into the diff file, I learned power management modules are heavely patched. The reason why m5_rc14 can not be booted on Zaurus might be related to the power management, I guess. After booting up Android, I even can not see the famous red cylon. Just sits dead blank. Eventually Zaurus goes suspend mode. Once in a while it gives me a message
android_power_wakeup 2->0
posted by 安藤恐竜 at 18:21 | Comment(4) | TrackBack(0) | 日記


Android on real handset

Wow! I say only wow! Great job!

Hands-on with Google Android-based E28 touchscreen phone

posted by 安藤恐竜 at 10:27 | Comment(4) | TrackBack(0) | 日記


Android in Barcelona

Mobile World Congress starts and a lots of news come up. I picked up some.

An official announcement lists up who are involved.
o Open Handset Alliance

Engadget posts lots of photos.
o Google attacks: Android at Mobile World Congress

Washington Post reports comprehensively including some interesting interviews.
o Android Comes to Life in Barcelona
Qualcomm's demonstration of its 7201 combined baseband and application processor sparkled, but did not exploit the chip's full potential. The spinning globe of Android's Global Time application turned smoothly even without the assistance of the 3D graphics hardware acceleration, for which the drivers are not yet ready, said Rob Woodford.
Hmm... I've never seen such an applet. Qualcom developed a world clock applet? Or, is a sneak preview of the next version SDK?
posted by 安藤恐竜 at 09:30 | Comment(0) | TrackBack(0) | 日記


Yet Another Hotpepper Applet for Android

Adamrocker posted a new applet on his blog article, An implementation of map applet for Android. This is another mash up applet of Google Map and Hotpepper. He also included Yahoo! Map service as searching landmarks.

In his article there is a screen cast which explains well how it works. If you wonder where the link to the applet, Download the around_here.apk is the executable applet and Download the around_here.zip is a whole project including source code.

By the way, Adamrocker always posts his applets with source codes. His codes are very educational. Anyone who wants to learn how to write an applet for Android but doesn't have much experience in Java programming, yeah like me, his openess is very helpful.

As usual, I took some screenshots with my Android Zaurus.

With cursor keys, you can move around Tokyo. Anywhere you want to find restarurants, hit [R] key, then [L] key. An overlay window pops up and you get a list of restaurants up to 20. [H] key shows you a bit of help messages.
aroundhere1.png    aroundhere2.png

Type the number on the list then hit [Space] key. Detail information of the restaurant pops up. If the restaurant info has URL to its Web, you can go to browse by clicking it.
aroundhere3.png    aroundhere4.png

Restaurant search function uses Hotpepper Web API. There is another search function. Landmark seach, which uses Yahoo! Map Web API. It searches landmarks such as schools, theaters, banks near the location.
aroundhere5.png    aroundhere6.png

There is one note for someone who wants to build his applet from source codes. Using Hotpepper and Yahoo! Map Web API requires IDs which is unique to each developers. You must get your ID from Hotpepper and Yahoo!, then hardcode the value to
  private String HOTPEPPER_KEY = "hogehoge";
private String YAHOO_KEY = "hugahuga";
in AroudHere.java.

Have fun.
posted by 安藤恐竜 at 13:23 | Comment(0) | TrackBack(0) | 日記


More hot Hottpepper applet

I introduced an Android applet in the previous post, More Android Applets, called Hotpepper developed by EAST Co. Ltd. Because the touchscreen of Android Zaurus still won't work correctly, I couldn't move across the map. I wrote it in the post.

Now, guys from EAST Co. Ltd. oviously read the artcle and came back with a revised version of their Hotpepper applet. The map window grabs the key focus, so I can move around Tokyo on the map. It is a really fun thing to play with.

You can download the applet from http://bizpal.jp/ocean.android/00002.


After launching the applet, you can move around on the map by pressing cursor key. Hit the [Enter] or [OK] wherever you want, the key focus goes to [検索/詳細(Search/Detail)] window. Just hit [Enter] again, the restaurants near the location are listed. Select the restaurant you want to see the detail then [Enter] and move cursor to [詳細(Detail)]. Detail information such as address, phone number, speciality dishes will be shown. The volume up key works as [Search] and the volume down key works as [Detail], too.

I feel really good about openess of Android. I left a comment only on my blog and guys from EAST Co. Ltd. picked it up. It is a fine example of Web 2.0 world.

Thank you very much, EAST Co. Ltd. Good luck in Android Developer Challenge!

posted by 安藤恐竜 at 20:08 | Comment(0) | TrackBack(0) | 日記


Android on Armadillo-500

A very interesting movie I found on YouTube.

Brilliant Service, a Japanese company ported Android to an ARM based evaluation board, Armadillo 500. CPU of Armadillo 500 is i.MX31L (ARM11 core) which runs at 400MHz. Eventhough CPU clock is close to Zaurus, the movie shows Android Armadillo runs a lot faster than Android Zaurus.

The post note of the movie says Brilliant Service could be reachable at query@brilliantservice.co.jp.

Unfortunatelly, I could not find any further information on the company Web. But it says their business has certain relations with Sharp and cellular phone devices. I take it a possitive sign.

posted by 安藤恐竜 at 07:22 | Comment(0) | TrackBack(0) | 日記


Videos by eu.edge

eu.edge puts up two movies of Android running on Zaurus.

o Videos of Google Android on Zaurus

They are the very first guys who successfully bring Android up on Zaurus. I thank and respect them.

Have fun,
posted by 安藤恐竜 at 09:43 | Comment(0) | TrackBack(0) | 日記


A trouble to write a comment?

I noticed that a lot of accesses to the page for submitting comments. And me myself have difficulties to write comments back.

I guess the hosting site, seesaa.net, has some troubles for now. Even I was annoied a dead link of my own post a few days ago.

Please be patiant for now. It will be fixed at sometime later. If you have something to bark at me, send me an email to androidzaurus@yahoo.co.jp.

posted by 安藤恐竜 at 22:08 | Comment(0) | TrackBack(0) | 日記




・マイブログの【設定】 > 【広告設定】 より、「60日間更新が無い場合」 の 「広告を表示しない」にチェックを入れて保存する。