OnePlus Nord / Macrodroid / Bluetooth tethering

|hb02|

New member
Hi everyone,

probably I'm too dumb to find the correct solution.

OnePlus recently upgraded my Nord with Android 11. Since this time my Macro which enables Bluetooththethering when I'm connected with my Car Handsfree doesn't work anymore.

Makro (AktiviereThetering):
Triggers --> Bluetoothdevice Connected --> Toyota
Actions --> Bluetooth Tethering --> Enable

SystemLog shows Following:

Invoking Macro: AktiviereThetering
A: Bluetooth Tethering (Aktiviere) AktiviereThetering
{Error} Bluetooth tethering action failed: java.lang.reflect.InvocationTargetException

I also tried to create a new makro but the BluetoothTethering-Action isn'T available anymore.

Can anybody help me please?

Kind regards
 

FrameXX

Well-known member
If you can't see bluetooth tethering action anymore in action list, it propably means that action is not supported anymore on your device with android 11. But if this is a case you should see bluetooth tethering action to be pink with warning (like for example trigger on screenshot below).

Screenshot_20210410-092639~2.png
 

MacroDroidDev

Administrator
Staff member
Yes this is correct I'm afraid. The hack I was using to do this action has been closed of on Android 11 and I'm not aware of any alternative mechanism that can function on Android 11 I'm afraid. If anyone does know how it can be done or another app that can do it then please do share!
 

|hb02|

New member
Yes this is correct I'm afraid. The hack I was using to do this action has been closed of on Android 11 and I'm not aware of any alternative mechanism that can function on Android 11 I'm afraid. If anyone does know how it can be done or another app that can do it then please do share!
Thx 4 info. Sad to hear. I will try give Tasker a try. Will give you feedback
 

Swap_File

New member
Ever since Android 11 came out I've been trying to figure out a way to turn Bluetooth Tethering off and on, without just automating screen input.

I had actually been emailing the MacroDroid creators about it prior to learning about these forums.

Like @MacroDroidDev said, it's an Android 11 permissions thing, all programs on Android 11 will have the same problems unfortunately.

After much testing (and an updated version of systemizer coming out), I found a procedure that worked.
  1. Root your phone, make sure you have magisk installed.
  2. Find an app that used to be able to turn on BT tethering. This is easiest to do on an older android device that isn't picky about privileges. (I used https://play.google.com/store/apps/details?id=pellereau.net.bttetherrestore ) I haven't been able to get this to work with secure settings, because recompiling the APK to give it the required extra permissions makes secure settings upset and it won't run once systemized.
  3. Install the app, then save the APK with something like APK Extractor, and then uninstall the app. https://play.google.com/store/apps/details?id=com.ext.ui
  4. Use something like APK Editor Pro or APK tool to add "TETHER_PRIVILEGED" and "BLUETOOTH_PRIVILEGED" to the permissions requested inside of AndroidManifest.xml Build and sign a new APK.
  5. Don't install the the new APK for conversion into a privileged system app, install the APK directly as a privileged system app using this specific version of systemizer. https://github.com/xeddmc/terminal_systemizer/releases/tag/17.4.1
  6. Try to run your app. If it doesn't work, use a logcat reader to see if it's asking for any more permissions, uninstall the app, and then repeat the process.
Attached are two pre-modified versions of "BT Tethering" with toast notifications removed, and altered so that one turns BT tethering on and the other turns it off. Both are ready for systemizing.

There may actually be a market for an automation helper application that is designed to be systemized to preform privileged actions like these. I know I'd pay a few bucks for that. Could be called "Privileged Settings" or something.
 

Attachments

  • BT_Tether_Off.apk
    16.6 KB · Views: 18
  • BT_Tether_On.apk
    16.6 KB · Views: 23
Last edited:

Swap_File

New member
As of Android 13, the above tools, even when systemized, stopped working.

I did however discover that the VPN hotspot app is somehow able to toggle BT tethering off and on with only root without being systemized, on my OnePlus 8 Pro.

Unfortunately, VPN hotspot has no automation functionality.

I quick hacked together some intents that enable toggling BT Tethering from Macrodroid, if you want to see how it works and build your own copy of VPN hotspot, the code is here:

 
Top