Android Screen Monitor is a must-have application for Android developers.
o http://www.adakoda.com/adakoda/android/asm/
ASM transfers continuously screen captures from an attached Android device to your PC. It is very useful when you make a presentation using PC, projector and of course your Android device.
Because ASM leverages adbd functions, you may experience "lost connection" issue once in a while. If it happens, give an "adb kill-server" - "adb start-server" cycle as usual.
A tip for installation. If you don't set PATH to Android SDK, copy the ASM to sdk/tools directory.
Anyway, a big thank you to adakoda san for sharing this amazing software!
Cheers,
06/21/2009
04/07/2009
Android 1.5 on Zaurus
In Android source code repository, cupcake (Android 1.5) has been merged to master branch. Current implementation of SystemServer.java throws exceptions and Android doesn't boot up properly.
Quick hack. Let the system thinks battery is healthy. Here's my patch.
Cheers,
Quick hack. Let the system thinks battery is healthy. Here's my patch.
Cheers,
12/19/2008
Bootchart on Android
I tried bootchart to see how Android boots up and how long each process takes.
First, rebuild /init with bootchart enabled.
Copy it to Zaurus and setup environment as written in README.BOOTCHART in system/core/init.
Make android-root/tmp directory and boot Android up.
After shutting Android down, copy grab-bootchart.sh to the same directory as the adb tool.
In grab-bootchart.sh, adb is executed without path and I don't set PATH to adb, so simply modify the scrpit from "adb pull" to "./adb pull".
Boot Android up on Zaurus again, then run the script on the host PC.
On Ubuntu 8.04, the visualizer can be installed by apt-get.
The result, bootchart.png, looks like this.

First, rebuild /init with bootchart enabled.
$ cd mydroid
$ export INIT_BOOTCHART=true
$ make clean
$ make
Copy it to Zaurus and setup environment as written in README.BOOTCHART in system/core/init.
$ scp out/target/product/generic/root/init root@zaurus:~/android-root/
$ ssh root@zaurus
# echo 1 > android-root/data/bootchart
# echo 5 > android-root/data/bootchart-stop
Make android-root/tmp directory and boot Android up.
# mkdir android-root/tmp
# chmod 777 android-root/tmp
# chroot android-root /init
After shutting Android down, copy grab-bootchart.sh to the same directory as the adb tool.
$ cp mydroid/system/core/init/grab-bootchart.sh mydroid/out/host/linux-x86/bin
$ cd mydroid/out/host/linux-x86/bin
In grab-bootchart.sh, adb is executed without path and I don't set PATH to adb, so simply modify the scrpit from "adb pull" to "./adb pull".
Boot Android up on Zaurus again, then run the script on the host PC.
$ export ADBHOST=zaurus
$ ./adb kill-server
$ ./adb start-server
$ sudo ./grab-bootchart.sh
On Ubuntu 8.04, the visualizer can be installed by apt-get.
$ sudo apt-get install bootchart
$ java -jar /usr/share/bootchart/bootchart.jar ./bootchart.tgz
The result, bootchart.png, looks like this.
10/24/2008
Porting Open Source Android to Zaurus
Big congratulations to Android team and even bigger thanks to make things happen.
o Android is now Open Source
There is only one final touch left for my project.
I built Android framework from scratch as described in source.android.com and bring the image to my Zaurus. It works as expected with one exception.
I received SEGV everytime I type something on the keyboard. It is resolved by copy keyboard configuration files and change permission.
By the way, T-Mobile G1 is unleashed with debuggerd enabled. It means you can debug your application running on G1. It is really sweet.
o Developing on Device Hardware - code.google.com
I assume debugging over WLAN also works. If you have G1, this is worth to try, I guess.
From your PC installed Android SDK 1.0,
Cheers,
o Android is now Open Source
There is only one final touch left for my project.
I built Android framework from scratch as described in source.android.com and bring the image to my Zaurus. It works as expected with one exception.
I received SEGV everytime I type something on the keyboard. It is resolved by copy keyboard configuration files and change permission.
# cd android-root/system/usr/keylayout
# cp qwerty.kl Spitz_Keyboard.kl
# chmod 666 *
# cd ../keychars
# cp qwerty.kcm.bin Spitz_Keyboard.kcm.bin
# chmod 666 *
By the way, T-Mobile G1 is unleashed with debuggerd enabled. It means you can debug your application running on G1. It is really sweet.
o Developing on Device Hardware - code.google.com
I assume debugging over WLAN also works. If you have G1, this is worth to try, I guess.
From your PC installed Android SDK 1.0,
$ export ADBHOST="G1 IP address connected through WLAN"If it successfully gives you a console, now Eclipse environment should be able to talk to your phone.
$ ./adb kill-server
$ ./adb start-server
$ ./adb devices
$ ./adb shell
Cheers,
09/25/2008
KeycodeChecker.apk for Android 1.0
Finally, Android 1.0 SDK has been released. The kernel is exactly same as Android 0.9. Just poring system image into my Zaurus, Android 1.0 works fine.
I rebuild KeycodeChecker on 1.0 SDK.
o KeycodeChecker-1.0-r1.zip
Just in case, if anyone is looking for keylayout file working on Zaurus, here is the one.
o qwerty.kl.zip
One issue currently I'm working on. Landscape view and portrait view issue. Until SDK m5, Zaurus booted up in portrait view which is hardware buffer aligned. But with Android 0.9 and 1.0, Zaurus boots in landscape view. It has huge impact to performance. I used to run my RotateView.apk to make adjustment, but the APIs RotateView uses have gone. I'm looking for alternative API but still can not find.
Cheers,
I rebuild KeycodeChecker on 1.0 SDK.
o KeycodeChecker-1.0-r1.zip
Just in case, if anyone is looking for keylayout file working on Zaurus, here is the one.
o qwerty.kl.zip
One issue currently I'm working on. Landscape view and portrait view issue. Until SDK m5, Zaurus booted up in portrait view which is hardware buffer aligned. But with Android 0.9 and 1.0, Zaurus boots in landscape view. It has huge impact to performance. I used to run my RotateView.apk to make adjustment, but the APIs RotateView uses have gone. I'm looking for alternative API but still can not find.
Cheers,
09/09/2008
V8 on Angstrom Zaurus
Chrome shines! V8 rocks!
I've been using Chrome since release and love more and more. Chrome is maximized on my desktop all the time and I'm crusing the Net with shortcut keys.
Chrome on Android is rumored. And amazingly V8 the Javascript engine is already ported to ARM. I couldn't wait for Android Chrome, so tried to build V8 for Zaurus.
First of all, grab the source code.
Quick dirty hack. Batch build, I tried.
First dry run scons on PC to generate script file.
Finally I got libv8.a and shell program
Conclusion. V8 does run on ARM. V8 on Android will be possible once source code becomes available.
Cheers,
I've been using Chrome since release and love more and more. Chrome is maximized on my desktop all the time and I'm crusing the Net with shortcut keys.
Chrome on Android is rumored. And amazingly V8 the Javascript engine is already ported to ARM. I couldn't wait for Android Chrome, so tried to build V8 for Zaurus.
First of all, grab the source code.
svn checkout http://v8.googlecode.com/svn/trunk/ v8I tried to cross compile by modifing scons scripts, but no luck. Next I tried to port scons itself to Angstrom but so many problems, then forgot about it.
Quick dirty hack. Batch build, I tried.
First dry run scons on PC to generate script file.
$ scons -nQ toolchain=gcc arch=arm library=static os=linux sample=shell > build.sh 2>&1Copy it and add #!/bin/sh at the fist line, add executable permission and fire it.
# ./build.shIt looks V8 is really ported to ARM. It is promissing. I modified build.sh adding;
src/macro-assembler-arm.cc:66:2: error: #error "for thumb inter-working we require architecture v5t or above"
-march=armv5te -mtune=xscaleto tell compile generate Armv5t binary. There is a little patch required to compile platform-linux.cc
diff -ur --exclude .o v8/src/platform-linux.cc v8-work/src/platform-linux.ccAnother and final touch to build.sh is required to avoid JS2C script. Commnet out JS2C line and copy libraries.cc from PC. I guess this libraries.cc is platform independent, so just scons on PC and pull obj/relrease/libraries.cc to Zaurus.
--- v8/src/platform-linux.cc 2008-09-03 11:42:30.000000000 +0900
+++ v8y-work/src/platform-linux.cc 2008-09-07 11:02:35.226762251 +0900
@@ -567,8 +567,10 @@
ucontext_t* ucontext = reinterpret_cast(context);
mcontext_t& mcontext = ucontext->uc_mcontext;
#if defined (__arm__) || defined(__thumb__)
- sample.pc = mcontext.gregs[R15];
- sample.sp = mcontext.gregs[R13];
+ // sample.pc = mcontext.gregs[R15];
+ // sample.sp = mcontext.gregs[R13];
+ sample.pc = mcontext.arm_pc;
+ sample.sp = mcontext.arm_sp;
#else
sample.pc = mcontext.gregs[REG_EIP];
sample.sp = mcontext.gregs[REG_ESP];
Finally I got libv8.a and shell program
# file shellI tried to run benchmark script in source tree but the program dies in out of memory.
shell: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14,
dynamically linked (uses shared libs), not stripped
# ./shell
V8 version 0.3.0
> for (var n in function() { return this } () ) print(n)
n
escape
unescape
decodeURI
decodeURIComponent
encodeURI
encodeURIComponent
load
quit
version
> quit()
~/work/v8/benchmarks# ../shell run.js
#
# Fatal error in CALL_HEAP_FUNCTION
# Allocation failed - process out of memory
#
Aborted
Conclusion. V8 does run on ARM. V8 on Android will be possible once source code becomes available.
Cheers,
08/28/2008
double buffer patch of pxafb for linux-2.6.26
The latest Angstrom development environment gives me a nice linux 2.6.26 kernel but there is a drawback. The frame buffer driver degrades a bit. Overlay function and higher color depth support is gone.
The source code of frame buffer driver in 2.6.23 version can not be compiled against 2.6.26 environment.
Based on the same strategy as 2.6.23 version, I wrote a small patch to handle double buffering and pan function for 2.6.26 version. Following is the patch file which is working fine for me.
o pxafb_doublebuffer.patch.bz2
The touchscreen driver is not working satisfactorily. Once I manage to make it work, I'll upload a pactch on this blog.
Cheers,
The source code of frame buffer driver in 2.6.23 version can not be compiled against 2.6.26 environment.
Based on the same strategy as 2.6.23 version, I wrote a small patch to handle double buffering and pan function for 2.6.26 version. Following is the patch file which is working fine for me.
o pxafb_doublebuffer.patch.bz2
The touchscreen driver is not working satisfactorily. Once I manage to make it work, I'll upload a pactch on this blog.
Cheers,
08/25/2008
Network is up - Android 0.9 SDK beta
I checked system propertis in the emulator.
net.dns1 sounds very interesting, so I modified android-root/default.prop, adding;
Chrees,
$ ./emulator &There is a new property [net.dns1] and [net.dns2].
$ ./adb shell
# getprop
net.dns1 sounds very interesting, so I modified android-root/default.prop, adding;
net.eth0.dns1=208.66.222.222OK. Network is up. Now I can browse the Internet and see Street View with Map application.
net.dns1=208.67.222.222
Chrees,
08/23/2008
Android 0.9 SDK beta - Up on Zaurus
Android Rocks! Zaurus Rules!
Android 0.9 SDK beta now runs on my Zaurus C-3000.
Booting... Hello, Goodie.

Home Screen. A nice big clock.

Applications. I want more apps.

Tips for porting.
o Get kernel tar ball from http://code.google.com/p/android/downloads/list
o Look into mm/ashmem.c and drivers/android.
o Port ashmem and drivers/android to your platform. My case, linux-2.6.26 which the latest Angstrom uses.
o Double buffering and pan functions for frame buffer driver is now mandatory.
Things not working yet.
o Network. Where should I put net.eth0.dns1?
o Touchscreen. It works very poor.
o Keyboard configuration. Mostly same as good old qwerty.kl but not ported yet.
o Sound. Haven't check it.
Anyway. So far, so good.
Cheers,
Android 0.9 SDK beta now runs on my Zaurus C-3000.
Booting... Hello, Goodie.
Home Screen. A nice big clock.
Applications. I want more apps.
Tips for porting.
o Get kernel tar ball from http://code.google.com/p/android/downloads/list
o Look into mm/ashmem.c and drivers/android.
o Port ashmem and drivers/android to your platform. My case, linux-2.6.26 which the latest Angstrom uses.
o Double buffering and pan functions for frame buffer driver is now mandatory.
Things not working yet.
o Network. Where should I put net.eth0.dns1?
o Touchscreen. It works very poor.
o Keyboard configuration. Mostly same as good old qwerty.kl but not ported yet.
o Sound. Haven't check it.
Anyway. So far, so good.
Cheers,
08/21/2008
Android 0.9 SDK beta
Long awaited Android SDK was finally released as 0.9 beta.
o http://code.google.com/android/index.html
I have tried to boot it up on my Zaurus. No luck yet. /init dies with a segmentation fault. Maybe I need to port some drivers from the latest Android kernel.
o http://code.google.com/p/android/downloads/list
Here is my first impression of the emulator.
Cheers,
o http://code.google.com/android/index.html
I have tried to boot it up on my Zaurus. No luck yet. /init dies with a segmentation fault. Maybe I need to port some drivers from the latest Android kernel.
o http://code.google.com/p/android/downloads/list
Here is my first impression of the emulator.
- Copy and Paste. Huge advantage to iPhone, for now.
- WebView works much better than m5.
- Street View rocks!
- Conference call function. Android becomes a cutting edge phone.
- Science Calculator.
$ ./emulator &Since rootfs is mounted as read only, you need to remount it after booted the emulator.
$ ./adb shell
# mount -o remount,rw rootfs /
# mkdir /tmp
# /system/bin/dumpstate
# exit
$ ./adb pull /tmp/state state.log
$ more state.log
Cheers,
08/01/2008
Current kernel image and cumulative patch
Following is an Angstrom image which is working on my Zaurus C3000.
o Angstrom-console-image-glibc-ipk-2007.11RC1-spitz-installkit.tgz
My case, lowmemorykiller is built as a module.
o lowmemorykiller.ko.bz2
I will not answer any questions about these binary files. AT YOUR OWN RISK, PLEASE.
Here is a patch file which can be applied to vanilla 2.6.23 kernel source tree. This is cumulative, including all Angstrom patches, Android patches as well as frame buffer, touch panel and so on.
o diff-linux-2.6.23-vanilla-androidzaurus.patch.bz2
Please note that redistributing Android SDK m5 is prohibited by the licence.
o Angstrom-console-image-glibc-ipk-2007.11RC1-spitz-installkit.tgz
My case, lowmemorykiller is built as a module.
o lowmemorykiller.ko.bz2
I will not answer any questions about these binary files. AT YOUR OWN RISK, PLEASE.
Here is a patch file which can be applied to vanilla 2.6.23 kernel source tree. This is cumulative, including all Angstrom patches, Android patches as well as frame buffer, touch panel and so on.
o diff-linux-2.6.23-vanilla-androidzaurus.patch.bz2
Please note that redistributing Android SDK m5 is prohibited by the licence.
07/30/2008
A patch for sound driver
Brilliant Service, who ported Android to Armadillo-500, released a patch of sound driver.
o Enabling audio on Android (Japanese)
o android-sound-patch.tar.gz
I have applied this patch to Angstrom kernel source. It works beautifully on Zaurus, too. Because Android uses /dev/eac as sound device, make a symbolic link;
Brilliant Service mentioned that this patch was originally written by Atmark Techno who is the developer of Armdallio. Big thanks to Atmark Techno.
Cheers,
o Enabling audio on Android (Japanese)
o android-sound-patch.tar.gz
I have applied this patch to Angstrom kernel source. It works beautifully on Zaurus, too. Because Android uses /dev/eac as sound device, make a symbolic link;
$ ln -s /dev/dsp /dev/eacIf your Android is booted up by chroot, remeber to make symlink in android-root/dev, too.
Brilliant Service mentioned that this patch was originally written by Atmark Techno who is the developer of Armdallio. Big thanks to Atmark Techno.
Cheers,
07/21/2008
Keycode Checker for Andorid
I found myself a bit of spare time last week, so I wrote a tiny utility to check the keycode and scancode on Android.
o KeycodeChecker.zip
As usual, copy the KeycodeChecker.apk in bin folder to data/app in android-root.
After launching KeycodeChecker, every time you type some key in, it show;
- key: keycode which Android uses internally.
- scan: scancode which is passed to Android from hardware driver.
- modify: true or false whether the key is modifier key or not.
- name: key name which is defined in android.view.KeyEvent as static final.
If you type [space key], [enter key] or [backspace key], the list will be refreshed.
Cheers,
o KeycodeChecker.zip
As usual, copy the KeycodeChecker.apk in bin folder to data/app in android-root.
After launching KeycodeChecker, every time you type some key in, it show;
- key: keycode which Android uses internally.
- scan: scancode which is passed to Android from hardware driver.
- modify: true or false whether the key is modifier key or not.
- name: key name which is defined in android.view.KeyEvent as static final.
If you type [space key], [enter key] or [backspace key], the list will be refreshed.
Cheers,
07/09/2008
telephony.db
Something interesting I found a few days ago.
It seems to me that this telephony.db file contains APN information which will be required to connect Internet through PPP.
Following is a complete list of carriers contained in telephony.db.
Cheers,
$ ./emulator &
$ ./adb shell
# cd /data/data/com.google.android.providers.telephony/databases
# sqlite3 telephony.db
sqlite> .schema
CREATE TABLE android_metadata (locale TEXT);
CREATE TABLE carriers(_id INTEGER PRIMARY KEY,name TEXT,numeric TEXT,
mcc TEXT,mnc TEXT,apn TEXT,user TEXT,server TEXT,password TEXT,
proxy TEXT,port TEXT,mmsproxy TEXT,mmsport TEXT,
mmsc TEXT,current INTEGER);
sqlite> .dump carriers
BEGIN TRANSACTION;
CREATE TABLE carriers(_id INTEGER PRIMARY KEY,name TEXT,numeric TEXT,
mcc TEXT,mnc TEXT,apn TEXT,user TEXT,server TEXT,password TEXT,
proxy TEXT,port TEXT,mmsproxy TEXT,mmsport TEXT,
mmsc TEXT,current INTEGER);
INSERT INTO "carriers" VALUES(1,'T-Mobile US','310260',
'310','260','wap.voicestream.com','none','*','none',
'216.155.165.50','8080',NULL,NULL,
'http://216.155.174.84/servlets/mms’,NULL);
:
:
:
INSERT INTO "carriers" VALUES(26,'Android','31099',
'310','99','internet','*','*','*',
NULL,NULL,NULL,NULL,
'null',NULL);
It seems to me that this telephony.db file contains APN information which will be required to connect Internet through PPP.
Following is a complete list of carriers contained in telephony.db.
- T-Mobile US
- T-Mobile UK
- T-Mobile D
- T-Mobile A
- T-Mobile CZ
- T-Mobile NL
- Cingular 410
- Cingular 170 Pacific Bell
- Cingular 380 ATT
- Chunghwa
- TWN GSM
- Far EasTone
- KGT-Online
- India Hutch
- SFR
- Vodafone UK
- IL Orange
- IL Cellcom
- IL Pelephone
- Jawwal Palestine
- Swisscom GPRS
- ERA
- CMCC
- Android
- UBIQUISYS
- Android
Cheers,
07/04/2008
AT Commands
I found an emulator log of AT commands issued by Android to 3G module (well, for now it's a virtual device).
The log file can be created by following procedure.
o 3GPP TS 27.007 AT command set for User Equipment (UE)
Initialization and PPP
Cheers,
The log file can be created by following procedure.
$ cd /your/android/sdk//toolsIn the ddms menu, click [Device], then [Dump device state]. AT commands can be found in RADIO LOG section. I only checked Linux version of SDK. If other SDK doesn't have ddms, alternatively the log can be dumped by command line.
$ ./emulator &
(wait for booting emulator up)
$ ./ddms
$ ./adb shell /system/bin/dumpstateMost of the AT commands match 3GPP specification. Some SMS related commands seem to be GSM based. 3GPP specification is available at a following page.
$ ./adb pull /tmp/state state.txt
o 3GPP TS 27.007 AT command set for User Equipment (UE)
Initialization and PPP
+CMEE=1Outgoing Voice Call
+CGREG=2
+CCWA=1
+CMOD=0
+CMUT=0
+CSSN=0,1
+COLP=0
+CSCS="HEX"
+CUSD=1
+CGEREP=1,0
+CMGF=0
+CFUN?
+CPIN?
+CNMI?
+CSMS=1
+CNMI=1,2,2,1
+CGSN
+COPS=3,0; +COPS=3,1; +COPS=3,2; +COPS?
+CGREG?
+CREG?
+CSQ
+CIMI
+CRSM=
+CGDCONT=1,"IP","internet",,0,0
+CGQREQ=1
+CGQMIN=1
+CGEREP=1,0
+CGACT=1,0
D*99***1#
DIncoming Call
+CLCC
+CSQ
+CHLD=1
RING
+CLCC
A
+CSQ
+CHLD=1
Cheers,
05/13/2008
Touchscreen works!
A reader of this blog, Rebecca, who worked really hard to port Android on to her C760 found out what the touchscreen issue was and sent me a patch for corgi_ts.c! Thank you very much, Rebecca! Following is a part of mail and patch.
This patch works on my C3000, too. Now touchscreen works all the time. Fortunately, I don't need much calibrations for now.
It seems Android wants to know not only pressure becomes zero but also pendown becomes zero. Only two lines but very precious lines.
Again, thank you very much, Rebecca! Your contribution is just great!
I wrote an applet to detect touch events, and found that the Dalvik VM only received "move" events. There was no action of touch pen up detected. So I modified the corgi-ts driver and added codes in function "ts_interrupt_main()".
@@ -215,6 +220,10 @@
/* Enable Falling Edge */
set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING);
corgi_ts->pendown = 0;
+ /* 2008(R) */
+ input_report_key(corgi_ts->input, BTN_TOUCH, corgi_ts->pendown);
+ input_sync(corgi_ts->input);
This patch works on my C3000, too. Now touchscreen works all the time. Fortunately, I don't need much calibrations for now.
It seems Android wants to know not only pressure becomes zero but also pendown becomes zero. Only two lines but very precious lines.
Again, thank you very much, Rebecca! Your contribution is just great!
05/05/2008
Kubench - 3D benchmark application
Kubench is a sample application to measure 3D performance of Android. Download the following file and unpack, then copy bin/Kubench.apk to data/app in android-root, as usual.
o Kubench.tar.gz
After launching Kubench from Home, rotating cube will be shown. By pressing any key, frame rate will be displayed on the window title.
My C3000 runs at around 20fps. The emulator running on ThinkPad X61 (Core2Duo 2.2GHz, Windows Vista) gives me around 22fps. My Linux PC (Athlon 3500+, Ubuntu) shows only 4fps somehow. I haven't resolve this Linux issue yet.
Frame rate is calculated by counting frames drawn in every 3 seconds. It would be not correct way to measure 3D performance, strictly saying. But I guess it would be sufficient practically.
I'd like to write some background of Kubench.
A few weeks ago, Google Japan hold a developer meeting called Android Hackathon. I was luckily able to attend it and had a very interesting discussion with people there.
One of the themes was benchmarking. Once Android handsets go on to the market, performance may very by handset. Some application developers, like 3D game software, worry about how performance could be guranteed for each handset. Too many handsets to be tested. It will be another nightmare for application developers.
Benchmarking may be a solution. Like a Windows Experience score on Vista.
Possible benchmarking item would be;
o Floating point calculation
o 2D
o 3D
o Network throughput
o SQLite
o File I/O
At Android Hackathon, I tried to modify Kube in Api Demo to measure 3D framerate, but I couldn't finish on that day. Today is a holiday in Japan and I try again to implement it.
Cheers,
o Kubench.tar.gz
After launching Kubench from Home, rotating cube will be shown. By pressing any key, frame rate will be displayed on the window title.
My C3000 runs at around 20fps. The emulator running on ThinkPad X61 (Core2Duo 2.2GHz, Windows Vista) gives me around 22fps. My Linux PC (Athlon 3500+, Ubuntu) shows only 4fps somehow. I haven't resolve this Linux issue yet.
Frame rate is calculated by counting frames drawn in every 3 seconds. It would be not correct way to measure 3D performance, strictly saying. But I guess it would be sufficient practically.
I'd like to write some background of Kubench.
A few weeks ago, Google Japan hold a developer meeting called Android Hackathon. I was luckily able to attend it and had a very interesting discussion with people there.
One of the themes was benchmarking. Once Android handsets go on to the market, performance may very by handset. Some application developers, like 3D game software, worry about how performance could be guranteed for each handset. Too many handsets to be tested. It will be another nightmare for application developers.
Benchmarking may be a solution. Like a Windows Experience score on Vista.
Possible benchmarking item would be;
o Floating point calculation
o 2D
o 3D
o Network throughput
o SQLite
o File I/O
At Android Hackathon, I tried to modify Kube in Api Demo to measure 3D framerate, but I couldn't finish on that day. Today is a holiday in Japan and I try again to implement it.
Cheers,
04/13/2008
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;
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.
Cheers,
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.Big congratulations to steleto! Great job!
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
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.
Cheers,
03/19/2008
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?
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?
03/18/2008
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;

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.
Cheers,
So, I wrote a small patch to swap the coordinate like this;
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.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)
return;
- 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
#endif
+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);
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.
Cheers,