Android 4.4/5.0 OOB?


My admittedly idealized dream of how to use Android on the Pyra...

Create a virtual machine environment that appears to Android as fairly generic hardware with assignable 'onboard' and 'expansion' storage that the user can point to directories on SD media.  Allow the user to allocate RAM and CPU as well.  See how VirtualBox on Debian for X86 does it for X86 environments as an example.  It should appear to Android as a tablet with USB connected HID devices, (Keyboard and game controls), tilt, rumble, sound, wired network (actually a bridge under Debian so it can use whatever Debian is connected to), screen, home button, power button.   Have the VM map the power button (or other mechanism) to minimize Android and return HID control to Debian.  Be able to run multiple Android VMs AND Debian at the same time.

Why?

I want to use one Android instance for work stuff - and nothing else.  I want to give it minimal CPU (@ 20% of an OMAP core max), storage and RAM resources.  I want to keep it 'always on', but when not in use, running in such a low power use state (2% of an OMAP core?) that it doesn't kill battery life.  Notifications in this instance (vibrate, chime, etc...) should flow through the Mixer to Debian.

I want to use one Android instance for play stuff - and nothing else.  I want to give it adequate CPU (@ 100% of an OMAP core max), storage and RAM.  I want to keep it 'always on', but when not in use, running in such low power use state that it doesn't kill battery life.  Notifications in this instance (vibrate, chime, etc...) should flow through the Mixer to Debian.

Note that these android instances -are not phones-.  Ideally Android would consider/see them to be data-only (WiFi only?) tablets.

in a perfect world, the 3 (Debian, Android1, Android2) would share a common clipboard, but I could live without that.

i see that capability as a potential 'killer app'.

Start with Android of course since it's ROM equivalent can simply be downloaded from Cyanogen or similar.  Then someday the proverbial someone interested could generate a hardware emulator for an iPad that runs in the same framework.

It's a fun dream.

Edit:  Just in case someone thinks this is 'too far out there', here is a guide for the same thing under X86 VirtualBox:  http://www.howtogeek.com/164570/how-to-install-android-in-virtualbox/

If the Pyra were Debian on X86 (Bay Trail), we would have had this functionality out of the box...  Just saying...

Anyway, the equivalent functionality on ARM can't be impossible - but I'm betting it isn't going to be easy.
 
Last edited by a moderator:
If the Pyra were Debian on X86 (Bay Trail), we would have had this functionality out of the box...  Just saying...
What is the performance hit for emulating ARM on x86? Just wondering.
 
The recent devboard kernel I'm using on the Pyra OS, I believe aTc has enabled the virtualization features... 
 
If the Pyra were Debian on X86 (Bay Trail), we would have had this functionality out of the box...  Just saying...
What is the performance hit for emulating ARM on x86? Just wondering.

The recent devboard kernel I'm using on the Pyra OS, I believe aTc has enabled the virtualization features... 
Search is my friend...

http://systems.cs.columbia.edu/projects/kvm-arm/

This looks like it's doing X86 VM on ARM...

http://www.virtualopensystems.com/en/solutions/guides/kvm-on-arm/

What I'm after is ARM VM on ARM...  Hmmm....  Nascent, but gets us part way there?

Edit/add:

Which kernel are we using?  3.9 seems to be where KVM on ARM becomes possible.

http://lwn.net/Articles/557132/

Edit/add 2:

Someone did ARM Android in a VM on Android running on ARM.

http://www.virtualopensystems.com/en/solutions/guides/kvm-android-on-fastmodels/

And it looks like we may have the right SoC to do it...?
 
Last edited by a moderator:
Code:
slaeshjag@pyra:~$ uname -a
Linux pyra 3.19.0-rc5-gta04-av #3 SMP Tue Jan 27 11:53:58 CET 2015 armv7l GNU/Linux
That's the kernel aTc is messing around with atm.
 
Last edited by a moderator:
Which kernel are we using?  3.9 seems to be where KVM on ARM becomes possible.
Currently running 3.19, aTc did enable the feature.. And yes the omap5 has two Cortex A15 cores..


