I followed these instructions; https://source.puri.sm/david.hamner/librem-5-anbox-setup but it did not work. All the required files are present in the /var/lib/anbox folder. Anbox gets installed but does not open up. It crashes.
I could not. I tried building from source as per the information at the https://source.puri.sm/Librem5/debs/anbox link but the image building fails. I tried building it on the phone itself so maybe that is a mistake but it does not work out.
Then I realized/discovered that there is a anbox package in the repository. (Try doing a apt-cache search anbox, the description says “Android in a Box”). I installed it and it shows up as an icon on the desktop.
When opened, the screen becomes all white and then the Anbox application crashes. Upon further analysis, the failure is because it cannot reach/start anbox-container-manager service. That was my logical end point for the weekend.
I tried copying the android.img file to the /var/lib/anbox location but it does not help. So, looks like the implementation is not complete. @dos can you provide more pointers for installation?
There are no instructions there, the README comes from upstream project and isn’t relevant. You’re definitely not going to be able to build an image on the phone, it requires 60GB of disk space and 16GB of RAM.
The apt-get fails to find `gcc-multilib g+±multilib and some more libraries. I even tried changing to Ubuntu 20.04 in the Dockerfile. It still fails to find those libraries.
now I can’t get any further.
i also get the error " You're running Anbox on a not yet supported architecture" with -system-info
and anbox does not start either.
do we need to start some services or so?
@dos It would be great if you could help us with what we are doing wrong or what steps are still missing.
@st.boom, I took the ARM image from this location; https://build.anbox.io/android-images/2017/08/04/ and copied it in the /var/lib/anbox location.
Next, I installed the two packages from the artifacts.zip file. The dpkg fails with unmet dependencies error. However, dpkg -l shows those two packages.
Then the Anbox icon is visible on desktop. When I try opening the Anbox application, I see following error; purism@pureos:~$ anbox launch --package=org.anbox.appmgr--component=org.anbox.appmgr.AppViewActivity [ 2022-04-06 00:41:42] [daemon.cpp:61@Run][org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files
Note the anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity command is from the Anbox.desktop file
If you are able to install the two files from artifacts.zip file then you might want to try the android.img file from the above link.
@dos, The 16 GB RAM / 60 GB hard disk only on Ubuntu 18.04 or 20.04 seems to be far fetched requirement. I have manjaro with 16 GB RAM and the compilation fails as mentioned in my earlier message. Can there be a easy way or can you offer any more suggestions?
@buzzLightyear
i get the same error as you, with my own image and the Image what you posted:
anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
[ 2022-04-07 04:11:10] [daemon.cpp:61@Run] [org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files
@dos, @david.hamner, Not sure if the android.img is proper but it does not throw any platform (amd64 or arm) error so I guess it is okay to use the img file from the https://build.anbox.io/android-images/2017/08/04/ location. I guess the anbox DEB package is also proper. Can you provide further instructions, directions on what else is needed to address the issue?
env ANBOX_LOG_LEVEL=debug anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
[ 2022-04-10 08:45:37] [launch.cpp:168@operator()] Session manager is not yet running, trying to start it
[ 2022-04-10 08:45:37] [launch.cpp:117@launch_session_manager] Started session manager, will now try to connect ..
[ 2022-04-10 08:47:23] [launch.cpp:202@operator()] Session manager failed to become ready
systemctl --user enable --now anbox-session-manager
Failed to enable unit: Unit file anbox-session-manager.service does not exist.
with my own image:
env ANBOX_LOG_LEVEL=debug anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
[ 2022-04-10 09:03:01] [launch.cpp:202@operator()] Session manager failed to become ready
Something is probably up.
purism@pureos:~$ adb install FDroid.apk
* daemon not running; starting now at tcp:5037
* daemon started successfully
Performing Streamed Install
Success
purism@pureos:~$ adb shell pm grant org.fdroid.fdroid android.permission.WRITE_EXTERNAL_STORAGE
purism@pureos:~$ adb shell pm grant org.fdroid.fdroid android.permission.READ_EXTERNAL_STORAGE
purism@pureos:~$ adb shell settings put secure install_non_market_apps 1
purism@pureos:~$ anbox launch --action=android.intent.action.MAIN --package=org.fdroid.fdroid --component=org.fdroid
.fdroid.views.main.MainActivity
[ 2022-04-10 09:24:18] [launch.cpp:202@operator()] Session manager failed to become ready
sudo systemctl status start anbox-container-manager
do:
(is apparently only needed when starting from the console.)
export DISPLAY=:0
start anbox with the icon
after that:
adb install FDroid.apk
* daemon not running; starting now at tcp:5037
* daemon started successfully
Performing Streamed Install
Success
purism@pureos:~$ adb shell pm grant org.fdroid.fdroid android.permission.WRITE_EXTERNAL_STORAGE
purism@pureos:~$ adb shell pm grant org.fdroid.fdroid android.permission.READ_EXTERNAL_STORAGE
purism@pureos:~$ adb shell settings put secure install_non_market_apps 1 anbox launch --action=android.intent.action.MAIN --package=org.fdroid.fdroid --component=org.fdroid.fdroid.views.main.MainActivity
the onscreen keyboard does strange things.
When I press backspace, I get an = and stuff like that.
EDIT: only happens when you start from the console.
Otherwise it looks fine.
if you have installed an app go to /home/purism/.local/share/applications/anbox/
copy the desktop file of your app to /home/purism/.local/share/applications/
otherwise the changes will be undone by anbox.
open the desktop file.and change
NoDisplay=true to NoDisplay=false.
and add:
X-Purism-FormFactor=Workstation;Mobile;
Then the app is also displayed in the menu. And is also displayed under Mobile Apps.