[Desire HD General] memnoc:
Big thanks to [MENTION=1040621]DarkAdrien[/MENTION]. His work insipires me. You can find his THREAD HERE

Hi everyone;)

Due to many requests, I decided to share with you my tips to improve the battery life of your device. This guide is nothing so new, but sometimes little things can improve the overall environment a lot! So, I decided to write these steps down to help you with your battery life issues, one of the most importa thing

we ask for our custom rom.

Remember that battery drain is a kind of random, weird problem, it can be related to many factors, sometimes it is difficult to say "who's the culprit"! Anyway, I came up with these steps with a 100% success! If you follow these steps, your battery drain will be just an unpleaseant memory!;)

What you do need

​

Download:

--Current Widget from Market-- (or similar)

--Elixir from Market--(or similar)

Chose one of these two apps, the point is to have a widget on your home screen to keep under control the MHa values!

--Battery Calibration---from Market (Damo software) or similar

You can also use current widget to get a log of your battery drain, it can be useful monitoring your battery drain over night. The log files is placed in your sd card, so you will find it there, or you can examine the log through Current Widget menu.

VERY IMPORTANT:

You can post your log here, so it's easier for me to help you to figure out how heavy is your battery drain. You must post a log of at least 2h, with less time it won't be possible to establish your battery behaviour! You can do something like this

2011/02/01 03:48:12,-5mA, il 55%

2011/02/01 03:53:20,-3mA, il 55%

2011/02/01 03:57:54,-66mA, il 55%

2011/02/01 04:07:46,-5mA, il 55%

2011/02/01 04:08:51,-5mA, il 55%

2011/02/01 04:18:44,-7mA, il 55%

2011/02/01 04:23:20,-3mA, il 55%

2011/02/01 04:33:13,-3mA, il 55%

2011/02/01 04:38:19,-3mA, il 54%

2011/02/01 04:48:12,-3mA, il 54%

2011/02/01 04:53:20,-3mA, il 54%

2011/02/01 04:58:12,-3mA, il 53%

2011/02/01 05:08:20,-3mA, il 53%

2011/02/01 05:18:13,-8mA, il 53%

2011/02/01 05:28:05,-5mA, il 53%

2011/02/01 05:37:58,-5mA, il 53%

2011/02/01 05:48:44,-5mA, il 53%

As you can see, two hours, 2% battery left! that's a very good battery performance, and our point is to achieve such values (or less! sometimes my battery drain is 0.75% per hour!)

IMPORTANT NOTE: BATTERY DRAIN MUST BE BETWEEN 3 TO 10mA WITH WIFI OR DATA ON! Without connections, your battery drain will be awesome, I'm sure about that:) (sarcasmLOL:))

What's the point, and the real improvement!

Keep in mind that

the real improvement

occurs when the phone is in full standby (deep sleep mode) ! When the device is being used, it's perfectly normal to experience a battery drain, but if the battery drain is remarkably heavy when the phone is in "deep sleep" (standby), than your battery will not last long! That's our point, and the most important thing we can work on!

Let's move on, and see what we can do!:D

How I install my Rom (if you follow these steps, this guide will work 100% for sure! Full wipes and Super wipes scripts might work as well, but there's a difference! (I'll explain in detail later)

--Put you rom.zip in your SD card

--Go to Recovery (

NOTE: I use ext4 Recovery from [MENTION=476845]madmaxx[/MENTION], otherwise you can use CWM as well;)

--Go to "Mounts and Storage"(if you use CWM)--Go to wipe|format(if you use 4ext)

--Format sytem, then data, then cache partition

