Difference between revisions of "Anbox"

From Maemo Leste Wiki
Jump to navigationJump to search
Line 16: Line 16:
  \_ /usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox --android-image=/usr/share/anbox/android.img
  \_ /usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox --android-image=/usr/share/anbox/android.img


You should be able to start Anbox through the '''Menu->Debian->Anbox'''. Be patient with the splash screen. It can take a looong time.


You should be able to start Anbox through the '''Menu->Debian->Anbox'''. Be patient with the splash screen. It takes a long time.
== Alternative (CLI) ==


 
Same as above, the initscript should start anbox's container manager.
An alternative to starting Anbox is the following:


As '''user''' in a terminal:
As '''user''' in a terminal:
Line 41: Line 41:
You can view "progress" in htop. anbox should be using the CPU. When the usage is low, you should be ready to start activities.
You can view "progress" in htop. anbox should be using the CPU. When the usage is low, you should be ready to start activities.


You can also find some useful logs in /var/lib/anbox/logs
 
== Tips ==


To free up some memory after you're done with usage:
To free up some memory after you're done with usage:


  kill -3 `pgrep -f session-manager`
  kill -3 `pgrep -f session-manager`
You can also find some useful logs in /var/lib/anbox/logs

Revision as of 21:08, 18 January 2021

Installation

From extras

apt install anbox

Or install anbox from HAM.

You might have to enable zram or classic swap (at least 1GB).

Usage

The initscript should automatically start anbox container-manager.

supervise-daemon anbox-container-manager --start /usr/bin/anbox -- container-manager --daemon --privileged --data-path=/var/lib/anbox --android-image=/usr/share/anbox/android.img
\_ /usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox --android-image=/usr/share/anbox/android.img

You should be able to start Anbox through the Menu->Debian->Anbox. Be patient with the splash screen. It can take a looong time.

Alternative (CLI)

Same as above, the initscript should start anbox's container manager.

As user in a terminal:

export ANBOX_LOG_LEVEL=debug
anbox session-manager

This should output:

user@devuan-pinephone:~$ anbox session-manager
[ 2021-01-18 14:20:08] [Renderer.cpp:165@initialize] Using a surfaceless EGL context
[ 2021-01-18 14:20:08] [Renderer.cpp:248@initialize] Successfully initialized EGL
[ 2021-01-18 14:21:03] [session_manager.cpp:264@operator()] Android successfully booted

In another terminal, also as user:

anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

Please note that it takes a long time to start an activity for the first time. So be patient. Subsequent runs should be faster. You can view "progress" in htop. anbox should be using the CPU. When the usage is low, you should be ready to start activities.


Tips

To free up some memory after you're done with usage:

kill -3 `pgrep -f session-manager`

You can also find some useful logs in /var/lib/anbox/logs