yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] StuttgartKiwi:
Size differences with system app file

Hi [MENTION=1330150]chamonix[/MENTION], quick question:

If I use the BBS (version 1.16) built-in feature for "Install as System App", it places the file "com.asksven.betterbatterystats_xdaedition.apk" into the priv-app directory. This file is 641 KB in size.

However, if I instead use your CWM script from post #3 - "BetterBatteryStats_SystemApp_xdaedition_CWM_1.1.0.0.zip" - this script places the same file into the priv-app directory, however its version of this file is only 219 KB in size - that's significantly smaller!

Is there any particular reason for this difference in file size? Perhaps the CWM script is using an older version of the file and needs to be updated?
[BetterBatteryStats] mdamaged:
I just looked at it, and it does indeed appear to be an older version.
[BetterBatteryStats] Perseus:
[MENTION=5490227]mdamaged[/MENTION] is right. The APK inside the CWM zip is older.
[BetterBatteryStats] StuttgartKiwi:
Thanks for verifying, you two. Hopefully chamonix will update it when he gets the chance. :)
[BetterBatteryStats] Karpfenhai:
Hmm, afaik the app within the zip is just the helper apk, so it should work anyway.

Regards.
[BetterBatteryStats] StuttgartKiwi:
Yes, it is the helper app, but it appears to be an older version (and much smaller in size) than the helper app provided by the latest version of BBS.

I would assume there must be a reason for the big change in size - perhaps newer functionality or something.
[BetterBatteryStats] mdamaged:
Maybe the 'L' stuff...just spitballing.
[BetterBatteryStats] shiboby:
hey guys. I'm currently running fusionjack's slimsaber 4.3.1 reborn version 0705. The battery drain problem I'm having appears to be from WiFi. In settings>wifi>advanced settings I have "keep wifi on during sleep" set to only when plugged in and "scanning always available" unchecked. Despite that, in the battery stats of the phone, it shows wifi as almost always being on/awake.

Per fusionjack's suggestion, I ran bbs on the phone for about 6-7 hours without using it. I tried looking at it, but I don't understand that much. As far as I can tell, the wifi wasn't using that much power. Is that right? Can you tell what might be causing drain? I can also say that my phone generally didn't drain that much for the amount of time is was plugged in this time. But a couple of nights ago, the phone drained 23% over about 8 hours.

I look forward to any help you can give!
[BetterBatteryStats] Perseus:
Under Location Service, what do you have it set to ? Device Only or Battery Saver or turned off ?

The log you have covers only 5 minutes. Probably you pulled the log after plugging in ?
[BetterBatteryStats] chamonix:
I will look into that. The main change between the "old" and the "new" version of the helper app is the ability to uninstall the helper app by itself (previously only the main app could uninstall). As it way said before correctly by [MENTION=4355376]Karpfenhai[/MENTION] the helper app has no purpose (function) except requesting the proper permissions that are then inherited by the main app. Nevertheless I will fix accordingly to make sure that I provide the current helper app in the CWM package
[BetterBatteryStats] ballmead:
I can't get it to work any more. I'm on the Playstore latest apk and I'm rooted with it running as a system app but I get no readings whatsoever. I'm on a custom 4.4.4 Rom, what am I missing here?
[BetterBatteryStats] gonaroles:
Great app! Thanks for sharing Xda Version :)
[BetterBatteryStats] alxdadev:
I don't see the updates on play store :-\
[BetterBatteryStats] jefbuan:
is this enough?
[BetterBatteryStats] chamonix:
A staged rollout does not hit all users at the same time and the pace is not that fast. Please be patient
[BetterBatteryStats] chamonix:
Are you by chance on 1.15 and using Google launcher. If yes please be patient as a new version is rolling out, or download the XDA version 1.16
[BetterBatteryStats] chamonix:
please enable the advanced debug settings and provide a logcat.

If dashclock does not display a current reading it may be that dashclock does not call BBS to get up-to-date data.
[BetterBatteryStats] ballmead:
Yes and yes, I was pulling my hair out lol.

