maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [Fremantle] Android inside chroot (https://talk.maemo.org/showthread.php?t=92898)

reinob 2014-03-19 13:01

Re: [Fremantle] Android inside chroot
 
Note:

This (http://whiteboard.ping.se/Android/Debian) = running Android system on a Debian chroot itself running on Android kernel might be something cool to do on our N900s (or a laptop, or whatever).

lexik 2014-03-19 13:25

Re: [Fremantle] Android inside chroot
 
http://logs.nslu2-linux.org/livelogs...o.20131109.txt

< list of Android drivers needed anyone / anywhere?

Including them in kernel-power is no-go, but what about hybrid of nitdroid-kernel and kp.
nitdroid-kernel is on Gitorious.

From here: binder, ashmem, pmem, logger, wakelocks, oom handling?

marmistrz 2014-03-19 13:53

Re: [Fremantle] Android inside chroot
 
If you need an Android-kernel on which no Linux will run, then how can you run Android apps on Jolla?

wicket 2014-03-19 17:44

Re: [Fremantle] Android inside chroot
 
Quote:

Originally Posted by reinob (Post 1417648)
doesn't android require a not-really-linux kernel? (or am I still living in the past?)

Android uses a fork of the Linux kernel. It's still very much a Linux kernel and many of their changes have been accepted upstream so things have improved in this regard. Of course the N900 kernel (stock and power) are too old and do not include these upstream changes but freemangordon, pali and others have recent kernels booting on the N900 (not yet complete) so this would be a good starting point for running Android and should require fewer patches.

Quote:

Originally Posted by DDark (Post 1417650)
Maybe it's better to run it inside VM. I heard that Xen got ARM support.

Xen on ARM is still experimental but you can forget about running a Xen VM of Android on the N900 with only 256MB RAM.

Quote:

Originally Posted by lexik (Post 1417513)
how?: first of all we need chrooted Android (NITDroid probably, or some "cropped" version of it) and running Dalvik. Then?

A more elegant option than your bog-standard chroot would be to use LXC (which has been described as a "chroot on steroids"). LXC "boots" the OS inside the chroot so you're more likely to have an environment that resembles a normal Android system. Your normal chroot would require many hacks to provide host OS (Maemo) components in the Android chroot. LXC already has ways of taking care of this. There has already been some success in running Android under LXC, but as the blog post says, "it really depends on what you want to do with it".

Quote:

Originally Posted by Hurrian (Post 1417658)
This is exactly what you want to do.

Some talking points:
  • There is already an Android kernel adaptation for N900
  • Fremantle uses GTK
  • You can do exactly what he did, on ARM

This is an interesting possibility. Perhaps this can be used in combination with LXC to display the Android container in a Maemo window.

Quote:

Originally Posted by marmistrz (Post 1417679)
If you need an Android-kernel on which no Linux will run, then how can you run Android apps on Jolla?

The Jolla device uses an Android kernel which is why it suffers from crippled static power management.

marmistrz 2014-03-19 19:27

Re: [Fremantle] Android inside chroot
 
Supposed there is static pm missing, what would happen while trying to run an Android app? //edit: Can't our Linux kernel take care of whole power management and our Dalvik app just let be controlled?

taixzo 2014-03-19 19:50

Re: [Fremantle] Android inside chroot
 
Is it possible to give access to hardware components (e.g. accelerometer, GPU, etc) to something in a LXC container? If so, could the nested Android have hardware acceleration? It makes Android apps so much more usable on the N900.

lexik 2014-03-19 20:04

Re: [Fremantle] Android inside chroot
 
Quote:

Originally Posted by taixzo (Post 1417722)
Is it possible to give access to hardware components (e.g. accelerometer, GPU, etc) to something in a LXC container? If so, could the nested Android have hardware acceleration? It makes Android apps so much more usable on the N900.

Correct me if I'm wrong, but yes, as we are not emulating anything. Drivers are still needed inside (and outside) the LXC, because chrooted system has no knowledge about it's HW.

Here is some stuff about direct rendering (simillar).

Alecsandru 2014-03-19 20:23

Re: [Fremantle] Android inside chroot
 
So basically we need to load android drivers in maemo chroot and use the maemo for chroot ,easy to tell , hard to do.
But how do you start the android kernel in chroot?
Asumed you have done that do you need to bind maemo to the android kernel&dalvik vm for installing and running the apps ? or do you need to use the full chroot , run full android and apps in that chroot?

Android_808 2014-03-19 22:15

Re: [Fremantle] Android inside chroot
 
AIUI, LXC containers share the same kernel still - see Oracle documentation on LXC

In that case your now looking at patching host kernel to enable Android, which I dare say is going to break a few things a long the way. If that's the case I'd start looking at a Sailfish approach by running libhybris, if only for the possibility of detaching MCE and co from N900 specifics to allow porting to other devices. Problem is how much RAM and performance loss your going to see.

taixzo 2014-03-19 22:23

Re: [Fremantle] Android inside chroot
 
If the container has the same kernel, does that mean it has to load two sets of drivers for everything? Or are the android drivers only loaded inside the LXC container?


All times are GMT. The time now is 10:54.

vBulletin® Version 3.8.8