[MOD] Working Samsung Gear App for non (also rooted) Samsung devices.

Status
Not open for further replies.
Search This thread

paulograve

Member
May 3, 2014
30
2
Thank you for this. It works with my Xiaomi mi5. The problem is that i cant make any backup, the option is grayed out. And the Samsung Health app doesn't sync.... Any help would be much appreciated! Thanks
 

DubMonsta

Member
Nov 24, 2014
6
2
SHealth Sync Issue

Hello guys,
For those who cannot sync their Gear with SHealth; try to install only the modded Samsung Gear application, without installing the modded Gear S Plugin, SHealth and Accessory Service. Go thru the pairing process and there is the chance that the modded Gear app will not fail and will download all the other ones after pairing. After that, install the SHealth app from the Store and see if it syncs.

I came across the not syncing issue and tried for several days to make them work on LeeDroid and ViperRom on my HTC 10 with all the modded apps but it did not work. But last night, I tried the above and now it syncs without any issues.

Hope it helps!

PS: Thank you @j to the 4n for spending the time to make our modded phones work with Samsungs "mistake".
 

paulograve

Member
May 3, 2014
30
2
I have tried everything, and with Xiaomi Mi5 the Samsung Health app does not work....
I think I can give my thank you again for at least Gear S3 works good!

Edit: Forget what I wrote before. It works!
Use the modded app and original plugin and acessory app.
 
Last edited:
G

GuestD2137

Guest
Hello guys,
For those who cannot sync their Gear with SHealth; try to install only the modded Samsung Gear application, without installing the modded Gear S Plugin, SHealth and Accessory Service. Go thru the pairing process and there is the chance that the modded Gear app will not fail and will download all the other ones after pairing. After that, install the SHealth app from the Store and see if it syncs.

I came across the not syncing issue and tried for several days to make them work on LeeDroid and ViperRom on my HTC 10 with all the modded apps but it did not work. But last night, I tried the above and now it syncs without any issues.

Hope it helps!

PS: Thank you @j to the 4n for spending the time to make our modded phones work with Samsungs "mistake".

Mate, I can confirm this is working! Had the same problem with non syncing shealth app over the last few weeks now and tried many different things to fix it. On my phone I had all four modded apps from here until today. Then followed your suggestion to delete all but the modded Gear app. The only difference was that the app then gave me something like "incompatible device", so I downloaded the gear s plug-in plus accessory services plus shealth from playstore manually. restarted gear app and upon connecting to the s2 it automatically initiated a soft reset on it. restored my backup and syncing, INCLUDING SHEALTH, is working like a charm! ?... thanks for pointing us into this direction!
 

k4ever

Senior Member
Apr 28, 2008
422
59
Tried installing the Samsung Gear 2.2.17022862-resigned.apk on my Samsung Galaxy Note 4, which has a fresh install of Lineage OS 14.1 on it. App fails to install with error: The package conflicts with an existing package by the same name.

I don't have any Gear apps installed on this phone....

Edit: Disregard. I had some rogue Samsung apps that were installed from my backup. I uninstalled them and Samsung Gear installed with no problems!

---------- Post added at 05:25 PM ---------- Previous post was at 04:41 PM ----------

Ok, need the Gear Fit2 plugin. Did not see that in your Google Drive...

Just to clarify, the Gear Fit2 plugin will not install from the Play Store, says it is incompatible with my device. I downloaded the apk from another site and tried to side load it, but it gave me a "The package conflicts with an existing package by the same name" error. Frustrating!
 
Last edited:

j to the 4n

Recognized Developer
Oct 18, 2012
16,205
44,288
Germany
Tried installing the Samsung Gear 2.2.17022862-resigned.apk on my Samsung Galaxy Note 4, which has a fresh install of Lineage OS 14.1 on it. App fails to install with error: The package conflicts with an existing package by the same name.

I don't have any Gear apps installed on this phone....

Edit: Disregard. I had some rogue Samsung apps that were installed from my backup. I uninstalled them and Samsung Gear installed with no problems!

---------- Post added at 05:25 PM ---------- Previous post was at 04:41 PM ----------

Ok, need the Gear Fit2 plugin. Did not see that in your Google Drive...

Just to clarify, the Gear Fit2 plugin will not install from the Play Store, says it is incompatible with my device. I downloaded the apk from another site and tried to side load it, but it gave me a "The package conflicts with an existing package by the same name" error. Frustrating!
..well, there also must be the fit2 app already installed then.
 

k4ever

Senior Member
Apr 28, 2008
422
59
..well, there also must be the fit2 app already installed then.

Thanks for the reply. I wish it were that simple, but I verified that there is/was no Fit2 plugin app installed.

The Fit2 plugin app is conflicting with your Gear app. I uninstalled your Gear app and the Fit2 plugin app installed with no issues. However, now your Gear app won't install with the same conflict message. I believe that it is either a signature conflict or there is a file shared between the two apps.

Both apps are needed for the Gear Fit2 to work. Will you please take a look at the Fit2 plugin app?

Edit: For more clarity, I was also able to install the unmodified Gear app along with the unmodified Fit2 plugin with no install errors. Too bad the unmodified Gear app doesn't like Samsung devices with custom ROMs. It gives me an error that my OS "has been modified in an unauthorized way" when I start it. Your modified Gear app does not give that error, it just won't let the unmodified Fit2 plugin install. Like I mentioned before, I think if you modify the Fit2 plugin, it will work with your Gear app.
 
Last edited:

adammanson

Senior Member
Mar 21, 2015
57
51
Sharjah
Hey guys so here is how i got it to work on my Galaxy S4 runnijg LineageOs 14.1 and rooted by magisk.

First i downloaded .buildprop and then typed Samsung , you get 2 items which is brand manfacturer and something else, change both to htc and reboot.
Download Samsung Gear from playstore, pair you device via bluetooth.
Go to google and download Gear S plugin and samsung accessory.
Now after installing these go to gear app and connect and yay! Its working perfectly.
Havefun.
 
G

GuestK00351

Guest
Today I received an update message inside the Samsung Gear app (not PlayStore) and I recommend not to update!
After updating inside the Gear App I got a slightly new design, but Gear S Plugin was crashing every few seconds. So I tried to reinstall just Gear S Plugin and after I did this, my phone was not able to connect to my watch anymore.
So I had to reset my Gear S3. Now everything is working again, but the "new" design disappeared.

I don't know what happened, but I wouldn't try this update again...

I'm using the modded Gear App, but Gear S Plugin and Accessory Service directly from PlayStore.
 
Last edited:

XyByDy

Member
Oct 30, 2010
48
4
Thank you so much! I just could not pair the watch with my rooted Xperia XZ. And with using three of the patched apks it now works great.
 
G

GuestK00351

Guest
Wow thanks, that was fast.
Unfortunately I can't install it and I don't know if it's a problem with the app or something else on my side.

If I try to install it, I get the message "App not installed. The package appears to be corrupted."

Sent from my HTC 10 using XDA Labs
 
Last edited:

j to the 4n

Recognized Developer
Oct 18, 2012
16,205
44,288
Germany
Wow thanks, that was fast.
Unfortunately I can't install it and I don't know if it's a problem with the app or something else on my side.

If I try to install it, I get the message "App not installed. The package appears to be corrupted."

Sent from my HTC 10 using XDA Labs

nope, sth is messed up.
will check.

Edit: check the new version
 
Last edited:
  • Like
Reactions: kajos
G

GuestK00351

Guest
nope, sth is messed up.
will check.

Edit: check the new version

Yes, it's working now. Thank you.
But I'm still a bit confused, because it still shows me an update inside the app...

Edit: Okay, the update button is for gear s plugin. But after updating, the plugin crashes every few seconds.
So I deinstalled every samsung app and reinstalled all latest versions. Resetted my watch and configured it. Everything was fine, until I finisehd the configuration. Now the plugin starts crashing again.

I made a logcat, maybe you can have a look at it @j to the 4n :)

This is the latest gear s plugin: https://drive.google.com/open?id=0BwF-T4LX8qMfaEV1ZEZmQmRhbTA
Not on apkmirror yet, but this is the one you get, if you update over the app.
 

Attachments

  • logcat.txt
    337.9 KB · Views: 53
Last edited:

j to the 4n

Recognized Developer
Oct 18, 2012
16,205
44,288
Germany
Yes, it's working now. Thank you.
But I'm still a bit confused, because it still shows me an update inside the app...