--Do wipe data factory reset (

Very Very important things, it needs to re-mount your partitions after format clean! Otherwise the rom won't boot at all!

--Now flash your rom

--Boot your Rom (

Very important: let the rom boot completely before flash ANYTHING!!!!

Explanation: this kind of installation is the most clean installation possible. Note that "format" it's pretty different from "wipe". Wipe command cleans partition files, so every file in your partition. Formatting process instead, cleans all of the files in your partition plus the partition files themselves! That's a deeper clean, and can make the difference. As I previosuly stated, you can use full wipe scripts or similar as well, but a manual process is recommended.

Ok, now your rom should be flashed properly..let's move on to see how the battery drain is going!

Now, you have your MHa monitoring widget on your home screen. Keep in mind that a good battery drain, stay between 3\10MHa..if you're experiencing a higher value, than you most likely have a problem! How can you solve it?

Clean Battery_stats.bin file to set the graphic percentage properly just in case (it's useless in terms of real battery consumption, the file only includes info about how the battery percentage is being showed in the system)​

--Let the phone in charge, untill you see 0mA on current widget (or elixir, or whatever app you use)--

--Now open Battery Calibration--

--Chose remove battery_stats.bin---

--Click on "exit application"--(no reboot your phone from the app option!!)

--Reboot your phone COMPLETELY--(no hot restart!! Just reboot)

NOTE: keep the phone plugged during all of these steps

What's happening now?!

Now you have just deleted a FS (=Fille system) file;it means that Android will create the files again when you are booting your phone! But now, the file is being created properly, because you have charged your battery at its maximum capacity, and this means that files.bin will reflect the correct, full capacity, of your battery!

Damn! I still have a heavy battery drain! What the hell is going on here?!:mad:

Just don't worry. You have to wait a full discharge, then a full charge again (full charge means 0mA on current widget, green led IT'S NOT ENOUGH!!!) to see the result!

NOTE: some phone/OS doesn't seem to reach the 0mA whatsoever, that could be possible, and IMHO it is most likely a kernel issue; just don't panic, what you have to do is to establish what is the lowest mA value your device is able to reach, and take thatvalue as reference for future measurement.

No way! I still have a heavy battery drain!:mad::mad:

Ok, but at least now you are pretty much sure that your battery is perfectly fine! Let's move on to find the culprit!!!

Find "The Culprit"

​

--At this point, if you still have a heavy battery drain, you'll most likely find the culprit in your settings! Settings means: downloaded apps, syncing apps, weird tools or a, bad flash. That's it! There's no reason why a healty battery in terms of hardware shouldn't work properly;) Follow these steps:

--If you flashed your rom WITHOUT format (or superwipe) there's no way to establish what is causing your battery drain! So first of all, perform a clean installation--(remember guys, all roms are supposed to work fine, but if you install your rom just wiping cache or dalvik or data (or all of them, but leaving the system partition untouched, than you have no right to complain about anything, especially with the rom developer! You cannotachieve the best overall performance with a dirty system partition! That's the truth, ask to dev's, they'll confirm this, I do ;)!--

--now you are booting your just clean flashed rom with a smile on your face;)--

--During the installation wizard, DON'T LET GOOGLE RESTORE YOUR APPS, JUST SKIP THAT POINT, that's to avoid any possible confusion because if your battery is being calibrated, and your rom is being flashed properly, "The culprit" is one of your apps! If you restore them completely, you will not be able to understand what is causing battery drain whatsoever!--

--Calibrate your battery again--

--Now check your battery values using current widget(you can install this one;))--

--if values are between 3\10mA you're ok, and you can skip calibration (but I suggest you to do it anyway, just to be 100% sure)--

