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.
  • 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.
A little tip how to get boot log of the emulator.
$ ./emulator &
$ ./adb shell
# mount -o remount,rw rootfs /
# mkdir /tmp
# /system/bin/dumpstate
# exit
$ ./adb pull /tmp/state state.log
$ more state.log
Since rootfs is mounted as read only, you need to remount it after booted the emulator.

Cheers,
posted by 安藤恐竜 at 10:12 | Comment(29) | TrackBack(0) | 日記
Comments for this entry
Hi,

I strace'd init and it's children and found the brand-new device "/dev/ashmem" is newly opened.

http://tinyurl.com/5lzktp

Hope this helps.

Posted by Jyunji at 08/21/2008 12:10
Jyunji san,

Thanks for your tip. I haven't checked the kernel tree yet though...

Arigatou gozaimasu.
Posted by androidzaurus at 08/21/2008 13:09
I also tried it on A1200 and met the same error (segmentation fault). But on m5-r14 version, my A1200 can run Android normally. After I checked init.rc, I found that 0.9beta has big difference with m5-r14.
Posted by androidezx at 08/23/2008 16:07
androidezx,

You need to port mm/ashmem.c to your kernel. ashmem.c (and ashmem.h) can be retrieved from Android kernel tar ball.
http://code.google.com/p/android/downloads/list

There are significant changes in binder.c and power.c, too. Some are heavily depending on relatively new features of kernel. Android kernel is based on linux-2.6.25, so your kernel might be updated 2.6.25 or 2.6.26.

I'm now workig on updating kernel from 2.6.23 to 2.6.26.

Cheers,
Posted by androidzaurus at 08/23/2008 17:43
actually, I have ported all android driver (including ashmem.c/h) to my kernel except removing goldfish/qemu_trace/yaffs2 related files.
Posted by androidezx at 08/25/2008 00:09
Hi,

Did you try strace? Log in through ssh and then chroot with strace.

$ ssh root@zaurus
# strace chroot /home/root/android-root /init

It gives me a big picture of what /init does.

Cheers,
Posted by androidzaurus at 08/25/2008 08:33
Would you please upload your install image?
Thanks!
Posted by edwardlee at 08/28/2008 11:34
Now I can run Android 0.9beta sdk on my A1200. Segmentation fault is caused by missing ashmem.o. I forget to enable ASHMEM in config. Touchscreen/keypad can work. But seem that 0.9beta SDK cannot fit 240*320 resoluton automatically well. m5-r14 has no such problem.
Posted by androidezx at 08/28/2008 16:53
edwardlee,

Currently the system is not stable enough to be public.
Posted by androidzaurus at 08/29/2008 16:50
androidezx,

Have you tried to boot emulator with -skin option? There are QVGA skins. It might give you some ideas how Android 0.9 works on QVGA.

My case, com.android.mms dies with "unknown display format" error. I guess some applications are pre-configured for fixed resolution.
Posted by androidzaurus at 08/29/2008 16:55
I'm now workig on updating kernel from 2.6.24 to 2.6.25. but have some difficult.
Posted by elad at 09/03/2008 14:54
I tried the emulator with -skin QVGA-P (240*320 resolution) and layout has the same problem in emualtor.
Posted by androidezx at 09/08/2008 17:41
My screen showed "android_", and i wait for it for an hours, but the screen stop showing the android log and the system can not show the android GUI.

why?


