Pre-Android 12 I could create proprietary Bluetooth health device driver service APKs and exchange info with them from a main application via AIDL. The driver APKs have no UI and launch nothing when installed. Though these APKs used Bluetooth and BLE all runtime permissions could be given from the primary application. These APKs could be installed and uninstalled without changing any code in the primary application (no action from the user, either).
With Android 12, that is no longer true. These service APKs are useless without the primary application yet Android 12 is requiring runtime permissions from these UI-less and launch-less services.
Does anyone know how to work around this issue or why Android even did this? Defeats the entire purpose of creating plugin drivers! Is there a way to give the permissions from the primary application to the installed driver? The driver does not crash due to no runtime bluetooth permissions until the application tries to use it.
Source: Android Questions