maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [SFOS] [DEV] sfdroid: run android in a window (https://talk.maemo.org/showthread.php?t=95631)

liar 2015-06-17 14:10

[DEV] sfdroid: run android in a window
 
Update from the field:

https://www.youtube.com/watch?v=78N1C2-6t3I

This will be released soon :).

Instructions are on wiki.merproject.org

https://wiki.merproject.org/wiki/Ada...for_hammerhead

https://wiki.merproject.org/wiki/Ada...ishOS_for_mako

Old instructions:

Code:

Don't flash this if you're not able to recover from it. It breaks some things. I hope i can make it better. ONLY FLASH ON A ROM YOU DON'T NEED.

Instructions:
Backup /init.rc from your sfos installation.
$ devel-su
# cp /init.rc /home/nemo/init.rc.bak

Flash with recovery on top of SailfishOS (gapps can be flashed too).
(Multirom: Recovery->Advanced->Multirom->List Roms->your rom->Flash Zip). Then install SDL2:
$ devel-su
# pkcon install SDL2

[hammerhead]
$ devel-su
# usermod -G net_bt_stack -a nemo

Downloads:
v0.9
[Nexus 4/mako] https://www.dropbox.com/s/qspp5s4rvf...-mako.zip?dl=0
CHECK THAT YOU'RE USING SFOS 2.0.0.10 beta9!!! AND CM10.1.3 AS BASE.

v0.9
[Nexus 5/hammerhead] https://www.dropbox.com/s/hwt3tjceom...rhead.zip?dl=0
CHECK THAT YOU'RE USING SFOS 2.0.0.10 AND CM11 AS BASE

changelog v0.9: https://bpaste.net/show/00d571f0b3f0

Remember! Flash on a rom you don't need to test it first.
If you're experiencing any problems with sfos, neutralize sfdroid and see if it works again, then report here.

NEUTRALIZE (disable):
$ devel-su
# cp /home/nemo/init.rc.bak /init.rc

UPDATE flash the new zip.

WHATSAPP: https://www.youtube.com/watch?v=OA4KTPt2wgY


       
Code:

       
surfaceflinger buffer <-> unix domain socket <-> sfdroid -> GLES
libinputservice <- uinput <- sfdroid
wifi, hack
most HAL modules disabled (inside android: no sensors, no gps, no bluetooth,...)



irc.freenode.net -> krnlyng

Jeffrey04 2015-06-17 14:21

Re: Idea for an Android Compatibility Layer
 
just out of curiousity, would the use of lxc/docker help?

liar 2015-06-17 15:40

Re: Idea for an Android Compatibility Layer
 
Quote:

Originally Posted by Jeffrey04 (Post 1473849)
just out of curiousity, would the use of lxc/docker help?

probably not, as far as i know they try to isolate the target from the host, but we want to be able to have a tcp connection between the renderer app and the chroot

pycage 2015-06-17 17:23

Re: Idea for an Android Compatibility Layer
 
I wonder why a TCP connection. Shouldn't a local Unix datagram socket be good enough but without the additional overhead of network and TCP?

liar 2015-06-17 17:30

Re: Idea for an Android Compatibility Layer
 
Quote:

Originally Posted by pycage (Post 1473862)
I wonder why a TCP connection. Shouldn't a local Unix datagram socket be good enough but without the additional overhead of network and TCP?

the main reason why tcp is because that is already implemented.. but if you would like to change it please do so :)

liar 2015-06-17 18:38

Re: Idea for an Android Compatibility Layer
 
update:

surfaceflinger does not crash anymore:
https://bpaste.net/show/5520d6e5bc9b

but rendering does not work yet...
initializing renderer process
listening on port 22468
renderer process started
creating sub window
created sub window
FrameBuffer::post
accepted client
accepted client

hedayat 2015-06-18 01:32

Re: Idea for an Android Compatibility Layer
 
Thanks! Does the chroot work(run!) on N9 or it should be compiled from sources?

Vento 2015-06-18 07:46

Re: Idea for an Android Compatibility Layer
 
Quote:

Originally Posted by liar (Post 1473857)
probably not, as far as i know they try to isolate the target from the host, but we want to be able to have a tcp connection between the renderer app and the chroot

yes, but you can tell to isolate less :) I'm not know acl stuff but I use docker for work every day so if you want some help.

liar 2015-06-18 10:15

Re: Idea for an Android Compatibility Layer
 
Quote:

Originally Posted by hedayat (Post 1473912)
Thanks! Does the chroot work(run!) on N9 or it should be compiled from sources?

the chroot which i uploaded contains a bug which will make surfaceflinger crash (both on n9 and sailfish, i will update it sometime today)
i fear we wont get it to work on the n9 though, because the renderer requires some egl/gles features which we don't have on the n9

liar 2015-06-18 10:27

Re: Idea for an Android Compatibility Layer
 
current issue, please help, eglCreateContext from libhybris segfaults if share_context != EGL_NO_CONTEXT

it crashes inside the adreno blobs, can we do it without that pbuffer context?


All times are GMT. The time now is 20:52.

vBulletin® Version 3.8.8