Now THIS is battery life!

Discussion in 'Jailbreaks and iOS Hacks' started by tryppy, Nov 14, 2009.

  1. tryppy macrumors member

    Nov 26, 2007
    ( no.. not another rate my battery thread. :eek: )

    Has anyone seen this happen? I know it would be fixed with a simple restore and I have no objection to that but I found this comical.

    Nothing else seems to be affected on the phone. When I noticed the error I plugged my phone in right away to reach 21% and watched it go down again. Different percentage this time but still messed :D


    I think it's safe to say I have the best battery life of any iPhone user. ( just don't look up at the 20% battery on the status bar :rolleyes: )
  2. Vandam500 macrumors 68000


    Sep 29, 2008
    Hahaha maybe in 10 years we will have that kind of battery :)
  3. justinwebb macrumors regular

    Aug 23, 2009
    Did you change your font at all normally that is what causes it
  4. tryppy thread starter macrumors member

    Nov 26, 2007
    I haven't changed it myself. May have been done within LockInfo perhaps. I don't recall this every happening before it was installed. I did mess around with it quite a bit to get my lock screen the way it is now but I myself haven't touched any fonts and they all look stock
  5. djstarrock macrumors 6502a


    Nov 23, 2006
    UK, Scotland, Glasgow
    You can't get more than a 100% battery life.
  6. -aggie- macrumors P6


    Jun 19, 2009
    Where bunnies are welcome.
    You do know he was just making a comment about the batteries being better, right?
  7. iPhone-power macrumors 6502a

    Nov 12, 2009
    I have read one other thread about this happening. On that thread, no one could figure out the cause.
  8. djstarrock macrumors 6502a


    Nov 23, 2006
    UK, Scotland, Glasgow
    Yea, just saying you can't have more than 100% of a cake same with battery.

    I should probably stop typing now.
  9. sushi Moderator emeritus


    Jul 19, 2002
    Just a rounding error. Ha ha!

    Cool. Thanks for posting.

    Yes, that would probably be a good idea -- well at least get rid of the shovel. :)
  10. zakath47 macrumors newbie

    Sep 29, 2009
    St. Paul, MN
    This started happening to me as well recently, and although I found many instances of people reporting the same issue, no one had any concrete answers.

    After futzing around a bit this evening, I think I have a possible solution.

    It appears that this problem is theme-based (not an issue with fonts, as others have theorized). In particular, at some point in recent software revisions (could have been 3.0, perhaps 3.1 -- all I have are 2 phones on 3.1.2 so I can't verify when), there was a change made to how the "Low Battery" message is constructed.

    In particular, if you look at the SpringBoard.strings plist on a 3.1.2 phone (as located in /System/Library/CoreServices/, you'll see the following:

    [COLOR="Gray"][I](Correct for 3.1.2)[/I][/COLOR]
    <string>[COLOR="Red"]%@[/COLOR] of battery remaining</string>
    However, in a theme that I had applied, the theme author had duplicated the entire SpringBoard.strings file & then applied modifications -- rather than just including the mods. In the theme's file, that same element appears as:

    [COLOR="Gray"][I](Old format; incorrect for 3.1.2)[/I][/COLOR]
    <string>[COLOR="Red"]%d%%[/COLOR] of battery remaining</string>
    Based on those two snippets, it looks like at some point the message changed from just taking a numeric value (%d) to using a string value (%@). Thus, when 3.1.2 passes in a character string, the old message string in the theme is trying to interpret those bytes as a number. And wackiness ensues.

    The fix:

    Assuming that you're on 3.1.2 (perhaps someone else can verify for earlier versions), check your themes for SpringBoard.strings files (under <ThemeName>/Bundles/, and if present look for the LOW_BATT_MSG_LEVEL key. If it's the "bad" version (%%d%...), copy the "good" version of the string into its place, and respring. I'd suggest looking in any lockscreen/slider themes first, as they nearly always include SpringBoard.strings to alter/remove the 'slide to unlock' text.

    After I did that, and allowed my phone to hit the next battery warning, the text was correct -- the first time in several weeks.

    I'd also recommend that you let the theme's author know of the issue, so that in future releases they can pare down the SpringBoard.strings file to just what the theme needs to modify (and thus to minimize side-effects like these in the future).

    - Karl
  11. corriewf macrumors 6502a

    Oct 5, 2009
    I had this problem yesterday when I switched to a older theme that I think was not updated since 3.0 since some of the themed icons did not include some of the factory default icons. I switched to another theme and have not seen the problem since.

Share This Page