Skip to main content
Topic: Anbox without systemd (Read 5076 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Anbox without systemd

    Note: This will work on OpenRC, Runit, Dinit and Suite66
    Requirements:
    • binder_linux or binderfs
    • ashmem_linux

    Kernelbinderfsashmem_linuxbinder_linux
    linux-zen
    linux
    linux-lts
    • Install anbox-modules-dkms-git, it should work fine for linux, linux-lts
      • Steps for linux-zen and tkg kernel users:
          • Remove auto loading of binder_linux because kernel has builtin binderfs, using following command
            Code: [Select]
            sudo sed -i '1d' /usr/lib/modules-load.d/anbox-modules.conf
          • Create file /etc/tmpfiles.d/anbox.conf with following content
            Code: [Select]
            d! /dev/binderfs 0755 root root
          • Add following line to /etc/fstab [*Dinit users skip this step]
            Code: [Select]
            none                         /dev/binderfs binder   nofail  0      0

    Installation:
            Runit: anbox-runit
            Openrc: anbox-openrc   
            Dinit: anbox-dinit         
            *[Incomplete][Need Testing]] Suite66: anbox-suite66 (Give Feedback)
       
       
    • For Openrc start anbox-container-manager (During my testing, I did not need to start anbox-session-manager , if someone confirmed, i will update PKGBUILD)
          For Runit start anbox-container-manager
    • Run anbox from application menu.

    Credits:
    A huge thanks to Antoine Fontaine Maintainer of anbox at Alpine package repository (https://pkgs.alpinelinux.org/package/edge/community/x86_64/anbox-openrc)
    Arch wiki anbox page got updated information for more infomation go to https://wiki.archlinux.org/title/Anbox

    Screenshot:

    [/list][/list][/list]
    Create problems which don't have solution

    Re: Anbox on Artix Linux

    Reply #1
    Wow, thanks!

    The anbox-container initscript also needs openrc-fuse, this should be added to the depends array.

    And in case someone makes an Arch package out of it: If the abovementioned PKGBUILD is used, the package is called anbox-git (provides a full anbox), and it should be added anbox-openrc to the provides array.

    Thanks again for that thing!

    Re: Anbox on Artix Linux

    Reply #2
    And in case someone makes an Arch package out of it: If the abovementioned PKGBUILD is used, the package is called anbox-git (provides a full anbox), and it should be added anbox-openrc to the provides array.
    Can you elaborate more this line?
    Edit: I guess you saying that create separate package for services file
    Create problems which don't have solution

    Re: Anbox on Artix Linux

    Reply #3
    And in case someone makes an Arch package out of it: If the abovementioned PKGBUILD is used, the package is called anbox-git (provides a full anbox), and it should be added anbox-openrc to the provides array.
    Can you elaborate more this line?
    Edit: I guess you saying that create separate package for services file

    No, I mean:

    • Although the directory from the online source in the initial post might suggest that the package is named anbox-openrc, it in fact is named anbox-git,
    • anbox-openrc would mean, if naming scheme would be consistent with the other *-openrc packages, that it would provide exactly and only the openrc initscripts,
    • since the linked PKGBUILD does build a full anbox latest git checkout and also provides openrc initscripts, it should be named something like anbox-git and has anboox-openrc in it's provides array.

    I am currently making an AUR package, and I will call it anbox-nosystemd-for-openrc-git with corresponding provides entries. If it works I will try to split it up into a anbox-nosystemd-git and a anbox-openrc.

    Does this answer your question(s), provide clarification for you?

    Re: Anbox on Artix Linux

    Reply #4
    I m so confused with package naming for anbox

     I guess splitting package will work fine.


    Create problems which don't have solution

    Re: Anbox on Artix Linux

    Reply #5
    Code: [Select]
     sudo rc-service anbox-container start -v

    fuse              |fuse              | * Executing: /usr/lib/openrc/sh/openrc-run.sh /usr/lib/openrc/sh/openrc-run.sh /etc/in
    it.d/fuse start
    fuse              | * Starting fuse ...                                                                                [ ok ]
    anbox-container   |anbox-container   | * Executing: /usr/lib/openrc/sh/openrc-run.sh /usr/lib/openrc/sh/openrc-run.sh /etc/in
    it.d/anbox-container start
    anbox-container   | * Creating anbox0 network interface ...                                                            [ ok ]
    anbox-container   | * Starting Anbox container manager ...
    anbox-container   | * supervise-daemon: fopen `/var/run/anbox-container.pid': No such file or directory
    anbox-container   | * Detaching to start `/usr/bin/anbox'

    Code: [Select]
     sudo rc-service anbox-session start -v
    anbox-session     |anbox-session     | * Executing: /usr/lib/openrc/sh/openrc-run.sh /usr/lib/openrc/sh/openrc-run.sh /etc/init.d/anbox-session start
    anbox-session     | * Starting anbox-session ...
    anbox-session     | * start-stop-daemon: fopen `/var/run/anbox-session.pid': No such file or directory
    anbox-session     | * Detaching to start `/usr/bin/anbox' ...

    Do  you know why anbox-session.pid and  anbox-container.pid not found?
    I checked paths , these file exist

    Create problems which don't have solution

    Re: Anbox without systemd | Artix Linux (This post is not complete)

    Reply #6
    Update:
    Anbox is working on Artix Linux (runit)
    Create problems which don't have solution

    Re: Anbox without systemd

    Reply #7
    Update:
    Anbox-openrc link added again
    Create problems which don't have solution

    Re: Anbox without systemd

    Reply #8
    Update:
    Version matched with AUR pkg
    Create problems which don't have solution


    Re: Anbox without systemd

    Reply #10
    I have made the unofficial anbox service for 66. It is currently at:
    https://git.sr.ht/~strahinja/anbox-suite66

    Disclaimer: In my experience, Anbox itself is rather unstable. It could be due to the Android image I tested with, anbox-image-gapps or the fact that I don't use elogind but seatd. Anbox Application Manager starts, but applications just crash randomly.

    In any case, this service is pretty straightforward, as with other inits, so if Anbox is working for you, it will add support for starting container-manager as a 66 service.