PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-18-2010, 04:15 PM
Unknownforce's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC Evo 3D™
Carrier: Sprint
 
Join Date: Nov 2008
Posts: 234
Reputation: 545
Unknownforce knows their stuffUnknownforce knows their stuffUnknownforce knows their stuffUnknownforce knows their stuffUnknownforce knows their stuffUnknownforce knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Battery Meter and Temp reading "Fix" (workaround) (6/22 Update)

Just thought I'd share this here...

First and Foremost. This is NOT supported by the Devs... NOR am I a Dev... This is simply a modification of the code that generates the zImage file. (specifically the file htc_battery_smem.c)

Secondly... It's not dead accurate, it's using some of the calculations from the raphael's battery calculations... I have been told by one of the devs that the rhodium calculates battery life much differently, so I will say that this isn't supposed to be a REAL fix, just a temporary workaround.

OK, now that all that is out of the way... here's somewhat of a "fix" for the Battery meter for the SPRINT CDMA TP2 RHODIUM (At least that's all I've tested it on, I have heard that it also works with the Tilt 2 and other "rhodium" devices, but I can't confirm that)

It's the same zImage as all the others with just a single modified source file compiled in. So all you have to do is copy it over the zImage file you currently have and run android like normal.

6/4 UPDATE

As you may have noticed... when you plug your phone in the battery meter jumps WAY up... well I have done a slight modification to the code to have it show something a Little more accurate... (only slight testing done)

Basically what I did was make it check to see if it's charging, if it is, it does less of a calculation based on the mV reading...

It's not perfect, but it's much closer to accurate when charging now, And what I did was make it so that it's a few percent HIGHER than the actual reading, so hopefully (and I don't know for certain) it will think it's at 100% when it's more like 95 ish then it will stop charging the battery and it won't keep charging and possibly do damage... as I said, I've only done some slight testing with this... but I figured I'd post it and get some feedback... My next thing is to figure out how to stabilize the battery meter so that it doesn't fluctuate as much, As an example, the percentage should never go UP when the phone is not charging, and it does... and also when you're actually using the phone for something that's got a drain on the battery, the percentage drops a lot because the mV reading drops when it's under load, So I have to try to figure out how to add in some calculation to incorporate current load so that it doesn't drop dramatically when you're online or something...

But back to the fix at hand here... You'll notice that at first when you plug it in, the % drops a bit, this is because the mV reading does not increase immediately, give it a minute or so and you will notice it start to climb back up as the mV reading increases. The inverse is also the same, in that when you unplug it AFTER charging for a bit, the % will spike for a bit, the mV reading will start to drop and it will stabilize in a minute or so.

6/22 UPDATE

I added a tiny bit of stabilization code. It's not much, and it isn't changing any calculations, so no more "real" accuracy, but just more to stabilize the battery value when it's under different loads. What I did was give it a place to store a "previous" value, then compare it to the "current" value, and if it's more than 1 % different, stick with the previous value, but if it's more than 10% different, use the current value. (This is necessary for bootup and for charging times when it changes so dramatically that the previous value will always be used because it's more than 1% all the time)

This should hopefully stabilize it a little further, but might need to be tweaked a bit, consider this a "BETA" of this code. I'm probably going to incorporate a little more math into this, because this is quite basic right now, but perhaps averaging values and pulling a value using both the previous and current values... But I haven't the time to sit down and really think about this right now...

I have left the 6/17 up just in case it works better.

The next thing I'm going to do is to make it never INCREASE in percentage if the battery isn't charging, this is easy to do, but I am busy right now, and this is all I could come up with for now.

As with the last change, I also made the change apply to all devices (not just the rhodium) but I don't know that it's a problem on other devices, but figured it wouldn't hurt to add it as most people here are using the rhodium anyways...

I will gladly share the code if anyone wants to take a peek.

The zImage includes all zImage updates located here including the ones from 6/14/10

Enjoy!
Attached Files
File Type: zip modules-zimage-061710.zip (8.59 MB, 107 views) Click for barcode!
File Type: zip modules-zimage-062210.zip (8.59 MB, 365 views) Click for barcode!
__________________

Phone: Sprint HTC EVO 3D
ROM: Synergy Nightly with Own Mods
"If you have the stereo on, why would you turn up the volume on the TV?" 'Cause I like to party

Last edited by Unknownforce; 06-22-2010 at 05:02 PM.
Reply With Quote
This post has been thanked 22 times.
  #2 (permalink)  
Old 05-18-2010, 05:26 PM
sjs01's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC Touch Pro 2
Carrier: Sprint
Location: Milwaukee, WI
 
Join Date: Sep 2008
Posts: 148
Reputation: 325
sjs01 is becoming a PPCGeeks regularsjs01 is becoming a PPCGeeks regularsjs01 is becoming a PPCGeeks regularsjs01 is becoming a PPCGeeks regular
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

I'm currently testing this right now, but so far it seems to be working! This is the biggest feature that was keeping me from using Android. I'm not sure if it's completely accurate or not, but it's at about the percent it was in Windows Mobile. Normally whenever I would boot into Android the battery meter would go right to red, and about 10% or so. Now it seems to actually be reading right. Again I'm not completely sure. I'm running it on a Sprint HTC Touch Pro 2. I'll try to run Android for the day and see if it's working, but so far so good!
__________________
If someone helps you press thanks!!
Reply With Quote
  #3 (permalink)  
