Page 1 of 3

How possible is it to port over android 4.4 kik-kat?

Posted: Mon Jun 02, 2014 8:23 pm
by Thediehardtrilogy
As you know, the raspberry pi's amount of RAM for the model B is 512MB. I have done a small bit of research Android 4.4, and found out that the smallest amound of RAM needed for android 4.4 is 512MB. It's right there on the target, but then I realized that it would be a tad slow. I have a AT&T Avail2 that runs android 4.1 with 512MB of RAM (Worst Christmas present for a parent to give their child. Makes me happy that I put it out of its misery by falling on it.) ANYWAY. The phone wasn't that slow, but it gets my gears thinking, how possible is it to port over the OS? And if its possible, does this mean the raspberry pi can count as a sort-of, Android mini-pc?Or is it being worked on right now...( My pi has been sitting on my shelf collecting dust, so I'll be happy to be a tester.)...well,that's it.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Mon Jun 02, 2014 8:48 pm
by fruitoftheloom
Did you not read the other recent posts in the Android section ? at this time there is no usable Android Ports !

http://www.raspberrypi.org/forums/viewt ... 73&t=71658

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Mon Jun 02, 2014 8:49 pm
by riklaunim
Raspberry uses old ARM architecture which is dead for Android. Only ARMv7 is supported by it, not v6 - so no KitKat... but you can get Android dongles or other Chinese Android devices easily in similar/lower prices (although it may be hard to find one which would be friendly for USB microcontrollers boards out of the box or close to that).

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Mon Jun 02, 2014 8:50 pm
by redhawk
If you have done a small bit of research then you will know that Android on Pi has been discussed in great detail.
The lack of RAM is not the issue here for Android (apart from the behind the curve slow single core ARMv6 processor) there is simply zero interest from Broadcom engineers to make it happen.
There is currently a gingerbread build that boots on the Pi but it's slow and buggy because there's no hardware driver support the build was a rip from an Android phone with similar Broadcom chip IIRC.

Richard S.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Tue Jun 03, 2014 2:47 pm
by aaa801
redhawk wrote:If you have done a small bit of research then you will know that Android on Pi has been discussed in great detail.
The lack of RAM is not the issue here for Android (apart from the behind the curve slow single core ARMv6 processor) there is simply zero interest from Broadcom engineers to make it happen.
There is currently a gingerbread build that boots on the Pi but it's slow and buggy because there's no hardware driver support the build was a rip from an Android phone with similar Broadcom chip IIRC.

Richard S.
thats not exactly true, the gingerbread build has no hardware drivers ATALL,

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 07, 2014 2:29 am
by Model_rocketeer
What is this, and how does it relate? It would appear to be kitkat for arm v6...
https://github.com/androidarmv6/android_build

And yes, I have no idea what I'm talking about.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 07, 2014 10:13 am
by mahjongg
its not specifically for the PI, and the specific PI drivers are what is preventing android to be ported, not the core.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 07, 2014 10:29 am
by fruitoftheloom
Model_rocketeer wrote:What is this, and how does it relate? It would appear to be kitkat for arm v6...
https://github.com/androidarmv6/android_build

And yes, I have no idea what I'm talking about.
Just give up on Android on Pi, you will be just totally frustrated, as said in many posts in this form just buy a £35 Android Stick..

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 4:55 pm
by kronflux
its not specifically for the PI, and the specific PI drivers are what is preventing android to be ported, not the core.
This is a completely ridiculous claim.

The kernel is what contains the device drivers. There IS a modern kernel for the Pi, which would work great with android with a few tweaks.
https://github.com/raspberrypi/linux

The androidarmv6 project is perfect for this application, as it constantly being updated, and brings KitKat to the Armv6 platform.
https://github.com/androidarmv6/android

The hardest part would be the device board configs for the device. Telling android which drivers and whatnot to use when compiling, but even that has been started by someone. It would just need to be updated to apply to KitKat.
https://github.com/Razdroid/android_device_raspberrypi

And lastly, you would need all the vendor stuff. Which RazDroid also has started, but would need to be updated to apply to KitKat.

I'm not saying it would be "easy" or "point and click" - but we ARE at a point where a KitKat port is completely possible, and would actually likely not be very difficult.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 4:59 pm
by DougieLawson
There are NO versions of Android that run on the Raspberry Pi.

