设为首页收藏本站

移动叔叔

搜索
查看: 3466|回复: 0
打印 上一主题 下一主题

[教程] 联想A820t 修改SystemUI.apk使状态栏电量图标显示「精确到1%」

[复制链接]
跳转到指定楼层
楼主
发表于 2013-7-14 23:23:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
联想A820t的电量图标显示是很不准确的,通过修改SystemUI.apk可以使电量图标显示精确到1%

电量图标可以去网上找,也可以自己制作

比如我想要横向的、能精确反映电量消耗的电量图标

1. 制作电量图标

打开Photoshop,新建一个宽100像素、高24像素的文件

先制作出电量为1%的电量图标,命名为stat_sys_battery_1。电量每减少1%,绿色部分的宽度就减少1像素。我们可以用PS的“动作”功能来快速制作stat_sys_battery_2至stat_sys_battery_100。这些图标一共100个

2.制作充电时的电量图标

在上一步的基础上,用PS的“动作”功能,也能比较快地完成。这些图标命名为stat_sys_battery_charge_1至stat_sys_battery_charge_100,共100个

3. 把/system/app/SystemUI.apk复制到电脑上

4. 用apktool反编译SystemUI.apk

5. 把1、2步中的200个图标放到\res\drawable-hdpi中

6. 打开\res\drawable\stat_sys_battery.xml,修改为如下内容保存
  1. <FONT color=dimgray><?xml version="1.0" encoding="utf-8"?>
  2. <level-list
  3. xmlns:android="http://schemas.android.com/apk/res/android">
  4. <item android:drawable="@drawable/stat_sys_battery_1" android:maxLevel="1" />
  5. <item android:drawable="@drawable/stat_sys_battery_2" android:maxLevel="2" />
  6. <item android:drawable="@drawable/stat_sys_battery_3" android:maxLevel="3" />
  7. <item android:drawable="@drawable/stat_sys_battery_4" android:maxLevel="4" />
  8. <item android:drawable="@drawable/stat_sys_battery_5" android:maxLevel="5" />
  9. <item android:drawable="@drawable/stat_sys_battery_6" android:maxLevel="6" />
  10. <item android:drawable="@drawable/stat_sys_battery_7" android:maxLevel="7" />
  11. <item android:drawable="@drawable/stat_sys_battery_8" android:maxLevel="8" />
  12. <item android:drawable="@drawable/stat_sys_battery_9" android:maxLevel="9" />
  13. <item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="10" />
  14. <item android:drawable="@drawable/stat_sys_battery_11" android:maxLevel="11" />
  15. <item android:drawable="@drawable/stat_sys_battery_12" android:maxLevel="12" />
  16. <item android:drawable="@drawable/stat_sys_battery_13" android:maxLevel="13" />
  17. <item android:drawable="@drawable/stat_sys_battery_14" android:maxLevel="14" />
  18. <item android:drawable="@drawable/stat_sys_battery_15" android:maxLevel="15" />
  19. <item android:drawable="@drawable/stat_sys_battery_16" android:maxLevel="16" />
  20. <item android:drawable="@drawable/stat_sys_battery_17" android:maxLevel="17" />
  21. <item android:drawable="@drawable/stat_sys_battery_18" android:maxLevel="18" />
  22. <item android:drawable="@drawable/stat_sys_battery_19" android:maxLevel="19" />
  23. <item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="20" />
  24. <item android:drawable="@drawable/stat_sys_battery_21" android:maxLevel="21" />
  25. <item android:drawable="@drawable/stat_sys_battery_22" android:maxLevel="22" />
  26. <item android:drawable="@drawable/stat_sys_battery_23" android:maxLevel="23" />
  27. <item android:drawable="@drawable/stat_sys_battery_24" android:maxLevel="24" />
  28. <item android:drawable="@drawable/stat_sys_battery_25" android:maxLevel="25" />
  29. <item android:drawable="@drawable/stat_sys_battery_26" android:maxLevel="26" />
  30. <item android:drawable="@drawable/stat_sys_battery_27" android:maxLevel="27" />
  31. <item android:drawable="@drawable/stat_sys_battery_28" android:maxLevel="28" />
  32. <item android:drawable="@drawable/stat_sys_battery_29" android:maxLevel="29" />
  33. <item android:drawable="@drawable/stat_sys_battery_30" android:maxLevel="30" />
  34. <item android:drawable="@drawable/stat_sys_battery_31" android:maxLevel="31" />
  35. <item android:drawable="@drawable/stat_sys_battery_32" android:maxLevel="32" />
  36. <item android:drawable="@drawable/stat_sys_battery_33" android:maxLevel="33" />
  37. <item android:drawable="@drawable/stat_sys_battery_34" android:maxLevel="34" />
  38. <item android:drawable="@drawable/stat_sys_battery_35" android:maxLevel="35" />
  39. <item android:drawable="@drawable/stat_sys_battery_36" android:maxLevel="36" />
  40. <item android:drawable="@drawable/stat_sys_battery_37" android:maxLevel="37" />
  41. <item android:drawable="@drawable/stat_sys_battery_38" android:maxLevel="38" />
  42. <item android:drawable="@drawable/stat_sys_battery_39" android:maxLevel="39" />
  43. <item android:drawable="@drawable/stat_sys_battery_40" android:maxLevel="40" />
  44. <item android:drawable="@drawable/stat_sys_battery_41" android:maxLevel="41" />
  45. <item android:drawable="@drawable/stat_sys_battery_42" android:maxLevel="42" />
  46. <item android:drawable="@drawable/stat_sys_battery_43" android:maxLevel="43" />
  47. <item android:drawable="@drawable/stat_sys_battery_44" android:maxLevel="44" />
  48. <item android:drawable="@drawable/stat_sys_battery_45" android:maxLevel="45" />
  49. <item android:drawable="@drawable/stat_sys_battery_46" android:maxLevel="46" />
  50. <item android:drawable="@drawable/stat_sys_battery_47" android:maxLevel="47" />
  51. <item android:drawable="@drawable/stat_sys_battery_48" android:maxLevel="48" />
  52. <item android:drawable="@drawable/stat_sys_battery_49" android:maxLevel="49" />
  53. <item android:drawable="@drawable/stat_sys_battery_50" android:maxLevel="50" />
  54. <item android:drawable="@drawable/stat_sys_battery_51" android:maxLevel="51" />
  55. <item android:drawable="@drawable/stat_sys_battery_52" android:maxLevel="52" />
  56. <item android:drawable="@drawable/stat_sys_battery_53" android:maxLevel="53" />
  57. <item android:drawable="@drawable/stat_sys_battery_54" android:maxLevel="54" />
  58. <item android:drawable="@drawable/stat_sys_battery_55" android:maxLevel="55" />
  59. <item android:drawable="@drawable/stat_sys_battery_56" android:maxLevel="56" />
  60. <item android:drawable="@drawable/stat_sys_battery_57" android:maxLevel="57" />
  61. <item android:drawable="@drawable/stat_sys_battery_58" android:maxLevel="58" />
  62. <item android:drawable="@drawable/stat_sys_battery_59" android:maxLevel="59" />
  63. <item android:drawable="@drawable/stat_sys_battery_60" android:maxLevel="60" />
  64. <item android:drawable="@drawable/stat_sys_battery_61" android:maxLevel="61" />
  65. <item android:drawable="@drawable/stat_sys_battery_62" android:maxLevel="62" />
  66. <item android:drawable="@drawable/stat_sys_battery_63" android:maxLevel="63" />
  67. <item android:drawable="@drawable/stat_sys_battery_64" android:maxLevel="64" />
  68. <item android:drawable="@drawable/stat_sys_battery_65" android:maxLevel="65" />
  69. <item android:drawable="@drawable/stat_sys_battery_66" android:maxLevel="66" />
  70. <item android:drawable="@drawable/stat_sys_battery_67" android:maxLevel="67" />
  71. <item android:drawable="@drawable/stat_sys_battery_68" android:maxLevel="68" />
  72. <item android:drawable="@drawable/stat_sys_battery_69" android:maxLevel="69" />
  73. <item android:drawable="@drawable/stat_sys_battery_70" android:maxLevel="70" />
  74. <item android:drawable="@drawable/stat_sys_battery_71" android:maxLevel="71" />
  75. <item android:drawable="@drawable/stat_sys_battery_72" android:maxLevel="72" />
  76. <item android:drawable="@drawable/stat_sys_battery_73" android:maxLevel="73" />
  77. <item android:drawable="@drawable/stat_sys_battery_74" android:maxLevel="74" />
  78. <item android:drawable="@drawable/stat_sys_battery_75" android:maxLevel="75" />
  79. <item android:drawable="@drawable/stat_sys_battery_76" android:maxLevel="76" />
  80. <item android:drawable="@drawable/stat_sys_battery_77" android:maxLevel="77" />
  81. <item android:drawable="@drawable/stat_sys_battery_78" android:maxLevel="78" />
  82. <item android:drawable="@drawable/stat_sys_battery_79" android:maxLevel="79" />
  83. <item android:drawable="@drawable/stat_sys_battery_80" android:maxLevel="80" />
  84. <item android:drawable="@drawable/stat_sys_battery_81" android:maxLevel="81" />
  85. <item android:drawable="@drawable/stat_sys_battery_82" android:maxLevel="82" />
  86. <item android:drawable="@drawable/stat_sys_battery_83" android:maxLevel="83" />
  87. <item android:drawable="@drawable/stat_sys_battery_84" android:maxLevel="84" />
  88. <item android:drawable="@drawable/stat_sys_battery_85" android:maxLevel="85" />
  89. <item android:drawable="@drawable/stat_sys_battery_86" android:maxLevel="86" />
  90. <item android:drawable="@drawable/stat_sys_battery_87" android:maxLevel="87" />
  91. <item android:drawable="@drawable/stat_sys_battery_88" android:maxLevel="88" />
  92. <item android:drawable="@drawable/stat_sys_battery_89" android:maxLevel="89" />
  93. <item android:drawable="@drawable/stat_sys_battery_90" android:maxLevel="90" />
  94. <item android:drawable="@drawable/stat_sys_battery_91" android:maxLevel="91" />
  95. <item android:drawable="@drawable/stat_sys_battery_92" android:maxLevel="92" />
  96. <item android:drawable="@drawable/stat_sys_battery_93" android:maxLevel="93" />
  97. <item android:drawable="@drawable/stat_sys_battery_94" android:maxLevel="94" />
  98. <item android:drawable="@drawable/stat_sys_battery_95" android:maxLevel="95" />
  99. <item android:drawable="@drawable/stat_sys_battery_96" android:maxLevel="96" />
  100. <item android:drawable="@drawable/stat_sys_battery_97" android:maxLevel="97" />
  101. <item android:drawable="@drawable/stat_sys_battery_98" android:maxLevel="98" />
  102. <item android:drawable="@drawable/stat_sys_battery_99" android:maxLevel="99" />
  103. <item android:drawable="@drawable/stat_sys_battery_100" android:maxLevel="100" />
  104. </level-list></FONT>
