I've started developing an app for the Pinephone, my app would be deployed with a flatpak.
My application needs access to system directories to read the device camera.
Doing some testing I've discovered that a native Pinephone application called megapixels doesn't launch if I package it into a flatpak. The error is related to not being able to read a system directory `/sys/firmware/devicetree/base`
In order to diagnose the problem I've run a python terminal inside the container and I've verified that neither `/sys/firmware` nor `/dev/video*` are visible from within the container:
they are there, just not visible from the container:
Even though I've built the flatpak with `"finish-args": ["--filesystem=host", "--filesystem=host-os"]`.
What am I missing?
Any help will be much appreciated.
My application needs access to system directories to read the device camera.
Doing some testing I've discovered that a native Pinephone application called megapixels doesn't launch if I package it into a flatpak. The error is related to not being able to read a system directory `/sys/firmware/devicetree/base`
In order to diagnose the problem I've run a python terminal inside the container and I've verified that neither `/sys/firmware` nor `/dev/video*` are visible from within the container:
Code:
mobian@mobian:~$ /usr/bin/flatpak run --branch=master --arch=aarch64 --command=python3 com.lagrange.myapp
Python 3.11.4 (main, Jul 13 2023, 12:52:58) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.listdir('/sys')
['devices', 'dev', 'class', 'bus', 'block']
>>> os.listdir('/dev')
['console', 'ptmx', 'pts', 'shm', 'core', 'fd', 'stderr', 'stdout', 'stdin', 'tty', 'urandom', 'random', 'full', 'zero', 'null']
>>> exit()
they are there, just not visible from the container:
Code:
mobian@mobian:~$ ls /dev/video*
/dev/video0 /dev/video1 /dev/video2 /dev/video3
mobian@mobian:~$ ls /sys
block bus class dev devices firmware fs kernel module power
Even though I've built the flatpak with `"finish-args": ["--filesystem=host", "--filesystem=host-os"]`.
What am I missing?
Any help will be much appreciated.