The hardware might just about be capable of running Gingerbread (at a pinch), but there's nobody who has the time to waste to do the port and get device drivers running.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 5:29 pm
by fruitoftheloom
DougieLawson wrote:There are NO versions of Android that run on the Raspberry Pi.

The hardware might just about be capable of running Gingerbread (at a pinch), but there's nobody who has the time to waste to do the port and get device drivers running.
+1 yes totally agree

Maybe it is "feasible" ?? and await kronflux Android version, but at the moment everyone is just blowing hot air

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 7:15 pm
by riklaunim
Software clash seems quite strong as this topic is constantly returning. I wonder which side will win... you can do without Raspberry for education you know, and Android devices sell at ~200 millions devices per year quarter. ;)

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 7:30 pm
by Joe Schmoe
So, here's a point. Every time I see this "Why can't I have Android?" whine on these forums, I have much the same reaction that most of the smart people here have - which is: Doesn't exist; not gonna happen; wouldn't be prudent.

And then I think of typing in something pithy about all the other OSes that I'd like to see ported to the Pi - such as MSDOS, z/OS, CP/M, etc - that are all about as likely as Android to ever see the light of day on the Pi. But then I ask myself: If Android isn't gonna happen, why do we have a forum for it on this board? Equivalently, why *don't* we have forums for those other OSes, if they are equally likely as Android?

The fact hat we have a forum for it is likely what causes people to keep asking about it.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 8:30 pm
by redhawk
But then I ask myself: If Android isn't gonna happen, why do we have a forum for it on this board?
I wondered about this too, it seems a little misleading to have a support forum for unsupported operating system.
I had suggested to one of the moderators to rename the Android forum section to Android (not supported) but apparently that wasn't possible.

Richard S.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 8:46 pm
by fruitoftheloom
redhawk wrote:
But then I ask myself: If Android isn't gonna happen, why do we have a forum for it on this board?
I wondered about this too, it seems a little misleading to have a support forum for unsupported operating system.
I had suggested to one of the moderators to rename the Android forum section to Android (not supported) but apparently that wasn't possible.

Richard S.
Just move the posts to OS - Other - Misc......

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 11:11 pm
by DougieLawson
Just delete the whole subforum and everything in it. One of the forum admins can do that with no hassle.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Thu Jun 19, 2014 11:47 pm
by Joe Schmoe
DougieLawson wrote:Just delete the whole subforum and everything in it. One of the forum admins can do that with no hassle.
(Yes, that's best.)

Or, add sub-forums for all those other OSes, which are all as likely as Android to ever run on the Pi.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Fri Jun 20, 2014 8:06 am
by jamesh
It's a good point - not sure why we have an Android forum! I'll flag it up to Liz - she's in control of content, not the mods.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 21, 2014 8:41 am
by trevd1234
kronflux wrote: The kernel is what contains the device drivers. There IS a modern kernel for the Pi, which would work great with android with a few tweaks. https://github.com/raspberrypi/linux
.
Actually you can build an Android ( Kitkat ) compatible userspace with no tweaking whatsoever.
kronflux wrote: The androidarmv6 project is perfect for this application, as it constantly being updated, and brings KitKat to the Armv6 platform. https://github.com/androidarmv6/android
.
Agreed the androidarmv6 project is a perfect base for the PI :)
kronflux wrote: The hardest part would be the device board configs for the device. Telling android which drivers and whatnot to use when compiling, but even that has been started by someone. It would just need to be updated to apply to KitKat.
https://github.com/Razdroid/android_device_raspberrypi
.


I'd forget about the razdroid device tree as alot of changes have occurred since Gingerbread plus ( and no offence to the original implementers ) it's a bit of a mess anyway.
kronflux wrote: And lastly, you would need all the vendor stuff. Which RazDroid also has started, but would need to be updated to apply to KitKat.
.


The vendor stuff for the PI is the Graphics stack ( Gralloc , HWComposer and the OpenGL/OpenVG libraries ) using the razdroid stuff as a base seems like a good idea. This is also where the bulk of the work is
kronflux wrote: I'm not saying it would be "easy" or "point and click" - but we ARE at a point where a KitKat port is completely possible, and would actually likely not be very difficult.
Like kronflux says Kitkat is perfectly possible on the PI.

