Very simple "1%" One Percent Battery Hack! - Defy General

Hi Folks,
I'm not sure whether this is the right place, but I just wanted to share this information:
There is a very simple way of forcing all Apks of a rooted Defy with init.d support to read battery stats with 1% accuracy. Just add this script in /system/etc/init.d/ and name it something like '12onepercentbattery':
Code:
#!/system/bin/sh
# fake access to 10% battery status to 1%
busybox mount -o bind /sys/class/power_supply/battery/charge_counter /sys/class/power_supply/battery/capacity
I basically tested this on a 4.5.1-134_DFP-74 modded by Greenbreadmod_1.1 on a green lensed Defy.
Explanation: in sysfs /sys/class/power_supply/battery directory the kernel provides a 1% charge counter by the file 'charge_counter', but the Android framework only reads 'capacity' which only has 10% accuracy.
The script establishes a file system redirection from 'capacity' to 'charge_counter', so all Android apks will read the more accurate charge counter instead
Hope this helps someone out there...

Can someone please move it to Android Development, because it solves threads like http://forum.xda-developers.com/showthread.php?t=950888 ? (I can't because I'm a newbie here).

J_C_D said:
Can someone please move it to Android Development, because it solves threads like http://forum.xda-developers.com/showthread.php?t=950888 ? (I can't because I'm a newbie here).
Click to expand...
Click to collapse
It is great If It works. Because many people facing battery drop issues. i am trying it today and report later. Its more good if u include details of how to make an int.d file, what are the required permissions for the file etc in your first post
Thanks

pradeeppk said:
It is great If It works. Because many people facing battery drop issues. i am trying it today and report later. Its more good if u include details of how to make an int.d file, what are the required permissions for the file etc in your first post
Thanks
Click to expand...
Click to collapse
The hack I present here e.g. fixes bad accuracy of the battery level display in " menu > settings > about phone > status " and also increases resolution of the stock battery usage graph. In general, it forces ALL Apps to use the 1% accuracy reading by very simple means.
Please note that this does not change the way the battery charge level is displayed in the notification bar on the home screen. SystemUI.apk is responsible for the way this information is presented there!
I also believe that battery drops are not related to this. See here http://forum.xda-developers.com/showthread.php?t=1778492 instead!
Note: Support for running scripts at boot in etc/init.d can be achieved in various ways. For example by using 2ndInit (like I do): http://forum.xda-developers.com/showthread.php?t=1032212. Alternatively see here (I did not test this): http://forum.xda-developers.com/showthread.php?t=1431134
Set permissions of the '12onepercentbattery' script to 755 and chown to 0:0.

I have battery drop issues but I don't think this helps to solve the issue. I see the battery bar 1% accurate and I still have the drops from 45->20 and from 19->4. This means almost half of my battery is dead...

zipike said:
I have battery drop issues but I don't think this helps to solve the issue. I see the battery bar 1% accurate and I still have the drops from 45->20 and from 19->4. This means almost half of my battery is dead...
Click to expand...
Click to collapse
Are you sure the drops are not related to http://forum.xda-developers.com/showthread.php?t=1778492 (see my previous post)?

Does this work on the Defy XT with Republic Wireless? I hate how it is only at 10% increments.

GeckoPower said:
Does this work on the Defy XT with Republic Wireless? I hate how it is only at 10% increments.
Click to expand...
Click to collapse
only tested on Defy(+) so far, but I guess that it can also work on Defy XT.

xt687 atrix ics 4.0.4
Working on xt687 atrix ics 4.0.4

Related

mssmison did it!: CyanogenMod 5.07 test 3. for kaiser!

