Root cause for Gear 2 high battery consumption found, at least for non-Samsung phones

Search This thread

best97

Member
Dec 21, 2013
14
12
OK, the handler I updated in the 2 previous fixes didn't change from the previous version of "goproviders", so I hoped I could just use the same .class file, DEX it, stick into an APK, sign and be done with it. Unfortunately, it looks some other logic has changed, so now the same fix doesn't work anymore.
So I started investigating the other end, that is, the watch. The major difference is now we have ROOT on the Gear, so why not use it?
I quickly figured out that the offending process on the watch side was "w-contacts2-consumer". Apparently, if you just kill it, this stops Contact synchronisation only, while Contacts app on the watch remains fully functional. Unfortunately, this process is respawned every time Bluetooth connection is reestablished between the the phone and the watch.
I was looking for "cron" for Tizen, hoping to put "pkill" into a recurring task that'd run every couple of minutes. Unfortunately, I couldn't find "cron" on the watch, and the version of busybox suggested in one of the threads on this forum doesn't have it precompiled.
Then I thought: why the heck can't I just write a small app (command line) that would literally just do this:
Code:
while(1)
{
	system("pkill w-contacts2");
	sleep(120);
}
After a bit of playing around with Tizen SDK, I managed to produce this executable (attached). You can put it into /sbin, making sure permissions are 755. One last thing is to make it run as a service:
Code:
systemd-run --unit=kill_contacts.nonsamsung --description="Automatically Kill Contacts Every 2 Minutes" /sbin/kill_contacts
I don't think it'll survive a reboot though, I'll get it sorted later.

Now battery consumption is back to normal, and contacts get synchronised every time the watch connects to the phone, which is more than fine with me.

Thank you for sharing this
I've got a question, should I insert this file into my Galaxy S4 or into my Gear 2? Because there are /sbin folders in the S4 and in the Gear 2 :)
Thanks :)
 

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
Thank you for sharing this
I've got a question, should I insert this file into my Galaxy S4 or into my Gear 2? Because there are /sbin folders in the S4 and in the Gear 2 :)
Thanks :)
Gear 2. Please, read my next post for more details.
Also, just in case you missed it, you need to have root on you Gear 2 / Neo.
 
Last edited:

enko420

Senior Member
Mar 28, 2011
78
2
if someone only has 200 contacts in their phone, could this still drain battery life?
 
The goproviders solution is too fragile, as any update of Gear Manager breaks it. Rooting the Gear is actually very safe and you can always flash it back to factory...

I too had battery issues all of a sudden. The Gear 2 would barely last a day. NOW, I am on my 4th day at 42% remaining!!!!! :laugh:

I ended up factory resetting both devices. Set Gearmanager/MyApps/Contacts to Favorites instead of All. It tells you then that you will have to manually resync if you change your Favorites contacts details. I have also turned off the Wake gesture. Everything else is standard. I haven't installed any other apps to the Gear 2.

Hope this helps someone.

Using Gear 2 and Galaxy S5
 

dwpang

New member
Jul 14, 2014
1
0
hi hi may i ask whats the battery drain like when you guys run the music player?
the battery like went down 50% after listening to 1.5 hours.
is it common for you guys?
if it's left alone, battery is pretty gd. 2 or 3% drain every 2 hours.
 

Skin1980

Inactive Recognized Developer
Nov 25, 2009
2,490
6,233
I just want report my story:

With ur mod,after 56hr from full charge, always connected to bt, i had 70% left!

Really nice job!
 

Skin1980

Inactive Recognized Developer
Nov 25, 2009
2,490
6,233
Thanks for the feedback, which mod are you referring to? Is it the original goproviders mod or the new contact-sync-killer one?

I'm referring to Goproviders mod... I also use a custom watchface but not from watchstyler... If i'm not wrong its called clocky from playstore that install the wgt directly on the phone and is very battery friendly.
 

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
I'm referring to Goproviders mod... I also use a custom watchface but not from watchstyler... If i'm not wrong its called clocky from playstore that install the wgt directly on the phone and is very battery friendly.
So that means you didn't upgrade to the new Gear Manager. Otherwise you would need the second mod...
 

Skin1980

Inactive Recognized Developer
Nov 25, 2009
2,490
6,233
So that means you didn't upgrade to the new Gear Manager. Otherwise you would need the second mod...[/]

No i didn't... I'm so happy with this. I didnt take a look but maybe u can answer... Is not possible to unpack the boot img of tizen to add ur service?
 

rorijam

Senior Member
Nov 16, 2005
348
3
I will try the same measures as You did, because know after 4 resets and trial an error, I have to recharge in the middle of the day to keep it running until 8 pm :(

It is running between 5 to 7 hours know... I have WATCH STYLER and TRENDIE, very nice Watch Faces installed, it is very sad for to Me to avoid using this faces... but if necessary lets have an ugly watch then :) ...SAMSUNG: You Ought to solve this!

Thanks...
 

Lazzeuz

New member
Jul 23, 2014
4
0
still unfamiliar with the fix

Hi guys, i just received my gear 2 neo about a week now, and its draining VERY FAST!!! about 7hrs could drain a fully charged watch

