blob: f24854a656c8b953e28a9d356665f9b629b3f8ae [file] [log] [blame]
# Huddly USB rules
# Bootloader mode (PID:0010) occurs as part of firmware upgrade process.
# huddly-upater flashes the bootloader and the app, then reboot the device into
# App mode.
ACTION=="add", SUBSYSTEM=="usb", \
ENV{ID_VENDOR_ID}=="2bd9", ENV{ID_MODEL_ID}=="0010", \
MODE="0664", OWNER="cfm-firmware-updaters", GROUP="cfm-firmware-updaters", \
RUN+="/sbin/minijail0 -u cfm-firmware-updaters -g cfm-firmware-updaters -e -i -l -N -v -r -n -- /usr/sbin/huddly-updater --burn"
# APP mode (PID:0011) occurs in normal operation.
# In this mode huddly-updater will perform upgrade eligibility check.
# If the condition is not met, huddly-updater will simply bail out.
# If the condition is met, huddly-updater will reboot the device in Bootloader
# mode, then bail out.
ACTION=="add", SUBSYSTEM=="usb", \
ENV{ID_VENDOR_ID}=="2bd9", ENV{ID_MODEL_ID}=="0011", \
MODE="0664", OWNER="cfm-firmware-updaters", GROUP="cfm-firmware-updaters", \
RUN+="/sbin/minijail0 -u cfm-firmware-updaters -g cfm-firmware-updaters -e -i -l -N -v -r -n -- /usr/sbin/huddly-updater --prep"