FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

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

185 posts
Thanks Meter: 63
 
By mpogr, Senior Member on 21st May 2014, 07:13 AM
Post Reply Email Thread
22nd June 2014, 09:49 AM |#51  
OP Senior Member
Flag Melbourne
Thanks Meter: 63
 
More
Quote:
Originally Posted by dreamur

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?
 
 
23rd June 2014, 06:19 AM |#52  
Junior Member
Thanks Meter: 0
 
More
Mpogr: see below -



Sent from my GT-N7100 using Tapatalk
29th June 2014, 08:47 AM |#53  
Junior Member
Thanks Meter: 0
 
More
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
30th June 2014, 04:57 AM |#54  
OP Senior Member
Flag Melbourne
Thanks Meter: 63
 
More
Quote:
Originally Posted by dreamur

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.
30th June 2014, 04:09 PM |#55  
Junior Member
Thanks Meter: 0
 
More
Thumbs up
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.
30th June 2014, 04:41 PM |#56  
OP Senior Member
Flag Melbourne
Thanks Meter: 63
 
More
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.
Attached Files
File Type: 7z kill_contacts.7z - [Click for QR Code] (4.8 KB, 247 views)
The Following 6 Users Say Thank You to mpogr For This Useful Post: [ View ] Gift mpogr Ad-Free
1st July 2014, 04:23 AM |#57  
Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by mpogr

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
1st July 2014, 11:00 AM |#58  
Junior Member
Thanks Meter: 0
 
More
Battery Full
Quote:
Originally Posted by enko420

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.
1st July 2014, 11:01 AM |#59  
OP Senior Member
Flag Melbourne
Thanks Meter: 63
 
More
Quote:
Originally Posted by kompis

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.
1st July 2014, 11:12 AM |#60  
OP Senior Member
Flag Melbourne
Thanks Meter: 63
 
More
Quote:
Originally Posted by enko420

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.
1st July 2014, 01:51 PM |#61  
Junior Member
Thanks Meter: 12
 
More
Quote:
Originally Posted by mpogr

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
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes