adil192 / SamsungAppsPatcher

[Unmaintained] Samsung Apps Patcher for Samsung phones with custom ROMs
https://adil.hanney.org/SamsungAppsPatcher/
74 stars 7 forks source link

Galaxy Watch (OG) (SM-R800) Plugin is unable to setup/connect Galaxy Watch! #17

Closed AlperShal closed 2 years ago

AlperShal commented 2 years ago

Describe the bug Galaxy Watch (OG) Plugin is unable to setup/connect Galaxy Watch. I just installed 3 core apps and Galaxy Watch and Buds2 plugins. SHealth, Wearable and Buds2 works just fine. I even did a software update with Buds2. And my guess Acessory Service works too since I am able to connect to my Buds2. Now when I try to setup/connect (you need to reset your watch to be able to connect a new/formatted phone so that's why the setup needed) it stucks in this screen and watch displays "Check your phone to complete setup." message in my local language. (It doesn't freeze. Last bubble fades in and out in a loop.)

Screenshot_20220911-115158_Galaxy Watch PlugIn

Smartphone

What (versions of) modded apps have you installed?

Unmodded apps

Logs (if possible) Output of adb logcat -b crash when crash/error/bug occurs: https://pastebin.com/nCn6WNsZ (I couldn't paste the logs because of the character limit. (65536))

adil192 commented 2 years ago

Yeah I used to have this issue too with my watch (also OG). If you keep trying again (including resetting the watch) it should eventually connect. Sometimes it really does take waiting an inordinate amount of time for the final bubble to finish.

AlperShal commented 2 years ago

Yeah I used to have this issue too with my watch (also OG). If you keep trying again (including resetting the watch) it should eventually connect. Sometimes it really does take waiting an inordinate amount of time for the final bubble to finish.

Okay I will try it when I get to home then. Thanks for the assistance.

AlperShal commented 2 years ago

Oh heck. There is a new update of Watch Plugin and every time I choose my watch to setup it shows me the update. https://www.apkmirror.com/apk/samsung-electronics-co-ltd/galaxy-watch-plugin/galaxy-watch-plugin-2-2-05-22081141n-release/galaxy-watch-plugin-2-2-05-22081141n-android-apk-download/ I guess I will try patching this one.

AlperShal commented 2 years ago

I wrote the previous reply an hour ago and couldn't manage to build patched app successfully and magically your version stopped getting update blocks. So trying again: 4 minutes later Looks like your version started getting update blocks. Returning to my patching attempt. 13 minutes later I re-followed steps given in the README.md but still get the same error.

[alper@ALPER-MANJARO SamsungAppsPatcher]$ ./wearable-patcher.sh watchplugin.apk
[1 / 1] patching watchplugin 
I: Framework installed to: /home/alper/.local/share/apktool/framework/127.apk
I: Using Apktool 2.6.1 on watchplugin.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/alper/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Baksmaling classes5.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
    patching samsung check in watchplugin 
    patching samsung account dependency in watchplugin 
    patching watchplugin with watchplugin-custom-cert.patch 
can't find file to patch at input line 14
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 801fa13ab838fa4c5eeb0c0341f3ffcb7963b601 Mon Sep 17 00:00:00 2001
|From: =?UTF-8?q?Alper=20=C5=9Eal?= <alpersal235@gmail.com>
|Date: Mon, 12 Sep 2022 01:09:27 +0300
|Subject: [PATCH] custom cert
|
|---
| .../util/Signaturechecker.smali               | 23 +++++++++++++++----
| 1 file changed, 18 insertions(+), 5 deletions(-)
|
|diff --git a/smali_classes2/com/samsung/accessory/goproviders/shealthproviders/util/Signaturechecker.smali b/smali_classes2/com/samsung/accessory/goproviders/shealthproviders/util/Signaturechecker.smali
|index 15fa36d2..65fd6400 100644
|--- a/smali_classes2/com/samsung/accessory/goproviders/shealthproviders/util/Signaturechecker.smali
|+++ b/smali_classes2/com/samsung/accessory/goproviders/shealthproviders/util/Signaturechecker.smali
--------------------------
File to patch: watchplugin.apk
watchplugin.apk: No such file or directory
Skip this patch? [y] n
File to patch: originals/watchplugin.apk 
originals/watchplugin.apk: No such file or directory
Skip this patch? [y] n
File to patch: decompiled/smali_classes2/com/samsung/accessory/goproviders/shealthproviders/util/Signaturechecker.smali
decompiled/smali_classes2/com/samsung/accessory/goproviders/shealthproviders/util/Signaturechecker.smali: No such file or directory
Skip this patch? [y] y
Skipping patch.
3 out of 3 hunks ignored

I don't have any time left so I will try again tomorrow if you can enlighten me with what I am doing wrong. My patch file; Just before giving my patch file I realized that my patch looks different than the others in the patches folder. Edited and gave it another try: WORKED! It compiled/built but not sure if it will connect.

Been a few minutes since I started connection but seems... what! IT WORKED! Trying reactivation lock... WORKED! Backups... WORKED! All seems fine. I will write back tomorrow if it keeps disconnecting or works with the .patch file. I don't know why I did write every step but it was fun lol.

adil192 commented 2 years ago

Congrats @AlperShal! I'll upload some updates as I get time