Bonding with autoBondFixes set to true deletes all Bluetooth devices from Sony phones



  • The nuke method is essentially the same as calling reset(), only it calls one additional method via reflection (factory_reset). I suppose that method has the potential to wipe out bluetooth pairings (its unclear what it does exactly as it's not an exposed method in the normal API), but it will never be called accidentally. You have to call the nukeBle() method from your own code. Have you reproduced this issue yourself in house?



  • We don't call the nukeBle() function from any where in our code base. Is there anything else that could be triggering this or the factory_reset function?



  • No, nothing else triggers that method.

    Have you been able to reproduce the issue yourself in house?



  • Hi, I was able to get my hands on a Xperia XZ2.

    We've confirmed that a user has this particular issue with that phone. The preliminary results indicate that the device is not saving the bonding information for some reason:
    On every connection, it asks to pair with our BLE device. Does this mean anything to you?

    I'll keep testing and keep you posted.



  • That is expected, and the default behavior. You can experiment with the setting autoBondFixes (set it to false) to see how connection rates are. What is NOT expected behavior is to lose pairings to other devices that you are not connecting to in your app.



  • Thank you, I'll be able to confidently test without the autoBondFixes now.



  • @AlejandroHCruz @ryanbis I have also noticed the same behaviour.
    It will wipe out all devices related to the scan filter you have, so if you have autoBond fixes to true and your scan filter is set to look for SweetBlue manufacturer ID then it will remove pairing with any device with that manufacturer ID



  • @caeduk, that sounds very odd to me. ScanFilters have nothing to do with bonding. Are you connecting to every device you see with your ScanFilter? Are you using SweetBlue's ScanFilters, or the native android one?



  • @ryanbis Is there a way to not have to bond every time the device connects on Sony devices? I have a large suspicion that the bond fixes should not be required at all on Sony devices running Android 10+. Have you tested on modern devices? We have an XZ2 to test with, in case it helps. It would be great if the fixes were not required anymore 🍀



  • @alejandrohcruz Set autoBondFixes to false.