I'll wait for the new 1.16 on Playstore, thanks mate :good:
[BetterBatteryStats] seroesh:
is that it? I've disabled Fast Dormancy through the kernel and I have greenified Facebook and I don't use Facebook messenger. I'll give it another idle test run for you to monitor.

thanks.
[BetterBatteryStats] shiboby:
Battery Saver. And it could be that I plugged it in first. I'm not running at 100% when I wake up. I'll do it again tonight.
[BetterBatteryStats] u81:
Samsung Spica i5700 - CPU not sleeping with wifi n sync on - BBS v 1.16

[MENTION=1330150]chamonix[/MENTION] and [MENTION=3639717]Perseus71[/MENTION]

I'm now on version 1.16 + BBS_STATS - Granted + DUMP_Granted + Root enabled + Debug enabled.

I can see alarms information but I lack the knowledge to comprehend this effectively.

Please look at the two sets of BBS , dmesg and logcats attached herewith

1- wifi off

2-wifi on

Almost 50% of the battery went in under 2 hours after enabling wifi n sync.

No heavy apps running - No (Facebook, Twitter, Whatsapp, office etc.)

Look forward to your kind assistance.

Thanks
[BetterBatteryStats] dimm0k:
not sure what happened, but now my battery drain has vecome quite noticeable... help!
[BetterBatteryStats] thomase00:
Have any Android L users looked at the battery historian tool? I did some digging and figured out how to run it.

http://xdaforums.com/google-nexus-5...-battery-historian-tool-t2808146/post53984578

I wonder if it will be possible to view this information from within an app like BetterBatteryStats...
[BetterBatteryStats] dimm0k:
looking through the log myself, it looks like *sync*_gmail-ls_Account is keeping the device awake... this never happened so severely before... what gives??
[BetterBatteryStats] Perseus:
Sipdroid and Viber are keeping the phone awake on Wfi. Do you care for notifications from Google Apps such as Hangouts, Gmail Calendar etc ? This question does not apply to Non-Google apps.

Please look for a mod by [MENTION=4355376]Karpfenhai[/MENTION] . I have linked it recent pages and provided steps on how to apply it. Do so.

Gmail might have had slowdown due to bad connection or large number of email. Please turn off option to download attachments in Gmail. Remove Clock and Weather widget. Change Mailwise options to pull on request rather than scheduled Pull from server.
[BetterBatteryStats] dimm0k:
Damn, you're good! I believe the spike in battery usage may be due to the download attachments in GMail... I remember turning that on at some point, but I've turned that off for now and it already seems like it's made a difference. Will try BBS tonight with this option off and then again tomorrow night with the Clock and Weather widget and Mailwise suggestions to see how much those drain.
[BetterBatteryStats] It_ler:
I see a wrong calculation of the deep sleep radio in other stats for custom ref using BBS app v1.16.0.0:

It's calculated based on the time since boot/unplugged ... not based on the time since custom ref.

Here is my dumpfile and a logcat from BBS app:

My tapatalk signature:

Phone:

SGS5 (SM-G900F)

ROM:

AllianceROM v4.1

Kernel:

Stock G900FXXU1ANE2

Recovery:

PhilZ-touch

If you have any question about or any issue with your SGS2, just ask in the New members friendly Q&A thread.

If you need general help/assistence, please go to XDA-Assist.
[BetterBatteryStats] Perseus:
Don't forget to reboot before you leave the phone alone tonight and tomorrow night.
[BetterBatteryStats] a1exus:
I don't have CWM recovery, so what else can I do?
[BetterBatteryStats] Perseus:
If you have TWRP or Philz, the file will still work. Give it a try.
[BetterBatteryStats] a1exus:
I don't have them either, I have stock recovery.
[BetterBatteryStats] Perseus:
Your Signature states you have a moto X. See the link in my signature to get either recovery.
[BetterBatteryStats] chamonix:
unzip and file the apk

