Mathijs
Posts: 22
Joined: Sat Jun 30, 2012 2:23 pm

Re: Porting Android

Tue Jul 10, 2012 11:23 am

arturo777 wrote:What exactly does the infamous "colour screen" look like? :idea: I'd like to check that we're seeing the same thing.
Image

I narrowed it down to the CONFIG_ANDROID option. Whenever that one is enabled, I get the colour screen. It's in Device Drivers -> Staging -> Android. Its suboptions don't matter.

lesderid
Posts: 13
Joined: Mon Jul 09, 2012 12:44 pm
Location: Mechelen, Belgium
Contact: Website

Re: Porting Android

Tue Jul 10, 2012 2:00 pm

Does anyone have a (probably) working filesystem of GB or ICS for the Pi?

Mathijs
Posts: 22
Joined: Sat Jun 30, 2012 2:23 pm

Re: Porting Android

Tue Jul 10, 2012 2:06 pm

lesderid wrote:Does anyone have a (probably) working filesystem of GB or ICS for the Pi?
You can find one here:
http://forum.xda-developers.com/showpos ... stcount=27

It's outdated but it should work.

arturo777
Posts: 28
Joined: Sat Mar 24, 2012 10:02 am

Re: Porting Android

Tue Jul 10, 2012 2:43 pm

Mathijs wrote:I narrowed it down to the CONFIG_ANDROID option. Whenever that one is enabled, I get the colour screen. It's in Device Drivers -> Staging -> Android. Its suboptions don't matter.
Thanks :) Do you know what actually produces the colour screen?

Question: are you try to start a "standard" file system, e.g. Debian, rather than an Android one? If so what sort?

Mathijs
Posts: 22
Joined: Sat Jun 30, 2012 2:23 pm

Re: Porting Android

Tue Jul 10, 2012 2:59 pm

arturo777 wrote:
Mathijs wrote:I narrowed it down to the CONFIG_ANDROID option. Whenever that one is enabled, I get the colour screen. It's in Device Drivers -> Staging -> Android. Its suboptions don't matter.
Thanks :) Do you know what actually produces the colour screen?

Question: are you try to start a "standard" file system, e.g. Debian, rather than an Android one? If so what sort?
The colour screen is because the firmware was not able to load the kernel. I don't know the specifics, except that the boot process is kind of unusual (firmware gets loaded into GPU, then the CPU gets started later on).

Not sure if I understand your second question right. Do you mean ext4? I extracted the rootfs zip from the link to an ext4 partition. Make sure this is in cmdline.txt on your boot partition:

Code: Select all

root=/dev/mmcblk0p2 rootfstype=ext4 rootwait init=init
If your android partition is not the second partition on your sd card, then you need to alter the root=mmcblk0p2 of course. init=init makes sure the kernel finds the right init file, which is in the root of your android partition.

I haven't tried making my own Android root filesystem, because some changes are needed. Usually it generates a boot.img, system.img, userdata.img, etc. but we'd rather have it all on one to make things easier. This file contains a device tree that apparently generates a root filesystem for a device (the Mini6410) that looks rather similar regarding the SoC.

lesderid
Posts: 13
Joined: Mon Jul 09, 2012 12:44 pm
Location: Mechelen, Belgium
Contact: Website

Re: Porting Android

Tue Jul 10, 2012 3:12 pm

Same problem here as Mathijs got earlier. Using a 3.3 kernel, booting fine up to "A N D R O I D" and then processes start crashing, ending with something along the lines of "servicemanager crashed 4 times in 4 minutes" and then trying to go into recovery mode.

Why is it crashing though, does Android log it anywhere?

Warg
Posts: 20
Joined: Thu Jul 05, 2012 8:47 pm
Location: Sweden

Re: Porting Android

Tue Jul 10, 2012 3:17 pm

lesderid wrote:Why is it crashing though, does Android log it anywhere?
Might only be for apps, but check '/anr/traces.log' as that's where the full traces are logged usually.

arturo777
Posts: 28
Joined: Sat Mar 24, 2012 10:02 am

Re: Porting Android

Tue Jul 10, 2012 3:21 pm

The reason I ask about which file system is because apparently an android kernel can be used to start an non-android one. Reading http://elinux.org/Android_on_OMAP#Kernel_configuration, it appears this makes it easier to iron out problems, although if it is failing so early on I guess it is never making it to some sort of /init and is probably dying in the kernel.

What I find really interesting is that then you can chroot to the android /init
Last edited by arturo777 on Tue Jul 10, 2012 3:29 pm, edited 1 time in total.