wifi working with patch.
http://forum.xda-developers.com/attachment.php?attachmentid=325161&d=1273647492
http://forum.xda-developers.com/showthread.php?t=679680
could someone resize it to 240x320 please? cant wait to try this
Heads up! New Kaiser Wifi update: http://forum.xda-developers.com/showpost.php?p=6456191&postcount=33
Old one replaced build.prop with wrong version. Reinstall and use the new Wifi update.
Also to get rid of android-rebooting-problems with GPS Test application do the following:
1. Start terminal emulator
2. su
3. cd system/lib/hw
4. rwsystem
5. rm sensors.msm7k.so
6. rosystem
7. exit
8. exit
9. restart phone
So how is it? I'm too lazy to install it.
Dukenukemx said:
So how is it? I'm too lazy to install it.
Click to expand...
Click to collapse
Seems like a really nice build. I'm using 320x428 with 144 dpi. A bit slow because I'm currently not running in NAND but I would expect it to perform quite well once I go back to running NAND again.
I haven't tested it very much yet as I'm doing some experiments in WinMO at the moment.
just tried
hey
i just downloaded this and i have to say im impressed about this.
as i love the eclair design and everything and the donut speed i have to say this is impressing because it is FAST! not as fast as donut but pretty much the same. that could be due to the 500 mHz OC but i just like that build.
just needs to be optimized a bit, maybe a few apps like astro and others
and as the developer has a new phone we need a new one.
But i have to say its awesome!
i love it already and just tried it for 9 min.
just the OC needs to be removed i noticed right now and is there any way to set another value for the screen sensebility because quiet often it does not react on a touch.
so keep updating this!
nick
nice rom but it chews through battery like crazy. With a full charge battery will drop from 99 to 75(battery fix removed OC and set 1400 value) with just a 10min phone call and a couple txts. I think what we need is a new kernel highly optimized for battery life using the latest patches. Judging from the name alone of the kernel its running right now 2.6.25-01051-gc362ac-dirty and the fact that 2.6.25 was released in jul 2008 i think theres room for tons for improvement.
Does anyone know how to adjust the microphone gain? my friends complain they cant hear me..
The wifi scan interval is set to 15 seconds by default in this release. That will have a negative effect on battery life if you are out of range of a known network and have wifi enabled. I'll put together an update to change this when time allows. I use 120 seconds myself.
kallt_kaffe said:
The wifi scan interval is set to 15 seconds by default in this release. That will have a negative effect on battery life if you are out of range of a known network and have wifi enabled. I'll put together an update to change this when time allows. I use 120 seconds myself.
Click to expand...
Click to collapse
Thanks to update.
It working good on Polaris.
Also i change interval to 180 and density to 120 in .prop
Here's an update that changes the wifi scan delay to 120 seconds and also (not tested yet) changes the model name from Vogue to Kaiser.
i'm still trying to figure out if it's possible, somehow, to flash an update.zip file (to be able to use the cyanogenmod skins) with the nomorootfs we're using, instead of converting the skins to metamorph format
does anyone know if it's possible or how to do it?
Can't get wifi to work with updates, which one should I need?
kallt_kaffe's works for me. If something isn't working like it should, power off the phone and remove the battery. Then hold down the power button to remove any remaining power left. Place batter back in and try again.
Also, make sure to always fix permissions when you apply updates, even for wifi.
Dukenukemx said:
kallt_kaffe's works for me. If something isn't working like it should, power off the phone and remove the battery. Then hold down the power button to remove any remaining power left. Place batter back in and try again.
Also, make sure to always fix permissions when you apply updates, even for wifi.
Click to expand...
Click to collapse
edit: how stupid can I be? I've bought another phone and forgot to add the mac adress.
Certainly think mod needs work. So far the battery meter is off, and all this time I thought it drained less power. A lot of pop ups to force close apps. A lot of apps are running that I don't use.
mssmison didn't say he was going to put any more effort into it either. Hopefully, someone will pick it up.
Dukenukemx said:
Certainly think mod needs work. So far the battery meter is off, and all this time I thought it drained less power.
Click to expand...
Click to collapse
Try deleting /data/system/batterystats.bin. That usually helps when the batterymeter has gone bad.
A lot of pop ups to force close apps. A lot of apps are running that I don't use.
Click to expand...
Click to collapse
Have you removed or renamed /lib/modules/hw/sensors.msm7k.so? After I removed that it runs very stable for me.
kallt_kaffe how do you do it?
I'm new to the androidinstall.tar method. I'm tyring to run from haret but it seems impossible.
You said you where experimenting with something in winmo, so that implies you're using haret? Are you running from haret?
When I try, Polymod, and Mssmission they don't show an install option, when I try myn and incubus I get it installed but I get no sound. It was actually your gps kernel that let me get things installed all other kernels i tried had non-functional dpads within the installer environment. Also, trying another kernel once installed didn't fix the sound issue.
Anyhow just let me know if you're using Haret. I wonder whats up with the sound and missing install option. I tried the install two different ways one with a 2gb fat32 partition, and then another attempt using three primary partitions 1.3gb fat32, 300mb ext, 300mb ext. All installers then would give me options beside's fat, but not all intallers would have an install option.. I'm using radio 1.71.09.01.eMo, model: kais100, os: wm6.5 (shifu v.3)
kallt_kaffe said:
Have you removed or renamed /lib/modules/hw/sensors.msm7k.so? After I removed that it runs very stable for me.
Click to expand...
Click to collapse
I try start Skyforce game, but it forceclose.
It can work after i added "sensors.sapphire.so" into /lib/modules/hw/
I've installed the cyanogenMod updater from the marketplace, but it can only find older versions, no experimental versions, whatever option I set in the program.Anyone?
Dukenukemx said:
Certainly think mod needs work. So far the battery meter is off, and all this time I thought it drained less power. A lot of pop ups to force close apps. A lot of apps are running that I don't use.
Click to expand...
Click to collapse
battery life has been fantastic for me on this build...
although I reverted back to 400mhz and got rid of compcache.
I am sure that OCing to 500 by default is draining the battery faster.
I would rather a usable phone than a fast one...(although it still seems very fast to me)

[ROM] [JVO] All in one tweak

