Anbox on pinetab
#1
Spent a good chunk of today attempting to get anbox running under mobian (Linux thalia 5.7-pinetab #1 SMP PREEMPT Fri Sep 11 11:37:38 UTC 2020 aarch64 GNU/Linux) because why not. A log of my progress:

  • Nobody's built a snap for arm64 so I can't do that.
  • Attempted to build anbox from source and actually managed it, but couldn't use it because all the plumbing (e.g. systemd and dbus stuff) is contained in the snapcraft yaml which is used to build systemd units when the snap is built so make install produces roughly one-third of a functioning installation.
  • Attempted to build a snap myself but it failed because snapcraft builds in a container using multipass but multipass uses qemu's default --machine handling which is unpopulated on arm64 so it complains and bails out. Can't use the --destructive-build option, which skips the containerization, because it just blows up due to a library version mismatch. Also, snaps don't support cross-compilation. Like, at all.
  • Finally decided to just ignore apt's attempts to tell me that anbox wasn't available for my system and started using curl and dpkg to install random debs from other releases. Eventually found this one that appears to have installed mostly right: http://http.us.debian.org/debian/pool/co..._arm64.deb.
  • anbox-container-manager.service wouldn't start because it was attempting to modprobe ashmem_linux and binder_linux, which don't exist any more because they're now (respectively) in-tree and obsolete. /proc/config.gz has both CONFIG_ASHMEM=y and CONFIG_ANDROID_BINDER_IPC=y, so I just edited /lib/systemd/system/anbox-container-manager.service to remove the modprobes. That got anbox-container-manager.service enabled and started. However, this doesn't yet prove anything because the container manager doesn't start the container until a request is received from the session manager, so we haven't actually tried talking to lxc yet.
  •  anbox session-manager also complained about not having ashmem or binder. It turned out that it was looking for binder by just attempting to blindly open /dev/binder, which has been superseded on recent kernels by binderfs. I "fixed" this by manually creating a binderfs and then symlinking the device in where anbox was looking: mkdir -p /dev/binderfs ; mount -t binder binder /dev/binderfs ; ln -s /dev/binderfs/binder /dev/binder. This got the session-manager to at least do something, though it immediately failed out because the container manager can't start a container.
Current status:
Code:
mobian@thalia:~$ anbox session-manager
[ 2020-09-19 12:21:17] [client.cpp:49@start] Failed to start container: Failed to start container: Failed to start container
[ 2020-09-19 12:21:17] [session_manager.cpp:152@operator()] Lost connection to container manager, terminating.
[ 2020-09-19 12:21:17] [daemon.cpp:61@Run] Container is not running

Logs for anbox-session-manager.service are clean, so I have to hunt down the logs for the attempt to actually start the container. Either way, I called it a night there. Probably going to turn out to be an obvious-but-unfixable showstopper in lxc-on-arm64 or something equally obnoxious. Or, like, dbus blowing up for no reason. Maybe I'll keep tearing out attempts to modprobe unnecessary kernel modules until it all works. Or I'll just try arch! Who knows? The me of tomorrow, probably.
#2
You might find useful information here https://forum.pine64.org/showthread.php?tid=9815
And btw, I just did a `sudo apt install anbox` on my device with no problem at all, did you apt update beforehand?
#3
(09-19-2020, 08:20 AM)a-wai Wrote: You might find useful information here https://forum.pine64.org/showthread.php?tid=9815
And btw, I just did a `sudo apt install anbox` on my device with no problem at all, did you apt update beforehand?
Decided to try again with a clean install of mobian just to be sure. I did make sure I was updated. Got "Unable to locate package anbox".

Code:
mobian@mobian:~$ ls /etc/apt/sources.list**
/etc/apt/sources.list

/etc/apt/sources.list.d:
extrepo_mobian.sources
mobian@mobian:~$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main
mobian@mobian:~$ cat /etc/apt/sources.list.d/*
Components: main non-free
Suites: mobian
Uris: http://repo.mobian-project.org/
Architectures: amd64 arm64 armhf
Types: deb deb-src
Signed-By: /var/lib/extrepo/keys/mobian.asc

Result of following the anbox installation instructions:
Code:
mobian@mobian:~$ sudo add-apt-repository ppa:morphis/anbox-support

More info: https://launchpad.net/~morphis/+archive/ubuntu/anbox-support
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmprjoad3cu/pubring.gpg' created
gpg: /tmp/tmprjoad3cu/trustdb.gpg: trustdb created
gpg: key 21C6044A875B67B7: public key "Launchpad PPA for morphis" imported
gpg: Total number processed: 1
gpg:              imported: 1
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.
mobian@mobian:~$ sudo apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Ign:2 http://ppa.launchpad.net/morphis/anbox-support/ubuntu groovy InRelease
Err:3 http://ppa.launchpad.net/morphis/anbox-support/ubuntu groovy Release
  404  Not Found [IP: 2001:67c:1560:8008::15 80]
Hit:4 http://repo.mobian-project.org mobian InRelease
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/morphis/anbox-support/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Code:
mobian@mobian:~$ uname -a
Linux mobian 5.7-pinetab #1 SMP PREEMPT Fri Sep 11 11:37:38 UTC 2020 aarch64 GNU/Linux
This is with mobian-pinetab-20200916.img linked from the Pine64 wiki.
#4
oh right, you have to enable Debian's contrib repo (just append "contrib" at the end of the line in /etc/apt/sources.list)


Possibly Related Threads…
Thread Author Replies Views Last Post
  PineTab 2 login screen rotation fix chzbacon 11 7,177 03-17-2024, 04:53 PM
Last Post: mtomaschett
  NixOS on PineTab 2 asonix 3 3,710 02-24-2024, 12:29 PM
Last Post: Evergreen
  Working OS on pinetab RISC-V? user641 3 2,161 12-13-2023, 08:11 AM
Last Post: tophneal
  Pinetab 2 as Pinebook Pro replacement Corkonian 4 3,503 08-15-2023, 11:22 AM
Last Post: CadenAnderson
  Software for PineTab-V msm 12 7,127 08-05-2023, 05:08 PM
Last Post: bingch
  Arch Linux ARM on PineTab 1 Danct12 25 34,393 06-10-2023, 05:33 PM
Last Post: fxc
  PineTab 2 Login Failure cptijerina 0 964 06-07-2023, 07:16 PM
Last Post: cptijerina
  PineTab Mobian bcnaz 150 172,513 04-26-2022, 11:58 AM
Last Post: thomzane
  Xmonad on PineTab Telefza 0 2,051 06-24-2021, 04:04 AM
Last Post: Telefza
  PineTab Mobian Upgrade issue - Pin no longer works thomzane 3 4,793 04-30-2021, 06:52 AM
Last Post: thomzane

Forum Jump:


Users browsing this thread: 1 Guest(s)