[LG Optimus Black] jason600:
This mod modifies the power_profile.xml in framework-res.apk. The values are used in Battery Usage to display how much battery has been used. The values LG used are way off, most notable is the Cell Standby and Phone Idle bug which reports using almost all the battery.

The values I have used are my estimates for battery consumption. I based this on the power_profile.xml values from the Nexus and Galaxy i9000, then modified a bit to what I think is correct based on readings from Power Tutor. Feel free to change any values you think are incorrect.

Please note that the framework-res.apk changes for each rom and for each build of a specific rom. Do not use a mod'd file for another rom or another build.

This is my mod'd power_profile.xml

<?xml version="1.0" encoding="utf-8"?>
<device name="Android">
<item name="none">0</item>
<item name="screen.on">81</item>
<item name="bluetooth.active">142</item>
<item name="bluetooth.on">0.3</item>
<item name="bluetooth.at">35690</item>
<item name="screen.full">256</item>
<item name="wifi.on">4</item>
<item name="wifi.active">202</item>
<item name="wifi.scan">202</item>
<item name="dsp.audio">88</item>
<item name="dsp.video">88</item>
<item name="radio.active">185</item>
<item name="gps.on">108</item>
<item name="battery.capacity">1500</item>
<item name="radio.scanning">88</item>
<array name="radio.on">
<value>3.4</value>
<value>3.4</value>
</array>
<array name="cpu.speeds">
<value>300000</value>
<value>600000</value>
<value>800000</value>
<value>1000000</value>
</array>
<item name="cpu.idle">1.4</item>
<item name="cpu.awake">44</item>
<array name="cpu.active">
<value>85.3</value>
<value>154.1</value>
<value>205.4</value>
<value>259.0</value>
</array>
</device>

How to install:

1. Pull your existing framework-res.apk file

2. Download/Install 'APK MultiTool v1.02 from http://apkmultitool.com/

a) Run Script first to make the folders.

b) Place your framework-res.apk file in the folder called 'place-apk-here-for-modding'

c) Use Option 25 to select current project, select framework-res.apk

d) Use Option 9 to decompile the apk

e) The decompiled file will be placed in the projects folder

f) Open projects\framework-res.apk\res\xml\power_profile.xml with notepad

g) Copy the above xml code and replace the contents, then save your file.

h) use option 11 to compile the file (If you get compile errors complaing about can't find aapt, download from the same website 'APK Manager 5.02'. Copy the file from other\aapt.exe into your apk_multitool folder.)

i) When asked if it is a system file, enter y

j) When asked if you want to copy additional files, enter n (If you use this option, it will rebuild the apk incorrectly)

3. In the 'place-apk-here-for-modding' there will be a new file called 'unsignedframework-res.apk'. Open this with 7zip, also open your original framework-res.apk in 7zip.

4. Drag the file called resources.arsc from the unsignedframwork-res.apk window into the framework-res.apk window, overwriting the existing file.

5. In both 7zip windows, navigate to res\xml folder, and drag the file called power_profile.xml from the unsignedframwork-res.apk window into the framework-res.apk window, overwriting the existing file.

6. Your framework-res.apk has now been modded and can be pushed to the phone.

To build an update.zip flashable from CWM

1. Download Update.zip 2.0 Modifier/Creator from http://xdaforums.com/showthread.php?t=717437

2. Download my cwm zip for Temasek build 56 from the link below

3. With 7zip, extract the contents of my update.zip file and place them in the Update-Zip_Packager\placehere folder. There should be 2 folders, META-INF and system.

4. Navigate to system\framework and delete my framework-res.apk file. Copy your mod'd version into this folder.

5. If you plan to upload your mod'd file for others to use, edit the file META-INF\com\google\android\updater-script with notepad and change the line ui_print("temasek's p970 KANG build P20-56"); to display the rom/build you've modded.

6. Run the script in Update-Zip_Packager and select option 2

7. Rename the update.zip file with rom/build numbers, copy to the SD card of your phone and flash through CWM. Remember to nandroid backup before flashing. Also recommended to wipe Dalvik cache.

For anyone running Temasek Self-Kang #56, you can flash my file through cwm.

Download from: http://www.mediafire.com/?d210riqatvgv9k9

Enjoy.