1. Download our Official Android App: Forums for Android!

Support Terrible battery life, firmware issue?

Discussion in 'Android Devices' started by DrCereal, Aug 22, 2009.

  1. ZeeToo

    ZeeToo Newbie
    Rank:
    None
    Points:
    15
    Posts:
    47
    Joined:
    Sep 3, 2009

    Sep 3, 2009
    47
    0
    15
    That's not a bad plan, but how do you launch the process? I mean things like an exec from java will work, but that's not as lightweight as just piping the output .. Am I missing a simple commandline or shell for the phone?

    Thanks for the idea though, I'll update my app to create a log file of all its info...

    ZeeToo
     

    Advertisement

  2. AceStar

    AceStar Newbie
    Rank:
    None
    Points:
    35
    Posts:
    17
    Joined:
    Sep 3, 2009

    Sep 3, 2009
    17
    0
    35
    Hey, I notice you guys seem to be getting better standby time with 3G off. However, I note that specifications for most really modern phones these days quote much larger standby (not talk) times for 3G than for 2G, presumably because 3G is designed to use a lot less power when it's idle and just trying to maintain registration with the cell towers.

    Is this bunkum, or is it something worth trying - disabling 2G (if that's possible on Android) and using 3G only? Would only be worth it if you need a long standby time and don't need much talk (or other intensive 2-way data-streaming) time I guess.
     
  3. Bozzy

    Bozzy Member
    Rank:
    None
    Points:
    15
    Posts:
    52
    Joined:
    Aug 28, 2009

    Aug 28, 2009
    52
    0
    15
    Just got done testing APNdroid and its is worth checking out. I got 45hrs out of the battery with bout 5 hours of wifi searching downloading installing, few phone calls, few text messages, some gaming, reading books, google maps... As oppose to barely 24 without it
     
  4. ZeeToo

    ZeeToo Newbie
    Rank:
    None
    Points:
    15
    Posts:
    47
    Joined:
    Sep 3, 2009

    Sep 3, 2009
    47
    0
    15
    Hi AceStar,

    The testing I've done doesn't really appear to show too much difference between 3G on or off, if the phone is immobile - but that's the issue.

    If you're moving a lot then the phone will try and maintain a 3G connection, or an EDGE connection, or a GPRS connection... Even just maintaining the GSM connection drains battery (long journeys with older phones on trains shows that handoff between towers takes quite a bit of power).

    Personally from what I've seen on my phone I've no issue with leaving things like 3G on when I'm at home, but when I head off out I tend to shut it down as it does (anecdotally) hurt the battery on trips to work - I've not gotten figures for this yet so I'd not mentioned it.

    I'd really suggest taking Bozzy's advice, APNdroid is well worth it when you're not actively using it - especially if you're moving from tower to tower.

    I've started collecting 3G data, and I'll be able to collect 2G data (by disabling 3G) but it'll take a little while to have some results I can post but hopefully we'll be able to get the static standby times for 3G and 2G (from me or others) and see what is worse :)

    ZeeToo.

    P.S. Thanks for the ideas, always good to hear from others, and if you have any figures for battery time on your phone feel free to add them ;)
     
  5. pegasus21

    pegasus21 Android Enthusiast
    Rank:
    None
    Points:
    36
    Posts:
    253
    Joined:
    Aug 26, 2009

    Aug 26, 2009
    253
    1
    36
    I think once you're done with your testing, you could write the definitive guide to prolonging the battery life. :) Good work.
     
  6. Hawklord

    Hawklord Newbie
    Rank:
    None
    Points:
    15
    Posts:
    45
    Joined:
    Sep 5, 2009

    Sep 5, 2009
    45
    0
    15
    Interesting post Zee ... certain anecdotally the two occasions my battery life was absolutely caned (ie to <50% in <1/2day type thing) was when I was using it a lot on 3G on a 30min train ride into and out of london.

    Having said that that's precisely the kind of dead time that its quite useful to fill with surfing, downloading frmo the market etc.

    Anyway thanks to you and Bozzy for helping us refine all this stuff.

    As I understand it the current hypothesis is that the real battery killers are 3G-in-motion and sync...? I did try looking up the latter (which is rubbish functionality - cant chose frequency, cant schedule etc) but gave up when I found it was based on MS technology that Google had just incorporated.... as far as I was concerned that was the smokin' gun [I think I read its based on the old activesync that MS used on things like my old Ipaq].

    Anyway hopefully all this stuff is iterative ... ie the more the community really focuses on the key problems of android, the more likely it is to get them solved in a future release (as after all battery life is pretty much the only reason not to have a smartphone right now - esp. as prices will fall).

    rgds

    H
     
  7. Andronix

    Andronix Android Enthusiast
    Rank:
    None
    Points:
    63
    Posts:
    676
    Joined:
    Aug 31, 2009

    Aug 31, 2009
    676
    16
    63
  8. bitxboi

    bitxboi Android Enthusiast
    Rank:
    None
    Points:
    36
    Posts:
    323
    Joined:
    Aug 21, 2009

    Aug 21, 2009
    323
    6
    36
    hmmmmmm, I did a full battery charge at 11pm, and at 6am today it was still at 100%. APN off (APNdroid), 3G off, WiFi off, brightness 10% (I don't think it matters, as the display has been off, I hope), sync and BG data ON (but as every data mode was off, I didn't expect this one to drain my battery, as it happened to be).
    4 hours later, 10am, the battery is at 92%, same settings, 1 short call made, moved from home to work (40min by car aprox).
    I've got the feeling APN management is what drains the battery the most (3G or not, HSDPA, EGDE, GPRS, any of them), but it's more pronounced with 3G on.
    I'll try to continue with different settings testings

    P.S: not being able to schedule the auto sync (rate, etcetera) is a bit frustrating too.
     
  9. lazarus101

    lazarus101 Member
    Rank:
    None
    Points:
    16
    Posts:
    70
    Joined:
    Sep 1, 2009

    Sep 1, 2009
    70
    6
    16
    there is an easier way. You can get the list of running processes with the method
    Code (Text):
    1.  
    2. public List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses ()
    3.  
    from ActivityManager class

    and to stop an app there is

    Code (Text):
    1. public void restartPackage (String packageName)
    2.  
    3. Have the system perform a force stop of everything associated with the given application package. All processes that share its uid will be killed, all services it has running stopped, all activities removed, etc. In addition, a ACTION_PACKAGE_RESTARTED broadcast will be sent, so that any of its registered alarms can be stopped, notifications removed, etc.
    4. You must hold the permission RESTART_PACKAGES to be able to call this method.
    5.  
    I believe these are the methods used by task killer and other apps of that kind.




    APNdroid does help extending battery life but the problem is it cuts all data connectivity and you won't have email on your phone. A device without email can hardly be called a "smartphone".

    I think I found what was keeping my device awake although the screen was off (I had like 99% of the time the device running and only 10% the screen on), it was the damn case, it's too tight and some buttons were being pressed when I had the device in my pocket. Now without using it I have the device running for almost 48 hours and my battery is at 26%, with 3G on for most of the time, background data active, gmail sync.
     
  10. Andronix

    Andronix Android Enthusiast
    Rank:
    None
    Points:
    63
    Posts:
    676
    Joined:
    Aug 31, 2009

    Aug 31, 2009
    676
    16
    63
    do you see cpu usage by app with this method?



     
  11. bitxboi

    bitxboi Android Enthusiast
    Rank:
    None
    Points:
    36
    Posts:
    323
    Joined:
    Aug 21, 2009

    Aug 21, 2009
    323
    6
    36
    that's it, I'd like to extend my battery life, but not reducing my smartphone capabilities.
    About the case problem, are you saying the case was pressing some buttons and mantaining the display alive? Interesting.
    Almost 48 hours and battery still at 26%, with 3G on for most of the time, and gmail sync on is an interesting start point. Could you share your phone's setup with deeper detail? Thanks in advance
     
  12. synchromatik

    synchromatik Lurker
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Sep 4, 2009

    Sep 4, 2009
    5
    0
    5
    I managed about 40h uptime with turned off wirless, gps , screen dimmed to 20% (which is with OLED display very very useful , inside and outside too), i used EDGE instead of 3g, which is ok too , background data active , and all sync active. I upgraded to H7 first, and installed taskkiler just in case somethings bugs... i run 2-3 widgets for wireless toggle,battery life indicator and weather widget. Strange thing is that , when i turn on wireless, use it for about 5-10 minutes, battery drops down about 10-15% , and when i switch it back off, battery indicator levels goes up for about more or less same amount. So i guess there is some calculations that OS does , so switching this options only when u need them saves a lot of battery life.
     
  13. timmydog

    timmydog Lurker
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Sep 7, 2009

    Sep 7, 2009
    8
    0
    5
    I know an alternative to this has been sugested further down the thread, but try something like "Better Terminal Emulator". A quick google sugests that there are more, but I just searched on terminal in the app store and tried this one. ;)

    Seems to work fine, but as always, any other recommendations will be appreciated.

    Tim
     
  14. ZeeToo

    ZeeToo Newbie
    Rank:
    None
    Points:
    15
    Posts:
    47
    Joined:
    Sep 3, 2009

    Sep 3, 2009
    47
    0
    15
    Hi timmydog,

    I'd searched myself and literally just installed that (I tried the regular one but oddly enough it said it was already installed, and then failed to update because the signature was incorrect, so I assume it's part of the firmware) but thanks very much for letting me know :)

    lazarus101, cheers for that info... I'll take a look at that too.

    I've found another way to do it, if you look at the phone there's a /proc/ directory (astro or a terminal emulator can see it) and in there appears to be a directory per process..

    In there are a bunch of things, but amongst them is a stat file which appears to hold some information about that process. I've not looked into it too much but there appears to be some keys that indicate application rather than system commandlines and runtime etc. I'm hoping it holds a goldmine of information, some of the files are particularly interestingly named, including info on the VM for that process and who knows what else :)

    As a question to those of you who dislike using APNdroid, would you prefer something that shutdown the APN most of the time but allowed you to choose a schedule to start it up again and automatically turned it back on when you started using the phone again? Also be able to turn on and off autosync by a schedule or rules or something like that?

    ZeeToo.
     
  15. Bozzy

    Bozzy Member
    Rank:
    None
    Points:
    15
    Posts:
    52
    Joined:
    Aug 28, 2009

    Aug 28, 2009
    52
    0
    15
    You know ZeeToo something like that would be perfect, especially if it had an option for example that 3g turns on wifi turns on etc... (or each individually) when you unlock the screen and start using for whatever purpose. The more options the better it would be.

    Are you planning on writing something like that yourself?
     
  16. ZeeToo

    ZeeToo Newbie
    Rank:
    None
    Points:
    15
    Posts:
    47
    Joined:
    Sep 3, 2009

    Sep 3, 2009
    47
    0
    15
    Aye that's my goal :)

    I was wondering if I could incorporate some kind of script or let people configure what happens when, eventually. So something like on trigger X do Y type scripting so you can create a power profile that's not based on what *I* think it should be :)

    However as a first pass I wanted to work out what causes the problems and what we can ignore so I could have an app do the following:

    Disable things like the APN and Wifi if the phone hasn't been used for x seconds after the screen shuts off (don't want to kill it immediately as you might just unlock it again). Also potentially terminate programs in a user list or something if they're running when the phone shuts off.

    When the screen comes back on, look at the rough location and turn on things like wifi or the APN or both depending on roughly where you are (I prefer Wifi at home and I'll ignore it elsewhere - although having it remember if you connect somewhere and trying wifi if you did might be nice), and turn on sync.

    Hopefully have some way of scheduling a wakeup, quick re-enable of the APN and turn on sync for a bit for background grabbing of emails then turn it off again 60 seconds later and sleep for x mins.

    I've not found all the system calls to do this yet, it's mostly the scheduled wakeup that's an issue and that's the killer from my point of view... I want the smart phone stuff but I don't mind a 30 minute wait between emails etc if the battery lasts a lot longer... I also don't want to stop the phone sleeping as that'll kill the battery - not my goal :)

    I'm going on holiday for couple of weeks from next week (back in october and away from my dev machine till then), but I hope to have a first pass finished this weekend - if anyone's interested in trying it (I'm not going to upload it to the market till it's more of an end product but) I can *hopefully* send it to some people on monday..

    Thanks for everyone's help with grabbing the data...

    ZeeToo.
     
  17. Bozzy

    Bozzy Member
    Rank:
    None
    Points:
    15
    Posts:
    52
    Joined:
    Aug 28, 2009

    Aug 28, 2009
    52
    0
    15
    Im interested in helping out and trying it
     
  18. lazarus101

    lazarus101 Member
    Rank:
    None
    Points:
    16
    Posts:
    70
    Joined:
    Sep 1, 2009

    Sep 1, 2009
    70
    6
    16
    In the "battery history" that you can access with "spare parts" or if you type *#*#INFO#*#* in the dialer (see the attachments, those were made when I'm charging the device so it's not relevent but just so you know what I am talking about), you can see the time the device was running and the time when the screen was on, so when I first looked I had the time when device is running 99.6% - around 10 hours, and time with display on around an hour - 10%.
    That was happening when I was keeping the device in it's case, without it the difference between those two percentages is very small.
    I don't think the "lock" button is being pressed because that one would also turn the display on, the camera button seems the most sensitive, I'll make some tests to see what's happening if I keep it pressed when the display is off...

    I haven't used Bluetooth, GPS, Wi-Fi at all, all of these were off in this period, around 30 minutes of calls, 15 emails (I only use the gmail account where I've forwarded all the non-spam emails for other accounts), 30' browsing, 3G signal is not too great inside my house but it is good when I'm outside, I haven't played any music on the phone and I don't have any widgets that require data connection. Screen brightness is 49%. I had the phone on airplane mode for about 6 hours last night, and the alarm was on all the time.
     

    Attached Files:

  19. Hawklord

    Hawklord Newbie
    Rank:
    None
    Points:
    15
    Posts:
    45
    Joined:
    Sep 5, 2009

    Sep 5, 2009
    45
    0
    15
    Lazarus - great spot/idea re the case (I recall a similar problem last millenium with my Ipaq pda) ... certainly in my home tests I have been getting great results but every time i go to london not (but then its always in the case).

    One problem with APNdroid is I assume it blocks MMS reception - of course not a total disaster but thats sub-retro to me :rolleyes:

    Zee - some great ideas there but I'd definitely think in terms of interim 'releases' of the simplest ideas [after all killer apps are always simple rather than all singing all dancing infinitely intelligent and configurable]. I dont find I need to disable 2g with just the email client (and active sync off).

    For me the simple killer app would be something related to the lock button - ie when locked it goes retro+email, when unlocked smartphone [ie when goes into lock mode 3G off, sync off [we now dont feel that background data is such a problem] - ie when its locked and I am not actively using it then the only functionality we need is retro (ie receive phonecalls, txts, mms) + email]

    H7 seems good so maybe I should check it out - just not familiar with this hacker model of searching the net for new firmwares ... slightly clinging to the old-fashioned view that my carrier/the manufacturer should be doing all this for me :rolleyes:

    cheers to all experimenters

    H
     
  20. Hawklord

    Hawklord Newbie
    Rank:
    None
    Points:
    15
    Posts:
    45
    Joined:
    Sep 5, 2009

    Sep 5, 2009
    45
    0
    15
    Ok trying without the case. Think its even worse.. put it in my trouser pocket where its a little squashed and the battery has plummeted to 80% :-O in an hour of not much use (no 3g, wifi, sync)..of course any pressure gets the locked screen up. So maybe the case is better than jeans pocket??
     
  21. ZeeToo

    ZeeToo Newbie
    Rank:
    None
    Points:
    15
    Posts:
    47
    Joined:
    Sep 3, 2009

    Sep 3, 2009
    47
    0
    15
    What case did you get?

    Mine's in a little sock or bag thing (meant for ipods :eek: ) just to protect the screen from scratching and I keep it in my jeans.. My spare parts battery record shows it's only on about 9% of the time..

    The camera button seems very sensitive, or at least it has a lot of travel and is fairly loose but it doesn't appear to impact the phone unless it's unlocked.

    And yeah, the all singing all dancing app may take a while :) but the first pass at it is a lot more simple... Then I can complicate the heck out of it :D

    ZeeToo.

    P.S. I find it quite difficult to get the screen up - it requires a significant press of the lock button to go anywhere.
     
  22. pegasus21

    pegasus21 Android Enthusiast
    Rank:
    None
    Points:
    36
    Posts:
    253
    Joined:
    Aug 26, 2009

    Aug 26, 2009
    253
    1
    36
    How about this as an idea for your program... when the user locks the phone, the phone ignores all other button presses except the unlocking.
     
  23. Hawklord

    Hawklord Newbie
    Rank:
    None
    Points:
    15
    Posts:
    45
    Joined:
    Sep 5, 2009

    Sep 5, 2009
    45
    0
    15
    Hi Zee - I just have the black plasticy case that came with it. You are right about buttons *but* if you press power button when its lovked that certainly turns the screen on with a message saying its locked ... goodness knows how much that was being pressed in pocket but maybe enough to keep screen on (?) - also what android/the phone then gets up to while its more awake i dont know...

    The other parameter I didnt mention was for the first time I charged it this morning when the phone was on ... that may not have been as "good" (?).

    You testers seen netsentry? netsentry - Project Hosting on Google Code Maybe this can help find out what the phone is up to when its sleeping-not-sleeping...
     
  24. ZeeToo

    ZeeToo Newbie
    Rank:
    None
    Points:
    15
    Posts:
    47
    Joined:
    Sep 3, 2009

    Sep 3, 2009
    47
    0
    15
    Ahh, that case seemed really tight...

    Mine's more of a ribbed cloth thing... like this Apple iPod Socks - Apple Store (U.S.)

    It doesn't press the buttons and tends to keep it fairly safe (it was lying around so I figured I'd use it till something better came along).

    Thanks for the link to netsentry, I've just installed it and will see if I can work out how it picks up the network data..

    I didn't know the shutdown / cancel call key would trigger the screen :eek:

    I just tried every other button and no response other than that one... That might explain it for some people, since popping the screen up wakes up the phone...


    Hmmm.

    ZeeToo.

    P.S. Anyone tried the H8 firmware (despite the possible call problems?)
     
  25. ZeeToo

    ZeeToo Newbie
    Rank:
    None
    Points:
    15
    Posts:
    47
    Joined:
    Sep 3, 2009

    Sep 3, 2009
    47
    0
    15
    The phone already ignores almost all buttons, but I don't believe that's something that can be changed with an app - I've not seen any API that might let me control the buttons actions like this and I suspect for good reason :) locking the phone down totally might not be good...

    ZeeToo.
     

Share This Page

Loading...