Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,543 Members 37,165 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Quentin-
Old
(Last edited by Quentin-; 25th September 2009 at 06:42 AM.) Reason: Updated version of all files, see change log.
#1  
Senior Member - OP
Thanks Meter 0
Posts: 248
Join Date: Apr 2006
Cool [DRIVER] Touch Pro 2 Battery 1% Update [T-Mobile] [Sprint] [Verizon]

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.

Quote:
Originally Posted by rjmjr69 View Post
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!
If you find what I do useful, please

T-Mobile Rhodium (USA)
SPL: HardSPL v1.20R2
ROM: Q-Mobile 2.0 Alpha
Radio: 3.45.25.14
Accessories: SanDisk 16GB Micro SDHC Class 4, Motorola S705 SoundPilot
 
LifeStealer
Old
#2  
Junior Member
Thanks Meter 0
Posts: 27
Join Date: Sep 2009
Anyone on Sprint tried this?
 
Arcarsenal
Old
#3  
Arcarsenal's Avatar
Senior Member
Thanks Meter 17
Posts: 328
Join Date: Dec 2006
Location: Chicago, IL
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
Old
#4  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter 49358
Posts: 9,017
Join Date: Oct 2007

 
DONATE TO ME
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).
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - DONATE

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

NOTICE: I do not respond to tech support questions through PM.
 
Arcarsenal
Old
#5  
Arcarsenal's Avatar
Senior Member
Thanks Meter 17
Posts: 328
Join Date: Dec 2006
Location: Chicago, IL
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
Attached Thumbnails
Click image for larger version

Name:	Screen02.jpg
Views:	1093
Size:	23.3 KB
ID:	225747  
 
dodadent
Old
#6  
dodadent's Avatar
Senior Member
Thanks Meter 3
Posts: 318
Join Date: Sep 2005
Location: Presevo
Working.
Now battery increase with 1%.

THNKS
I-Mate PDA2K
SPV M500
O2 XDA Mini S
HTC Hermes
QTEK 9000
O2 XDA Orbit
T-Mobile MDA Vario III
HTC Touch Pro
HTC HD
HTC Touch Pro 2
HTC HD2
HTC Desire HD
Samsung SGS2
Samsung Note
Samsung P6200
Samsung S3
Samaung Note II
HTC One
Samsung Note 3
 
andrew-in-woking
Old
#7  
andrew-in-woking's Avatar
Senior Member
Thanks Meter 22
Posts: 1,038
Join Date: Jan 2006
Talking 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
White Nokia Lumia 920 from EE UK - stock rom

Matthew Ch 6 Vs 10:
"Your kingdom come,
"Your will be done,
"On Earth as it is in Heaven."
 
Chainfire
Old
(Last edited by Chainfire; 9th September 2009 at 01:05 PM.)
#8  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter 49358
Posts: 9,017
Join Date: Oct 2007

 
DONATE TO ME
Quote:
Originally Posted by andrew-in-woking View Post
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.
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - DONATE

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

NOTICE: I do not respond to tech support questions through PM.
 
yogam1
Old
#9  
Member
Thanks Meter 0
Posts: 56
Join Date: Aug 2009
Can I install this driver on top of the what Chainfire has released? Mine is Touch Pro 2 bought in Singapore.
 
Chainfire
Old
#10  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter 49358
Posts: 9,017
Join Date: Oct 2007

 
DONATE TO ME
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.
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - DONATE

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

NOTICE: I do not respond to tech support questions through PM.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes