BimmerGestalt / AAIdrive

Implementations of some Android Auto features as unofficial IDrive apps
MIT License
525 stars 89 forks source link

how to debug bluetooth problem for mybmw connect to car's app function #796

Open galenzhao opened 6 days ago

galenzhao commented 6 days ago

Hi,

Today, I upgraded my phone to Android 14 QPR3, build from LineageOS 21.

After the upgrade, the MyBMW app can no longer connect to the car's app function. The app checkbox is not shown checked in the car. (All permissions are set correctly for the MyBMW app, and it worked well before the upgrade.)

It always stuck on open app if necessary when I repair phone on car.

Before the upgrade, everything worked well. So, it may be a problem with the Bluetooth in the new Android system.

How can I debug the problem? Is there any checkpoint for MyBMW to make the app function connect to the car? Thanks.

Andrea535LT commented 6 days ago

Following. Same issue with my S24 Ultra

hufman commented 6 days ago

Unfortunately, the MyBMW>Car connection is relatively opaque, and I'm not sure what the car looks for before showing the Apps checkbox. The only suggestion I've heard work for other people is to enable all the permissions and background execution options (especially for Samsung), which it sounds like you've done. I've heard other people work well on Android 14 after setting these settings, and my own Sony phone hasn't had any issue with Android 14.

If you'd like to debug further, I have notes on how to patch the Connected/MyBMW apps to enable debug logging, which can be combined with decompilation to try to trace through what it's doing. I haven't experienced the issue of the Apps checkbox not showing, so I can't help in this regard.

galenzhao commented 6 days ago

Unfortunately, the MyBMW>Car connection is relatively opaque, and I'm not sure what the car looks for before showing the Apps checkbox. The only suggestion I've heard works for other people is to enable all the permissions and background execution options (especially for Samsung), which it sounds like you've done. I've heard other people work well on Android 14 after setting these settings, and my own Sony phone hasn't had any issues with Android 14.

I know the permission setting problem on Android 14, when I first upgraded to Android 14 beta I found it needed to give nearby device permission to the mybmw app which may be needed by connecting a Bluetooth device from the mybmw app. Then all things going well.

If you'd like to debug further, I have notes on how to patch the Connected/MyBMW apps to enable debug logging, which can be combined with decompilation to try to trace through what it's doing. I haven't experienced the issue of the Apps checkbox not showing, so I can't help in this regard.

Thanks for the info. Cuz I'm using a self-build AOSP which may be the QPR3 version missing some Bluetooth functions. I'm going to investigate the communication between mybmw and car and will come back if any progress.

galenzhao commented 3 days ago

is there any way to bypass the login view of BMW Connected_6.4.1.6349_Apkpure.apk I followed the info and opened the log, but the app needed a login to open.

hufman commented 3 days ago

BMW Connected will connect to the car even without logging in, and even add its old Audioplayer and Calendar apps.

galenzhao commented 3 days ago

BMW Connected will connect to the car even without logging in, and even add its old Audioplayer and Calendar apps.

Yes, I can confirm that the old "BMW Connected_6.4.1.6349_Apkpure.apk" app can work without any problems.

So, it seems that the new MyBMW app and Android 14 QPR3 may have some issues.

Since the old app works well, I thought the MyBMW app might have some additional checks or requirements for Android 14 QPR3, which could be causing the car to not recognize the phone's app functionality.

By the way, what are the negative effects of having both the old and new apps installed? Thanks.