Access to system directories from flatpak
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:

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:

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.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pinephone OS Backups (System Images) ThrillGates 6 8,061 08-20-2023, 09:22 AM
Last Post: DominiqueM
  Article: (Clickable) Call Graph for Apache NuttX Real-Time Operating System lupyuen 0 1,206 03-04-2023, 10:39 PM
Last Post: lupyuen
  Video: Apache NuttX Real-Time Operating System for PinePhone lupyuen 0 1,374 02-07-2023, 07:35 PM
Last Post: lupyuen
  Pine phone Battery life vs operating system bcnaz 19 22,453 08-27-2021, 09:35 PM
Last Post: bcnaz
  SD card mounted to access music files unable to play dcinoz 3 3,906 02-24-2021, 11:48 PM
Last Post: dcinoz

Forum Jump:

Users browsing this thread: 1 Guest(s)