New Post: Anbox on the Librem 5

yeah but with TOR Browser if you change anything in their COC you can get ZUCC-ed either way … TOR Browser is a good idea if you use a window-manager that is minimal and non-tiling so it’s harder to resize the window by mistake :sweat_smile:

or just TAILS and hope you do NOT massage anything you shouldn’t …

Or just use Whonix and do whatever you want with a very low chance or revealing your IP.

@david.hamner, can you share the command list / Steps to install Anbox on PureOS?

1 Like

Anbox camera passthrough?

You should wait for the camera to work even on PureOS itself. :smile: I guess easier installing of Anbox is one of the next little goals for Purism. The Anbox related things are not developed by them.

12 Likes

Thanks @dos. This will be one of the first things I do when I get mine.

There is already an Android driver for the rear camera, can it be use in anbox with an hardware pass-through?

1 Like

Drivers are not universal (in most cases) and are hardware specific. I doubt very much that Anbox comes bundled with camera drivers that work for all hardware.

Put simply, Anbox is not the droids you’re looking for.

But Anbox on the Librem 5 is awesome.

That’s not what I’m saying.
There are versions of the android kernel that integrate driver for the rear camera sensor of the Librem 5:

Anbox, like other virtual machine, doesn’t come with android, you have to had and image.

Ahh, so you are asking if Purism have a working Android camera driver?

Neither do I!
This driver already exists (see previous message). They talk about it in the dedicated git:

I’m wondering if this driver is usable with Anbox via a custom android kernel or if the camera driver needs to be integrated into the Librem 5’s linux kernel before.

1 Like

The Librem5 uses the same camera as the Samsung A20e.

3 Likes

This I did not know.

Suddenly this line of questioning makes a ton of sense.

4 Likes

Android camera drivers use a different camera management system, so the Android driver cannot be used as a base for the mainline Linux driver.

If the question is about passthrough of just the camera device to some emulator and then using a driver in the emulator, then… yeah, no. The camera is not connected over PCI or USB, so any kind of passthrough would require a special driver. I haven’t heard of MIPI-CSI passthrough, so you can be fairly sure that the camera is going to be supported natively before any such solution appears.

12 Likes

Thank you good sir, for shedding some light on this subject. I get that for some the camera is very important, but for me it is the absolute bottom of the pile. Just knowing that the hardware is there and will be implemented one day is more than enough.

3 Likes

I will gladly test it when I have my L5 and camera is implemented

I will also test integration via anyone’s suggestions. It’s the only thing keeping me carrying an Android phone.

Once I can do stable passthrough though qemu, I will be sure to share how I did it, and I will gladly ditch my Android devices :smiley:

AS FAR AS I CAN TELL ON BYZANTIUM… THIS DOESN’T WORK…

The instructions here are for amber-phone

The modules in byzantium are essentially not found. Run sudo modprobe ashem_linux and you’ll get a “cant find the modules” error in the kernel directory.

They are present in the kernel but not probable…

❯ sudo ls -1 /dev/{ashmem,binder}
/dev/ashmem
/dev/binder

So build the dang kernel modules and install them with dkms" you say… that returns an error because the headers are missing… so we sudo apt-install linux headers right and build again… ah progress… wrong… apparently the dkms scripts make a kernel call that has been deprecated and is no longer included in the kernel shipped with byzantium… hell. Pure hell. I would love to know how to redefine it in this script and fix it myself but I am reaching a dead end with this effort.

sudo dkms install anbox-ashmem/1

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.13.0-1-librem5 all KERNEL_SRC=/lib/modules/5.13.0-1-librem5/build..........(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.13.0-1-librem5 (aarch64)
Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.

Logs

ERROR: modpost: "kallsyms_lookup_name" [/var/lib/dkms/anbox- 
ashmem/1/build/ashmem_linux.ko] undefined!

Additionally the binaries in the CI pipeline appear to also be for amber singularly. In order to install it on byzantine you have to pull the boost libraries from the amber deb repos.

Finally there hasn’t been a new binary for the librem5 on that repo for 11 months. Unless this post is using an unreleased binary or they built it just for the video and are running a kernel that is also unavailable… I don’t see how this would work on Byzantium at all at this point. They’d have to be using amber and doing something I haven’t thought of at this point… After being on byzantine for a couple weeks, I can’t understand how they’d be building for amber at this point either because byzantine is much more stable and further along.

If i’m missing something please reply, otherwise I’m pretty sure this entire blog post about Anbox on librem 5 is invalid. I haven’t been able to reproduce a working version on byzantine or amber.

For those who are curious here is some more information.

> ❯ sudo systemctl status anbox-container-manager.service
> ● anbox-container-manager.service - Anbox Container Manager
>      Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: ena>
>      Active: failed (Result: exit-code) since Tue 2021-10-05 10:10:53 CDT; 21min ago
>        Docs: man:anbox(1)
>     Process: 629 ExecStartPre=/sbin/modprobe ashmem_linux (code=exited, status=1/FAILURE)
>     Process: 635 ExecStopPost=/usr/share/anbox/anbox-bridge.sh stop (code=exited, status=1/FAILURE)
>         CPU: 21ms
> 
> Oct 05 10:10:53 librem-5-usa systemd[1]: Starting Anbox Container Manager...
> Oct 05 10:10:53 librem-5-usa modprobe[629]: modprobe: FATAL: Module ashmem_linux not found in directo>
> Oct 05 10:10:53 librem-5-usa systemd[1]: anbox-container-manager.service: Control process exited, cod>
> Oct 05 10:10:53 librem-5-usa anbox-bridge.sh[635]: anbox-bridge isn't running
> Oct 05 10:10:53 librem-5-usa systemd[1]: anbox-container-manager.service: Control process exited, cod>
> Oct 05 10:10:53 librem-5-usa systemd[1]: anbox-container-manager.service: Failed with result 'exit-co>
> Oct 05 10:10:53 librem-5-usa systemd[1]: Failed to start Anbox Container Manager.

❯ anbox system-info
version: 0.0~git20210625-1-Debian
cpu:
  arch:  
  brand: 
  features: 
os:
  name: PureOS
  version: 
  snap-based: false
kernel:
  version: Linux version 5.13.0-1-librem5 (builder@cumin-landing-arm64-1wvv) (aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP PREEMPT Tue Sep 28 14:24:49 PDT 2021
  binder: true
  binderfs: false
  ashmem: true
graphics:
  egl:
    vendor: n/a
    version: n/a
    extensions:
      - n/a
  gles2:
    vendor: n/a
    vendor: n/a
    extensions: []

What android.img and I using? this one

I am chasing down one last lead which says the librem devs helped get it working on pinephone 64 back in April but afterwards I’m probably going to quit this and focus on getting the apps I need natively in linux arm64 and keep carrying around the iphone like a swiss army knife…