[Nexus 6P Q&A, Help & Troubleshooting] Rashad83:
Hi guys, i really love the 3Min battery Mod from [MENTION=4619873]gharrington[/MENTION] Tyvm bro. There is a lot of threads of how to make it yourself but i think most of them are not too detailed and cover everything. So since i use these instructions my self i thought of sharing them in case someone may benefit from it.

Preparation:

:

1. Download the latest BatchApkTool .

2. Tools needed and how to extract System.img.

3. Recommended tools needed: Notepad ++, 7zip or Winrar

Instructions:

:

A.

1. Download the latest BatchApkTool unzip it and move the need files to their designated folders explained in the next step.

2. We need to get SystemUI folder and framework folder(Inside it Framework_res.apk and arm64 folder is needed) either from a System.img in that case use the guide in the preparation section on how to extract it or import them from your device using any file manager with root.

3. Put SystemUI folder in _priv-app folder, and framework folder in to _framework folder.

B.

Open BatchApkTool select your language make sure that all the settings match your rom, enter the following numbers for changes:

83. Smali(By default it's the latest "2.2 latest when writing this" so just check it in case)

84. Api level: ------------- select 23( for Marshmallow)

85. Apktool(By default it's the latest stable version "it was 2.2.0 when writing this" just make sure it is)

C.

1. Under

Smali

section select '01 Deodex all apks and jars'(In case your rom isn't deodexed yet if it is skip this step). If your rom is stock then your SystemUi.apk needs to be deodexed for this to work. (For Nexus 6p select Arm64 when asked)

2.Under

Smali

section select '02' to move the deodexed files to _Input_Apk folder.

*Make a backup of META-INF folder and AndroidManifest.xml after extracting them from the deodexed SystemUI.apk file using Winrar or 7zip.

3.Under

ApkTool

section select '1' to decompile Apks.

4. After that go to _Input_Apk folder and open the decompiled SystemUI folder, navigate to res/layout/system_icons.xml and open with notepad ++

5. Find:

Code:

android:layout_width="9.5dip"

and

Code:

android:layout_height="14.5dip"

Note: These values may not be an exact match, doesn't matter

Change both values to

Code:

android:layout_width="0.0dip"

and

Code:

android:layout_height="0.0dip"

6. Hit enter and directly underneath that line add the following:

Code:

<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content" />

7. Save your work and close notepad ++

8. You now need to navigate to smali/com/android/systemui/statusbar/policy folder

** Download the latest Modfiles package(3MinitBatterySettings, MinitBatteryResources, 3 Smali files) needed from here or main website.

9. Copy the 3 smali files(files that end with .smali) into that policy folder.

10. Time to recompile the SystemUI.apk. Under

ApkTool

section select '3 recompile apks' in Batchapktool.

11. Once recompiling of SystemUI.apk is complete go to it in _OUT_APK you will find it there, open it with 7zip or Winrar and

Don't Extract

.

12. Delete META-INF folder and AndroidManifest.xml from newly recompiled SystemUI.apk and replace them with the original backup we took in step C.2.

13. Download the 3MinitBattery_Template1.zip(will remove original SystemUi.apk and replace it) or 3Minit_Battery_Template2.zip(Will not remove the original SystemUi.apk and will leave it for you to remove it manually in case you want to back it up).

14. Use one of the template zips then open it

don't extract it

just open it with Winrar or 7zip and drop 3MinitBatterySettings, MinitBatteryResources that we got in step C.8 to their respective folders in the zip file. Drop the newly recompiled SystemUI.apk to SystemUI folder if you choose template 1 and if you choose template 2 put it in priv-app folder.

P.s: If you choose template 2 after flashing it go to system/priv-app/SystemUI folder in your device and with any file manger with root delete SystemUi.apk after you back it up to where ever you choose then reboot the device.

15. After this make a backup of your rom and flash the zip.

16. To use 3minBattery app open it and choose your customization then reboot you should see the changes after that. Good luck! :good:

Credits go to:

- [MENTION=4619873]gharrington[/MENTION] for his Mod&Guide.

- bursoft for Batch ApkTool.

- [MENTION=1195110]bdorr1105[/MENTION] for his Thread.

- https://androidmtk.com for the Guide&Tools.