I read about your fix but still unfamiliar about it, could you simplify it (sorry but im not that tech savvy :( ) step by step and is it safe for my gear 2 neo?

any help would be appreciated !!

Edited, Im using note 2 (unroot) 4G NT 7105 and galaxy gear manager build 22 Jul (its new)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    Edit: with new Gear Manager (Jun release), this method doesn't work anymore. The new approach is to install a "contact synchroniser killer" app on the rooted watch. More details are in this post.

    ==================================================================================================================================================================================

    Hi all,

    Ever since I started using my Gear 2 Neo with my HTC One M8 phone (using the guide in this forum), I noticed that my watch consumes battery significantly faster than most of the users have been reporting. Even more strangely, sometimes after resetting both the phone and the watch (and I've done this a lot while experimenting and trying to get more stuff working) I had streaks of stellar battery life, well in line with optimistic reports here and elsewhere, but then, after a while, it started deteriorating very quickly.

    So I decided it was time to do something about it. I installed Tizen SDK, hooked the watch up and started poking around. The first thing I noticed my watch CPU was, most of the time, sitting on 40%! Well, that doesn't sound right, does it? Then I noticed the log (located under /var/log/dlog_main) was full with messages related to contact synchronisation. It turns out the damn thing synchronises all of my contacts every several seconds. The trouble is I have well over 1500 contacts (that's consolidated from different sources, the number of raw contacts should be well over 3000). So it takes significant time to do this, meaning my watch (and the phone!) are thrashed by these stupid full contact syncs all the time! What's even more striking is the fact it doesn't help when I change it to "favourites only". Apparently, this affects only the contacts displayed on the watch, however, the sync process still takes all of them.

    At this point I started poking around Samsung APK files to try and understand what was going on. Apparently, the APK responsible for contact sync is called GOPROVIDERS. Indeed, if you kill it, the thrashing stops, however, other important functions cease working as well. Aside of Contacts vanishing from the Gear, "Find my phone" is gone as well, but, more importantly, notifications stop working. While I could tolerate the first two, the last one was too much to give up.

    I started decompiling and analysing sources. Apparently, there is a process running every several seconds that analyses if any changes have been made to the contacts. It uses pretty bizarre logic which seems to be relying on Samsung-specific fields in the contacts. Now, this already sounds suspicious, and, apparently, leads to full sync every several seconds. Obviously, the more contacts you have, the harder you're hit.

    An interesting point in all this is that I'm not 100% sure the logic is working properly even on Samsung devices, so it might well be that the same issue is affecting people with high number of contacts using Samsung phones as well. I'd be really interested to see any feedbacks regarding this.

    So, long story short, instead of fixing the logic (which is quite difficult in SMALI), I made a simple change which dilutes this logic invocations, right now 1:64. Since then I'm enjoying MUCH improved battery life.

    The fixed APK is attached. You're welcome to give it a try at your own risk (you need to enable installation from untrusted sources + reboot and clean dalvik cache).
    6
    New approach

    OK, the handler I updated in the 2 previous fixes didn't change from the previous version of "goproviders", so I hoped I could just use the same .class file, DEX it, stick into an APK, sign and be done with it. Unfortunately, it looks some other logic has changed, so now the same fix doesn't work anymore.
    So I started investigating the other end, that is, the watch. The major difference is now we have ROOT on the Gear, so why not use it?
    I quickly figured out that the offending process on the watch side was "w-contacts2-consumer". Apparently, if you just kill it, this stops Contact synchronisation only, while Contacts app on the watch remains fully functional. Unfortunately, this process is respawned every time Bluetooth connection is reestablished between the the phone and the watch.
    I was looking for "cron" for Tizen, hoping to put "pkill" into a recurring task that'd run every couple of minutes. Unfortunately, I couldn't find "cron" on the watch, and the version of busybox suggested in one of the threads on this forum doesn't have it precompiled.
    Then I thought: why the heck can't I just write a small app (command line) that would literally just do this:
    Code:
    while(1)
    {
    	system("pkill w-contacts2");
    	sleep(120);
    }
    After a bit of playing around with Tizen SDK, I managed to produce this executable (attached). You can put it into /sbin, making sure permissions are 755. One last thing is to make it run as a service:
    Code:
    systemd-run --unit=kill_contacts.nonsamsung --description="Automatically Kill Contacts Every 2 Minutes" /sbin/kill_contacts
    I don't think it'll survive a reboot though, I'll get it sorted later.

    Now battery consumption is back to normal, and contacts get synchronised every time the watch connects to the phone, which is more than fine with me.
    2
    To make kill_contacts permanent, you can create service so that it will automatically start on reboot

    create file named kill_contacts.service
    Code:
    [Unit]
    Description=Automatically Kill Contacts Every 2 Minutes
    
    [Service]
    ExecStart=/sbin/kill_contacts
    
    [Install]
    WantedBy=multi-user.target

    push this file to /etc/systemd/system
    change mod to 644
    enable service
    start service
    Code:
    c:\sdb root on
    c:\sdb push kill_contacts.service /etc/systemd/system
    c:\sdb shell
    sh-3.2#chmod 644 /etc/systemd/system/kill_contacts.service
    sh-3.2#systemctl enable /etc/systemd/system/kill_contacts.service
    sh-3.2#systemctl start kill_contacts.service

    check running service using :
    Code:
    journalctl -u kill_contacts.service
    1
    Could you please explain your "logic invocations, right now 1:64" change?
    In the fixed APK the logic is actually invoked 1 time out of 64 attempts. It makes its frequency about every 40 minutes instead of every 30 seconds.
    1
    thanks but I am not been able to uninstall the goproviders app. there is no option to uninstalled View attachment 2807827

    please advice if you can

    Sent from my SM-N900T using Tapatalk
    I use Super Manager for this sort of tasks. Look it up in Google Play store.

    Sent from my GT-I9505 using Tapatalk