So if anyone want to get involved you can start here :) https://github.com/trevd/android_vendor_broadcom_rpi

This will produce a CM11 ( 4.4.4 ) system image that will boot on the PI.

Details/Features
=============
New device tree written from scratch
A small patch needed applying to the build system which builds all binaries in arm mode because the PI doesn't support Thumb-2 which is the default mode on android arm builds and I didn't fancy converting a load of Thumb-2 assembly to Thumb-1. I also added tuning for the PI's cpu ( arm1176jzf-s ).

Currently the build uses softfp and -mfpu=vfp . I would've preferred to use hardfloat and I've compiled and experimental androideabi compatible toolchain to do that but one thing at a time eh. lol ;)

TODO/WIP
=========
The Graphics Stack :
I took razdroids gralloc and updated it to the latest api version. this is working at the moment
I've cherrypicked a combination of the raspberryPI userland and the Broadcom source drop to create a basic EGL/GLES library. A couple of extra Android Flavour EGL attributes also had to be added to make it kitkat compatible ( namely EGL_ANDROID_recordable and EGL_ANDROID_framebuffer_target )
I've upgraded the hwcomposer to v1.3 - this is currently incomplete but is coming along nicely :)
===============

HACKING
=========
You can plug a keyboard straight in as the boot process starts a root console. I also added openvt and chvt to busybox so you can start logcat etc on alternative vtty's. Personally however I normally do this sort of stuff over adb. This is a little more tricky on the PI. Due the my lack of a full-size usb otg cable. To that end the boot process will also attempt to bring-up eth0 using dhcp and will print the ip address to the console if successful. You can then use adb tcp feature to connect to the PI over ethernet.

You can find an example sdcard configuration and cmdline.txt and boot partition info in this gist https://gist.github.com/trevd/64f0a0cbc45f2d7bd210 . sdcard setup is a manual process at the moment.

Finally while I have plenty of experience porting legacy devices to the latest and greatest version of Android up until starting this project 2 weeks ago I've never had to deal with implementing the Graphic Stack mainly because the OpenGLES libraries are normally closed source binaries blobs. Additionally "Graphics" programming has never really been my thing so I figured doing this project on the PI will provide a great learning experience if nothing else

I was going to hold off posting until I had something working but seeing as the forum looks like it's about to be moved to /dev/null I thought throw this out there

Well That's all folks.
trevd

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 21, 2014 7:31 pm
by bigbadadam14
So.... I'm confused. Did you just prove its possible to port Android to Pi?

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 21, 2014 8:03 pm
by joan
bigbadadam14 wrote:So.... I'm confused. Did you just prove its possible to port Android to Pi?
No. The Android kernel can be run on the Pi. Just like the Microsoft Windows Mobile kernel can be run on the Pi. Another machine can be used to attach a "debugger" to the running kernel. It's a necessary step but it is useless in its own right.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 21, 2014 8:29 pm
by Cancelor
I feel compelled to ask ....... WHY? (port android)

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 21, 2014 8:52 pm
by Joe Schmoe
Cancelor wrote:I feel compelled to ask ....... WHY? (port android)
That's the question I keep asking. Both publicly and privately.

The only answer anyone has been able to come up with is (basically the computer equivalent of) "Because it's there". (As in "Why does a man climb a mountain?")

Because more OSes is considered an unqualified good.

So, why not z/OS?

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 21, 2014 9:00 pm
by DougieLawson
Joe Schmoe wrote:So, why not z/OS?
That's an easier question to answer.

You can run Hercules with OS/360 (because that is a public domain OS).
http://www.rs-online.com/designspark/el ... -mainframe

You can't run z/OS because IBM Corp. won't licence it for non-approved processors and they won't licence their intellectual property (zSeries Licenced Internal Code (LIC)) for use on non-approved processors. You'll like Mark Anzani when you meet him (he's very friendly and interested in small microcomputers like the RPi), but you won't like Mark Anzani when he's standing as plaintiff when IBM Corp. sues you.

Re: How possible is it to port over android 4.4 kik-kat?

Posted: Sat Jun 21, 2014 10:14 pm
by Joe Schmoe
You can run Hercules with OS/360 (because that is a public domain OS).
http://www.rs-online.com/designspark/el ... -mainframe
Interesting stuff. Thanks for posting.