Edit: Okay, the update button is for gear s plugin. But after updating, the plugin crashes every few seconds.
So I deinstalled every samsung app and reinstalled all latest versions. Resetted my watch and configured it. Everything was fine, until I finisehd the configuration. Now the plugin starts crashing again.

I made a logcat, maybe you can have a look at it @j to the 4n :)

Code:
Process: com.samsung.android.gearoplugin, PID: 4463
java.lang.RuntimeException: java.lang.IllegalArgumentException: You cannot keep your settings in the secure settings.
	at com.samsung.android.sdk.accessory.SASocket$3$1.run(SASocket.java:546)
	at android.os.Handler.handleCallback(Handler.java)
	at android.os.Handler.dispatchMessage(Handler.java)
	at android.os.Looper.loop(Looper.java)
	at android.app.ActivityThread.main(ActivityThread.java)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
[B][COLOR="Red"]Caused by: java.lang.IllegalArgumentException: You cannot keep your settings in the secure settings[/COLOR][/B].

Nothing I can do about.
Just system apps are allowed to do that.
you could move com.samsung.android.gearoplugin to /system that should fix the issue.
 
  • Like
Reactions: kajos
G

GuestK00351

Guest
Code:
Process: com.samsung.android.gearoplugin, PID: 4463
java.lang.RuntimeException: java.lang.IllegalArgumentException: You cannot keep your settings in the secure settings.
	at com.samsung.android.sdk.accessory.SASocket$3$1.run(SASocket.java:546)
	at android.os.Handler.handleCallback(Handler.java)
	at android.os.Handler.dispatchMessage(Handler.java)
	at android.os.Looper.loop(Looper.java)
	at android.app.ActivityThread.main(ActivityThread.java)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
[B][COLOR="Red"]Caused by: java.lang.IllegalArgumentException: You cannot keep your settings in the secure settings[/COLOR][/B].

Nothing I can do about.
Just system apps are allowed to do that.
you could move com.samsung.android.gearoplugin to /system that should fix the issue.