If you experiencing battery drain problems in new JVO release then this package is for you!
Package includes:
- turned off debug infos in most framework modules
- FM Radio is turned off by default instead of stock always loaded!
- optimized timings for light animations and refresh rate of various things
- new broadcom wifi/bt module from Nexus S
- updated flash library from Galaxy S2
- new bootlogo and bootsound in format .ogg instead of .wav from Galaxy S2
- custom volume level notification sounds feature instead of simple "beep" ported from HTC
- new media_profiles.xml with redefined values for even better video recording/playback and sound fidelity
After apply clean battery stat infos in recovery charge your battery to the full and watch "Android System" process in battery usage menu after few hours
If you use custom ROM with other lockscreen than stock Glass or with extended power menu you will LOOSE THESE FEATURES!
Download link (FIXED VERSION):
http://www.multiupload.com/N0VLGNQHLU
Apply via recovery!
Can u clarify what features get lost if using a different lockscreen
fatjoez said:
Can u clarify what features get lost if using a different lockscreen
Click to expand...
Click to collapse
You'll simply reverse lockscreen to the stock one (TouchWiz Glass).
Lukiqq? You're from samdroid.net? Spica user ?
Sent from my GT-I9000 using Tapatalk
not working. installation always aborted.
Looks nice, will try this one out !
bududroid said:
Lukiqq? You're from samdroid.net? Spica user ?
Sent from my GT-I9000 using Tapatalk
Click to expand...
Click to collapse
Yes I'm. w8, will find out why it aborts.
Sent from my GT-I9000 using XDA Premium App
Brotuck said:
Looks nice, will try this one out !
Click to expand...
Click to collapse
So what's your verdict, "Yea" or "Nay"?...(and how does it get along with Damien's Beta 7? Do they play well together?)
eternal-intent said:
So what's your verdict, "Yea" or "Nay"?...(and how does it get along with Damien's Beta 7? Do they play well together?)
Click to expand...
Click to collapse
If such ROM is based on JVO then why not
eternal-intent said:
So what's your verdict, "Yea" or "Nay"?...(and how does it get along with Damien's Beta 7? Do they play well together?)
Click to expand...
Click to collapse
I had to remove the modified framework files and the wifi driver i already got.
But the other "tweaks" i am testing right now.
It is for batterylife so i am able to tell something in a few days.
But the integration with damian's kernel works great until now.
Lukiqq said:
If such ROM is based on JVO then why not
Click to expand...
Click to collapse
GingerMod is......
Brotuck said:
I had to remove the modified framework files and the wifi driver i already got.
But the other "tweaks" i am testing right now.
It is for batterylife so i am able to tell something in a few days.
But the integration with damian's kernel works great until now.
GingerMod is......
Click to expand...
Click to collapse
Modified framework files and wifi module are critical to battery life. Other things in package are just eye candy
Lukiqq said:
Modified framework files and wifi module are critical to battery life. Other things in package are just eye candy
Click to expand...
Click to collapse
Yes i would think so, but the tricky part of it is that almost everybody uses his / her own framework files.
Can/are you willing to modify mine with the tweaks ?
Sure i can decompile the mods you made and compare them to my framework, but it's nicer to ask you.
Brotuck said:
Yes i would think so, but the tricky part of it is that almost everybody uses his / her own framework files.
Can/are you willing to modify mine with the tweaks ?
Sure i can decompile the mods you made and compare them to my framework, but it's nicer to ask you.
Click to expand...
Click to collapse
I would like to but I don't have enough time for such things :/ Try it tell me how it works after few hours. If you like it I'll modify some popular frameworks.
Lukiqq said:
Modified framework files and wifi module are critical to battery life. Other things in package are just eye candy
Click to expand...
Click to collapse
framework might work be but wifi even compiled from latest sources gives nothing in exchange
interesting aproach anyways
$omator said:
framework might work be but wifi even compiled from latest sources gives nothing in exchange
interesting aproach anyways
Click to expand...
Click to collapse
I'm not sure about wifi, but total time about 8h, 3h with wifi, web browsing, xda app etc. gave me results:
LCD display - 60%
Wi-Fi - 9%
Standby - 8%
Android System - 2% + 3% (before about 20%)
And the rest.
mostly placebo mate ;]
i got same aos % usage wo a single tweak
well lies, i have *%load of tweaks but only two of them are aimed at bat. and those are not changing much tbh.
one makes scan for new ap every 2min not 15sec and second makes wifi go to sleep on screen off after 10 seconds at place of 15minutes set by default
battery likes to drain a bit after flash or even after a via recovery file update but after cycle or two it goes back into normal -0 -1 -2% of bat during night sleep. thats ok for me ;]
but keep up the good work as people like to say ;]
$omator said:
mostly placebo mate ;]
i got same aos % usage wo a single tweak
well lies, i have *%load of tweaks but only two of them are aimed at bat. and those are not changing much tbh.
one makes scan for new ap every 2min not 15sec and second makes wifi go to sleep on screen off after 10 seconds at place of 15minutes set by default
battery likes to drain a bit after flash or even after a via recovery file update but after cycle or two it goes back into normal -0 -1 -2% of bat during night sleep. thats ok for me ;]
but keep up the good work as people like to say ;]
Click to expand...
Click to collapse
I'm not forcing anyone to use this mod. Compare adb logcat with modified and original ones, you'll see the different. Stock framework throw so much useless garbage...
just want to point those:
- few random tweaks not bat related here and there - curiosity
- uncertain benefit of disabled logcat (personaly i think dimming the screen a bit at options or setting cpu to conservative would make much more difference for bat)
- all previous lockscreens/power menu/overscroll glow and so on modifications stop working
and at the end logcat is usefull ;] but ofc unnoticable for every day user
as said previous well done
could you please publish the source/list of changes/diff file for framework? can't life without a number of mods but improved battery life would be quite nice as well...
Installation aborted...

[Q] [REQ] Gsiff_Daemon Runaway causing severe battery drain, possible fixes?

