My device uses a Qualcomm chip, Android 7 (SDK 25). I am coding an app that uses a USB camera (webcam) to record and capture. To hold permanent permission for my app. My problem is, the first time plugging the USB cam into my device, a dialog appears and I have to tick "Use by default for this USB device".
My device has no screen, to do that I need to use ADB debug, connect WiFi, and use Vysor to access the device.
I tried setting my app as a system app but it did not solve my problem.
I wonder how to make my app auto-accepts the dialog.
/data/data
. You may need to increase the maximum files if inotifywait shows an error. Then you will see all file operations (open, read, write) on files within /data/data. When you change the setting there should be a file operation at the same time so this way you can identify the file.