My company has their own Android tablets created by an OEM partner and we are using custom ROM based on Android 11. The stakeholders have a strange requirement now. They want to allow only our applications (identified by bundle id) to have access to printers and bar code scanners connected to the peripheral ports. Users are allowed to install any application of their choice from the Playstore and they will function normally but when it comes to printing or scanning via peripheral ports, it shouldn't work.
We have full control over the AOSP build and can do whatever we want to ensure above requirements are met. I have no clue where to start and appreciate some help.