This is a formal request for any developer capable of doing so, to take a look at this problem.
There is a growing number of users noticing a severe battery drain and hot phone at times, caused by the runaway process; (gsiff_daemon)
The threads discussing this as of now are scattered and unorganized, and with the number of users experiencing this problem, it would be excellent to have one central thread for everyone to work together on this.
Here's what we know so far:
The problem occurs for most on a hot-boot, and can be triggered by forcing a hot-boot.
It is not carrier specific, At&t, Tmobile, and Verizon users have all confirmed this problem.
The only reliable way to rid of this at this time, is a reboot, although some have had luck ending the gsiff_daemon process, or renaming the file, although this requires further testing.
Here are a few threads that have been started on the issue, with some good reading:
http://forum.xda-developers.com/showthread.php?p=30074303#post30074303
http://forum.xda-developers.com/showthread.php?t=1800812&page=3
Anyone capable of looking into this, and know what they are looking at enough to determine the cause, will be eternally thanked, and i will personally donate a case of beer(or soda) to whoever fixes it.
Thanks!
is this Gsiff_Daemon issue only for rooted users? I just got it too...after rooting...I never had this issue since june 30, since I've had the phone
I just renamed the file.. problem went away. it doesn't run anymore.. and haven't had any negative effects that I can tell....
do any of you guys have the "increase volume in pocket" setting on in phone-->settings?
also do any of you have motion settings enabled and/or autorotation on?
Seems it has to do with the gyro issue
also are you guys rooted or non-rooted?
Crapppp
Jellybean didn’t solve it. Gsiff_daemon just popped up for me. Just renamed it AGAIN.
Hopefully it won't pop up again
Sent from my SPH-L710 using xda app-developers app
tjb433 said:
The problem occurs for most on a hot-boot, and can be triggered by forcing a hot-boot.
Click to expand...
Click to collapse
FULL REPORT
HARDWARE and OS
I747m, Stock LH1 4.0.4, Rooted
SOFTWARE
SetCpu 384-1512mhz OnDemand
System Tuner Pro 2.5.5 (STP)
Rebooter 1.6.0, Author: DAVIDJR621
BetterBatteryStats 1.11.0.0
Battery: /menu/settings/battery/
NORMAL OPERATION
- Reboot normally until system settles in fully loaded and in idle
- check SetCpu. Scaling should hover at 384mhz and with occasional spikes usually up to 1512.
- check BetterBatteryStats, switch top drop down selection to "Process" and secondary selection to "Since Unplugged". "gsiff_daemon" should NOT be listed there
REPRODUCING THE ISSUE
- Open Rebooter app and launch the HOT REBOOT option and wait for the system to reboot and settle.
- Open SetCpu and you should notice that the scaler will be at 1512mhz >90% of the time. IF NOT...repeat the hot reboot step.
- Open BetterBatteryStats as you did above and notice that "gsiff_daemon" is now listed in there.
- Open Battery info and notice that ANDROID SYSTEM is at the top of the list usually around 60%. Now STARE at Android system and click the refresh button...and notice for a brief Milli Second you will see,,,,"gsiff_daemon". Not sure about this but interesting.
- Open STP, launch it's built in Task Manager, make sure you allow viewing of SYSTEM and KERNEL. (at the bottom you can click on their ICONS) Scroll down near the bottom third of the list where it shows KERNEL elements, and you will see /system/bin/gsiff_daemon. Click on /system/bin/gsiff_daemon. Under CPU Consumption....you can watch the % climb.
- at this point, if you KILL /system/bin/gsiff_daemon, the CPU will settle back down to 384mhz and the statistics of cpu usage will not climb/grow.
WORKAROUNDS
- kill /system/bin/gsiff_daemon/ after a hot reboot or reboot your S3
- with a Root File Explorer, rename your /system/bin/gsiff_daemon to /system/bin/gsiff_daemonBAK and reboot normally. This should prevent the issue but it is not known whether it is adversely affecting any system components.
- /system/bin/gsiff_daemon/ should not show up in STP if you have renamed the file.
themadproducer said:
FULL REPORT
HARDWARE and OS
I747m, Stock LH1 4.0.4, Rooted
SOFTWARE
SetCpu 384-1512mhz OnDemand
System Tuner Pro 2.5.5 (STP)
Rebooter 1.6.0, Author: DAVIDJR621
BetterBatteryStats 1.11.0.0
Battery: /menu/settings/battery/
NORMAL OPERATION
- Reboot normally until system settles in fully loaded and in idle
- check SetCpu. Scaling should hover at 384mhz and with occasional spikes usually up to 1512.
- check BetterBatteryStats, switch top drop down selection to "Process" and secondary selection to "Since Unplugged". "gsiff_daemon" should NOT be listed there
REPRODUCING THE ISSUE
- Open Rebooter app and launch the HOT REBOOT option and wait for the system to reboot and settle.
- Open SetCpu and you should notice that the scaler will be at 1512mhz >90% of the time. IF NOT...repeat the hot reboot step.
- Open BetterBatteryStats as you did above and notice that "gsiff_daemon" is now listed in there.
- Open Battery info and notice that ANDROID SYSTEM is at the top of the list usually around 60%. Now STARE at Android system and click the refresh button...and notice for a brief Milli Second you will see,,,,"gsiff_daemon". Not sure about this but interesting.
- Open STP, launch it's built in Task Manager, make sure you allow viewing of SYSTEM and KERNEL. (at the bottom you can click on their ICONS) Scroll down near the bottom third of the list where it shows KERNEL elements, and you will see /system/bin/gsiff_daemon. Click on /system/bin/gsiff_daemon. Under CPU Consumption....you can watch the % climb.
- at this point, if you KILL /system/bin/gsiff_daemon, the CPU will settle back down to 384mhz and the statistics of cpu usage will not climb/grow.
WORKAROUNDS
- kill /system/bin/gsiff_daemon/ after a hot reboot or reboot your S3
- with a Root File Explorer, rename your /system/bin/gsiff_daemon to /system/bin/gsiff_daemonBAK and reboot normally. This should prevent the issue but it is not known whether it is adversely affecting any system components.
- /system/bin/gsiff_daemon/ should not show up in STP if you have renamed the file.
Click to expand...
Click to collapse
isn'ttthere a period before bak?
eyecon82 said:
Crapppp
Jellybean didn’t solve it. Gsiff_daemon just popped up for me. Just renamed it AGAIN.
Sent from my SPH-L710 using xda app-developers app
Click to expand...
Click to collapse
What JB ROM are you using? I had the issue when I was running stock, rooted, with the Sammy KT747 kernel, but after flashing CM10, landing the AOKP KT747 Kernel, and running Pimp My ROM on it, I've never seen it crop back up. (knocking on wood here).
78c10 said:
What JB ROM are you using? I had the issue when I was running stock, rooted, with the Sammy KT747 kernel, but after flashing CM10, landing the AOKP KT747 Kernel, and running Pimp My ROM on it, I've never seen it crop back up. (knocking on wood here).
Click to expand...
Click to collapse
I am using rooted stock rom
This is only an issue with touchwiz, so you won't see it on cm10
Sent from my SPH-L710 using xda app-developers app
eyecon82 said:
isn'ttthere a period before bak?
Click to expand...
Click to collapse
NOPE!
Specifically though, I used uppercase BAK....doubt that makes a difference.
themadproducer said:
NOPE!
Specifically though, I used uppercase BAK....doubt that makes a difference.
Click to expand...
Click to collapse
What is the difference of having or not having a period?
Upper casing probably doesn't make a difference though
eyecon82 said:
What is the difference of having or not having a period?
Upper casing probably doesn't make a difference though
Click to expand...
Click to collapse
Eyecon82...really...don't worry about the period. It's irrelevant.
So long is the file is renamed, it wont be triggered/found by whatever normally triggers/finds it.
http://pastebin.com/siAGdxp4
It looks like it's sending gyroscope and accelerometer data to the locapi, (location application interface) and there's some reference to sns there as well.
So, why would a location app need accelerometer data? Or maybe the question is why would someone who's getting my location data need my accelerometer data, too? What's in it for Samsung that they would bother developing it and roll it out? Why wasn't it there in June?
Ok, having a little fun speculating, but perhaps blackboxing for car accidents? Your phone log is the first thing they check and see if you were texting, or whatever, right before impact. Oh, wait, if they have a location-accessing app, they don't need your locally stored log. Nah, probably something technical with the compass....
Janis;34345281It looks like it's sending gyroscope and accelerometer data to the locapi said:
Yes, I don't have any evidence to support this other than what just happened on my phone. I was out for about a 15 minute walk and I got back. Phone was hot and i noticed a severe drop in battery. I remember reading that Goog Now tabulates how far you walked/jogged monthly or something. Maybe this process is capturing that motion/data for it? Just my speculation. No evidence. I think I'll try renaming the file as I dont really GAF about how far Goog thinks I've walked.
Click to expand...
Click to collapse
I am having this issue. I've just rooted my phone and the file seems to no longer be in /system/bin and running a search for it the file isn't found. Yet it's completely killing my battery. It's quite annoying to have to monitor battery use and kill this off or restart the phone so renaming it would be nice to disable it fully but I can't seem to find the file
harryshepard said:
I am having this issue. I've just rooted my phone and the file seems to no longer be in /system/bin and running a search for it the file isn't found. Yet it's completely killing my battery. It's quite annoying to have to monitor battery use and kill this off or restart the phone so renaming it would be nice to disable it fully but I can't seem to find the file
Click to expand...
Click to collapse
You sure it's gsiff_daemon that's causing the issue? Have you renaming qosmgr in system/bin?
Sent from my SGH-I747 using Tapatalk 2
Sorry, didn't have reply notification. Yes I am sure. I Google'd it after seeing it using 30% of my battery with about 50s use. I will try renaming qosmgr but how do you diagnose which process is actually doing it? This time battery doesn't specifically say gsiff_daemon but not sure if that's where I saw it before.
I have attached my battery use screenshot. Game and screen a the top, fair enough. But 13 hours on battery and 75% drained, 6% of which is 7 seconds of the gpsd process. It's a little odd
Sent from my GT-I9300 using xda app-developers app
fix yet ? mines doing same
gsiff_daemon
Mine has been doing the same ever since the kitkat update.
I am running an unrooted EE note 3 (n9005) in the UK.
Gsiff_daemon is constantly my top battery drainer according to the battery app (35% - 47%).
I have not been able to find any consistent method to either activate this rogue app or to get rid of it.
Is there any solution without rooting it as I understand that renaming it should do the trick?
+1 from me about this problem.
Uprooted, up to date Note 3.
No solution so far, will try turning off WiFi when screen off and auto rotation... Let's see...
Hopefully it'll be fixed soon or in next version. It's a shame, though, my Windows phone pals are teasing me!
Best regards,
Doncho