--Now, your battery drain it's awesome, I'm sure it is;) (otherwise your battery sucks:( or your Rom is bugged!:eek:)--

--Now, install your app's one by one and see what's happening--

--costantly check your battery drain through Current Widget. If it's ok, install another app, and so on--

--this way, you will likely find "The Culprit;)"--

--another thing to keep in mind: check your syncing app. I have a lot of syncing (two fb account, two twitter account, two gmail account, and another POP3 account, as well as a Weather account!) definitely a lot! And no issues at all. Because I'm sure of my apps, and I'm sure about how they are supposed to work. I know how my battery drain should be, and when i install something new, I can easily find out if this app is making my system drain too much from the battery!--

--that's all..or not??:eek::D

The Ultimate Weapon

DISCLAIMER: this kind of tool and this kind of command from CMD may brick your phone if something goes wrong, or you make a mistake writing a command, or you unplug your phone during the process!! I'm not responsible, use this method ONLY IF YOU KNOW EXACTLY WHAT YOUR DOING! This kind of clean is similar (but not the same) to format partitions from recovery. So if you're not sure, clean your partition from recovery or perform a full wipe. A dirty phone is always better than a bricked one's!! Trust me!!

PS. This method is kinda old now, and the tool only works with DHD (HTC desire hd) but if you find it useful, and you want to use it on your NON HTC phone (or an HTC phone different from Desire HD) the basic idea is still good, especially for HTC devices, but again, use it with caution as I do not take any responsibility for any damage can occur to your device!

To achieve a perfect, 100% clean installation you can use fastboot! Bootloader works very well guys, and is the best tool we have on our dhd! You can do everything via bootloader, and you can make a perfect installation as well! Let me explain you how!!::D

Fastboot Commander!! What a powerful tool! (Big Thanks to [MENTION=2436146]mumilover[/MENTION], visit his thread HERE)

​

Eng-set off and Radio set-off needed!

--download tool--

--unpack zip and click on .exe application (is a stand alone app, so you have to click and confirm installation, that's all!)

--open tool--

--put DHD in "Fastboot Mode"--

--plug it to your pc usb--

--Wait for "print of device succesfull"--(if fails, check your sdk driver)

--here you go to "misc"--

--select: erase partitions (system,cache,userdata,boot(optional))--

--click on "Erase chosen partition"--

--Done--

--manually reboot dhd to recovery--

--don't care about error message like E:/can't found recovery log" or something like this. Iy's just recovery wich telling you that partitions are not mounted!--

--So wipe data factory reset to re-mount partitions, otherwise you can't flash anything!

--now flash your rom--

This way you are 1000x1000 sure that your phone partitions are completely wiped! And when I said completely I do mean COMPLETELY!! (except for recovery partition)

This tool is very useful to solve strange issues that a normal wipe cannot solve! Sometimes **** happens;)

Note: this tool it's amazing! You can do everything easily with it, but it's very powerful and as a consequence, can be seriously dangerous! Use it with caution, make sure you know what your doing, and everything it's gonna be ok! Otherwise, I'm not responsible!

Please donate to the author, he deserves it, and visit his thread to hit his thanks button!

Through Shell(for expert user only!!!it's dangerous!)

Eng-set off and Radio set-off needed!

--all you did read above can be achieved even WITHOUT a tool, using instead CMD (DOS in windows, shell in Linux operating system)--

--put dhd in fastboot mode--

--plug it to your pc usb--

--open CMD, navigate to the folder that contains fastboot.exe and adb.exe--

--now write this command---fastboot erase system -w(will clean system)

--than fastboot erase boot -w(optional, will clean only boot partition)

--that's all--

Note: don't ask how to install\set\use\ sdk. You must know about this all you need to know. Who decide to flash in general, cannot ignore how sdk is and how use it!

DOWNLOAD FASTBOOT COMMANDER TOOL

Final suggestions

This guide help you to find your best battery life. It works 100% for sure with EVERY rom, just because is not related to rom's,kernel,themes,etc.., but to Android, and your habits too, that is 7\10 the reason of your battery drain!

Is not supposed you follow this guide every time you flash a rom, but you can! But if you follow my steps, even once, you can figure out what is going wrong in your settings, especially if you have heavy battery drain with all the rom's!

IMPORTANT

Remember that every flash you do, delete your battery stats so you MUST calibrate your battery every time. It's easy, only things you have to do is care about your MHa values, and remember to charge your phone untill Current Widget shows 0, green led IS NOT ENOUGH.

Keep in mind that after calibration, you MUST wait 3 to 4 full charge discharge to have the best overall performances, but you cam see an huge improvemente till the first calibration!

App doesn't work! is there another way toproperly delete\restore my battery_stats.bin?!

Of course! You must go into recovery (whatever you use) and "wipe battery stats". It's just the same thing that you do with Battery Calibration app.

Ok now that's all;) Obviously, I'll support this thread as long as I can, but I must admit that I unveiled all of my tricks to improve battery, and I can say for sure that is enough in order to achieve the result! Use this guide to figure out what are your best settings, and remember, if you follow these steps carefully, the result is 100% guarantee!;)

Hope this help!:D

---Updated and fixed on August, the 10th, 2013---