copy the apk to your phone

remount system to rw

copy the apk the /system/priv-app

change perms to 644

remount system ro

reboot
[BetterBatteryStats] chamonix:
working on it
[BetterBatteryStats] a1exus:
i tried that, but can't copy apk to /system/priv-app even after remounting /system as rw
[BetterBatteryStats] Perseus:
Copy it to /system/app then change permissions and then reboot.
[BetterBatteryStats] j1gga84:
Is there any updates on that because I still get wakelocks of Google Play Services although I disabled all points of that screenshots (although my signal bar of Wifi and 2G/3G went from white to orange), see screenshots in attachment.

I can remember that there were some more screenshots concerning this issue that were a bit older I think.

[MENTION=4355376]Karpfenhai[/MENTION]

Is your post also valid for Android 4.4 in connection with newest Google Play Services 5.0.84 ?

I disabled everything of Google Play Services with app Autostarts from Play Store and will see if this helps after charging my device.

Regards
[BetterBatteryStats] chamonix:
do you have priv-app at all?
[BetterBatteryStats] a1exus:
yes

---------- Post added at 05:09 PM ---------- Previous post was at 05:07 PM ----------

that worked, now what? I ran BBS and it still complaining...
[BetterBatteryStats] Perseus:
Now you can move the apk to /system/priv-app then boot to recovery and wipe dalvik+cache.

When you say not working, please post a screenshot of the errors you are getting.
[BetterBatteryStats] Karpfenhai:
Hmm, to be honest I didn't touch much on latest play service but system updater, and I can live with the current overhead... sorry.. disable also the corresponding receivers for the autostart you disabled.

Regards
[BetterBatteryStats] HulkSmashBurgers:
I guess this is more of a typo than a bug. When I have it on the charger, battery stats displays something like this:

2h37m20s Bat.: 74% (15% to 89%) [-28.2%/h]

Shouldn't it display [+28.2%/h] ?

I think I may have OCD or something.
[BetterBatteryStats] mdamaged:
Well no, normally when you lose battery you lose a positive number, therefore when you gain battery, you lose a negative number...think about it.
[BetterBatteryStats] HulkSmashBurgers:
You're messing with me, right?
[BetterBatteryStats] mdamaged:
No, I am dead serious. Think about it, if your battery is at 99% and it goes down to 90%, you've lost +9%, if you are at 90% and you charge it to 99%, you lost -9%...that number always represents loss, never a gain...so a gain shows up as a negative.
[BetterBatteryStats] HulkSmashBurgers:
Yeah, that true. I just looks weird, though. Especially with the [15% to 94%] right next to it. Like using a double negative or something.
[BetterBatteryStats] Karpfenhai:
That's while "Enable stats during charge" is unchecked by default, to prevent confusion [emoji14]
[BetterBatteryStats] HulkSmashBurgers:
Mine is still unchecked. Doesn't show any other stats. Not that confusing. Just thought the - was a typo. I probably shouldn't have brought it up. :)
[BetterBatteryStats] CM17X:
Just wonder, after disable those GCM receivers, do you still getting Push notifications?
[BetterBatteryStats] a1exus:
I keep getting this screen:

