I'm looking into automating certain Bluetooth activities via adb.
I have been able to successfully enable and disable Bluetooth using information found here: android enable disable bluetooth via command line but need more capabilities and control than just enable/disable.
While looking for solutions I came across this post: Need ADB command line to start a youtube video using browser where chrome is controlled via intents/activities.
I've attempted a similar solution with Bluetooth by unpacking (using apktool) the Settings apk and the bluetooth apk, looking at their AndroidManifest.xml files for a list of their intents and activities - then using those intents and activities via adb,
e.g. (running shell as superuser)
am start -n "com.android.settings.bluetooth.RequestPermissionActivity/android.bluetooth.adapter.action.REQUEST_DISCOVERABLE"
Thus far, commands of this nature have either:
1) Failed outright, "unable to resolve intent" or similar issues
2) Led to a ">" prompt wherein I'm expected to give more input (though I'm not sure what I would enter there)
Ultimately, I'm seeking to control BT connections using adb (so as to be able to automate those tasks via scripts in the future). I am using a Google Pixel 2 (rooted).
If I am on the right track, any guidance or advice would be appreciated. If I'm going about this completely wrong, feel free to let me know (and hopefully let me know where I should be looking instead).