lesderid
Posts: 13
Joined: Mon Jul 09, 2012 12:44 pm
Location: Mechelen, Belgium
Contact: Website

Re: Porting Android

Tue Jul 10, 2012 3:23 pm

Warg wrote:
lesderid wrote:Why is it crashing though, does Android log it anywhere?
Might only be for apps, but check '/anr/traces.log' as that's where the full traces are logged usually.
I can't find such a file, I'm afraid.

Anyway, we should try to compile Android specific for the Pi, it seems to me that this rootfs isn't going to work.

Has anyone created an IRC channel for Android on the Pi yet? That might be a bit better than spamming this thread...

Mathijs
Posts: 22
Joined: Sat Jun 30, 2012 2:23 pm

Re: Porting Android

Tue Jul 10, 2012 3:25 pm

lesderid wrote:Same problem here as Mathijs got earlier. Using a 3.3 kernel, booting fine up to "A N D R O I D" and then processes start crashing, ending with something along the lines of "servicemanager crashed 4 times in 4 minutes" and then trying to go into recovery mode.

Why is it crashing though, does Android log it anywhere?
I tried google on that error, it is because there is no ipc binder present according to here:
https://groups.google.com/forum/#!topic ... hyOnOdE0DI

Maybe something went wrong with compiling the ipc binder? Did you turn it on at all?

An IRC channel would be great, but I don't know how to make one :oops: .

lesderid
Posts: 13
Joined: Mon Jul 09, 2012 12:44 pm
Location: Mechelen, Belgium
Contact: Website

Re: Porting Android

Tue Jul 10, 2012 3:27 pm

Mathijs wrote:
An IRC channel would be great, but I don't know how to make one :oops: .
I made one:
Server: irc.rizon.net
Channel: #androidpi
Link: irc://irc.rizon.net/androidpi
Last edited by lesderid on Tue Jul 10, 2012 3:28 pm, edited 1 time in total.

arturo777
Posts: 28
Joined: Sat Mar 24, 2012 10:02 am

Re: Porting Android

Tue Jul 10, 2012 3:27 pm

lesderid wrote:Why is it crashing though, does Android log it anywhere?
Depending how far along it got, logcat might be working, in which if you've got the android SDK installed, you can use:

Code: Select all

adb logcat
This might be alittle tricker though, as you'd have to connect via ethernet rather than USB, which would require changing the setup a bit:

http://stackoverflow.com/questions/2604 ... er-3623727

ScorpAL
Posts: 10
Joined: Thu Jun 14, 2012 2:07 pm

Re: Porting Android

Fri Jul 13, 2012 7:18 am

First Jelly Bean port for ARMv6 device ever IS WORKING!

http://maclaw.pl/?p=205

arturo777
Posts: 28
Joined: Sat Mar 24, 2012 10:02 am

Re: Porting Android

Fri Jul 13, 2012 9:11 am

I just found another resource about Android platform development that is very interesting reading: A Practical Real-World Approach To Android Platform Development In ODROID. The guide is about getting Android going on the ODROID platform, however many of the issues are the same.

http://com.odroid.com/sigong/nf_file_bo ... -A4&bid=98

Mathijs
Posts: 22
Joined: Sat Jun 30, 2012 2:23 pm

Re: Porting Android

Sat Jul 14, 2012 11:55 am

Here's a kernel that works in Debian. /dev/binder actually shows up.

http://dl.dropbox.com/u/2806139/kernel. ... ashmem.img

6677
Posts: 382
Joined: Wed Mar 14, 2012 9:23 pm

Re: Porting Android

Tue Jul 17, 2012 7:01 pm

t166err wrote:Would the play store be usable on the android port or is that out of bounds ?
no, the play store - although primarily for android which is open source - is not open source. It infact needs a license to be paid in order for it to be included on the device, google do not allow it as an additional download for devices without it either. There are numerous ways of hacking it onto the pi afterwards but the play store filters out app search results based on hardware support and it probably won't recognise the pi so no apps will be returned as compatible. My ZTE blade as it is an ARMv6 device won't show results for ARMv7 apps or apps with a certain screen size requirement etc.

A case where someone did get in trouble for using the play store in an android fork would be cyanogen mod, they included it in their distributions, after google contacted them cyanogen pulled play out of all its builds. Most people use a few workarounds though that allow you to keep apps on your device already when installing cyanogen mod on their handsets, this works with play store aswell.

LAR
Posts: 2
Joined: Wed Jul 18, 2012 1:15 pm

Re: Porting Android

Wed Jul 18, 2012 1:18 pm

For the ICS port on the Kindle Fire, this was worked around by modifying the device information in Android so that the app store thinks it's a Galaxy Nexus.

User avatar
fodi
Posts: 112
Joined: Wed Mar 14, 2012 9:03 pm
Location: Hungary

Re: Porting Android

Wed Jul 18, 2012 6:30 pm

maybe this can be used for constructing the root file system:
information on the partition layout of the galaxy s
http://forum.xda-developers.com/showthread.php?t=999097

Mathijs
Posts: 22
Joined: Sat Jun 30, 2012 2:23 pm

Re: Porting Android

Thu Jul 19, 2012 8:37 pm

Update for the people not following the IRC channel (#androidpi at irc.rizon.net).

We are able to boot Android 4.0! There is still one major problem: the framebuffer is interfering with the actual Android interface, making everything unbearably slow and buggy. System UI is crashing too, although these two things may be related. Any help with the framebuffer issue would be appreciated!

zenguz
Posts: 1
Joined: Fri Jul 20, 2012 4:24 am
Location: Burlington, MA
Contact: Website

Re: Porting Android

Fri Jul 20, 2012 4:27 am

Hi I saw the good news!

What kernel are you using with Android 4.0?
How this kernel was compiled? can you post your .config?

I downloaded this kernel:
http://dl.dropbox.com/u/2806139/kernel. ... ashmem.img
Boot nice and I would like to compile myself but I need a working .config

Thanks,
Dave
Never type:
rm -rf /
and the press Enter

GizmoTheGreen
Posts: 27
Joined: Mon Jul 16, 2012 12:39 pm

Re: Porting Android

Fri Jul 20, 2012 5:43 am

Nice!

I will join the irc channel after work today (I just started so thats in 8 hours)

Mathijs
Posts: 22
Joined: Sat Jun 30, 2012 2:23 pm

Re: Porting Android

Fri Jul 20, 2012 8:18 am

Please note that this is not yet in a very usable state!
@ zenguz: The instructions from Casey from headlessandroid should work. Here is my kernel configuration:
http://dl.dropbox.com/u/2806139/kernel.14.img.config

This is a confirmed working kernel:
http://dl.dropbox.com/u/2806139/kernel.14.img

There are kernels based on the linux kernel 3.3 that work too. You can find them here:
http://lesderid.net/RPi/Android/Kernel/

About the actual android version: we use CyanogenMOD 9 (based on ICS). A device tree for the Pi can be found here: http://dl.dropbox.com/u/2806139/rpi.tar.gz.
A small change was needed in build/core/combo/arch/arm/armv6-vfp.mk. You can find it here.
Also, you'll need a small change in init.rc in order to make the userdata and cache partitions work. Here's the init.rc with the changes applied: http://dl.dropbox.com/u/2806139/init.rc

So you will need 4 partitions:
1. boot partition, fat32
2. filesystem partition, this is where the root of android resides, ext4
3. userdata partition, ext4
4. cache partition, ext4

In config.txt on your boot partition, change cmdline.txt to:

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait init=init
If you don't feel like setting this all up, extract and flash this image to an sd card (2gb minimal) just like you would with the debian image:
http://www.4shared.com/archive/m_eBBrh_ ... _2tar.html

CrysisLTU
Posts: 23
Joined: Tue May 29, 2012 11:43 am

Re: Porting Android

Fri Jul 20, 2012 9:47 am

Video showing this early port: http://www.youtube.com/watch?v=t0MrtlyJOq0

User avatar
fodi
Posts: 112
Joined: Wed Mar 14, 2012 9:03 pm
Location: Hungary

Re: Porting Android

Fri Jul 20, 2012 10:43 am

wow, nice job
you might want to drop in here, probably tehre are some devs in there who know the answers
http://forum.xda-developers.com/forumdisplay.php?f=613 xda android chef forum
http://forum.xda-developers.com/forumdisplay.php?f=1507 xda android development forum

(anyway, Mathijs i sent you a pm last night, but don't know if it has any use or you)

rza
Posts: 2
Joined: Fri Jul 20, 2012 1:21 pm

Re: Porting Android

Fri Jul 20, 2012 1:25 pm

Please note that this is not yet in a very usable state!
@ zenguz: The instructions from Casey from headlessandroid should work. Here is my kernel configuration:
http://dl.dropbox.com/u/2806139/kernel.14.img.config
How did you fix the colour screen while loading the kernel? What was the problem?
Last edited by rza on Fri Jul 20, 2012 1:46 pm, edited 1 time in total.

Return to “Android”