... and same thing after reboot(
[BetterBatteryStats] Karpfenhai:
Nope, you won't, major reason why I didn't touch them[emoji3] hangouts..
[BetterBatteryStats] chamonix:
as you are on 4.4.x the app must go to priv-app. Can you please tell us about the owner / perms of priv-app and the owner and perms of the apks inside of priv-app?
[BetterBatteryStats] shiboby:
Attached are 2 logs (1 txt and a logcat). I looked at the text, and as far as I can tell it has about 6 hours. I'm also attaching a screen shot which shows that wifi (atleast in the battery log of android) is showing as being very active. I look forward to your feedback!
[BetterBatteryStats] Re-Mi:
Hi I also have the same issue when i try to install BBS, on my system the

permissions of the priv-app folder:

0755 (RWXR-XR-X)

owner: read/ write/execute

Group: read / ------ / execute

Others: read / ------ / execute

Ownership : root

Group: root

And for the apk's inside

0644 (RW-R-R)

owner: read/ write/ -----

Group: read / ------ / -----

Others: read / ------ /-----

Ownership : root

Group: root

Greetz,

Michel
[BetterBatteryStats] marl1234:
Cool, Trying the app now.
[BetterBatteryStats] Hopper8:
Hi [MENTION=4355376]Karpfenhai[/MENTION] and [MENTION=4699854]j1gga84[/MENTION]

Here's my list of things I disable in latest Google Play (well at least V5, not sure the exact version). I got 99.7% deep sleep just today, data and 3g enabled ??

Here's the text file: https://www.dropbox.com/s/fbwquxjnjaodf0j/v5GPlay.txt

Karpfenhai I doubt you'll need this for yourself, but feel free to share it with others if you choose :) j1gga84, hope that helps :)

Sent from my Nexu5
[BetterBatteryStats] dabayer:
Thx for the hint. I deleted Cm widget Clock.

I use switch pro so i don't think its good to delete it :) (I need it for one touch change of brightness. I deactivate auto-brightness and made it most time at the darkest preference, but if i went outside i have to change it if i want to use it :) so i need a button which i cand find without reading something on my screen)

But i don't find google.search. Waht is the name of the programm in my App-List? I search for it with root-uninstaller and TitaniumBackup...

Attached a 4h Trace of Handy with less usage.

Could you tell my, what is the following:

com.android.phone (): Wakeups: 56 (11,5 / hr.)

Alarms: 56, Intent: com.android.internal.telephony.data-stall

I don't made an call during the trace. kann i delete it or freece or is it necessary for general telephone usage?

On my old Android i can't remeber such a high count of that app/process
[BetterBatteryStats] a1exus:
after copying BetterBatteryStats_xdaedition_1.16.0.0.apk to /system/priv-app and reboot as you guys suggested, i find that app is no longer there after reboot
[BetterBatteryStats] Karpfenhai:
That is totally weird, it's supposed to be working, any chance your phone is supervised / administered by your company? Seems you can't change any system app, consider clearing cache and dalvik, maybe it helps.

Regards
[BetterBatteryStats] Perseus:
There are couple of different names for Google Search. You'd have to look. Just turn off Google location Reporting instead if you can't find it. Also please post an Idle Log. This one has the phone in use for 36 m 50 s

Please turn off Fast dormancy and shut off either location service or Google location Reporting.
[BetterBatteryStats] a1exus:
No, this is my own phone and nobody has any access other than me. I cleared cache through TB and it didn't do anything.
[BetterBatteryStats] Karpfenhai:
Hmm,I have to admit were running out of options then, is the file still there?

Try pushing it from recovery via adb, mount system and do

adb push bbs.......apk /system/priv-app/

chown root /system/priv-app/bbs......apk

chgrp root /system/priv-app/bbs......apk

chmod 644 root /system/priv-app/bbs......apk

adb reboot

Good luck!
[BetterBatteryStats] a1exus:
even though I went ahead and remount /system as rw I cannot push apk from adb

mbp:Downloads alexus$ adb push BetterBatteryStats_xdaedition_1.16.0.0.apk /system/priv-app/
failed to copy 'BetterBatteryStats_xdaedition_1.16.0.0.apk' to '/system/priv-app//BetterBatteryStats_xdaedition_1.16.0.0.apk': Read-only file system
mbp:Downloads alexus$

So, I copy it to /sdcard and then adb shell, su, cp , chmod , reboot

mbp:Downloads alexus$ adb push BetterBatteryStats_xdaedition_1.16.0.0.apk /storage/emulated/legacy/
4434 KB/s (4378999 bytes in 0.964s)
mbp:Downloads alexus$

1|root@ghost:/storage/emulated/legacy # mount | grep system
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
text4 /dev/block/platform/msm_sdcc.1/by-name/system /system <
root@ghost:/storage/emulated/legacy # mount | grep system
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 rw,seclabel,relatime,data=ordered 0 0
root@ghost:/storage/emulated/legacy #

end result

root@ghost:/system/priv-app # ll BetterBatteryStats_xdaedition_1.16.0.0.apk
-rw-r--r-- root root 4378999 2014-07-10 13:27 BetterBatteryStats_xdaedition_1.16.0.0.apk
root@ghost:/system/priv-app # reboot
Done
root@ghost:/system/priv-app #

after reboot, i check /system/priv-app and "BetterBatteryStats_xdaedition_1.16.0.0.apk" is no longer there...
[BetterBatteryStats] uthpala89:
I just downloaded the apk. Installed it normally. Then after starting the app it asked me if I wanted it as a system app. Said yes to that. Then it told me to reboot. Now it's working perfectly! :)
[BetterBatteryStats] bpaulien:
I see some people have been having issues with the new update. I installed it, and it asked to install as a system app. I hit the button, and it said "Failed". So I uninstalled, and re-installed from play store, and tried running it again. Same thing. Asked me to install as system app, hit button, and it said "Failed'.

Then I saw the suggestions to move it manually to a system app. So I first tried in Titanium Backup to "Convert to System app." After doing that, I tried running it again, and was met with the exact same thing. It told me it had to be installed as a system app, so I hit the button again, and was once again presented with "Failed".

I then noticed that TiBu placed it in the /system/app directory instead of system/priv-app, so I tried moving it there using Solid Explorer (my file manager of choice lately.) It has the same permissions of all the other apps in that directory (rw, r, r,). Now when I try to run it, I get Better Battery stats has stopped running, and lets me send an error report...

Do'h! Luckily I noticed that you said I had to reboot, so I just did that. Now I can run BBS, so I guess I'll just keep this post as a cautionary tale, as well as thank you to those who're so helpful on this thread, and provided the information that I needed to get this running again.
[BetterBatteryStats] chamonix:
I have updated the CWM package with the current version of the system app in post #3
[BetterBatteryStats] Karpfenhai:
Thats the part you need to take care of (which you know :P)

Either selinux prevent you from changing systemfolders or any fancy security safe guard whatever app is doing this, check your device administrators for a possible clue which app is allowed to do so :)
[BetterBatteryStats] a1exus:


I'm not sure SELinux causing that as I'd get 'Permission denied' message.
[BetterBatteryStats] Karpfenhai:
Did you tried turning those Motorola things of for testing purposes and try again?
[BetterBatteryStats] u81:
Thanks [MENTION=3639717]Perseus71[/MENTION]

I have looked for the mod and found the following posts

http://xdaforums.com/showpost.php?p=29420959&postcount=7059

http://xdaforums.com/showpost.php?p=35634745&postcount=11040

http://xdaforums.com/showpost.php?p=47177180&postcount=20255

I've spent hours installing Gemini app manager and android tuner to make use of this info.

However, only a very few items seemed relevant as I have android 2.3 and these seem to be for 4.2 and above.

So, there are a lot more services in GB that are not listed on these screenshots and vice versa.

I do need Viber and Sipdroid and use them a lot, and also claendar reminders. I've uninstalled Hangouts.

Anything you can suggest any further.
[BetterBatteryStats] Perseus:
That sounds about right. for testing only, just freeze/ disable Viber and SipDroid. Please reboot after those changes. Leave the phone alone overnight. Post the log in the morning.

You may want to replace your Launcher to Zeam Launcher. Its meant for low ram devices. Works wonders on GB.
[BetterBatteryStats] u81:
[MENTION=3639717]Perseus71[/MENTION]

Thanks for the prompt response.

Do you want me to just freeze viber and sipdroid and leave the wifi and sync on throughout the night? or turn off wifi as well as sync or just turn off sync only.