Edit: What Slaeshjag said  :ph34r:
 
Last edited by a moderator:
So...  does that mean that someone with a dev board and the current Pyra Debian OS image could/should try it?

Running one or more Android VMs inside the Debian OS would be killer.  Even better would be to have it ship with the units?

Anxiously awaiting the Pyra.  Watching 256GB SDXC and 128GB microSD card prices dropping...

Wouldn't this also enable someone to run Debian (or Ubuntu) for ARM inside a KVM on Debian on ARM (Pyra)?  (If they wanted to...)

By extrapolation - maybe even iOS if someone already owned an iPad to extract the OS image from?  Not interested in this myself, but the capability could be an impressive win.
 
Last edited by a moderator:
What I'm after is ARM VM on ARM...  Hmmm....  Nascent, but gets us part way there?
It can only do ARM on ARM.
Running one or more Android VMs inside the Debian OS would be killer.  Even better would be to have it ship with the units?
Note that android is useless without 3d acceleration (recent versions won't even boot without 3d I think?), and 3d is real difficult to do on virtualization..
 
Last edited by a moderator:
What I'm after is ARM VM on ARM...  Hmmm....  Nascent, but gets us part way there?
It can only do ARM on ARM.
 No, but it can layer in QEMU on an ARM VM... Fake X86 VM on ARM?

http://www.virtualopensystems.com/en/solutions/guides/kvm-on-arm/

Running one or more Android VMs inside the Debian OS would be killer.  Even better would be to have it ship with the units?
Note that android is useless without 3d acceleration (recent versions won't even boot without 3d I think?), and 3d is real difficult to do on virtualization..
Is this demonstration any help?http://www.virtualopensystems.com/en/solutions/demos/vosyshmem-api-remoting/
 
Wouldn't it be possible to build the Android "emulator" that you get with the dev tools?

Hmm, actually, that might be a nice way to run some on the Pandora too... if it works
 
What's the advantage of a virtual machine compared to Alien Dalvik or the Solution Jolla Phone uses?

something that allows to start apks from the Linux Desktop directly?
 
It can only do ARM on ARM.
 
No, but it can layer in QEMU on an ARM VM... Fake X86 VM on ARM?

http://www.virtualopensystems.com/en/solutions/guides/kvm-on-arm/
What makes you think it's x86? KVM doesn't imply x86 at all.

Note that android is useless without 3d acceleration (recent versions won't even boot without 3d I think?), and 3d is real difficult to do on virtualization..
Is this demonstration any help?http://www.virtualopensystems.com/en/solutions/demos/vosyshmem-api-remoting/
No? The fact that someone managed to pull off a spinning cube on some platform (exynos?) doesn't mean we can do full blown android on OMAP5, especially knowing the usual breakage of SGX driver and all.
 
Last edited by a moderator:
Wouldn't it be possible to build the Android "emulator" that you get with the dev tools?

Hmm, actually, that might be a nice way to run some on the Pandora too... if it works
Can't tell anything about other systems, but at least on my 2010 x86 notebook, it takes ages to load and isn't very fast
 
No? The fact that someone managed to pull off a spinning cube on some platform (exynos?) doesn't mean we can do full blown android on OMAP5, especially knowing the usual breakage of SGX driver and all.

There are so many different Android devices out there and all work HW-accelerated with all the different Hardware (OMAP too afaik), what's the trick?  :ph34r:
 
I think the problem is to use Virtualization with HW acceleration. If you want to have an Android in a Debian running, the Android has to use the hw acceleration through the VM in Debian. The Alien Dalvik sounds like a good solution.
 
what's the trick?
No trick, it's just OpenGLES.The problem being discussed with the virtualization is that getting 3D acceleration from the guest OS into the host is actually very hard. I think Lunixbochs has had some success in the QEMU x86 emulator package on Pandora but I don't know how much of that work would help in this case.

What makes you think it's x86? KVM doesn't imply x86 at all.
I think he saw QEMU and assumed it was for x86 emulation, same as we have running on the Pandora. Most people forget that QEMU is a generic system emulator, not just an x86 emulator.
 
Back
Top