Closed Lexvox closed 7 months ago
OK, let us establish a baseline for the problem. Let me ask you a few things first:
I will look into the issue once I understand the situation better. Thanks for reporting this.
A simple thing to try is to go the Android setting, and clear "Storage and Cahe" for the app, and see if this fixes the promle. In v12.1, we changed the way we store local data, this might be effecting it.
If all else fails, somebody reported that they had to pair the watch manually once from the Android settings, and then it started working. We have tested the app with Android 14, so I assumed that this is something specific to their crDroid OS. It seems that some versions of Android 14 have extra security features that don't allow automatic pairing, or there is a bug in the OS. We are still investigating.
If you try to pair manually, go to Settings, select Bluetooth -> Pair new device, then long-press the lower-left button of the watch, and it will appear in the list of devices. Just pair it then
Please let me know how it goes.
Just keeping some notes here for future reference:
Location of DataStore data file: /data/data/org.avmedia.gshockGoogleSync/files/datastore/CASIO_GOOGLE_SYNC_STORAGE.preferences_pb
adb shell run-as org.avmedia.gshockGoogleSync cat /data/data/org.avmedia.gshockGoogleSync/files/datastore/CASIO_GOOGLE_SYNC_STORAGE.preferences_pb
Simmilar issue found here: https://issuetracker.google.com/issues/242755161
[SOLUTION:]
If all else fails, somebody reported that they had to pair the watch manually once from the Android settings ...
did that app works as expected now (cleared cache b4 for good measure)
- Is this a new behavior? [...]
- Please make sure the official app is not running on your phone or on phones in the proximity of the watch.
- Please make sure this app is not running on a phone in the proximity of the watch.
- Does the app work on another phone you might have?
- Do you have multiple watches?
A simple thing to try is to go the Android setting, and clear "Storage and Cahe" ...
same behavior as pressing 'forget' in app
... something specific to their crDroid OS ...
stock pixel rom, however custom linux-stable based kernel (5.10.197-Kirisakura_Raviantah_2.1.0), magisk 26.4, lsposed 1.9.2; if that matters
Great, thanks for the feedback! I'll add this solution to a troubleshooting section. I'll continue to investigate why this is the case.i can only assume this is a new security feature to prevent apps from maliciously connecting via Bluetooth without the user's knowledge. It does not effect all Android 14 phones, so I'm not sure what is the difference.
I would be really curious how the official app behaves with your phone, but if you have not installed it before, I understand you might be reluctant to compromise your privacy.
Thanks again for reporting this.
I would be really curious how the official app behaves with your phone, but if you have not installed it before, I understand you might be reluctant to compromise your privacy.
Just tried both the 'classic' g shock connected and newer casio watches app and both work as expected. Once paired in app the watch and app reconnect without hiccup. Deleted the watch pairing from my phones bluetooth settings beforehand. So I'm guessing it's bug specific to your app.
Ok, I'll look into it. Thanks.
On Sun, Feb 18, 2024, 12:14 PM Lexvox @.***> wrote:
I would be really curious how the official app behaves with your phone, but if you have not installed it before, I understand you might be reluctant to compromise your privacy.
Just tried both the 'classic' g shock connected and newer casio watches app and both work as expected. Once paired in app the watch and app reconnect without hiccup. Deleted the watch pairing from my phones bluetooth settings beforehand. So I'm guessing it's bug specific to your app.
— Reply to this email directly, view it on GitHub https://github.com/izivkov/CasioGShockSmartSync/issues/75#issuecomment-1951389297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7M37XRT7EZFSHPLYSVRJTYUIZGFAVCNFSM6AAAAABDNVBDOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGM4DSMRZG4 . You are receiving this because you commented.Message ID: @.***>
Sounds like you have some good technical skills. Could you help me narrow down the problem? I suspect it has something to do with the app storage. After connection, the Bluetooth (BT) ID of the watch is stored in the DataStore of the app. Next time, the app will reuse the same ID to connect to the watch until you clear the storage or press "FORGET".
Could you try the following:
Unpair the watch and clear storage from Android settings.
Set up ADB on your PC. Put your phone in "developer" mode and connect it to the PC via USB.
Run the following to see the content of the app's data:
adb shell
run-as org.avmedia.gshockGoogleSync
cat /data/data/org.avmedia.gshockGoogleSync/files/datastore/CASIO_GOOGLE_SYNC_STORAGE.preferences_pb
You should see "File not found".
Connect the watch to the phone for the first time. Run the above commands again. This time you should see something like:
LastDeviceName*CASIO GA-B2100
LastDeviceAddress*F6:A1:42:57:7A:07
LastDeviceAddress is what holds the ID of the watch. Let me know if you see it.
Thanks
also cleared and reconnected twice just to see if the phone changed the id for some reason (it didn't)
Hello @Lexvox
If you are comfortable with it, do you mind building the branch new-ble and testing it with your Android 14? This should address the issue of having to press the "FORGET" button with every connection, without manually pairing the watch.
I replaced my own implementation of the BLE interface with this library. This is supposed to be the "gold standard" when referring to BLE libs, so I hope this fixes the issue.
If you prefer an APK, I can send you to test.
Thanks in advance.
Hi @izivkov
wouldn't mind building it but I'm currently on vacation and don't have my computer with me. But if you can send me an apk I'll gladly test it.
Oh, sorry to bother you on vacation. Here is the APK, but please don't spend too much time on this, I can get somebody with Android 14 to test it.
I don't mind, not like I'm wasting any beautiful weather here and I enjoy the tinkering :) Unfortunately after going through initial setup the app crashes about a second after I attempt to connect a second time. It first reacts to the watch (loading animation plays) but it crashes before the interface comes up. Yet again the problem is solved by pairing the watch in the device settings first. I'll send you the crash log via email.
Thanks for the log. I saw this error earlier, and I updated the APK. If you have time, download again give it another try. It does not happen for me. If it deos not work for you, I will post a messages on GitHub regarding this. One of the contributots with Android 14 will try to fix it.
It's actually good that it crashes now, we can find the cause easer running Android 14.
Thanks again Ivo
Fixed
The action button doesn't work and I'm only able to connect once, after that I have to forget the watch in the app and connect again.
Steps to reproduce:
Expected behavior:
1.- 4. as above
If theres a way to send logs or provide u with other information please let me know.
Devices: GW-B5600 Pixel 7 Android 14 UQ1A.231205.015 App ver. 12.1