I've just changed the VM heap size from 32mb to 24mb, hoping that sync wouldn't kill the other processes running. I tried running with a swap file but don't think I saw any improvement in speed or battery, so I gave that up.

This is a temp phone while my S2 is getting repaired but that might take a long while if it gets repaired at all, so meanwhile, I just get 10 hours of battery life with wifi on, a bit too short I think especially with no havey apps running .

I'll also try to check for a different version of viber that is lighter.

I'm already using zeam launcher with only one screen, all icons on the screen, no widgets.

I can't imagine running this anymore frugal.

I'll post the log tomorrow.

Thanks again.
[BetterBatteryStats] Markox89:
Staged rollout reached me today, :highfive: [MENTION=1330150]chamonix[/MENTION]
[BetterBatteryStats] Perseus:
Just turn off the Sync only. Leave WiFi on.Make sure to reboot before leaving idle.
[BetterBatteryStats] Dupa Zupa:
BATTERY_STATS Granted

DUMP Granted

This is a companion app to BetterBatteryStats. It will be copied to /system and stay there to grant permissions that can only be grated to system apps. This app has no functionality at all.

Anyone know how to fix this? Already tried reinstalling the app, uninstalled the app in /system/ etc.
[BetterBatteryStats] chamonix:
what exactly are you trying to fix. the perms show correctly so the app is installed (if you are on 4.4+)
[BetterBatteryStats] Dupa Zupa:
Can't use the app at all. No normal interface or anything. Just says that and gives me an uninstall button
[BetterBatteryStats] a1exus:
[MENTION=1330150]chamonix[/MENTION], should I try that? any ideas what does it do? i mean, i can try it, i'm not sure if that would help or would it?
[BetterBatteryStats] chamonix:
what happens if you hit 'back'?
[BetterBatteryStats] chamonix:
it's worth a try. Obviously there is some stuff going on at boot that is not stock (deletion) And I would attribute that to:

- an init script doing weird things in your rom

- some management / ADMIN software enforcing some weird policies
[BetterBatteryStats] Dupa Zupa:
There is no back. See screenshot attachment.
[BetterBatteryStats] chamonix:
This is not BBS it is the helper app. It is no replacement for BBS but - as the name says - a helper app. Install / reinstall BBS and you will be fine
[BetterBatteryStats] Dupa Zupa:
Can't install BBS since it says "App not installed. An existing package by the same name with conflicting signature is already installed." I installed it through the recovery from a zip on this thread since I couldn't get dump access by installing the system files through the app itself.
[BetterBatteryStats] chamonix:
you can not mix the system app from xda with the app from gplay or vice versa.
[BetterBatteryStats] Dupa Zupa:
I was only using the one from xda. So what can I do to fix it?

EDIT: Uninstalled the CWM script and tried installing it as a system app through the app itself. It successfully installs and tells me to reboot, but when I reboot, it's still not granted.

EDIT 2: Looks like the apk never reaches /system/priv-app after installing it through the app.
[BetterBatteryStats] Thomas_BA:
Hi folks, since a long time it was not necessary to consult BBS, but my battery duration was horrible.

So in short terms, since i updated to the last Google Play service i have a huge amount of "Checkin Service" time.

I have to say that during the day (working in a well isolated building..uff) i have a pure data connection, "E" or none and mostly no WiFi. May this be a reason? I have all Location settings disabled, etc.

Anyone the same experience lately?
[BetterBatteryStats] chamonix:
if the in-app install fails reapply the CWM package to install the system app
[BetterBatteryStats] rowdyw:
Are you using Xposed? You could try using the ENABLE_BATTERY_STATS module.
[BetterBatteryStats] Dupa Zupa:
Looks like it worked. But now I don't have anything showing up for any category
[BetterBatteryStats] chamonix:
plug/unplug, wait for a while, if it still does not show anything please post a dumpsys and logcat.

As a sidenote: from the screenshot it seems that you are using a developer preview. I assume that you use an official image from google on a supported device right?