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

Search This thread

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
Thanks a great deal. Worked perfectly. Took a bit of dexterity to get it installed before the Gear Manager rebooted the deleted funcitonality but this watch is now functional. I took the first one back secondary to literally being able to watch the battery meter drain in less than 2 hours. Now I am a day and a half and still at 50 percent. I have over 2k contacts and that clearly was the issue. I thank you sincerely for the help, Any thoughts as to why the email may not be up to date. I am very fearful of reloading manager and having my drain problems again. The email seems to lag considerably behind my Note 3.
THanks again. Wonderful help
Are you saying your email synchronisation broke since installing my APK? That's strange, because the change I made is supposed to affect only contact synchronisation, nothing else. That said, I can't really test it, because I have a non-Samsung device, so emails don't work for me at all on the Gear.

Also, your experience confirms that the problem addressed by this fix exists for Samsung users as well. I'd like to suggest you to raise an official support request with Samsung. Maybe they'll eventually come up with a proper fix. This is something I can't do because I'm using the Gear with a non-Samsung device.
 

dreamur

Member
Jul 19, 2005
22
0
mpogr:

I checked my log file and I am always getting this fail message during contact sync -

06-19 19:02:08.610 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.615 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.620 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.625 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.630 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.630 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.635 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.635 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.645 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.645 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.650 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.655 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
 

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
mpogr:

I checked my log file and I am always getting this fail message during contact sync -

06-19 19:02:08.610 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.615 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.620 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.625 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.630 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.630 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.635 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.635 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.645 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.645 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.650 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
06-19 19:02:08.655 721 781 E W-CONTACTS2-CONSUMER: ct-sap-svc-parser-contacts.c: __ct_sap_svc_get_default_number_str(998) > * Critical * contacts_record_get_str() Failed(-61)
Yep, that's the problem I had. Chances are my fix will work for you.
 

vikramdhani

Senior Member
Apr 2, 2006
1,869
63
Well seems like since I am on Samsung phone I am not able to install the apk :(

Sent from my SM-N900T using Tapatalk
 

dreamur

Member
Jul 19, 2005
22
0
Yep, that's the problem I had. Chances are my fix will work for you.

mpogr: I have installed your apk and so far I am losing 35% after 11 hours. Not sure if that is the normal consumption for gear 2 but surely is an improvement before I applied your fix. Thanks a lot and I will continue tracking my battery.

---------- Post added at 12:45 AM ---------- Previous post was at 12:40 AM ----------

Well seems like since I am on Samsung phone I am not able to install the apk :(

Sent from my SM-N900T using Tapatalk

I am using Note 2 (N7100) and here's what I did (note: I'm no techie so this may sound cumbersome):

1. I saved first the apk to a local folder
2. Next click on Settings > Application Manager > click on goproviders > click Unistall
3. Open local folder and click on the saved apk from mpogr
4. Follow through installation process
5. Reboot. Did not even wipe Delvik cache as I have no idea where it is!

HTH!
 

vikramdhani

Senior Member
Apr 2, 2006
1,869
63
mpogr: I have installed your apk and so far I am losing 35% after 11 hours. Not sure if that is the normal consumption for gear 2 but surely is an improvement before I applied your fix. Thanks a lot and I will continue tracking my battery.

---------- Post added at 12:45 AM ---------- Previous post was at 12:40 AM ----------



I am using Note 2 (N7100) and here's what I did (note: I'm no techie so this may sound cumbersome):

1. I saved first the apk to a local folder
2. Next click on Settings > Application Manager > click on goproviders > click Unistall
3. Open local folder and click on the saved apk from mpogr
4. Follow through installation process
5. Reboot. Did not even wipe Delvik cache as I have no idea where it is!

HTH!
thanks but I am not been able to uninstall the goproviders app. there is no option to uninstalled uploadfromtaptalk1403242386315.jpg

please advice if you can

Sent from my SM-N900T using Tapatalk
 

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
so I have downloaded the super manager can you guide me how can I use it to delete the go providers

Sent from my SM-N900T using Tapatalk
In Super Manager, go to File Manager and navigate to the directory where you put my APK. Tap on it. Super Manager will think it's installed (because, from the system perspective, it's identical to the original APK), so it'll present you with "uininstall" option. Do uninstall and then, immediately, "install". Since you're standing on my APK, it will install it. If you do it quickly enough, it should work.
 

dreamur

Member
Jul 19, 2005
22
0
Mpogr: I think your apk is preventing fitness for gear to sync with Note 2. I tried several times but the sync broke. I deleted it and let GM install its own and sync is workinf again.

Sent from my GT-N7100 using Tapatalk
 

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
Mpogr: I think your apk is preventing fitness for gear to sync with Note 2. I tried several times but the sync broke. I deleted it and let GM install its own and sync is workinf again.

Sent from my GT-N7100 using Tapatalk
What kind of sync are you talking about? Can you elaborate what exactly broke?
 

dreamur

Member
Jul 19, 2005
22
0
Finally found a fix! I deleted my google account from the phone and reinstalled including contacts. Now the log showed no contatc sync error and battery is draining 1% per hour. Will continue to monitor battery life.

Sent from my GT-N7100 using Tapatalk

---------- Post added at 06:47 AM ---------- Previous post was at 06:44 AM ----------

Btw, I upgraded GM to xxx401 and I am not using mpogr's apk. All stock.

Sent from my GT-N7100 using Tapatalk
 
Last edited:

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
Finally found a fix! I deleted my google account from the phone and reinstalled including contacts. Now the log showed no contatc sync error and battery is draining 1% per hour. Will continue to monitor battery life.

Sent from my GT-N7100 using Tapatalk

---------- Post added at 06:47 AM ---------- Previous post was at 06:44 AM ----------

Btw, I upgraded GM to xxx401 and I am not using mpogr's apk. All stock.

Sent from my GT-N7100 using Tapatalk
Nah, sorry mate, didn't work for me. Maybe it does fix stuff on Samsung devices, but it didn't help at all on my HTC M8. I even fully reset my device (flashed a different ROM), installed Samsung stuff first and then added Google and other accounts. As soon as contacts are populated, the crazy thrashing begins.
I also updated to the latest release of Gear Manager, same issue. I already updated the new "goproviders" with my fix, will post it here later.
 
Last edited:

kompis

Member
Jan 30, 2009
5
0
I installed the APK and it solved my battery problem.
Now, ear Manager is updated to version 2.1.14062401 and I have same problem again.

Would you please make the new version available. Thanks for great work.
 

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
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.
 

Attachments

  • kill_contacts.7z
    4.8 KB · Views: 248
Last edited:

enko420

Senior Member
Mar 28, 2011
78
2
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.

Please continue your amazing work. my battery life is so bad I dont even use the watch.

also, if you could explain in a little more detail on how to do your new fix that would be great, im trying to do sdb shell cp kill_contacts.7z /sbin and I get cp: cannot stat `kill_contacts.7z': No such file or directory

but the file is in the directory im in because i used tab completion for the name
 
Last edited:

kompis

Member
Jan 30, 2009
5
0
Please continue your amazing work. my battery life is so bad I dont even use the watch.

also, if you could explain in a little more detail on how to do your new fix that would be great, im trying to do sdb shell cp kill_contacts.7z /sbin and I get cp: cannot stat `kill_contacts.7z': No such file or directory

but the file is in the directory im in because i used tab completion for the name

In setting for contacts in Gear Manager, I changed to Favorits and it helps and is much better than having all contacts to sync.
 

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
In setting for contacts in Gear Manager, I changed to Favorits and it helps and is much better than having all contacts to sync.
Tried that in the past of my device (Sense 6 HTC One M8) and it didn't help at all. Apparently, the phone still sends all the contacts to the Gear, this setting just changes what's displayed on it when you open the Contacts app.
 
Last edited:

mpogr

Senior Member
Jan 16, 2008
185
63
Melbourne
Please continue your amazing work. my battery life is so bad I dont even use the watch.

also, if you could explain in a little more detail on how to do your new fix that would be great, im trying to do sdb shell cp kill_contacts.7z /sbin and I get cp: cannot stat `kill_contacts.7z': No such file or directory

but the file is in the directory im in because i used tab completion for the name
OK, I think I need to publish a bit more detailed tutorial on how to use this app.
First of all, the 7z file is an archive, the actual executable is packed inside (use 7zip software on your PC to extract). You can then use sdb to push the file to the Gear. Once within the Gear shell (e.g. using "sdb shell"), if you did "sdb root on" beforehand, you can change permissions ("chmod 755 kill_contacts") and copy the file to /sbin ("cp kill_contacts /sbin"). Then you can run it as a service ("systemd-run --unit=kill_contacts.nonsamsung --description="Automatically Kill Contacts Every 2 Minutes" /sbin/kill_contacts"), but it will still not survive the Gear reboot. I need to figure out how to create a proper service configuration file, so it gets started automatically upon reboot. Will update on that later.
 

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