-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look at supporting anbox in some form #9
Comments
Packaging for Debian is being worked on by Debian Project Leader Chris Lamb: |
Great, I wasn't looking forward to snaps... |
Seems like it is in sid now. I wonder if we could use it on ascii (stretch). |
It's in ascii-backports and beowulf: I tried to install it on my Devuan ascii desktop but it conflicted with packages I already have installed. Hopefully a fresh Leste install won't have this problem. |
There are a few things we'll need to do to before this will run under Maemo. Anbox has a couple of daemons which have systemd service files but the Debian package is missing rc scripts (*sigh*), so we'll need port these to OpenRC. The kernel config will need to be updated to enable these modules:
Since Anbox uses LXC, so we'll need to ensure namespaces, etc. are enabled in the kernel too. |
Did you get some of it to work? I could help with porting the init scripts if that helps. |
Maybe this is useful: we had an init script here, and done some more WIP work in the branch linked below. https://github.com/postmarketOS/pmbootstrap/tree/feature/anbox "After some patching we have it compiling and displaying the "Starting..." screen, but the way it configures LXC does not work out of the box for us." |
@MerlijnWajer, I've not really tried very hard to get it working yet. I didn't get as far a rebuilding the kernel yet. To be honest, I'd rather look at other stuff first before getting heavily involved in this. @ollieparanoid, thanks! I've run into issues in the past when starting a container under Devuan as the way LXC was set up on Debian expected systemd, although I think I managed to work around them. I'm not sure what the current state of affairs is for LXC under Devuan. |
It's actually very easy to get Anbox from ascii-backports running under Devuan with a backported kernel (which has already been built with all of the required modules). I don't envisage any real difficulties in getting this running under Leste once we've enabled the all of the goodies in the kernel config. It does however seem to be a bit picky about needing video acceleration. I couldn't get it to work in a Devuan VirtualBox VM, even with VirtualBox's "3D acceleration" option enabled. Anbox does have an option for software rendering but it doesn't seem to work either. |
Do you have some instructions on how to do this on devuan? |
I should be able to cobble something together. I might have a go at building a new kernel with LXC and those two modules for the N900 first. ;) |
Will be interesting to see if the hw accel on the n900 suffices then. |
It looks like it doesn't suffice. :/ I built a new kernel for the N900 with the two Android drivers and full LXC support. I also needed to enable some SquashFS decompression options that were needed to mount the Android image. The Container Manager starts. When starting the Anbox Session Manager, there are a bunch messages related to the keyboard layout being unknown to SDL, followed by this error:
Then it prints a I'll write up instructions for Devuan later. |
Here's the kernel config I used for the N900: |
How to run Anbox under Devuan ascii amd64 (with notes for N900 differences) Commands to be run as a regular user and root are denoted below by the shell prompt, $ and #.
(If you're trying this on the N900, the latest armhf image is available here: https://build.anbox.io/android-images/2017/06/12/)
(This step is not required when using my N900 kernel config from the comment above. They will be built into the kernel.
You can also start a shell inside the Android container with this wrapper script |
To be clear, does this work on the N900 now, or not? |
Unfortunately not. |
I think in general it would make sense to add a Wiki page about Anbox, collecting all the infos from this issue. Maybe I get this done this week, if not then on the Week-end :P |
For what it's worth, this is the message you get if you try to start the Session Manager with software rendering:
|
So you could look at setting |
Thanks for finding this. It looks promising but I see a couple of issues:
Although these issues are overcomable, it seems like a lot of effort just to get software rendering working. |
In virtual machines, you're likely to have just software rendering. We might switch over to beowulf/buster in a month or so, so then it might become easier. |
A bit more information...
The error code from https://github.com/anbox/anbox/blob/master/android/opengl/system/egl/egl.cpp#L919 Unless anyone has any idea as to why it thinks OpenGL ES 1 or 2 isn't avaiable, I'm going to have a go at building it for debug and attach a debugger to find out what going on. |
on what device is that error generated? or this is VM? If in VM, I guess you need GLES2 libs installed. |
This is on the N900. |
Have you dist-upgraded? |
I haven't tried it for a while. |
Purely off the top of my head, are you using the GLES libs provided by the driver? From what I recall of building SDL2 for Fremantle, I had to patch the source to get it to find the libs. Unfortunately I can't find the post on TMO. It may even have been for love2d. Another bit was the GL header files provided defined a function parameter as size_t instead of unsigned int. QT IIRC had a patch to work around that. I'll have to go on laptop to see if I can find the full details. |
OK, I've taken a quick look at my SDL2 package.
Outside of SDL: |
https://github.com/anbox/anbox
The text was updated successfully, but these errors were encountered: