[DRIVER] Touch Pro 2 Battery 1% Update [T-Mobile] [Sprint] [Verizon]

Search This thread

Quentin-

Senior Member
Apr 27, 2006
248
0
Hi, this is a battery increment driver update for the Touch Pro 2. Credit to Chainfire for giving me the idea here. Unfortunately there seems to be a different version driver for every device. So I made my own. From scratch. It's basically the same thing though.

IMPORTANT!!
I don't know what the potential issue(s) may come with installing an older/newer version of the battery.dll driver on a given device so I'll say now that I am providing versions here for each device people request in this thread (see below for what is currently available). These are NOT the same as the version released by Chainfire. You have to use a HEX editor to check the DLL version that comes with your device, so its somewhat a pain. Hopefully people that know how can post here elaborating on the specific device they have and what version DLL it comes with.

Enjoy!

Change Log
  • 2009.09.24 All versions *.1
  • Updated Q-Mobile (Code) certificates to last until 2035.01.31.
    Yes, I'm an idiot and the Q-Mobile certificates I created originally lasted 30 days. If yours is still working you don't need this until/unless you reinstall and need a new version. They won't expire again I promise ;)


Thanks to LifeStealer for providing the battery.dll that comes with US Sprint Touch Pro 2 devices.

Thanks to twolostminds for providing the battery.dll that comes with US Verizon Touch Pro 2 devices.

I think it should be noted in the first post that a new battery icon or a meter app is required to get the proper readings after install of this altered driver.

P.P.S. As rjmjr69 points out this driver is of course most useful to people who have some theme or application that can actually display battery levels in something other than the default 10 blocks in the Settings|System|Power applet. There's a ton of them so I'll leave it said at that.

Technical Information
In case people want to know more precisely what's happening here I'll briefly mention what is involved in the hack.

The actual modification of the stock battery.dll on the device is merely four (4) bytes. This is due to a simple return statement. There exists a subroutine within the driver that is called with a precise percentage of the battery level. The subroutine then uses an algorithm to determine a 10% increment level to return, which is then subsequently reported by the driver. By simply inserting a return statement at the beginning of the subroutine it returns the same 1% increment value that was passed to it to begin with. Voila! So no need to worry about any adverse effects the hack could have.

The trick of course is that since it runs as a driver on the machine it needs to be digitally signed (on a stock/secured device, that is). Changing those four bytes invalidates the current digital signature of the file, so it needs to be signed again. Of course, merely signing the DLL file won't work as your signature probably isn't trusted in the device's certificate store. So as part of the CAB installation process, the certificate you signed with must be installed in the "Privileged Execution Trust Authorities" store on your device so that when the file loads the certificate is recognized as a trusted authority for digitally signing code that can run on the device.

This is where things get sort of interesting. It is common practice here on XDA Developers for people to use the SDK sample certificates to sign files, and then request that you install trust for those certificates. The obvious security flaw here is that ANYONE can sign files with those certificates (even malicious code), thus invalidating the security mechanism in the first place. This essentially puts you in the same group of people who disable security prompts on their device (manually or by installing a CAB that does so), and ROM developers who disable it or install the SDK certs as trusted.

Of course there is no real "problem" per se with disabling (or allowing the circumvention) of the security features of the new version of windows mobile, its just that you are disabling/crippling a potentially useful feature.

Hence, I sign my files with my own 2048 bit certificate that is strictly under my control. Thus by installing any Q-Mobile application (and in the future ROM) your security will remain tight with the only applications implicitly trusted are those I signed.

Anyway, enough for now, that's probably way more than you ever wanted to know. Cheers!
 

Attachments

  • QM_TP2_Battery_Update_T-Mobile_USA_1.20.51986.1.CAB
    29.8 KB · Views: 1,743
  • QM_TP2_Battery_Update_Sprint_USA_1.21.56779.1.CAB
    33.4 KB · Views: 3,274
  • QM_TP2_Battery_Update_Verizon_USA_1.18.62316.1.CAB
    30.1 KB · Views: 1,081
Last edited:

Arcarsenal

Senior Member
I've been using your driver with my Touch Pro2 running Miri's 2.1 manila ROM and have had no problems, it may even be reporting more accurately than the previous driver because my battery life seems to be a bit better. Going to have to give a few more charge cycles to really find out though. Thanks again.
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
Thx for the credits. Let's see if you get the same amount of nonsense of completely non-related issues from some people ;)

If I remember I'll take a look tomorrow to see how this driver works on my own TP2. The one it came with (and I modded) can be rather twitchy. I might see about linking from my own thread as well.

One thing though, I think the US T-Mobile TP2 is an MSM7201A, can you confirm? The Euro version is MSM7200A. Perhaps that could make an incompatibility with the battery driver (CDMA battery driver is also wildly different, for some reason) between US and Euro devices.

BTW I agree with your self-signing, I always sign my stuff with my own cert as well (if needed). Though I'm not so much worried about security, it's just 'bad form' to have people need to install SDKCerts, when it's a breeze to just install the certificate in the CAB itself. (For those wondering, search for my DriverWiz project which can do it for you if you do not know how).
 

Arcarsenal

Senior Member
Looks like the processor is the same. I've got a T-Mobile USA Touch Pro2 and it has a 7200A according to Device Information. P.S., thanks for the original battery driver ;)
 

Attachments

  • Screen02.jpg
    Screen02.jpg
    23.3 KB · Views: 1,100

andrew-in-woking

Senior Member
Jan 14, 2006
1,030
22
Test

Hi all

I'm on day 1 of using this driver. I must admit, it looks like my battery is going down quicker than normal. This of course may not be related at all. I'll see if it actually switches off if it runs out.

Cheers

andrew-in-woking
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
Hi all

I'm on day 1 of using this driver. I must admit, it looks like my battery is going down quicker than normal. This of course may not be related at all. I'll see if it actually switches off if it runs out.

Cheers

andrew-in-woking

Please test if it gets low to soft-reset, then see the battery level after reboot. Check if it's suddenly a lot higher again. I know the old driver sometimes haves the issue (it is indeed a common one on various devices), wondering if this one has the same problem.

BTW Quentin- I also linked this thread from my own.
 
Last edited:

yogam1

Senior Member
Aug 6, 2009
56
0
Can I install this driver on top of the what Chainfire has released? Mine is Touch Pro 2 bought in Singapore.
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
When installing CAB files that modify (the same) system files, you should always (at least try to) uninstall other versions before installing a new one. If you don't, your "Remove programs" thingy may go completely weird.

If you want to install this one but already have mine installed, I'd advise uninstalling mine, soft-resetting, and only then installing this one.
 

b16b

Retired Recognized Developer
Apr 5, 2008
3,358
31
Athens
this working great like chainfire
now i have 1% battery on task bar
but..
i do not have on HTC Notification Enhancement there still 10%
any idea?
 

Quentin-

Senior Member
Apr 27, 2006
248
0
Thx for the credits. Let's see if you get the same amount of nonsense of completely non-related issues from some people ;)

Indeed ;)

One thing though, I think the US T-Mobile TP2 is an MSM7201A, can you confirm? The Euro version is MSM7200A. Perhaps that could make an incompatibility with the battery driver (CDMA battery driver is also wildly different, for some reason) between US and Euro devices.

Looks like the processor is the same. I've got a T-Mobile USA Touch Pro2 and it has a 7200A according to Device Information. P.S., thanks for the original battery driver ;)

Arcarsenal is correct. The T-Mobile USA version is MSM7200A as well.

(For those wondering, search for my DriverWiz project which can do it for you if you do not know how).

Now I can bang my head against the table for not using Google...I spent a couple hours on the MSDN site reading their XML provisioning docs to figure this out ;)

BTW Quentin- I also linked this thread from my own.

Appreciate it!
 

Quentin-

Senior Member
Apr 27, 2006
248
0
i do not have on HTC Notification Enhancement there still 10%
any idea?

The HTC Notification app that comes on my US T-Mobile device doesn't even have anything about the battery. Unless there is an alert (likely) about low battery but I haven't seen that myself.

Is that what you are talking about (a low battery alert that doesn't show the exact percentage--if there exists such a thing)? Or are you referring to something else?

If you have installed someone's packaged CAB of the HTC Notification and the battery then starts showing in 10% increments again it is because they overwrote the battery.dll (and shouldn't have).

Those are the only things I can think of in the way of a response without more information. Cheers!
 

b16b

Retired Recognized Developer
Apr 5, 2008
3,358
31
Athens
The HTC Notification app that comes on my US T-Mobile device doesn't even have anything about the battery. Unless there is an alert (likely) about low battery but I haven't seen that myself.

Is that what you are talking about (a low battery alert that doesn't show the exact percentage--if there exists such a thing)? Or are you referring to something else?

If you have installed someone's packaged CAB of the HTC Notification and the battery then starts showing in 10% increments again it is because they overwrote the battery.dll (and shouldn't have).

Those are the only things I can think of in the way of a response without more information. Cheers!

thanks for quick reply
i have stock europian HTC Notification enchantment and i have the baterry dll with package with name z_tp2 1% battery drivers i have Z front to be the latest package ;)

and also i have battery on task bat with 1%

the europian tp2 notigication is like this from topaz

attachment.php


but for me shows only every 10%


Here the package of tp2 europe

Download HERE
 
Last edited:

andrew-in-woking

Senior Member
Jan 14, 2006
1,030
22
PROBLEM

Hi all

I had a problem with this driver. My phone's battery dropped to between 5% and 10% and then it just switched off as the battery was actually completely discharged. When I plugged it in and switched it on straight away it showed up as 1%, which I'm sure was more accurate.

Cheers

andrew-in-woking
 

tft

Senior Member
Feb 24, 2008
842
202
any luck inspecting the sprint battery driver to see if it's the same?
is it safe for the sprint tp2?