Now THIS is battery life!

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

  1. tryppy macrumors member

    Joined:
    Nov 26, 2007
    #1
    ( 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

    [​IMG]

    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

    Vandam500

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

    Joined:
    Aug 23, 2009
    Location:
    Columbus, Ohio
    #3
    Did you change your font at all normally that is what causes it
     
  4. tryppy thread starter macrumors member

    Joined:
    Nov 26, 2007
    #4
    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

    djstarrock

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

    -aggie-

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

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

    djstarrock

    Joined:
    Nov 23, 2006
    Location:
    UK, Scotland, Glasgow
    #8
    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

    sushi

    Joined:
    Jul 19, 2002
    Location:
    キャンプスワ&#
    #9
    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

    Joined:
    Sep 29, 2009
    Location:
    St. Paul, MN
    #10
    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/SpringBoard.app/English.lproj/), you'll see the following:

    Code:
    [COLOR="Gray"][I](Correct for 3.1.2)[/I][/COLOR]
    
    <key>LOW_BATT_MSG_LEVEL</key>
    <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:

    Code:
    [COLOR="Gray"][I](Old format; incorrect for 3.1.2)[/I][/COLOR]
    
    <key>LOW_BATT_MSG_LEVEL</key>
    <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/com.apple.springboard/en.lproj/), 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

    Joined:
    Oct 5, 2009
    #11
    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