• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP][MOD] Galaxy Wearable patch for Samsung phones with custom ROMs

Search This thread

CYB3RV3N0M

Member
Jun 23, 2021
7
1
To anyone coming across this post who wants to do this themselves, I've made a little guide here: https://gist.github.com/adil192/ab95808fb66b6cde3d63ded6c19b0f1d. I've also attached the latest apps I've patched if you don't want to do that (since the ones in OP didn't work for me) here: https://mega.nz/folder/sUFj2C5b#M4zEP-c9ylY-ENxPw7qCUQ. This is tied to my name so I have no reason to add malicious code.
Does every update have to be patched again or is it enough to connect the device 1x with a patched version? Unfortunately, the files on Mega are already outdated.

@73sydney
Doestn work, checked it multiple time. Just hiding the apps in Magisk is not enough, the watch still won't connect.
 

Adil192

Member
Jun 13, 2021
5
0
Does every update have to be patched again or is it enough to connect the device 1x with a patched version? Unfortunately, the files on Mega are already outdated.

@73sydney
Doestn work, checked it multiple time. Just hiding the apps in Magisk is not enough, the watch still won't connect.
The apps on my mega link work fine for me still, do they not work for you? But yes you can't update via Google Play or anything as the apps will have different signatures (mine vs samsung's).
 

CYB3RV3N0M

Member
Jun 23, 2021
7
1
The apps on my mega link work fine for me still, do they not work for you? But yes you can't update via Google Play or anything as the apps will have different signatures (mine vs samsung's).
Unfortunately, it does not work as expected. As soon as I start Samsung Wearable, it asks for an update from the store, I forbid the internet connection or turn on the flight mode, the app does not start at all. So I don't even get to the point where I can connect the watch :(
 

Adil192

Member
Jun 13, 2021
5
0
Unfortunately, it does not work as expected. As soon as I start Samsung Wearable, it asks for an update from the store, I forbid the internet connection or turn on the flight mode, the app does not start at all. So I don't even get to the point where I can connect the watch :(
I tried it and if you turn airplane mode on, but have bluetooth and location turned on, the app doesn't prompt for an update and you can pair with your watch. But I admit that I don't have the typical system (e.g. using microg) so if that doesn't solve the problem, I've updated the apks on the MEGA folder.
Edit: You'll need to uninstall all the old apks since I'm using a different key to sign the apks this time.
 

Gambero81

Member
May 28, 2011
15
0
Hi,
I have a galaxy tab s6 lte and i just purchased a galaxy watch 4, but i found watch can't connect to tablet device.. someone solved editing keys ro.product.model and ro.build.characteristics in build.prop (https://forum.xda-developers.com/t/gear-s3-on-tab-s4.3869197).

I don't want to root my device and edit these keys so i think this problem can be solved bypassing the keys check in the wearable app.

@Adil192 can you add this feature to your patched version?
 

gella1992

Senior Member
Mar 14, 2011
57
12
@Adil192

Followed your Instructions for patching apks.
Unfortunately during adb install I have problems installing com.samsung.android.app.watchmanager .

I get the following message:
Failure [-124: Failed parse during installPackageLI: Targeting R+ (version 30 and above) requires the resources.arsc of installed APKs to be stored uncompressed and aligned on a 4-byte boundary]

I think this has something to do with apktool or signing apk?

EDIT: Problem solved myself. Just use zipalign -f -p 4 input.apk output.apk before signing the apk.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Hello everyone,

    Recently I have been experimenting with custom ROMs on my Samsung phone and was very unpleasantly surprised to find that Samsung does not allow my Galaxy Watch to be used with modded Samsung phone... Yeah, I know there's the option to replace manufacturer and brand in build.prop, however I don't like the idea of unnecessarily modifying the system just for a couple of proprietary apps, so instead I took the approach of patching the apps to make them work with the phone again.

    All that needed to be done was patch manufacturer and brand to static string(s). Here's a command to do just that:

    Bash:
    find . -type f -name "*.smali" -exec sed -i 's/sget-object \(v\|p\)\(.\+\), Landroid\/os\/Build;->\(MANUFACTURER\|BRAND\):Ljava\/lang\/String;/const-string \1\2, \"letitbeheardthisphoneistobetreatedasifitwereofabranddifferentfromtheonestartingwiths\"/g' "{}" \;

    Patching the apps, however made the shealth app refuse communication with the wearable app due to mismatching signing certificates and it needed to be patched too. It is possible to either completely bypass signature checking or insert custom certificate - I have attached a patch that does just that.

    You can (and probably should) do this yourself if you want to use the modified applications. Just decompile apks with apktool, apply the command in the directory with the apps content (it is necessary for Galaxy Wearable, Samsung Accessory and Galaxy Watch Plugin apps), and insert you own custom certificate into Galaxy Watch Plugin (attached patch - just replace the cert with your custom one). If you use Samsung Health, just replace the certificate string with hex-encoded certificate you used to sign the apps in the attached patch and apply it to the app. Then rebuild the apps and sign using the key whose certificate you just inserted into the apps.

    Although you should never trust a random stranger on the internet with apps you install, I understand not everyone wants to go through this process themselves, so hereby I solemnly promise there is no malicious code inserted into the provided apks. And here's the link

    App Versions:
    Samsung Accessory (com.samsung.accessory): 3.1.94.11128
    Galaxy Wearable (com.samsung.android.app.watchmanager): 2.2.42.21083061
    Galaxy Watch PlugIn (com.samsung.android.geargplugin): 2.2.05.21042051
    Samsung Health (com.sec.android.app.shealth): 6.18.7.005
    1
    No idea what you're talking about. My watch works fine with my note 10+ using Dr ketan rom.
    Same with Alexis. I just hide it with magisk but it was working just fine before that.

    I was talking about AOSP-based ROMs. Generally, I build and sign the ROM whenever possible and so I don't find it necessary to root my devices. Also I don't like the idea of making changes to mask the actual device and when the app is used with Samsung phone, it relies on proprietary interfaces implemented only in Touchwiz, which are not available in AOSP. Since it is an app issue, it makes sense to make changes on the app level instead of the system level.
    1
    I own a s5neo with lineage 17.1 and I had the same problem as reported, galaxy wearable identified my phone as modified/rooted and exited. Using your apk I was able to launch the app but it fails to install the galaxy buds live plugin, only shows a message that failed to install.

    I don't know how to do the patch and I would like to know if you can generate a patched apk for buds live plugin (https://play.google.com/store/apps/details?id=com.samsung.accessory.neobeanmgr&hl=en_GB)

    thanks in advance

    I have Galaxy Buds+ on a Pixel 2 XL

    Heres how to do it the easy way...

    Install Magisk
    Enable MagiskHide in Magisk Manager settings
    Tick all Samsung related apps in MagiskHide in Magisk Manager
    Hide Magisk Manager
    Reboot

    Thats how i also have my Active 2 and Samsung Pay working
    1
    To anyone coming across this post who wants to do this themselves, I've made a little guide here: https://gist.github.com/adil192/ab95808fb66b6cde3d63ded6c19b0f1d. I've also attached the latest apps I've patched if you don't want to do that (since the ones in OP didn't work for me) here: https://mega.nz/folder/sUFj2C5b#M4zEP-c9ylY-ENxPw7qCUQ. This is tied to my name so I have no reason to add malicious code.
    I need assistance with the gear s3plugin apk please.

    Got it working..thanks