Reply
Thread Tools
Hariainm's Avatar
Posts: 485 | Thanked: 708 times | Joined on Feb 2010 @ Galiza
#81
How much system resources does this use?
__________________
Adrian Filgueira, @hariainm
 

The Following User Says Thank You to Hariainm For This Useful Post:
Posts: 288 | Thanked: 1,103 times | Joined on Jul 2014
#82
Originally Posted by Hariainm View Post
How much system resources does this use?
When both are idle about 600mb, rising to just over a 1gb when multiple apps are running in android and sailfish.

Also providing you boot into CM via ssh, then its now possible to get in an out of CM multiple times. by pausing and unpausing Sailfish and Surfaceflinger depending on which one you want to get back in to. Before you would have to straight up kill surfaceflinger via ssh if you wanted to get back into Sailfish and then it wouldn't be possible to get back into CM.

Remember it's still a WIP and CM is still not stable and if you want to get between Sailfish and CM then you still have to use ssh due to android version of the kill command doesn't seem to know the "-cont" parameter

Replace step 6 with kill -stop [pid of lipstick]; ./surfaceflinger
and then have another ssh window/screen open to run kill -stop [pid of surfaceflinger]; kill -cont [pid of lipstick]. (you can try ctrl + z in the same window but I haven't tested it.)



If anyone has any ideas how to make an automated script out of this (for sailfish and android) then please say so. Especially if you know how to get back into Sailfish from Android without ssh.
 

The Following 6 Users Say Thank You to nh1402 For This Useful Post:
Posts: 440 | Thanked: 2,256 times | Joined on Jul 2014
#83
Originally Posted by nh1402 View Post
If anyone has any ideas how to make an automated script out of this (for sailfish and android) then please say so. Especially if you know how to get back into Sailfish from Android without ssh.
Can you still get to systemctl from android? Might be an idea to write a unit file for surfaceflinger, and get systemd to start lipstick when it exits.

Using a 'Conflicts' directive you can stop lipstick when the surfaceflinger.service starts, and with a 'OnFailure' directive you can start lipstick again when you kill surfaceflinger from inside.

This also looks like a way to get the buffer output of Surfaceflinger and could be useful for integration work later.
__________________
SirenSong v0.5
Like my work? buy me a beer

Last edited by r0kk3rz; 2015-10-30 at 09:39.
 

The Following User Says Thank You to r0kk3rz For This Useful Post:
Posts: 288 | Thanked: 1,103 times | Joined on Jul 2014
#84
we don't want to kill them, just pause them, if you kill surfaceflinger then you won't be able to get back in to CM.
 

The Following User Says Thank You to nh1402 For This Useful Post:
Posts: 210 | Thanked: 841 times | Joined on Feb 2013
#85
what we're currently doing: https://www.youtube.com/watch?v=iH_NUIKSTpg
 

The Following 11 Users Say Thank You to liar For This Useful Post:
Posts: 440 | Thanked: 2,256 times | Joined on Jul 2014
#86
I think it will be worthwhile investigating running surfaceflinger, and anything else it interacts with inside a systemd-nspawn which is an easy integrated way of using namespaces and other virtualisation features mentioned earlier in the thread.

Reasonable primer on systemd-nspawn: https://rich0gentoo.wordpress.com/20...-nspawn-guide/

Additional crazy idea that probably won't work, use Xvfb to create a virtual framebuffer on the android side and use XWayland to display on the sailfish side. Slightly rube-goldbergy but maybe worth investigating.

EDIT: More food for thought http://mer-project.blogspot.fi/2013/...u-drivers.html

Interesting stuff about wayland, more specifically wayland clients and EGL: https://jan.newmarch.name/Wayland/index.html
__________________
SirenSong v0.5
Like my work? buy me a beer

Last edited by r0kk3rz; 2015-11-05 at 15:56.
 

The Following 2 Users Say Thank You to r0kk3rz For This Useful Post:
wicket's Avatar
Posts: 634 | Thanked: 3,266 times | Joined on May 2010 @ Colombia
#87
Originally Posted by r0kk3rz View Post
I think it will be worthwhile investigating running surfaceflinger, and anything else it interacts with inside a systemd-nspawn which is an easy integrated way of using namespaces and other virtualisation features mentioned earlier in the thread.
Not a good idea. systemd-nspawn is not portable. Any solution using it would not work on Harmattan, Fremantle or any other Linux OS that does not use systemd without porting it first. In the case of Harmattan and Fremantle, it's very unlikely that this will ever happen, and even if it does happen, despite Lennart's attempts to enforce it, systemd will never be a ubiquitous solution that everybody will want to use. The clone and unshare system calls aren't exactly hard to use and is what systemd-nspawn uses under the bonnet. With the ongoing N900 and N9 kernel mainlining efforts, using namespaces on Harmattan and Fremantle will eventually be possible.
__________________
DebiaN900 - Native Debian on the N900. Deprecated in favour of Maemo Leste.

Maemo Leste for N950 and N9 (currently broken).
Devuan for N950 and N9.

Mobile devices with mainline Linux support - Help needed with documentation.

"Those who do not understand Unix are condemned to reinvent it, poorly." - Henry Spencer
 

The Following User Says Thank You to wicket For This Useful Post:
Posts: 440 | Thanked: 2,256 times | Joined on Jul 2014
#88
Originally Posted by wicket View Post
Not a good idea. systemd-nspawn is not portable. Any solution using it would not work on Harmattan, Fremantle or any other Linux OS that does not use systemd without porting it first. In the case of Harmattan and Fremantle, it's very unlikely that this will ever happen, and even if it does happen, despite Lennart's attempts to enforce it, systemd will never be a ubiquitous solution that everybody will want to use. The clone and unshare system calls aren't exactly hard to use and is what systemd-nspawn uses under the bonnet. With the ongoing N900 and N9 kernel mainlining efforts, using namespaces on Harmattan and Fremantle will eventually be possible.
Naturally i'm targetting sailfish with its systemd/wayland setup, you guys can figure out something for the N9 using whatever tools make sense there, there is simply too much difference between sailfishos and meego for a single solution to apply here.

Some of the same ideas might work, but ultimately there will need to be differing implementations
__________________
SirenSong v0.5
Like my work? buy me a beer
 

The Following 2 Users Say Thank You to r0kk3rz For This Useful Post:
wicket's Avatar
Posts: 634 | Thanked: 3,266 times | Joined on May 2010 @ Colombia
#89
Originally Posted by r0kk3rz View Post
Naturally i'm targetting sailfish with its systemd/wayland setup, you guys can figure out something for the N9 using whatever tools make sense there
Okay, but liar appears to be targeting Harmattan too. Have a look at his YouTube link above.

Originally Posted by r0kk3rz View Post
there is simply too much difference between sailfishos and meego for a single solution to apply here. Some of the same ideas might work, but ultimately there will need to be differing implementations
Not necessarily. This may be true in some cases, but not for everything. Differences such as X11 and Wayland may need to be accounted for. In the case of namespaces, they are a feature of recent Linux kernels. systemd-nspawn uses the the same underlying kernel technology. Why waste time writing code twice when you can write it once and have it work on both?
__________________
DebiaN900 - Native Debian on the N900. Deprecated in favour of Maemo Leste.

Maemo Leste for N950 and N9 (currently broken).
Devuan for N950 and N9.

Mobile devices with mainline Linux support - Help needed with documentation.

"Those who do not understand Unix are condemned to reinvent it, poorly." - Henry Spencer
 

The Following User Says Thank You to wicket For This Useful Post:
Posts: 440 | Thanked: 2,256 times | Joined on Jul 2014
#90
Originally Posted by wicket View Post
Okay, but liar appears to be targeting Harmattan too. Have a look at his YouTube link above.
For sure, and nh1402 is working on sailfish and also posting things within this thread. Perhaps we need a separate thread for sailfish discussion to avoid confusion.

Originally Posted by wicket View Post
Not necessarily. This may be true in some cases, but not for everything. Differences such as X11 and Wayland may need to be accounted for. In the case of namespaces, they are a feature of recent Linux kernels. systemd-nspawn uses the the same underlying kernel technology. Why waste time writing code twice when you can write it once and have it work on both?
Sure, but nspawn also handles virtual networking, whitelisting shared directories, and a bunch of other useful looking things without having to write any code at all. Since Android doesn't use systemd, there is no 'lock-in' from using nspawn, and it looks useful for exploratory hacking to get something working quickly.
__________________
SirenSong v0.5
Like my work? buy me a beer
 

The Following User Says Thank You to r0kk3rz For This Useful Post:
Reply

Tags
apkenv

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:40.