I made a quick Magisk module and moved all relevant apps to /system. But Gear S Plugin is still crashing :(
 
G

GuestK00351

Guest
That's why you don't buy ****sung

I thought the same. I really love this watch, but why does Samsung fail to program functional apps :mad:

Btw.: Looks like Samsung fixed the pairing problem. With latest Gear app I'm able to connect to my watch without your modified version. But yeah... now Gear Plugin crashes every time, so I have to go back to your modded one with old Gear Plugin.
 
Last edited:

mikdima

Senior Member
May 13, 2014
51
14
Milan
Thanks for the reply. I wish it were that simple, but I verified that there is/was no Fit2 plugin app installed.

The Fit2 plugin app is conflicting with your Gear app. I uninstalled your Gear app and the Fit2 plugin app installed with no issues. However, now your Gear app won't install with the same conflict message. I believe that it is either a signature conflict or there is a file shared between the two apps.

Hello, same issue here.
If I try to install the Gear Manager and the Gear Fit 2 Plugin, the second I install is reported as "There is a conflict in the package name".
Unfortunately the "Gear Fit 2 Plugin" is unavailable for me in the Play Store, it is reported as "not compatible" with my Note3.

Can you please give me a hint?
Thanks,
Michele

EDIT: Both APKs have been downloaded from Google Drive:
https://drive.google.com/drive/folders/0B1uk1ESfnhXkblAzZWVJUC14aVE
https://drive.google.com/file/d/0BwF-T4LX8qMfaEV1ZEZmQmRhbTA/edit
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 68
    Update 12.10.2017

    UPDATE
    There is a new Gear S Plugin update available in PlayStore. They fixed the crashes, everything is working now.

    Looks like even the modded gear app is not needed anymore. But I will check this later.

    Sent from my HTC 10 using XDA Labs

    Can confirm, updated to the latest Gear S Plugin and latest unmodded Gear App and everything is working properly on my HTC 10.

    Gear App 2.2.17022862
    Gear S Plugin 2.2.03.17101142N


    In our Viper10 Thread we had multiple reports, that the Samsung Gear app force closes when trying to connect their device.

    Seemed not just the HTC10 is affected though. From my google research I found also some logcats from other roms and devices posted with the same issue.
    @Toni10 linked me to that thread today, opened by @kajos in the Samsung Gear S3 Forum..so it seems it's really a general issue.

    Okay, so what is the issue:

    Code:
    -27 21:10:15.357 E/AndroidRuntime(6044): FATAL EXCEPTION: main
    11-27 21:10:15.357 E/AndroidRuntime(6044): Process: com.samsung.android.app.watchmanager, PID: 6044
    11-27 21:10:15.357 E/AndroidRuntime(6044): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/samsung/android/feature/FloatingFeature;
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.samsung.android.app.watchmanager.sdllibrary.FloatingFeature.getEnableStatus(FloatingFeature.java:11)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.samsung.android.app.twatchmanager.log.LoggerUtil$Builder.<clinit>(LoggerUtil.java:95)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.samsung.android.app.twatchmanager.util.HostManagerUtils.startPluginActivity(HostManagerUtils.java:551)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.samsung.android.app.watchmanager.setupwizard.HMConnectFragment.callPluginActivity(HMConnectFragment.java:377)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.samsung.android.app.watchmanager.setupwizard.HMConnectFragment.callPluginActivityWithDelay(HMConnectFragment.java:365)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.samsung.android.app.watchmanager.setupwizard.HMConnectFragment.access$200(HMConnectFragment.java:67)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.samsung.android.app.watchmanager.setupwizard.HMConnectFragment$1.handleMessage(HMConnectFragment.java:315)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at android.os.Handler.dispatchMessage(Handler.java)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at android.os.Looper.loop(Looper.java)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at android.app.ActivityThread.main(ActivityThread.java)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at java.lang.reflect.Method.invoke(Native Method)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
    11-27 21:10:15.357 E/AndroidRuntime(6044): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.samsung.android.feature.FloatingFeature" on path: DexPathList[[zip file "/data/app/com.samsung.android.app.watchmanager-1/base.apk"],nativeLibraryDirectories=[/data/app/com.samsung.android.app.watchmanager-1/lib/arm64, /system/fake-libs64, /data/app/com.samsung.android.app.watchmanager-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    11-27 21:10:15.357 E/AndroidRuntime(6044): 	... 13 more

    Bad coding, or intended, no idea.

    A framework class com.samsung.android.feature.FloatingFeature is not found on none samsung devices.
    I took the effort to decompile the sams h i t app and digged in the code and backtraced the issue.

    The source of the bug (or intended behavior) is the samsung device detection:

    Code:
    .method public static isSamsungDevice()Z
        .locals 1
    
        invoke-static {}, Lcom/samsung/android/app/twatchmanager/TWatchManagerApplication;->getAppContext()Landroid/content/Context;
    
        move-result-object v0
    
        invoke-static {v0}, Lcom/samsung/android/app/twatchmanager/util/InstallationUtils;->hasInstallPermission(Landroid/content/Context;)Z
    
        move-result v0
    
        return v0
    .end method

    It also returns true even on none samsung devices.
    Not sure why that fails. it checks if it can get android.permission.INSTALL_PACKAGES...that perm can be just granted to apps in /system.
    So moving the app to /system should work too, to fix the issue for rooted users...still it should return falls and not true on none samsung devices that dont't have it on /system

    The result of it is that causes the app to crash in LoggerUtil$Builder:

    Code:
    .method static constructor <clinit>()V
        .locals 2
    
        invoke-static {}, Lcom/samsung/android/app/twatchmanager/util/HostManagerUtils;->isSamsungDevice()Z
    
        move-result v0
    
        if-eqz v0, :cond_0
    
        invoke-static {}, Lcom/samsung/android/app/twatchmanager/util/FloatingFeatureFactory;->get()Lcom/samsung/android/app/watchmanager/libinterface/FloatingFeatureInterface;
    
        move-result-object v0
    
        const-string v1, "SEC_FLOATING_FEATURE_CONTEXTSERVICE_ENABLE_SURVEY_MODE"
    
        [COLOR="red"]invoke-interface {v0, v1}, Lcom/samsung/android/app/watchmanager/libinterface/FloatingFeatureInterface;->getEnableStatus(Ljava/lang/String;)Z[/COLOR]
    
        move-result v0
    
        if-eqz v0, :cond_0
    
        const/4 v0, 0x1
    
        :goto_0
        sput-boolean v0, Lcom/samsung/android/app/twatchmanager/log/LoggerUtil$Builder;->SUPPORT_LOGGING:Z
    
        return-void
    
        :cond_0
        const/4 v0, 0x0
    
        goto :goto_0
    .end method

    that tries to access an method in a class just available on a samsung device and its framework:

    Code:
    .method public getEnableStatus(Ljava/lang/String;)Z
        .locals 1
    
        invoke-static {}, Lcom/samsung/android/feature/FloatingFeature;->getInstance()Lcom/samsung/android/feature/FloatingFeature;
    
        move-result-object v0
    
        [COLOR="red"]invoke-virtual {v0, p1}, Lcom/samsung/android/feature/FloatingFeature;->getEnableStatus(Ljava/lang/String;)Z[/COLOR]
    
        move-result v0
    
        return v0
    .end method

    It's the only location where a call requires the samsung framework.

    So how to fix it:

    We just modify the device detection method to return always false:

    Code:
    .method public static isSamsungDevice()Z
        .locals 1
    
        const/4 v0, 0x0
    
        return v0
    .end method

    ...recompile, resign and it's done.

    So far I got 4 reports that it indeed works...so it should also for others.
    Since I had to resign the app, ensure you uninstall the original one before installing the fixed version.

    When an update in playstore drops for the gear app, and it still force closes, uninstall it and install my fixed version again.
    Since I won't monitor that thread...someone should shoot me a PM, so I can merge my fix to the new version from playstore.



    Code:
    [B]Update 06.09.17[/B] 
    Samsung Gear to fix custom binary message on samsung devices
    Gear S Plugin 2.2.03.17061361
    Samsung Health 5.12.0.025
    
    [B]Update 30.06.17[/B] 
    Accessory Service 3.1.51.70612
    Gear S Plugin 2.2.03.17041441N
    Samsung Health 5.9.1.003
    
    [B]Update 02.04.17[/B] 
    Accessory Service 3.1.39_170322
    
    [B]Update 01.04.17[/B] 
    Samsung Gear 2.2.17022862
    Gear S Plugin v2.2.03.17032442N
    
    [B]Update 08.02.17[/B] 
    Added modifications to new [URL="http://www.tizenexperts.com/2017/01/samsung-gear-manager-application-gear-smartwatches-updated-2-2-16121661/?utm_content=buffer51605&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer"]Gear App 2.2.16121661[/URL]
    
    [B]Update 03.02.17[/B]
    The installation issue some people were having seems to got resolved by signing the Gear S Plugin and Samsung Accessory Service with the same signature as the resigned Gear App.
    All three files are uploaded on Google Drive now (xda does not allow zips > 20mb, and no single apks > 8MB)


    Downloads:
    Samsung Gear Apps

    10
    If the apps get updated, please upload them for me here or elsewhere and mention my name.

    Update 30.06.17
    Accessory Service 3.1.51.70612
    Gear S Plugin 2.2.03.17041441N
    Samsung Health 5.9.1.003
    8
    66 downloads, seems a a few waited for that fix :p
    5
    Can confirm, updated to the latest Gear S Plugin and latest unmodded Gear App and everything is working properly on my HTC 10.

    Gear App 2.2.17022862
    Gear S Plugin 2.2.03.17101142N
    Cool, the for the feedback.

    No need for that thread anymore then :)
    4
    hi @j to the 4n
    i was using ur samsung gear s3 fix app found @ hub in viper rom until yesterday. from yesterday i cant seem to connect it....what i mean is phone is connected to samsung gear s3 via bluetooth... but when i log into samsung gear app , i cant connect it. so basically i cant do anything. i mean changing watchface, upgrading apps , nothing.
    i got a logcat 4 u. i dont know if this wil help . let me know if u need more information.. ur help will be highly appriciated

    https://www.dropbox.com/s/khjg867retjfdjt/report_2017-02-17-12-39-48.zip?dl=0

    logcat is empty, you most like selected "FC Only" in VenomTweaks, when you took the log.

    Did you try to install the new versions linked in the OP? Install all three.
    ..probably one of them got updated by the playstore and the signatures don't match anymore.


    @ All - Without a clock myself, it's impossible for me to fix the different issues people are reporting here. It seems its even phone dependant, since it seems it works for most, but for some not?
    What's a bit depressing is, that we got almost 1000 downloads and just a handful positive feedback if it works. I assume it does work for the most, and for those where it's not they reported it here? (-:

    Also reporting that it does not work, does not help. Provide a logcat each time you have an issue.