목요일, 1월 10, 2008

Hackers Get Android Running on Real Hardware

Hackers Get Android Running on Real Hardware

이런 망극할 일이 있나... (--)(__)
너무 좋은 소식이군... :)

http://eyevio.jp/movie/87252


:: Penguinistas hack Android onto real hardware
http://linuxdevices.com/news/NS4262102607.html

:: Google Android runs on Sharp Zaurus SL-C760
http://euedge.com/blog/2007/12/06/google-android-runs-on-sharp-zaurus-sl-c760/

---

:: Build or download a console image for the SL-C760
http://www.angstrom-distribution.org/

:: Benno provides a busybox compiled for the emulator
http://benno.id.au/blog/2007/11/14/android-busybox


[출처]
http://euedge.com/blog/2007/12/06/google-android-runs-on-sharp-zaurus-sl-c760/

Yesterday we managed to get Google Android running on a Sharp Zaurus SL-C760. This seems to be the first documented success with this device. This article provides instructions on how to get it working, in case you would like to try it at home :)

Google Android is a new software stack for mobile devices, specifically mobile phones. It uses the Linux kernel as the core, but Google developed a new user space stack:

* Developers use the Java language to write applications.
* The applications are executed using the Dalvik VM instead of the regular JVM.
* Google provides an easy to use SDK, complete with a QEMU based hardware emulator.

However, there is currently no real device on the market that runs Android. Open-source hackers instantly started to get the software from the emulator running on various devices. Most of the initial work was done by Ben “Benno” Leslie, who almost managed to run Android on a Neo 1973. Unfortunately the Neo includes an older ARM core, so the builds of the emulator won’t run on it.

Android browser

Then, based on Benno’s guide it was possible to run Android on an Armadillo-500.

Based on the findings of the earlier work, Android should run on any device with an ARMv5TE CPU + suitable amounts of RAM and Flash. Work started to get Android running on various devices, like the Sharp Zaurus family. An initial guide on how to get to the “cylon screen” with the moving red dot was posted on the Android Developers group.

With using information from the above work, I was able to run Android on a Sharp Zaurus SL-C760.

Here comes the outline of the process:

1. Build or download a console image for the SL-C760 from the Angstrom Distribution.
2. Build a patched kernel for Android. I used the android.diff from Benno to patch the linux-rp-2.6.23 kernel of the Angstrom distribution. I had to do some minor tweaks in the patch to apply cleanly: I removed some Goldfish device specific parts. In the kernel configuration enable all Android specific options except the USB gadget and the QEMU / debug options.
3. Flash the console image and the patched kernel onto the device.
4. Extract the contents of the /data and the /system drives from the emulator using Busybox tar. Benno provides a busybox compiled for the emulator here. Make sure you get the device files as well.
5. Extract the ramdisk image of the emulator using gzip and cpio.
6. Build a directory tree of the Andoid software which mimics the emulator layout. Make sure to preserve the file ownerships and permissions from the tar archives.
7. Share this directory over NFS
8. Connect your Zaurus to your host PC either with usbnet or wlan.
9. Mount the NFS share on your Zaurus to /android
10. Copy the /dev/binder to /android/dev/binder. This was necessary because in the emulator the binder device had major number 252 while in the Zaurus it had 253. Make sure that the binder device has the mode 666.
11. Create a small script on your Zaurus as /android/a.sh with the following contents:

#!/system/bin/sh

export PATH=/sbin:/system/sbin:/system/bin:$PATH
export LD_LIBRARY_PATH=/system/lib
export ANDROID_ROOT=/system
export ANDROID_ASSETS=/system/app
export ANDROID_DATA=/data
export EXTERNAL_STORAGE=/sdcard
export DRM_CONTENT=/data/drm/content

mount -t proc proc /proc
mount -t sysfs sysfs /sys

/system/bin/app_process -Xzygote /system/bin --zygote &
/system/bin/dbus-daemon --system &
runtime

12. Create a small script on your Zaurus as /bin/a.sh with the following contents:

#!/bin/sh
umask 000
chroot /android /a.sh

13. Execute /bin/a.sh as root on your Zaurus and hope for the best

Current status:

* The system boots and the applications seem to work.
* Runs from an NFS share over a network connection.
* Keyboard input is working.
* Touchscreen is not working.
* No network connection yet for Android applications.

Next steps:

* Get the touchscreen to work.
* Set up networking.
* Make it work from the flash file system as well. (JFFS2 does not support read-write memory mapped files, so we will need to use Yaffs, just like Google does.)

Have fun, and leave a comment, if you get further along in the process!

댓글 없음:

댓글 쓰기