[Tweaks] Lightning Zap for Ntiro from Team Fah-Q!

Please read the entire OP
DISCLAIMER:
I am NOT responsible for anything YOU do that causes damage to your device. Follow the instructions to TEE and there won't be any problems.
Your ROM/kernel MUST support init.d scripts
How do you know if your kernel supports init.d scripts? There are a number of ways to check, but the best way is to ask the developer of that kernel. You can also check in the ROMofCHOICE.zip by navigating to /system/etc/init.d. If the original .zip of your ROM has an init.d folder with scripts in it, then you are good to go.
What is Lightning Zap!?
Lightning Zap! is a set of tweaks that I have written and compiled to make the LG Nitro Lightning fast, super smooth, and contain excellent battery life!
I have used these same tweaks on devices like the Samsung SGS4G, Samsung Captivate, Samsung Skyrocket, Samsung Blaze, Sony S Tab. I have also assisted others with adding Lightning Zap! to their devices such as the Nexus S and various HTC devices. They have been proven time and time again to add amazing improvements to all devices.
What's the difference in the various version I find of Lightning Zap! when I google it?
Simply put, all devices are setup, formatted and created differently.
What's included in Lightning Zap!:
Battery tweaks for awesome battery life
Governor tweaks for amazing speed and performance without sacrificing battery life
Kernel tweaks
Memory and Ram tweaks
Cleaner tweaks
Build.prop tweaks
Internet speed tweaks
and MORE!
I used ParanoidAndroid ROM to test these tweaks. Although I have used the tweaks from froyo to jellybean, the the mounts, on some devices, are sometimes different as well as some kernel differences on each android version. If you are using a different ROM, feel free to test and post your results in this thread.
Install instructions:
Make a backup and then backup your data with titanium or something alike
***Download link is at the bottom of this post***
Download Lightning Zap! v1.zip to pc (Can be downloaded to sdcard also)
Place Lightning Zap! v1.zip on sdcard
Flash
Allow phone to set for 10 minutes after reboot
Enjoy
Confirmed ROMs & kernels
This space is going to be used to track the ROMs and kernels people have tested and confirmed Lightning Zap! installs and functions correctly.
Gningerbread:
ICS:
Jellybean:
ParanoidAndroid
CM10
Miui 2.9.27
CodeNameAndroid
I'm also adding some helpful tips on how to test Lightning Zap! to get the most positive results.
Testing option 1:
After flashing Lightning Zap!, download SManager from the market, navigate to /system/etc/init.d
Press menu key/more/advanced options/mount /system as rw and click ok
Press on each script individually then a ui will come up
In the ui, tap the icon at the top that is a skull and cross bones (has SU under it) then tap run.
An output will be displayed. Note the output for errors and report errors to me. Please use pastebin.com to upload your outputs
Testing option 2:
Plug phone into pc, open a terminal/command prompt and type each command individually
adb shell
su
cd /system.etc.init.d
Now type the file name of each tweak individually, eg:
01governor
Now note each output that is displayed and look for errors
If errors exist, report errors to me. Please use pastebin.com.
There may be some errors that exist that are not true errors. I know what they are, but haven't noted them yet.
If you have failures, please get them to me as soon as you can so I can fix it
FYI, since I installed Lightning Zap! on my wife's Nitro, she is at 100% with light use at 4.5 hours... I know it is not a normal day for her as she uses her phone much more than what she is using it today, but this is just to give users an idea of how great my scripts are. Typically on my S2 Skyrocket I get about 30 hours under moderate use (many texts from my wife, 5-10 calls, 30-45 minutes of web browsing, etc.) on a single charge...
More improvements and tweaks
The governor tweak is set pretty high for performance. If you find yourself needing battery life over performance, you can make some minor changes. Here's how:
1 Download Script Manager from the market (it's free)
2 Open Script Manager and navigate to /system/etc/init.d
3 Press menu/more/advanced options and select mount as RW
4 Select 01governor and select "edit" at the top (this will open the file in atext editor)
5 Change:
Code:
echo "45" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold;
To:
Code:
echo "[COLOR=red]70[/COLOR]" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold;
6 Select menu/save
7 Press the skull and cross bones icon at the top (this will allow Super User)
8 Press run, close app and enjoy
This will result is slightly slower performance but higher battery life.
If you want even better battery life:
1 Following steps 1-4
2 Add a # at the begining of lines 11 to 19
3 Scroll to "pwoersaver" section
4 Remove the # at the begining of lines 28, 30-38 and 43
Code:
#AWAKE_GOVERNOR="ondemand"
#SLEEP_GOVERNOR="ondemand"
# echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold;
etc
Code:
AWAKE_GOVERNOR="powersaver"
#SLEEP_GOVERNOR="powersaver"
echo "20000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
5 Follow steps 6-8 (no need to select super user icon if you already did)
This will result in lower performance, but ultimate battery life
When running in a higher performance mode (especially for gaming) you can disable powersave_bias by changing the 1 to a 0 like this:
Code:
echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias;
echo "[COLOR=red]0[/COLOR]" > /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias;
Powersave_bias only allows the CPU to peak for small increments at a time, and not allow the CPU to remain peaked even when the system calls for it. In gaming, that could result in choppy, laggy perofrmance and slow FPS..
Although it says not to in the script, you can change the sampling rate as well. Do not go below 50000. I left it at 57500 as I found this seems good setting for smooth scrolling and performance.
Code:
echo "[COLOR=Red]57500[/COLOR]" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate;
Always leave SLEEP_GOVERNOR="powersave" uncommented (no #) and do not uncomment any other SLEEP_GOVERNOR as this will keep ultimate battery save while screen is off.
Only change values in increments of 5 for the up_threshold.
I am not resposible if you do something wrong. Make a back up just in case.
Working on CM10 latest nightly. Noticing a slight speed up. Will keep an eye on battery and post back if I notice any notable changes. Thank you!!
Sent from my LG-P930 using XDA Premium HD app
Can i use it with official miui?
Jl6owa said:
Can i use it with official miui?
Click to expand...
Click to collapse
You should be able to, but like i said in the op, i need you guys to help me test. At worst, you will have to reflash your Rom and gapps... make sure you backup your data too...
Please report back with your results...
When i get home, i will post some testing tips for you guys also...
Sent from my SGH-I727 using xda app-developers app
Thanks for supplying this! I'll have time to make these changes tomorrow and hope to see great improvements.
Sent from my LG-P930 using xda app-developers app
AllstarE4 said:
Thanks for supplying this! I'll ha e time to make these changes tomorrow and hope to see great improvements.
Sent from my LG-P930 using xda app-developers app
Click to expand...
Click to collapse
Are you building from source? If so, you can add many of the values straight into the kernel. I haven't looked at the Nitro's source, but I can still somewhat guide you on how to make a Lightning Zapped! kernel where the tweaks work MUCH better than going thru scripts...
thomas.raines said:
Are you building from source? If so, you can add many of the values straight into the kernel. I haven't looked at the Nitro's source, but I can still somewhat guide you on how to make a Lightning Zapped! kernel where the tweaks work MUCH better than going thru scripts...
Click to expand...
Click to collapse
Oh heck no. I'm still a noob. I'm pretty good at following instructions though. Lol
Does SQLite Editor work the same? Can I perform all those changes with it or do I need the other app mentioned?
Sent from my LG-P930 using xda app-developers app
Jl6owa said:
Can i use it with official miui?
Click to expand...
Click to collapse
It works fine with miui. Phone become little more faster.
+500 points in antutu
Jl6owa said:
It works fine with miui. Phone become little more faster.
+500 points in antutu
Click to expand...
Click to collapse
Which version of MIUI?
Anyone tried it on Full Throttle 8.4
I'm not proficient enough so I want to hear if other Full Throttle 8.4 finds this working for them.
Jl6owa said:
It works fine with miui. Phone become little more faster.
+500 points in antutu
Click to expand...
Click to collapse
Want to raise your scores even higher, refer to the second post but lower the up_threshold to 15. Of course this will take from your battery life, but it will seriously enhance your performance. You can also change powersave_bias, io_is_busy, down_differential, ignore_nice_load to "0" and play with sampling_rate a bit too... Keep in mind, the more you add performance, the less battery life you will have...
AllstarE4 said:
Oh heck no. I'm still a noob. I'm pretty good at following instructions though. Lol
Does SQLite Editor work the same? Can I perform all those changes with it or do I need the other app mentioned?
Sent from my LG-P930 using xda app-developers app
Click to expand...
Click to collapse
Any text editor that supports shell scripting will work. As for adding this to a port, then it's as easy as adding files and a few entries in your updater-script...
Tried to install this on Full Throttle. Is it supposed to restart in the middle of flashing?
rsalan said:
Tried to install this on Full Throttle. Is it supposed to restart in the middle of flashing?
Click to expand...
Click to collapse
It does reboot itself as soon as it is done flashing... Since it rebooted, it flashed correctly...
Is full throttle ICS and how is it working for you?
thomas.raines said:
Which version of MIUI?
Click to expand...
Click to collapse
Miui 2.9.27
thomas.raines said:
It does reboot itself as soon as it is done flashing...
Click to expand...
Click to collapse
I get that you want to automate the process a bit, but I think it could be annoying in some cases. What if I wanted to do something else in recovery before rebooting? Just my personal opinion.
drumist said:
I get that you want to automate the process a bit, but I think it could be annoying in some cases. What if I wanted to do something else in recovery before rebooting? Just my personal opinion.
Click to expand...
Click to collapse
From my experience, when flashing tweaks, you want to reboot immediately after so they fully install. Same with ROMs, kernels and recoveries... Otherwise, you can cause gremlins to take over and corrupt your partitions...
thomas.raines said:
From my experience, when flashing tweaks, you want to reboot immediately after so they fully install. Same with ROMs, kernels and recoveries... Otherwise, you can cause gremlins to take over and corrupt your partitions...
Click to expand...
Click to collapse
Not true, but whatever. It's a minor point anyway.

[FIX] Cell standby/mobile radio active time issue

Introduction
If you think there is a drain in Lollipop this is not that fix. This fix the "high cell standby mobile radio active time" bug. You can still test this if you want.
Some people are writing that this patch "only" fix the battery radio active time counter. I say that if you know java and take a look on the code you will note that the side effects of this bug includes, among others, not calling various NetworkManagementEvent observers that will have role in other modules of the inner core of Android, and not only the battery stats. So you say me what are the other side effects fixed.
Other people are saying that this patch doesnt fix the "cell standy radio active time" bug, so take your chances, or wait until Marshmallow :fingers-crossed:.
If after the patch you see a "miscellaneous" item in the battery stats, I am sorry for you but this indicates a bug in your RIL module (or other module) which this patch not solve. The bug in the RIL module was only masked by the Lollipop radio active time bug.
Hi,
I'm working on a fix to the Cell standby / Mobile radio active time issue. The bug manifests as a high mobile radio active time on the Cell Standby in the battery stats.
I think I found the bug in the inner core of Android, and I made some fix to test if it works.
In this thread you will find a Cyanogenmod 12.1 (Android 5.1) build for Odin/Xperia ZL with the fix applied. I already flashed this build onto my odin device and the bug seems to be fixed.
So now I want some of you to test this build and see if the bug is definitely gone.
NOTES
- Your device must have bootloader unlocked.
- CyanogenMod and my work comes with NO WARRANTY as usual. Don't blame me for anything you think I deserve.
- This is my other work on fixing droids: http://forum.xda-developers.com/showthread.php?t=1312398
Patches
I submitted the fix patches to AOSP/Google and CM.
https://android-review.googlesource.com/#/c/168231/
http://review.cyanogenmod.org/#/c/107828/
FAQ
How to install
-Make a backup (using recovery or your preferred tool)
-Download .zip and copy to the phone external sd card
-Boot into recovery (TWRP recommended)
-Install zip cm-12.1-20150827-UNOFFICIAL-odin.zip
-Wipe dalvik/cache
-If you was not on CM12.1 before then Wipe Data
-Reboot
-Wait Android installing apps
How to test
-Enable mobile data (with wifi off)
-Use mobile data (now the bug was triggered)
-Disable mobile data
-Use your device normally and then some hours later look for the mobile radio active time on the battery stats.
-On normal circumstances the display should be the bigger drain. The bug manifests as the Cell Standby being the bigger drain with a high mobile radio active time.
-Please report in this thread if it works or not for you. Thank you!
Can I have a Xposed module of this
- Yes. Thanks to @pyler
http://forum.xda-developers.com/xpo...oactivefix-t3189393/post62570773#post62570773
Download: flashable ZIP
- 2015-08-27 v1 (new)
http://www.mediafire.com/download/2f0igf17ixs52zc/cm-12.1-20150827-UNOFFICIAL-odin.zip
MD5: 3c3641ad6738fad953a90a5d3e745f75
Info about the patches
How to reproduce the bug:
-Enable mobile data (with wifi off)
-Use some mobile data (radio active timer starts in battery stats)
-Disable mobile data (radio active timer keeps running in battery stats)
After some investigation on the issue I found that the BatteryStats
service was not receiving the radio power down notification. The
investigation lead me to the NetworkManagementService.java, where
I found that some code was discarding the radio power change
notifications after the first radio power on.
The problem is that in NetworkManagementServer.java the
notifyInterfaceClassActivity method is discarding the notifications
of radio power change to the BatteryStats (via noteMobileRadioPowerState)
if the fromRadio parameter is false after it's being true some time before.
Even after a detailed analysis, it was unclear what is the real role of
the fromRadio parameter. Changing it to true in the calling methods
solved the issue in the testing unit (Sony Xperia ZL).
Change that introduced the code with the potential to trigger the bug:
-Introduction of "boolean fromRadio" in
NetworkManagementService.java / notifyInterfaceClassActivity()
https://android.googlesource.com/platform/frameworks/base/+/2ffa11e4b71c545e34533ef827bdc1a07fbe8246
Change that triggered the bug:
-Uncommenting the code that calls notifyInterfaceClassActivity
with fromRadio=true
https://android.googlesource.com/platform/frameworks/base/+/2d4b4ed681efcfb64c4d2b4d2a2d236aae1dc7ee
Instructions on how to make an Xposed Module from this patch
XDA member pyler is working on a Xposed module to apply thish patch:
http://forum.xda-developers.com/xpo...oactivefix-t3189393/post62570773#post62570773
---
You can use and Xposed module to apply this fix on-the-fly. If you decide to make an Xposed module from this patch, please credit my work and put a link to this thread.
How to do:
- on package com.android.server class NetworkManagementService (NetworkManagementService.java)
- verify if the method assinature for notifyInterfaceClassActivity method is correct (have the fromRadio parameter)
- intercept the call for the notifyInterfaceClassActivity method
- change the value of the fromRadio parameter to true
- and then call the original method
package com.android.server
class NetworkManagementService
private void notifyInterfaceClassActivity(int type, int powerState, long tsNanos, boolean fromRadio)
For devs
- CyanogenMod: you can repopick the patch 107828 before building.
- Other ROMS: apply the patch manually, it's tiny. The project is frameworks_base.
- There is no APK alone that solves this, only the xposed module.
Supporters
Unexpected but not least important, the following people appreciated my work and made ​​a donation or special thanks:
phoneturf
I submitted the fix patches to AOSP/Google and CM.
https://android-review.googlesource.com/#/c/168231/
http://review.cyanogenmod.org/#/c/107828/
good work! finally a patch
Sounds Awesome!!! @jgcaap Could you please spin a build with this patch and let us all know if it fixed it on bacon as well?
@YoshiShaPow @kantjer @fusionjack @temasek
This is what Android has become, the bug second most stared on their tracker is fixed by volunteers on XDA.
In general that does not make me very happy, but the work you did for them is awesome, thank you!
I'm a little confused now... Does this really fix the battery drain or is it just a fix for false measurement in batterystats? Because battery life on mobile data is much worse than on wifi for me since Android 5/5.1
It appears from your patch that this is only a reporting issue in the battery stats, and that the mobile radio IS being shut down, it just isn't being reported properly. If this is the case, do you have any idea why the battery performance in Lollipop is som much worse than KitKat?
acwest said:
It appears from your patch that this is only a reporting issue in the battery stats, and that the mobile radio IS being shut down, it just isn't being reported properly. If this is the case, do you have any idea why the battery performance in Lollipop is som much worse than KitKat?
Click to expand...
Click to collapse
Yes. In my device the radio IS being shut down properly. But in fact the code is a mess and I think there are many other bugs in the networking module.
I was on stock Kitkat and now I'm getting the same battery duration on CM12.1 (4h display on + 30m GPS/3G). Need more tests to detect more issues.
Anyway, I found another issue that I want to investigate that is the mobile data radio being activated and deactivated for a few seconds every time the wifi is connected.
Bazoocaze said:
Yes. In my device the radio IS being shut down properly. But in fact the code is a mess and I think there are many other bugs in the networking module.
I was on stock Kitkat and now I'm getting the same battery duration on CM12.1 (4h display on + 30m GPS/3G). Need more tests to detect more issues.
Anyway, I found another issue that I want to investigate that is the mobile data radio being activated and deactivated for a few seconds every time the wifi is connected.
Click to expand...
Click to collapse
Interesting. I was beginning to suspect that the Radio active time being displayed was a reporting issue, if the radio was really turned on as much as it claims, I think battery life would be much worse. Your patch is useful in that I now have a good idea of where to add logging statements to try see if there ARE issues with the actual radio active time.
reaper90 said:
I'm a little confused now... Does this really fix the battery drain or is it just a fix for false measurement in batterystats? Because battery life on mobile data is much worse than on wifi for me since Android 5/5.1
Click to expand...
Click to collapse
I do not know for sure. This will only solve the "mobile radio active time" issue on my device, where there is not a drain, but only the false measurement.
But if there is a problem in the RIL module of your device this patch will not solve the drain.
acwest said:
Interesting. I was beginning to suspect that the Radio active time being displayed was a reporting issue, if the radio was really turned on as much as it claims, I think battery life would be much worse. Your patch is useful in that I now have a good idea of where to add logging statements to try see if there ARE issues with the actual radio active time.
Click to expand...
Click to collapse
You ARE CORRECT.
I concluded the same when I put the decice in ariplane mode for several hours: the battery percent was the same at the end, but the mobile radio active counter keeps running for several hours, indicanting that the radio was turned of properly (same battery percent) but the timer keeps running.
Bazoocaze said:
You ARE CORRECT.
I concluded the same when I put the decice in ariplane mode for several hours: the battery percent was the same at the end, but the mobile radio active counter keeps running for several hours, indicanting that the radio was turned of properly (same battery percent) but the timer keeps running.
Click to expand...
Click to collapse
This is a good news/bad news situation. Good news, you have found the cause of the high radio active times. Bad news, something is still draining the battery. At least now we have better information...
Excellent work on pathing the issue, by the way...
abhibnl said:
Sounds Awesome!!! @jgcaap Could you please spin a build with this patch and let us all know if it fixed it on bacon as well?
@YoshiShaPow @kantjer @fusionjack @temasek
Click to expand...
Click to collapse
Concept seems interesting. Lemme look at the commits first before we go as far as building :good:
abhibnl said:
Sounds Awesome!!! @jgcaap Could you please spin a build with this patch and let us all know if it fixed it on bacon as well?
@YoshiShaPow @kantjer @fusionjack @temasek
Click to expand...
Click to collapse
Done
jgcaap said:
Done
Click to expand...
Click to collapse
Nice!
Still trying to put this into an xposed module, gonna take ages for me to do it
merewood bebox said:
Still trying to put this into an xposed module, gonna take ages for me to do it
Click to expand...
Click to collapse
I will make an detailed explanation on the first topic.
----
EDIT: done
So anyone here has made the module for xposed?
Sent from my Oneplus One using Tapatalk
---------- Post added at 12:58 PM ---------- Previous post was at 12:54 PM ----------
jgcaap said:
Done
Click to expand...
Click to collapse
@jgcaap would you like to share link for your build that has this patch?
Thanks
Sent from my Oneplus One using Tapatalk
Bazoocaze said:
I will make an detailed explanation on the first topic.
----
EDIT: done
Click to expand...
Click to collapse
thank you very much
Could anyone make either a xposed module or a flashable zip that we can use on bacon OnePlus One 5.1.1 to fix the mobile radio active issue? Thanks

Categories

Resources