I think your approach is generally correct. You probably can't connect to the Bluetooth because your additional code throws an exception somewhere. The best idea would be to check it during dynamic analysis. You can do it using for example Android Studio and smalidea plugin.
As far as I see you don't store the result of your ByteArrayToString function call. ...
In this instance, packageInfo.signatures is the first signature that you find in the APK. Meaning, this is the first signature file that the Android system has read from the META-INF/ folder inside the APK.
Basically, what you'll need to do is unzip the APK, look inside the META-INF/ and grab whatever file has the extension .RSA (unlikely, but it could be ....
I don't think it is related to BIND_GET_INSTALL_REFERRER_SERVICE. That is related to Firebase Analytics, i.e., referrer for analytics purposes.
However, it may be related to Google Play app licensing? See https://developer.android.com/google/play/licensing/overview for more details.
The androidmanifest.xml file can be modified and the apk can be repackaged (I've done it before on various apks), but don't forget to use zipalign and re-sign the apk. If you miss using zipalign and re-sign the apk, that may be a reason why you are getting crashes with errors.