krnlyng / sfdroid_renderer

A renderer application which can, in combination with the sharebuffer module, display the contents drawn by SurfaceFlinger in an SDL window.
10 stars 8 forks source link

Complie or port guide #1

Open SunRain opened 8 years ago

SunRain commented 8 years ago

Hi, is there any compile/port guide about this? Is it possible to port to ubuntu phone? lol

krnlyng commented 8 years ago

while it is theoretically possible it will not be easy.

On custom sailfishos roms we have a cyanogenmod or aosp base of which sailfihos uses some parts like drivers and some services for playing media/accessing camera... afaik on ubuntu phone it is similar but, to port this you would need an android base which ubuntu can work with (eg. use the drivers properly and such) for which you have the sources (not the binary blobs but everything else in buildable form). Then you would need to modify those sources to connect to the sfdroid_renderer and see if it works.

we have a piratepad with rough instructions for sailfishos. you can also query me on freenode irc.

SunRain commented 8 years ago

Thanks for you reply, could you provide an 'android_manifest.xml' file for devs who want to build sfdroidrenderer from source? I havesome experiences about android porting, so I want to try to port it to my ubuntu phone ^^

krnlyng commented 8 years ago

sfdroid_renderer is a native application, you have to build it like you build other ubuntu apps except you have to provide the android headers for your gralloc version and so on

SunRain commented 8 years ago

Hi, I had downloaded the sfdroid_renderer package(.zip) for mako(nexus4) by your thread from talk.maemo.org and unzip it, I find some andorid part(android framework service / hw, etc...) from package. If I want to build a fully-work sfdroid_renderer, I need to patch and compile my own android framework and hw related code too, is it right?

krnlyng commented 8 years ago

sfdroid_renderer is only the native part thats why i was confused sorry. to build the other components you have to have an android manifest thats compatible with your device. for sailfishos we simply use the manifest of the underlying cyanogenmod installation. on ubuntu you basically need to do the following (roughly speaking and without much knowledge of ubuntu) build your own android that works with the ubuntu android drivers for your device, then you have to apply some patches to frameworks_native and hardware_libhardware and frameworks_base, the most important ones are sharebuffer support and alarm manager and all the patches that disable gps and so on...) then you need to build that and then since i don't know ubuntu i really don't know. you would probably set up a chroot where you launch zygote and all the android services which are necessary/not already running. if you have done that you can run the renderer and see if it works. though since it's a chroot you will need to modify the renderer a little (some paths).