Our Snap is built using –devmode and runs as root. It is not intended for the Snap Store.
It manages custom USB devices. We have the ability on our device to disable power to any USB port. However, it appears Linux does not de-enumerate when power is disable and one must trigger a udev rule to fully remove the device from Ubuntu Core.
The command to do this is: udevadm trigger --action=remove /sys/bus/usb/devices/2-1.4.6/
However, when executing this command inside the Snap I get ‘Running in chroot, ignoring request’ whether I use sudo or not.
Per googling, supposedly if you add a hardware-observe and/or snapd-control plug it should provide privileges so this can work – but none of this works? I still get the chroot errror. I already have raw-usb plug
How can I provide my Snap privs it needs to run udevadm trigger then?