Table des matières
Flipper zero management via web-serial
Introduction
Flipper zero can be managed, updated, and browsed by https://my.flipp.dev/ . Actually Firefox does not support the web-serial functionality and Flipper zero can't be updated (for example with the excellent unleashed firmware) through the browser. You can use qFlip on GNU/Linux but the simplest way is the Web installer and Chrome or Edge are not mandatory.
Issue description
After connection to https://my.flipp.dev/ on chromium, a popup ask to connect a serial device to the website. This popup is empty. On Edge or Chrome on Windows, you can directly connect to your preferred dolphin and interact with him. Apparmor is too strictly configured for allow this operation :
oct. 17 23:12:23 inc002-laptop audit[140025]: AVC apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/run/udev/data/b179:0" pid=140025 comm="ThreadPoolForeg" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 oct. 17 23:12:23 inc002-laptop audit[140025]: AVC apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/run/udev/data/b179:1" pid=140025 comm="ThreadPoolForeg" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 oct. 17 23:12:23 inc002-laptop chromium_chromium.desktop[140025]: [140025:140118:1017/231223.721812:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
Resolution
You must authorize snap chromium to read the /run/udev/data/ content. Just editing the /var/lib/snapd/apparmor/profiles/snap.chromium.chromium file and add the following content after the profile “snap.chromium.chromium”
#add read to USBtty (web-serial function) inc002 - 17.10.22 @{PROC}/tty/drivers r, /run/udev/data/** r,
Enable the new config on apparmor
sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.chromium.chromium
Restart Chromium and enjoy !
Unleashed web installer
- Plug your Flipper zero to USB port
- Get the latest unleashed firmware from Chromium at https://github.com/DarkFlippers/unleashed-firmware/releases
- Clic on “Install via Web Updater” after the changelog
- Clic Install
- Wait and profit !