复制代码
打开\res\drawable\stat_sys_battery_charge.xml,修改为如下内容保存
  1. <FONT color=dimgray><?xml version="1.0" encoding="utf-8"?>
  2. <level-list
  3. xmlns:android="http://schemas.android.com/apk/res/android">
  4. <item android:drawable="@drawable/stat_sys_battery_charge_1" android:maxLevel="1" />
  5. <item android:drawable="@drawable/stat_sys_battery_charge_2" android:maxLevel="2" />
  6. <item android:drawable="@drawable/stat_sys_battery_charge_3" android:maxLevel="3" />
  7. <item android:drawable="@drawable/stat_sys_battery_charge_4" android:maxLevel="4" />
  8. <item android:drawable="@drawable/stat_sys_battery_charge_5" android:maxLevel="5" />
  9. <item android:drawable="@drawable/stat_sys_battery_charge_6" android:maxLevel="6" />
  10. <item android:drawable="@drawable/stat_sys_battery_charge_7" android:maxLevel="7" />
  11. <item android:drawable="@drawable/stat_sys_battery_charge_8" android:maxLevel="8" />
  12. <item android:drawable="@drawable/stat_sys_battery_charge_9" android:maxLevel="9" />
  13. <item android:drawable="@drawable/stat_sys_battery_charge_10" android:maxLevel="10" />
  14. <item android:drawable="@drawable/stat_sys_battery_charge_11" android:maxLevel="11" />
  15. <item android:drawable="@drawable/stat_sys_battery_charge_12" android:maxLevel="12" />
  16. <item android:drawable="@drawable/stat_sys_battery_charge_13" android:maxLevel="13" />
  17. <item android:drawable="@drawable/stat_sys_battery_charge_14" android:maxLevel="14" />
  18. <item android:drawable="@drawable/stat_sys_battery_charge_15" android:maxLevel="15" />
  19. <item android:drawable="@drawable/stat_sys_battery_charge_16" android:maxLevel="16" />
  20. <item android:drawable="@drawable/stat_sys_battery_charge_17" android:maxLevel="17" />
  21. <item android:drawable="@drawable/stat_sys_battery_charge_18" android:maxLevel="18" />
  22. <item android:drawable="@drawable/stat_sys_battery_charge_19" android:maxLevel="19" />
  23. <item android:drawable="@drawable/stat_sys_battery_charge_20" android:maxLevel="20" />
  24. <item android:drawable="@drawable/stat_sys_battery_charge_21" android:maxLevel="21" />
  25. <item android:drawable="@drawable/stat_sys_battery_charge_22" android:maxLevel="22" />
  26. <item android:drawable="@drawable/stat_sys_battery_charge_23" android:maxLevel="23" />
  27. <item android:drawable="@drawable/stat_sys_battery_charge_24" android:maxLevel="24" />
  28. <item android:drawable="@drawable/stat_sys_battery_charge_25" android:maxLevel="25" />
  29. <item android:drawable="@drawable/stat_sys_battery_charge_26" android:maxLevel="26" />
  30. <item android:drawable="@drawable/stat_sys_battery_charge_27" android:maxLevel="27" />
  31. <item android:drawable="@drawable/stat_sys_battery_charge_28" android:maxLevel="28" />
  32. <item android:drawable="@drawable/stat_sys_battery_charge_29" android:maxLevel="29" />
  33. <item android:drawable="@drawable/stat_sys_battery_charge_30" android:maxLevel="30" />
  34. <item android:drawable="@drawable/stat_sys_battery_charge_31" android:maxLevel="31" />
  35. <item android:drawable="@drawable/stat_sys_battery_charge_32" android:maxLevel="32" />
  36. <item android:drawable="@drawable/stat_sys_battery_charge_33" android:maxLevel="33" />
  37. <item android:drawable="@drawable/stat_sys_battery_charge_34" android:maxLevel="34" />
  38. <item android:drawable="@drawable/stat_sys_battery_charge_35" android:maxLevel="35" />
  39. <item android:drawable="@drawable/stat_sys_battery_charge_36" android:maxLevel="36" />
  40. <item android:drawable="@drawable/stat_sys_battery_charge_37" android:maxLevel="37" />
  41. <item android:drawable="@drawable/stat_sys_battery_charge_38" android:maxLevel="38" />
  42. <item android:drawable="@drawable/stat_sys_battery_charge_39" android:maxLevel="39" />
  43. <item android:drawable="@drawable/stat_sys_battery_charge_40" android:maxLevel="40" />
  44. <item android:drawable="@drawable/stat_sys_battery_charge_41" android:maxLevel="41" />
  45. <item android:drawable="@drawable/stat_sys_battery_charge_42" android:maxLevel="42" />
  46. <item android:drawable="@drawable/stat_sys_battery_charge_43" android:maxLevel="43" />
  47. <item android:drawable="@drawable/stat_sys_battery_charge_44" android:maxLevel="44" />
  48. <item android:drawable="@drawable/stat_sys_battery_charge_45" android:maxLevel="45" />
  49. <item android:drawable="@drawable/stat_sys_battery_charge_46" android:maxLevel="46" />
  50. <item android:drawable="@drawable/stat_sys_battery_charge_47" android:maxLevel="47" />
  51. <item android:drawable="@drawable/stat_sys_battery_charge_48" android:maxLevel="48" />
  52. <item android:drawable="@drawable/stat_sys_battery_charge_49" android:maxLevel="49" />
  53. <item android:drawable="@drawable/stat_sys_battery_charge_50" android:maxLevel="50" />
  54. <item android:drawable="@drawable/stat_sys_battery_charge_51" android:maxLevel="51" />
  55. <item android:drawable="@drawable/stat_sys_battery_charge_52" android:maxLevel="52" />
  56. <item android:drawable="@drawable/stat_sys_battery_charge_53" android:maxLevel="53" />
  57. <item android:drawable="@drawable/stat_sys_battery_charge_54" android:maxLevel="54" />
  58. <item android:drawable="@drawable/stat_sys_battery_charge_55" android:maxLevel="55" />
  59. <item android:drawable="@drawable/stat_sys_battery_charge_56" android:maxLevel="56" />
  60. <item android:drawable="@drawable/stat_sys_battery_charge_57" android:maxLevel="57" />
  61. <item android:drawable="@drawable/stat_sys_battery_charge_58" android:maxLevel="58" />
  62. <item android:drawable="@drawable/stat_sys_battery_charge_59" android:maxLevel="59" />
  63. <item android:drawable="@drawable/stat_sys_battery_charge_60" android:maxLevel="60" />
  64. <item android:drawable="@drawable/stat_sys_battery_charge_61" android:maxLevel="61" />
  65. <item android:drawable="@drawable/stat_sys_battery_charge_62" android:maxLevel="62" />
  66. <item android:drawable="@drawable/stat_sys_battery_charge_63" android:maxLevel="63" />
  67. <item android:drawable="@drawable/stat_sys_battery_charge_64" android:maxLevel="64" />
  68. <item android:drawable="@drawable/stat_sys_battery_charge_65" android:maxLevel="65" />
  69. <item android:drawable="@drawable/stat_sys_battery_charge_66" android:maxLevel="66" />
  70. <item android:drawable="@drawable/stat_sys_battery_charge_67" android:maxLevel="67" />
  71. <item android:drawable="@drawable/stat_sys_battery_charge_68" android:maxLevel="68" />
  72. <item android:drawable="@drawable/stat_sys_battery_charge_69" android:maxLevel="69" />
  73. <item android:drawable="@drawable/stat_sys_battery_charge_70" android:maxLevel="70" />
  74. <item android:drawable="@drawable/stat_sys_battery_charge_71" android:maxLevel="71" />
  75. <item android:drawable="@drawable/stat_sys_battery_charge_72" android:maxLevel="72" />
  76. <item android:drawable="@drawable/stat_sys_battery_charge_73" android:maxLevel="73" />
  77. <item android:drawable="@drawable/stat_sys_battery_charge_74" android:maxLevel="74" />
  78. <item android:drawable="@drawable/stat_sys_battery_charge_75" android:maxLevel="75" />
  79. <item android:drawable="@drawable/stat_sys_battery_charge_76" android:maxLevel="76" />
  80. <item android:drawable="@drawable/stat_sys_battery_charge_77" android:maxLevel="77" />
  81. <item android:drawable="@drawable/stat_sys_battery_charge_78" android:maxLevel="78" />
  82. <item android:drawable="@drawable/stat_sys_battery_charge_79" android:maxLevel="79" />
  83. <item android:drawable="@drawable/stat_sys_battery_charge_80" android:maxLevel="80" />
  84. <item android:drawable="@drawable/stat_sys_battery_charge_81" android:maxLevel="81" />
  85. <item android:drawable="@drawable/stat_sys_battery_charge_82" android:maxLevel="82" />
  86. <item android:drawable="@drawable/stat_sys_battery_charge_83" android:maxLevel="83" />
  87. <item android:drawable="@drawable/stat_sys_battery_charge_84" android:maxLevel="84" />
  88. <item android:drawable="@drawable/stat_sys_battery_charge_85" android:maxLevel="85" />
  89. <item android:drawable="@drawable/stat_sys_battery_charge_86" android:maxLevel="86" />
  90. <item android:drawable="@drawable/stat_sys_battery_charge_87" android:maxLevel="87" />
  91. <item android:drawable="@drawable/stat_sys_battery_charge_88" android:maxLevel="88" />
  92. <item android:drawable="@drawable/stat_sys_battery_charge_89" android:maxLevel="89" />
  93. <item android:drawable="@drawable/stat_sys_battery_charge_90" android:maxLevel="90" />
  94. <item android:drawable="@drawable/stat_sys_battery_charge_91" android:maxLevel="91" />
  95. <item android:drawable="@drawable/stat_sys_battery_charge_92" android:maxLevel="92" />
  96. <item android:drawable="@drawable/stat_sys_battery_charge_93" android:maxLevel="93" />
  97. <item android:drawable="@drawable/stat_sys_battery_charge_94" android:maxLevel="94" />
  98. <item android:drawable="@drawable/stat_sys_battery_charge_95" android:maxLevel="95" />
  99. <item android:drawable="@drawable/stat_sys_battery_charge_96" android:maxLevel="96" />
  100. <item android:drawable="@drawable/stat_sys_battery_charge_97" android:maxLevel="97" />
  101. <item android:drawable="@drawable/stat_sys_battery_charge_98" android:maxLevel="98" />
  102. <item android:drawable="@drawable/stat_sys_battery_charge_99" android:maxLevel="99" />
  103. <item android:drawable="@drawable/stat_sys_battery_charge_100" android:maxLevel="100" />
  104. </level-list></FONT>
复制代码
7. 回编译所有文件,得到SystemUI.apk

8. 用WinRAR打开回编译后的SystemUI.apk文件[1]和原来的SystemUI.apk文件[2]
把1中的resources.arsc文件拖到[2]中,压缩方式选择“存储”。同样,用[1]中的stat_sys_battery.xml和stat_sys_battery_charge.xml替换[2]中的同名文件。把那200个图标也放到[2]的\res\drawable-hdpi文件夹中,“存储”

9. 制作刷机包,把[2]刷入系统。或者用替换的方式也可以

修改后的电量图标以1:1的比例显示在状态栏中(100×24),比较大,不过更直观,个人爱好,仅供参考
充电时没有动画,显示“正在充电”字样
您需要登录后才可以回帖 登录 | 注册

© 2008-2025 移动叔叔. 版权所有,专业的网络售后平台 ( 闽ICP备18006692号-3 )

商务合作点击这里给我发消息|Email:service@mobileuncle.com|手机版|移动叔叔     

GMT+8, 2025-1-8 22:22 , Processed in 0.180090 second(s), 13 queries , Gzip On, Memcache On.

返回顶部