Old 05-18-2010, 06:05 PM
Unknownforce's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC Evo 3D™
Carrier: Sprint
Threadstarter
 
Join Date: Nov 2008
Posts: 234
Reputation: 545
Unknownforce knows their stuffUnknownforce knows their stuffUnknownforce knows their stuffUnknownforce knows their stuffUnknownforce knows their stuffUnknownforce knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

Well as I said, it's not going to be dead accurate, because I don't know (noone knows for that matter, other than the real devs of the phone software) the correct calculations the rhodium "battery.dll" uses to calculate the exact battery life for windows mobile. I tried doing some reversing on it, but it's just a little over my head, I don't know asm well enough to follow and find the proper calculations, so I just started messing with numbers until it came out about right... and this seems to work.

It's more so that it at least reads "close" to what it should be... but I found it to be pretty damn close. When I talked to the dev, he discouraged my using the raphael calculations, but I figure... it's WAY better than it was before what with starting at like 40% and mostly being at 10% all the time...
Reply With Quote
This post has been thanked 2 times.
  #4 (permalink)  
Old 05-18-2010, 06:41 PM
mxl180's Avatar
Regular 'Geeker
Offline
Pocket PC: touch pro
Carrier: sprint
 
Join Date: Nov 2008
Posts: 381
Reputation: 220
mxl180 is keeping up the good workmxl180 is keeping up the good workmxl180 is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

well..I can say 100% Batt on Windows = 100% Batt on Andriod for me

and after 15 minute use, the battery meeter also drops a bit.... so far so GREAT.

Last edited by mxl180; 05-18-2010 at 07:06 PM.
Reply With Quote
  #5 (permalink)  
Old 05-18-2010, 07:14 PM
gTen's Avatar
"The Fuzzy One"
Offline
Pocket PC: PPC6800 & Touch Pro 2 & Epic 4G
Carrier: Sprint
Location: Internet
 
Join Date: Feb 2008
Posts: 7,855
Reputation: 9080
gTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the community
Mentioned: 106 Post(s)
Tagged: 1 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

Wait so if what you say works but only the battery is the issue..can't we use the calculation nue2chem has for nuebattery2 for the TP2?
__________________
Earn some spare cash and get cash back at stores like NewEgg and more:

http://quickrewards.net/?r=!F94VXV35D5MV2

(My shameless referral link)
Reply With Quote
  #6 (permalink)  
Old 05-18-2010, 10:05 PM
Reefermattness's Avatar
VIP Member
Offline
Pocket PC: HTC Touch Pro 2 (Tilt2)
Carrier: AT&T
 
Join Date: Apr 2009
Posts: 240
Reputation: 2740
Reefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

Battery workaround works pretty good man!! Nice job. Only problem I see so far is that I lose my WiFi if i use that zimage. GSM Tilt2(Rhod300) Battery works VERY close though.

Last edited by Reefermattness; 05-18-2010 at 10:31 PM.
Reply With Quote
  #7 (permalink)  
Old 05-18-2010, 10:53 PM
gface2k's Avatar
N00b
Offline
Pocket PC: Touch Pro 2
Carrier: Sprint
 
Join Date: Sep 2008
Posts: 26
Reputation: 100
gface2k is keeping up the good workgface2k is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

Great job! I do have other things to worry about than keeping track of the battery level on my phone 4 my phone.

I can not turn on wifi after using this zimage.

Tested on a Sprint Touch Pro 2


Now if only some one could get sound to work I would totally ditch WinMo.

Last edited by gface2k; 05-18-2010 at 11:44 PM.
Reply With Quote
  #8 (permalink)  
Old 05-18-2010, 11:53 PM
lioncat55's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC TP2
Carrier: Us Cellular
Location: 2 hours from any where
 
Join Date: Jan 2010
Posts: 175
Reputation: 100
lioncat55 is keeping up the good worklioncat55 is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

it works much better than other ones using UScell TP2 i can say that wifi dose not work and that the battery will bounce around 10% but it still works much much better
Reply With Quote
  #9 (permalink)  
Old 05-19-2010, 12:13 AM
coolsilver's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC TP2
Carrier: Verizon
 
Join Date: Oct 2007
Posts: 233
Reputation: 125
coolsilver is keeping up the good workcoolsilver is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

I'm glad this works at least mostly right.

I have a extended battery for my RHOD500. I wonder if that calculates ok.

The only other thing I worry about is charging still not stopping when at 100% or phone keeps from fully discharging causing power on and as some had on xda boot issues.
Reply With Quote
  #10 (permalink)  
Old 05-19-2010, 07:56 AM
hackbenjamin's Avatar
N00b
Offline
Pocket PC: HTC TP2, HTC Tmobile wing, Nokia 6265i,
Carrier: uscellular
Location: maine
 
Join Date: Mar 2009
Posts: 26
Reputation: 80
hackbenjamin is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Battery Meter and Temp reading "Fix" (workaround)

the battery meter seems to work...do we know why the gps doesnt? how bout gettting this battery "fix" added to the standard package? also how about the fix for the gps from the gps thread? cuz i assume im correct currently we lose these fixes everytime we update?
Reply With Quote
This post has been thanked 1 times.
Reply

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 05:36 PM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com