Android Development Tutorial method for obtaining Power_profile.xml files (Android Run-time energy consumption) _android

Source: Internet
Author: User

System settings –> Battery –> Use situation, the use of statistical energy consumption is also based on Power_profile.xml value as the basic parameter

1, my mobile phone power_profile.xml content: HTC t328w

Copy Code code as follows:

<?xml version= "1.0" encoding= "Utf-8"?>
<device name= "Android" >
<item name= "None" >0</item>
<item name= "Screen.on" >100</item>
<item name= "Bluetooth.active" >142</item>
<item name= "Bluetooth.on" >0.3</item>
<item name= "bluetooth.at" >35690</item>
<item name= "Screen.full" >160</item>
<item name= "Wifi.on" >4</item>
<item name= "Wifi.active" >120</item>
<item name= "Wifi.scan" >220</item>
<item name= "Dsp.audio" >88</item>
<item name= "Dsp.video" >88</item>
<item name= "Radio.active" >300</item>
<item name= "Gps.on" >170</item>
<item name= "Battery.capacity" >1390</item>
<item name= "Radio.scanning" >70</item>
<array name= "Radio.on" >
<value>3</value>
<value>3</value>
</array>
<array name= "Cpu.speeds" >
<value>245000</value>
<value>384000</value>
<value>460800</value>
<value>499200</value>
<value>576000</value>
<value>614400</value>
<value>652800</value>
<value>691200</value>
<value>768000</value>
<value>806400</value>
<value>844800</value>
<value>998400</value>
</array>
<item name= "Cpu.idle" >2.8</item>
<array name= "Cpu.active" >
<value>66.6</value>
<value>84</value>
<value>90.8</value>
<value>96</value>
<value>105</value>
<value>111.5</value>
<value>117.3</value>
<value>123.6</value>
<value>134.5</value>
<value>141.8</value>
<value>148.5</value>
<value>168.4</value>
</array>
</device>

2, obtain the method: first obtains the framework-res.apk from the handset, then uses the Apktool tool to Decompile

The file is located in the Mobile directory:/system/framework/framework-res.apk, enter the terminal under Linux, execute the command:

Copy Code code as follows:

ADB pull/system/framework/framework-res.apk./

This pulls the framework-res.apk to the local PC, and the following uses Apktool for decompile.

Copy Code code as follows:

dell@optiplex-7010:~/apktool/apktool-install-linux-r05-ibot$ ls
AAPT Apktool Apktool.jar framework-res.apk
dell@optiplex-7010:~/apktool/apktool-install-linux-r05-ibot$./apktool d framework-res.apk newapk
I:loading Resource Table ...
I:loaded.
I:decoding Androidmanifest.xml with resources ...
I:regular Manifest Package ...
I:decoding file-resources ...
I:decoding Values */* xmls ...
I:done.
I:copying Assets and Libs ...
dell@optiplex-7010:~/apktool/apktool-install-linux-r05-ibot$ ls
AAPT Apktool Apktool.jar framework-res.apk newapk
dell@optiplex-7010:~/apktool/apktool-install-linux-r05-ibot/newapk/res/xml$ ls
Apns.xml Password_kbd_qwerty_shifted.xml Storage_list.xml
Autotext.xml Password_kbd_qwerty.xml Time_zones_by_country.xml
Eri.xml Password_kbd_symbols_shift.xml Zzz_cdmaapns.xml
Password_kbd_extension.xml Password_kbd_symbols.xml Zzz_m_pdp_limit.xml
Password_kbd_numeric.xml Power_profile.xml
Password_kbd_popup_template.xml Preferred_time_zones.xml

Power_profile.xml in framework-res.apk directory:/res/xml/power_profile.xml

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.