Greetings everyone,
My question is very straightforward, bordering on trivial, as it pertains to the Android container in Sailfish OS X. If I remember correctly, the Android container is implemented as an LXC container. On Linux systems, it is possible to passthrough a USB device by using the mount --bind
command, but a better way to achieve this is with an OverlayFS command such as:
mount -t overlay overlay -o lowerdir=/var/lib/lxc/container/rootfs,upperdir=/host/overlay,workdir=/host/work /var/lib/lxc/container/rootfs
As such, my question is: Can a similar mount be performed in SFOS? To be honest, I have been trying, but have not found the required paths.
Moreover, if we want to fully passthrough a USB device to the LXC container, one possible workaround is the following:
-
Identify the USB Device: Find the right device node, for example, /dev/bus/usb/001/002.
-
Modify the Container Configuration: Change the container’s configuration file so that device passthrough is enabled. For example, include the following line:
lxc.cgroup.devices.allow = c 189:* rwm
lxc.mount.entry = /dev/bus/usb/001/002 dev/bus/usb/001/002 none bind,optional,create=file
This means that the container is granted access to the device and the mount is performed inside the container.
- Restart or Update the Container: If possible, try to use these changes at runtime, or restart the container.
This approach ensures the container has direct access to the USB device, which could be a key step in enabling Android Auto functionality in my car.
Thanks in advance for your help!