thanks
Posted by elad at 09/12/2008 15:31
You can use logcat to find out what happen.
It maybe caused by framebuffer driver. Your framebuffer should support double buffer.
Posted by edwardlee.2002 at 09/12/2008 23:12
now i am porting android 0.9 beta to HW which is designed by our own corp. but when i chroot to root of android and execute /init with strace tools, error ocurred, error log as follows:
......
00:00:41.876312 open("/system/default.prop", O_RDONLY|O_LARGEFILE) = 6
00:00:41.883254 lseek(6, 0, SEEK_END) = 77
00:00:41.888023 lseek(6, 0, SEEK_SET) = 0
00:00:41.893012 read(6, "#\n# ADDITIONAL_DEFAULT_PROPERTIES\n#\nro.secure=0\npersist.service.adb.enable=1\n", 77) = 77
00:00:41.905302 close(6) = 0
00:00:41.909659 futex(0x400014a0init: Failed to open socket 'property_service': Address family not supported by protocol
, FUTEX_WAKE, 2147483647) = 0
00:00:41.915189 futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
00:00:41.920189 open("/data/local.pinit: init startup failure
rop", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
00:00:41.927827 open("/data/property", O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 6
00:00:41.934538 getdents64(6, /* 3 entries */, 4200) = 88
00:00:41.945462 open("/data/property/persist.sys.timezone", O_RDONLY|O_LARGEFILE) = 7
00:00:41.954737 read(7, "GMT", 91) = 3
00:00:41.961031 futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
00:00:41.965999 close(7) = 0
00:00:41.970548 getdents64(6, /* 0 entries */, 4200) = 0
00:00:41.975089 close(6) = 0
00:00:41.979445 socket(PF_FILE, SOCK_STREAM, 0) = -1 EAFNOSUPPORT (Address family not supported by protocol)
00:00:41.989186 write(3, "<3>init: Failed to open socket \'property_service\': Address family not supported by protocol\n", 92) = 92
00:00:42.020164 socketpair(PF_FILE, SOCK_STREAM, 0, 0xbefd0cf0) = -1 EAFNOSUPPORT (Address family not supported by protocol)
00:00:42.031110 write(3, "<3>init: init startup failure\n", 30) = 30
00:00:42.045267 write(1, "[ on init ]\n[ on boot ]\n[ service console ]\n[ service adbd ]\n[ on property:persist.service.adb.enable=1 ]\n[ on property:persist.service.adb.enable=0 ]\n[ service servicemanager ]\n
Starting pid 395, console /dev/ttyS0: '/bin/sh'

anybody know cause of the error? you will be appreciated, thanks in advance.
Posted by raula at 10/05/2008 22:49
1) If your root fs is jffs2, try to port yaffs2 or use USB stick or SD card formatted ext2 fs.

2) If your CPU is ARM11, make sure TLS support turned off at kernel configuration.

Posted by androidzaurus at 10/06/2008 07:41
thanks your reply, my rootfs is based on nandflash formatted yaffs2 fs and my cpu is ARM926EJ-S [41069265] revision 5(ARMv5TEJ),and my cross compiler gcc version 4.1.0,size of SDRAM is 64M,my android patch is based on standard linux kernel 2.6.25 and android 0.9 beta.
i start android as follows: firstly boot into a standard non-Android file system which is ramdisk formatted ext2 file system, then switch over to Android file system but there directly execute init.

script is below:
#!/bin/sh
#Set Path
PATH=/sbin:/bin
export PATH
#make mount point
mkdir /mtdblock3
mkdir /sd
#make device node
mknod /dev/mtdblock3 b 31 3
mknod /dev/mmc0 b 179 0
mount -t vfat /dev/mmc0 /sd
mount -t yaffs2 /dev/mtdblock3 /mtdblock3
echo Starting Android...
umask 000
chroot /mtdblock3/android_fs /strace -f -ff -tt -s 200 /init
another thing is: i am not sure my frame buffer is double buffer, and i want to know wheather frame buffer driver under linux 2.6.25 is double buffer defaultly ?
expecting your reply, thanks in advance.
Posted by raula at 10/06/2008 11:17
thanks your reply, my rootfs is based on nandflash formatted yaffs2 fs and my cpu is ARM926EJ-S [41069265] revision 5(ARMv5TEJ),and my cross compiler gcc version 4.1.0,size of SDRAM is 64M,my android patch is based on standard linux kernel 2.6.25 and android 0.9 beta.
i start android as follows: firstly boot into a standard non-Android file system which is ramdisk formatted ext2 file system, then switch over to Android file system but there directly execute init.

script is below:
#!/bin/sh
#Set Path
PATH=/sbin:/bin
export PATH
#make mount point
mkdir /mtdblock3
mkdir /sd
#make device node
mknod /dev/mtdblock3 b 31 3
mknod /dev/mmc0 b 179 0
mount -t vfat /dev/mmc0 /sd
mount -t yaffs2 /dev/mtdblock3 /mtdblock3
echo Starting Android...
umask 000
chroot /mtdblock3/android_fs /strace -f -ff -tt -s 200 /init
another thing is: i am not sure my frame buffer is double buffer, and i want to know wheather frame buffer driver under linux 2.6.25 is double buffer defaultly ?
expecting your reply, thanks in advance.
Posted by raula at 10/06/2008 11:23
Compare your .config and goldfish_defconfig in Android kernel. Good luck.
Posted by androidzaurus at 10/06/2008 11:44
thanks your reply in time. i check it at once.
in your Articles, you say frame buffer and pan function is mandatory now,pan function you mentioned is 'fb_pan_displsy', is it right? thanks your help sincerely.
Posted by raula at 10/06/2008 12:29
androidzaurus
thanks your tips, i reconfigure my kernel according to goldfish_defconfig, and now i solved the former problem,next step, i have another problems: double frame buffer and pan function. any suggestion will be appreciated.
thanks
Posted by raula at 10/06/2008 18:49
please refer pxafb_doublebuffer.patch.
http://androidzaurus.seesaa.net/article/105551643.html

Or OMAP porting
http://elinux.org/Android_on_OMAP#Page_flipping_frame_buffer

page flipping and pan function is the same meaning.
Posted by androidzaurus at 10/07/2008 17:06
androidzaurus,
Now i think my android is running more or less in my board,because I can enter android shell,And execute $ps

command ,It can show me the same processes as the emulator environment execept processes related to qemu and

glodfish.But i still can not see android logo on screen,And i use strace tools to find android is running ,And my

LCD driver can work well without android patch, I already added patch for supporting double buffering and pan

function. i do not know why? Any tips will be appreciated.
So, I have some problems: in the android kernel, LCD driver must be RGB 16 bit mode,does it?
,And is it 565 format or 555 format? Is frame console optional or mandotary?
expecting your reply, thanks in advance.
Posted by raula at 10/08/2008 00:57
androidzaurus:
thanks your help, now i solved my double-flipping buffer problem, this problem result from our LCD controller which have a hardware bug,and now i can enter android logo menu.
but my keyboard have not worked, because i press key,android have no response to it,and android keep staying lock mode.
thank androidzaurus,thank your help,you are a good man.
Posted by raula at 10/09/2008 17:07
androidzaurus,raula:
I have successfully run m3 version on my platform.However,it fails in 1.0.
My Linux kernel is 2.6.25.
According to your old patch for 2.6.23,I have patched pxafb to support pan display and double frambuffle.

When run /init,LCD can show "android_",but never show the android log and the android GUI.

BTW:with the new built 2.6.25 kernel,it can show m5 GUI well.

What's the problem.

Could you please kindly give me any suggestion?
Your help is highly appreciated!

Thanks a lot!
Posted by zpf at 10/11/2008 16:59
raula,
what's the problem with your LCD controller?
I want to know your changes that make you run android 1.0 successfully,including your changes in config and lcd control.
Thanks a lot!
Posted by Paul Matthew at 10/11/2008 19:15
Hi
i am trying to port the 2.6.23 mc5-rc14 Android SDK into my PXA270 processor.

I am able to get to the red eye but never go to the main screen.

I put following components in my kernel.
(ashmem,logger,binder).

Can you please suggest me on this.

The sample of log messages:
Log Message:
inder: 672 close vm area 42641000-42a41000 (4096 K) vma 2020071 pagep 5f
binder_flush: 672 woke 0 threads
binder: release 672:678 transaction 133 in, still active
binder: send failed reply for transaction 133 to 702:702
binder_release: 672 threads 6, nodes 19 (ref 22), refs 4, active transactions 1,
buffers 3, pages 1


Maneesh
Posted by Maneesh Jain at 04/20/2009 22:13
Hi,

Try strace to see what is going on.
$ strace -ff -o log chroot android/ /init &

And make sure android/dev/binder has 0777 permission.

Posted by androidzaurus at 04/21/2009 09:37
Hi androidzaurus,
I am porting android on IMX27 platform.My basic kernel is coming up.I am using Linux-2.6.25-rc5 kernel from Freescale and applied patches from linux-2.6.25-android-1.0_r1.tar.gz. I took /data and /system images from the android-sdk-linux_x86-1.0_r1 .When i manually give ./init after setting up the environment as given in the http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget i am getting error as
logcat:
init: Failed to open socket 'property_service': Address family not supported by protocol

init: init startup failure

Please help us in this regard.
Thanks and regards,
Prabha
Posted by prabha at 12/30/2009 19:32
Leave your comment
Name: [Must]

EMail: [Must]

URL: [Must]

Comment: [Must]

Confirmation Code: [Must]


Type in alphabets what you see in this image.
Trackback URI:  http://blog.seesaa.jp/tb/105091433
Trackback entries must contain URL of this entry.

Trackbacks to this entry
×

この広告は1年以上新しい記事の投稿がないブログに表示されております。