Subject: Re: Re: Regarding running Android LXC guest in Ubuntu touch by using Mir

From: 유재용 <[email-masked]>
Date: Mon, 04 Jan 2016 05:37:46 +0000 (GMT)

Thanks for the answer Daniel,

Then, if I understand that two distinct display servers are running (both Mir and Surface flinger), is this correct?

Jaeyong

------- Original Message -------

Sender : Daniel van Vugt<[email-masked]>

Date : 2016-01-04 14:30 (GMT+09:00)

Title : Re: Regarding running Android LXC guest in Ubuntu touch by using Mir

Hi Jaeyong,

This is indeed the proper mailing list for such questions, but you can
also use https://answers.launchpad.net/mir

Good question, and I can kind of see how you might think Android is a
Mir client. But it is not.

The relevant stack is really:

Linux kernel and hardware
^
Android HAL (on phones only, not desktops)
^
libhybris (on phones only, not desktops)
^
Mir server (Unity System Compositor)
^
Mir server (Unity8 shell is a server and a client)
^
Apps (Mir clients)

We do not use Surfaceflinger at all anywhere in Ubuntu Touch. Although
in the early days before Mir, we did.

I don't know enough about LXC to comment further on that part.

- Daniel

On 04/01/16 13:05, 유재용 wrote:
> Hello Mir developers
>
> I saw an article of running Android as a LXC guest on top of Ubuntu
> touch in the following site.
>
> https://developer.ubuntu.com/en/start/ubuntu-for-devices/porting-new-device/
>
> Here, I have some question with the Mir display server. I hope if you
> could help me out understand the
>
> details of display server/client relationship with the above example.
>
> In the diagram (see above link), there is a single Mir display server
> placed in Ubuntu touch side.
>
> And, it looks like Android is working as a Mir client to the display server.
>
> As I know, Surface flinger is acting as a compositor (i.e., display
> server) in Android side. I'm wondering
>
> how do you manage to work Surface flinger as a Mir client?
>
> And, would it be possible to run 2 display servers (i.e., Surface
> flinger and Mir) within LXC but giving
>
> different virtual terminals to each other? (Are there some possibilities
> of mess-up in GPU context switches
>
> in between display servers?)
>
> If the question is not proper on this mailing list, could you let me
> know the pointers that I can these sort of questions?
>
> Thanks,
>
> Jaeyong
>
>
>

---

From: Daniel van Vugt <[email-masked]>
Date: Mon, 4 Jan 2016 13:41:27 +0800

SurfaceFlinger is not running. Mir uses the Android graphics driver
directly.

There are however two Mir servers running (nested) on an Ubuntu phone.
They are Unity System Compositor and Unity8.

You can imagine Unity System Compositor as having replaced
SurfaceFlinger entirely.

- Daniel

On 04/01/16 13:37, 유재용 wrote:
> Then, if I understand that two distinct display servers are running 
> (both Mir and Surface flinger), is this correct?
> 
> Jaeyong
> 
> ------- *Original Message* -------
> 
> *Sender* : Daniel van Vugt<[email-masked]>
> 
> *Date* : 2016-01-04 14:30 (GMT+09:00)
> 
> *Title* : Re: Regarding running Android LXC guest in Ubuntu touch by 
> using Mir
> 
> Hi Jaeyong,
>

---

From: Daniel van Vugt <[email-masked]>
Date: Mon, 4 Jan 2016 13:55:42 +0800

Mir is evolving toward independence from Android as Ubuntu/Unity8 aims
to be an independent platform. And independence means gradually removing
Android from the equation such that (eventually) only the hardware and
Ubuntu software remains.

On desktop/laptops we're already there and there is no Android code.
However the journey will take longer on phones as we leverage the
significant investment already made in Android graphics drivers (and
other drivers such as sensors and GPS).

On 04/01/16 13:50, 유재용 wrote:
> Oh, I see. That is more interesting.
> 
> Just for the curiosity, could you tell me more about the early days 
> before Mir?
> 
> I'm wondering why you choose to remove surface flinger.
> 
> Is there some constraint if you keep using Surface flinger and another 
> graphics server?
> 
> Thanks,
> 
> Jaeyong
> 
> *Date* : 2016-01-04 14:41 (GMT+09:00)
> 
>  > *Sender* : Daniel van Vugt
>  >

---

From: 유재용 <[email-masked]>
Date: Thu, 07 Jan 2016 09:53:08 +0000 (GMT)

Come to think of it, by replacing surfaceflinger, would it be possible to

run Android apps as it appears as a native application in Ubuntu touch?

In other words, if you run Angry bird in Ubuntu touch, it will launch

Angry bird in Android and the screen output is composed to the application

inside Ubuntu touch?

Thanks,

Jaeyong

------- Original Message -------

Sender : Andreas Pokorny<[email-masked]>

Date : 2016-01-05 03:07 (GMT+09:00)

Title : Re: Re: Regarding running Android LXC guest in Ubuntu touch by using Mir

On Mon, Jan 4, 2016 at 6:50 AM, 유재용 <[email-masked]> wrote:

Just for the curiosity, could you tell me more about the early days before Mir?

Is there some constraint if you keep using Surface flinger and another graphics server?

Thanks,

Jaeyong

Hi Jaeyong,

Replacng surfaceflinger with a mir based system compositor - next to the obvious idea of making the android driver based stack similar to the mesa/kms based stack - allows us to separate the user session from the output and input devices allocation. With that it will be easy to have a seamless switch between user sessions or have them running in parallel and move devices between sessions .. and more.

regards

Andreas