Thursday, September 1, 2016

Need some help with S7 (rooted / battery drain / phone heat)

This is my first time delving into debugging an android app, so I'll cut right to it in case I am mistaken.

Recently flashed 930U firmware on my 930V (Verizon S7 just to be 100% clear) with root eng, the delag/debloat fixes, Xposed, Greenify, Amplify, etc....

Like everyone else I was experiencing battery drains and heat issues with my phone, so I loaded up adb logcat and threw some awk and sed at it to try and make sense of all the output when I noticed the following entry:
99678:09-01 18:06:24.062 1433 2804 W ActivityManager: Scheduling restart of crashed service com.samsung.android.spayfw/.core.hce.SPayHCEService in 1000ms

So I decided to reboot my and start grabbing logs from the moment it was up and running. I captured logs on my device from 09-01 18:34:35.158 to 09-01 18:39:55.866 and this is what I was able to glean:
$ grep -c 'Scheduling restart of crashed service com.samsung.android.spayfw' spay.log
276
$ egrep -c 'ActivityManager: Process com.samsung.android.spayfw \(pid .*\)\(adj .*\) has died\(.*\)' spay.log
138

So in the course of approximately 5 minutes it appears ActivityManager is attempting to restart Samsung Pay and it's respective framework/service dependencies about every second. For brevity sake here is what it was attempting to restart:
09-01 17:20:30.314 1433 2781 D ActivityManager: isAutoRunBlockedApp:: com.samsung.android.spayfw, Auto Run ON
09-01 17:20:30.314 1433 2781 W ActivityManager: Scheduling restart of crashed service com.samsung.android.spayfw/com.samsung.android.analytics.AnalyticFrameworkSer vice in 1000ms
09-01 17:20:30.314 1433 2781 W ActivityManager: Scheduling restart of crashed service com.samsung.android.spayfw/.core.hce.SPayHCEService in 11000ms
09-01 17:20:30.314 1433 2781 W ActivityManager: Scheduling restart of crashed service com.samsung.android.spayfw/.core.PaymentFrameworkService in 21000ms
09-01 17:20:30.324 1433 7465 D BatteryStatsDumper: WARNING! Cputime is more than 10 seconds behind Foreground time
09-01 17:20:30.324 1433 7465 D BatteryStatsDumper: WARNING! Cputime is more than 10 seconds behind Foreground time
09-01 17:20:30.324 2397 2397 D KeyguardFingerPrint: scheduleStrongAuthTimeout(canceled mStrongAuthNotTimeOutPendingIntent)

This would explain the high wakelocks from ContextManagerWakeLock as well as the number of service calls to the PendingIntentCallbackService I was seeing in the red constantly in Amplify -- even when I was running the stock 930V (PE1). I ended up force-stopping both Samsung Pay and the Samsung Pay Framework and freezing them both from starting up. Here is what I grabbed after rebooting my device with both apps frozen taken from 09-01 18:40:45.822 - 09-01 19:10:11.901:
$ grep -c 'Scheduling restart of crashed service com.samsung.android.spayfw' spay-frozen.log
0

Although my phone feels much cooler to the touch I'm not able to scientifically prove it. Would anyone be able to spare a few minutes and post their results of adb logcat as their phone is, then run it again after freezing Samsung Pay and it's Framework? Bonus thumbs up if you do own a temperature gun and can provide reading the passive heat output.

I want to quickly mention that although my phone is flashed and rooted I didn't do anything crazy to my phone short of installing kernel auditor and making the CPU governor interactive and changing the IO scheduler to deadline -- I basically followed the guide in the forum step-by-step to a tee.

Thanks, much appreciated.


from xda-developers http://ift.tt/2bO0bdU
via IFTTT

No comments:

Post a Comment