XDA Xposed Tuesday: Modify the Look of Your Volume Control – XDA TV

How many screenshots have you seen with a volume status bar in the … more

Prepare Your Nokia X2 for Battle with Nokia X2 Tools

Unveiled in June this year, the Nokia X2 is the Finnish companys second crack at an … more

Increase the Speaker Volume of Your Samsung Gear 2 with Tool and Tutorial

I think its pretty safe to say that any sound coming out of a … more

Unlock Hidden Camera Settings on Your Moto G

At one point in time or another, weve all gotten very fiddly with the camera settings on our … more
Post Reply

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

4th September 2009, 11:30 PM   |  #1  
OP Senior Member
Thanks Meter: 0
 
248 posts
Join Date:Joined: Apr 2006
More
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

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!
Last edited by Quentin-; 25th September 2009 at 06:42 AM. Reason: Updated version of all files, see change log.
8th September 2009, 07:20 PM   |  #2  
Junior Member
Thanks Meter: 0
 
27 posts
Join Date:Joined: Sep 2009
Anyone on Sprint tried this?
8th September 2009, 08:27 PM   |  #3  
Arcarsenal's Avatar
Senior Member
Flag Chicago, IL
Thanks Meter: 17
 
328 posts
Join Date:Joined: Dec 2006
More
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.
9th September 2009, 01:02 AM   |  #4  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 50,222
 
9,108 posts
Join Date:Joined: Oct 2007
Donate to Me
More
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).
9th September 2009, 03:14 AM   |  #5  
Arcarsenal's Avatar
Senior Member
Flag Chicago, IL
Thanks Meter: 17
 
328 posts
Join Date:Joined: Dec 2006
More
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  
9th September 2009, 11:16 AM   |  #6  
dodadent's Avatar
Senior Member
Flag Presevo
Thanks Meter: 3
 
318 posts
Join Date:Joined: Sep 2005
More
Working.
Now battery increase with 1%.

THNKS
9th September 2009, 12:52 PM   |  #7  
andrew-in-woking's Avatar
Senior Member
Thanks Meter: 22
 
1,038 posts
Join Date:Joined: Jan 2006
More
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
9th September 2009, 01:02 PM   |  #8  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 50,222
 
9,108 posts
Join Date:Joined: Oct 2007
Donate to Me
More
Quote:
Originally Posted by andrew-in-woking

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 by Chainfire; 9th September 2009 at 01:05 PM.
9th September 2009, 01:16 PM   |  #9  
Member
Thanks Meter: 0
 
56 posts
Join Date:Joined: Aug 2009
More
Can I install this driver on top of the what Chainfire has released? Mine is Touch Pro 2 bought in Singapore.
9th September 2009, 01:47 PM   |  #10  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 50,222
 
9,108 posts
Join Date:Joined: Oct 2007
Donate to Me
More
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.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes