|
Home
Last Updated: Tuesday, May 08, 2008 IntroductionThis page collects information for running Android on the Nokia n800/n810. You can find a lot more information on running Android on real hardware on http://elinux.org/Android_on_OMAP. Much of the information from this site was obtained from there. I've setup this project due to popular demand and the elinux.org server currently having trouble coping with the traffic :-). If you have any issues following these directions, please email Jonathan Herriott, so the issues can be corrected. If you are having any issues, please see the following group http://groups.google.lu/group/android-internals/Android-Internals for the patches until mine are uploaded. StatusWhat's the status of this project? Well, Android works on the n810. Currently, the m5-rc14 kernel is used with the m3-rc37a userspace because of frame buffer problems with the newest userspace. The following items currently do not work:
In case you're wondering what then does work :-):
Checkout some screenshots of Android running on a Nokia n810. InstallationIf you have no unix knowledge, the instructions might be a little hairy. My suggestion is to just download the linked debian netinstall image linked below and install that on a machine. You should also make sure to install binutils from the package manager or at installation time. Getting StartedHere are just a list of things that need to have in order to build and install Android on the N8XX. These will also be included in the step-by-step process, but it might be quicker just to download them all ahead of time.
The KernelIt is assumed that for each step, you start out in the same directory ($ANDDIR).
> wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 > tar -xjvf linux-2.6.21.tar.bz2 > wget http://android-on-n8xx.googlecode.com/files/linux-2.6.21_rx-34_android-m5-rc14-patch3.bz2 > cd linux-2.6.21 > bzcat ../linux-2.6.21_rx-34_android-m5-rc14-patch3.bz2 | patch -p1 > wget http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 > tar -xjvf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 > cd linux-2.6.21 > make ARCH=arm CROSS_COMPILE=../arm-2008q1/bin/arm-none-linux-gnueabi- bzImage > > cp flasher-3.0 $ANDDIR > sudo ./flasher-3.0 -f -k linux-2.6.21/arch/arm/boot/zImage -R # this replaces the kernel on the device As an alternative, you can simply load the kernel to the memory instead of flashing it, so if something goes wrong you just need to reboot it in order to revert it to the previous kernel.> sudo ./flasher-3.0 -l -k linux-2.6.21/arch/arm/boot/zImage -R # this only loads the kernel to the memory and boots it
File SystemThis section assumes you start in the same directory as The Kernel section.
> android-sdk_m3-rc37a/tools/mksdcard -l card 100M card.img > android-sdk_m3-rc37a/tools/emulator -sdcard card.img -console -debug-kernel > adb -d 1 push busybox /data/busybox > chmod 774 /data/busybox > ln -s /sbin/tar /data/busybox > cd sdcard > tar -cvf /system -C /sdcard > df | grep /media/usbdisk-1 # do this to obtain what the usb device name, which
# may vary depending on the linux installation
# I will call mine /dev/sdc1
> su
> umount /dev/sdc1
> mkfs.ext2 /dev/sdc1
> mount /dev/sdc1 /media/usbdisk-1
> exit> cp android-sdk_m3-rc37a/tools/lib/images/ramdisk.img ramdisk.gz > gunzip ramdisk.gz > cd /media/usbdisk-1 > cpio -iv < $ANDDIR/ramdisk > mkdir dev/log > touch dev/log/main > touch dev/log/events > touch dev/log/radio > su > mkdir card > mount -o loop card.img card > tar -xvf card/system.tar -C /media/usbdisk-1 > cd /media/usbdisk-1 > cat $ANDDIR/userspace_android-m3-rc37a_N8XX.bz2 | patch -p1 The DeviceI haven't tested the init way, so I am providing the scripts necessary with the way I did it modified from http://elinux.org/Android_on_OMAP
> cd / > vi start_android.sh #!/bin/sh -x echo "Starting Android..." rm -rf /media/mmc1/tmp/* umount -l /proc umount -l /sys mount -t proc proc /media/mmc1/proc mount -t sysfs sysfs /media/mmc1/sys mount --bind /dev /media/mmc1/dev chmod -R 777 /media/mmc1 # if you know the exact permissions, email me umask 000 chroot /media/mmc1 /a.sh > cd /media/mmc1 > vi a.sh #!/system/bin/sh -x 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 /system/bin/app_process -Xzygote /system/bin --zygote & /system/bin/dbus-daemon --system & runtime & /system/bin/sh > chmod 777 start_android.sh > chmod 777 /media/mmc1/a.sh > /start_android.sh Running Your ApplicationThis section will be available shortly. Yes, it's possible. Links
ContributorsPage originally created by: Georges Toth Email: Georges.Toth AT gmail DOT com Page modified and restructured by: Jonathan Herriott Email: herriojr AT gmail DOT com And here will be a list of all the people who patched to make this possible :) |
Sign in to add a comment

can you install your own apps?
Where can I get the latest Nokia (already patched) kernel?
Just a note for those that are looking, the kernel source I was asking about I found at: http://repository.maemo.org/pool/os2008/free/source/k/kernel-source-rx-34/
The only issue is that the patch doesn't seem to match. Is there another source the above was referring to?
The kernel you mentioned should work... if it does not just download a vanilla 2.6.21 kernel and patch it with the other patch on the download page.
I haven't tried installing apps on the device yet but that should just work I guess :-)
Can you elaborate on what you mean by "alarm code" does not work ? I have the android alarm driver compile, which calls into rtc code to setup the interrrupts. I have not tested to see what happens. Perhaps, it does not work
Also, ApiDemos? turned out to be empty when i selected. Were you able to run ApiDemos? ?
The alarm code does compile, but IIRC it does not work, because anything RTC related does not work in Android. That is due to the n8xx not using a standard rtc driver, and there is no rtc device node/interface in /dev.
API Demos works for me.... what I'm struggling with though is how to install apps....that turns out to not be as easy as copying your files to the app folder (at least that does not work for me) :-(
Hmm.. cat /proc/devices does show me rtc.
Do you have to do anything special to get APIDemos to work ? If i invoke that, Android hangs. I do see that ApiDemos?.apk is installed.
I tried a little more with applications. 1) When i select "Applications" from main Menu it takes me to a new screen. I can invoke most of the applications except APIDemos. If i invoke APIDemos, it hangs and i need a reboot 2) I tried adding another application Snakes.apk to the same directory. This time, If i select Applications from Main menu, system hangs. Anything from /data/app seems to hang.
Another small update. I could install snakes.apk and then run it and play it. It was slow :-) For this to work, i have to remove ApiDemos?.apk from /data/app and then only have Snakes.apk. Selecting the app just played fine. Any clues..
Just out of curiosity, have you tried doing a diff of the running emulator with your application installed with the running android file system on N8XX? Maybe this will point out some clues? I haven't gotten the file system installed correctly yet, so I'll test once I do.
Hi Georges.Toth,
I can install my application on the device, just copy the .apk file into directory /data/app.:) But I can not launch any application from Graphic user interfaces. It hangs on when I enter the "Applications". I have another way to launch your application from console, with command "am"(Maybe that is the abbreviation for application manager): am start -n <package name>/<activity name> for example: am start -n com.google.android/com.google.android.HelloWorld?
I can launch all my applications from this way.:)
Hey Georges, can you give me admin privilage, so I can edit this page?
I'm a total n00b. What is compiling? Do I have to do that? Can't I just download something to install?
I do have some bits that i can share (obviously at your own risk :-)) if Geroges opens up this place. I have both a working kernel image and userspace files. Let me know if that would be of interest.
Hey nan.yeah, great, I'll give that a try thnx
@suruti94: I tried replacing already installed apps my mine, but it wouldn't show up, no matter where I put my file. ... I'll give it another try soon ... you should be able to upload files aren't you ? .. let me know if not
I'm not sure though if it's ok to share the userspace images... AFAIK that is not allowed by google. Uploading a kernel image should be fine though, as the patches are also available.
Anyway, if one follows the many guides available, putting together the system+data dir should be really easy even for a novice...well you should be used to a unix shell though ;-) In case that all sounds like "!#++4!"$"!!§%$§" this project is not for you, and you should wait for clean easy to flash images :-) ....sorry
The patches provided will not work properly. drivers/android/power.c does not contain all the proper functions for sysfs mounted on /sys. The only one I know of that is missing so far is last_user_activity.
There are things missing, sure....like the entry you mentioned. But the patch does work. Should you fix the power driver, please feel free to contribute it, but that doesn't prevent android from running on the n810, and it's at least for me very low-priority.
The framebuffer issue is far more important for now. Also getting the omap git tree to work (which apparently contains everything but the wifi stuff (proprietary)) would be great.... we'll see :-)
The issue is that I am getting a fatal error when trying to start up android because it is trying to access the file I specified above.
Hi Nan,
Have you tried starting APiDemos using the am command ? It hangs for me. As i had already mentioned, i can start some apps like Snake etc directly by using the UI. I thought ApiDemos? would work from command line. It fails.
-mohan
If there is any interest, I'll write a script to do everything for you (minus downloading openssh onto the device).
Where is the path for rx-44 version of the N810? I couldn't find it in the downloads section. Thanks!
RX-44 is a hardware revision => n810
A quote from a forum: The N800 and N810 share the same kernel, so the kernel-source-rx-34- is the correct package. There never was a specific rx-44 kernel package.
I'll take that portion out. I was just trying to figure out why the difference between some peoples' N8XX and others. The only moving part was the hardware.
laptop:~/projecten/android-nokia/linux-2.6.21$ make ARCH=arm CROSS_COMPILE=../arm-2008q1/bin/arm-none-linux-gnueabi- bzImage
scripts/kconfig/conf -s arch/arm/Kconfig In file included from include/asm/system.h:6, include/asm/memory.h:27:29: error: asm/arch/memory.h: No such file or directory In file included from include/asm/system.h:6, include/asm/memory.h: In function 'virt_to_phys': include/asm/memory.h:170: error: 'PHYS_OFFSET' undeclared (first use in this function) include/asm/memory.h:170: error: (Each undeclared identifier is reported only once include/asm/memory.h:170: error: for each function it appears in.) include/asm/memory.h: In function 'phys_to_virt': include/asm/memory.h:175: error: 'PHYS_OFFSET' undeclared (first use in this function) include/asm/memory.h: In function 'virt_to_bus': include/asm/memory.h:193: warning: implicit declaration of function 'virt_to_bus' include/asm/memory.h: In function 'bus_to_virt': include/asm/memory.h:198: warning: implicit declaration of function 'bus_to_virt' In file included from include/linux/timex.h:187, include/asm/timex.h:15:28: error: asm/arch/timex.h: No such file or directory In file included from include/linux/sched.h:51, include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:225:31: error: division by zero in #if include/linux/jiffies.h:225:31: error: division by zero in #if In file included from include/linux/mm.h:40, include/asm/pgtable.h:23:30: error: asm/arch/vmalloc.h: No such file or directory In file included from include/linux/mm.h:40, include/asm/pgtable.h: In function 'pmd_page_vaddr': include/asm/pgtable.h:330: error: 'PHYS_OFFSET' undeclared (first use in this function) In file included from arch/arm/kernel/asm-offsets.c:14: include/linux/mm.h: In function 'lowmem_page_address': include/linux/mm.h:538: error: 'PHYS_OFFSET' undeclared (first use in this function)Do I have te correct patch?
Hi,
Now I just succeeded on making touch screen work perfectly both in Maemo and Android. Please check this video. http://www.youtube.com/watch?v=ma5VdDx_0K4
I wanna post more detail about technique I used but... where can I post? Please tell me and I will post it as soon as possible.
Best Regards, Sittiphol Phanvilai
Might as well post it here, I'd love to have the touchscreen working in Maemo!
I just post it here http://groups.google.com/group/android-internals/browse_thread/thread/7028432fa76f57e8/6d77d401e5076000.
... 5. Inside the emulator shell, extract /system to the sdcard image ...
> ln -s /sbin/tar /data/busybox link failed File exists
What's wrong?
nightkeen:
do it the other way around.
'ln -s /data/busybox /sbin/tar'
Thanks Bradley. But i have another problem. Next step:
> cd sdcard
> tar -cvf /system -C /sdcard
tar: permission denied
Permissions on /sbin/tar - 777. Am I doing something wrong?
And another question, in which file system i must format my SD card? Ext3?
try this
# tar -cvf system.tar -C /sdcard /system
Regards, Sittiphol
I followed the instructions for the kernel compilation. After flashing the kernel my n810 won't boot. Flashing seemed successful but at boot the Nokia logo becomes visible, but after a while it blimps and starts again and again and... Any ideas what might went wrong?
Same here, probably kernel panic... too bad I cannot see what actually caused it. Or when it happened. After reflashing it with Nokia's firmware it seems to work again, but logs are of course lost. Any ideas? Hardware n810.
Hmm, strange. The whole thing worked when applying only the linux-2.6.21_rx-34_android-m5-rc14.bz2 patch. After I tired applying the "touchscreen" patch, compiled the kernel and flashed the n810 the device could not start properly, rebooting itself when the boot progress bar reaches about 70%. Any clues?
As many of you I had quite a few problems following the tutorial above. I've placed a rewritten/fixed version on my blog, together with binaries for userspace and a pre-compiled kernel image and details how to use them on your nokia 810:
http://www.alextreme.org/drupal/?q=android_on_n810
I urge the writer of this tutorial to at least skim my version, as the current tutorial will easily give you a non-booting n810.
Alextreme,
The steps are missing from your instructions. Any idea when you going to complete?
Currently, Anyone ported with m5 rootfs without m3 rootfs successfully ?
i have a problem: >tar -cvf /system -C /sdcard
tar:empty archive
who knows what is the matter? i need help!!!
i got two problem: there is no system.tar in /sdcard, and i use this command "android-sdk_m3-rc37a/tools/adb -d 1 push system.tar /sdcard" to push the system.tar to /sdcard. is it something wrong? and i typed "tar -cvf system.tar /system",got:"tar: permission denied".
The binary on alextreme.org doesn't work on my N810. Could it be because I am running Maemo Diablo 4.1? Has anyone managed to get this working after upgrading to 4.1?
I have, but that's because I ported the patch. I'm messing around with this on an N800, I'll start releasing my stuff when I'm done.
-qwerty12 (catch me on #maemo or Itt)
I just succeeded to boot m3-rc37a on N810 with diablo based kernel. I'll also release the patch when I'm done :)
Any easy install on this yet?