[Guide]Adding/Changing About Device Header Image - Xiaomi Redmi Note 3 Guides, News, & Discussion

Adding/Changing About Phone Header Image
Welcome! Here i will guide you to add/change the header of your ROMs "About Phone" section.
Adding the image(If there is no image by default)​
Requirements:-
Knowledge to decompile/recompile apk's
Working with images (To create your own image)
Knowledge about apktool, recompiling, decompiling
Procedure:-
Step 1:- Install your ROMs framework apk to apktool.
Step 2:- Get your ROMs Settings.apk
Step 3:- Decompile the apk and open the directory where its decompiled.
Step 4:- Go to res>xml folder and search for a file called "device_info_settings.xml" and open it.
Step 5:- In the file, at the top you will see the following line or something similar:-
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:settings="http://schemas.android.com/apk/res-auto">
Add the following line after the above code and save the file:-
Code:
<PreferenceScreen android:layout="@drawable/header" android:key="header" />
Step 6:- Now go to the drawable folder and add an image called header.png/jpg (Both extensions will do)
Note:- Any resolution will do so set it according to your flavour.
Step 7:- Now recompile the apk, put the META-INF folder from original folder to the newly created apk.
Step 8:- Copy the apk to your internal storage and use a file explorer like ES and root browser. Copy the apk file from internal storage to system/priv-app/Settings/here and the permission to rw-r-r.
Changing the default header image
Procedure:-
Step 1:- Decompile apk and head into res>xml
Step 2:- Find the file device_info_settings.xml and open it.
Step 3:- You will find the following or similar code:-
Code:
<PreferenceScreen android:layout="@drawable/header" android:key="header" />
Step 4:- Near the @drawable part there will be a name (here its header in your file it may differ). Change that header into "custom_header".
Step 5:- Go to the drawable directory and add a image file name "custom_header.png/jpg" with the resoultion that suits you.
Step 6:- Recompile the apk and copy the META-INF file from original to newly made apk.
Note:- For any errors, take a logcat and send it to me, I will see into it. Also, keep a backup of settings.apk in case anything goes wrong.
Please hit thanks if i helped.
XDA:DevDB Information
[Guide]Adding/Changing About Device Header Image, Tool/Utility for the Xiaomi Redmi Note 3
Contributors
Devam03
Version Information
Status: Stable
Created 2017-01-20
Last Updated 2017-01-20

Reserved

Reserved

seems your post in wrong section...please ask moderator to move this thread into correct section

Does this work even nougat?? I couldn't find the file.

Related

[30/08][TUTORIAL][GUIDE] Learn to make your own 'eye-candy' mods [Easy Steps]

Hi, I'm open this thread with the intention of help to all the people who wants give some 'eye-candy' to their SGSII. I'm taking as base the mods that I made for the Resurrection Remix ROM but this not means that only work on the RR ROM, since, what you can find here are guides, the only necessary to do it's follow the steps with the files from the ROM that you want.
Feedback and comments are welcome.
Remember, always make a Nandroid Backup before of flash any mod!
If you are using the "Technical way" and have some troubles at the moment of decompile/compile, take a look on this thread.
⊗ INDEX OF TUTORIALS ⊗
Decompile the .apk method [Technical Way]
How-to modify the SystemUI background
How-to modify the Dialer background
How-to change the Lockscreen Icon to swype
How-to add the Carrier Name on the status bar
Drag & Drop Method [Easy Steps for noobs]
How-to modify the SystemUI background
How-to modify the Dialer background
How-to modify the Toggles of the notification area
Useful Guides
How-to do it your own theme by kroz46 Drag & Drop Method [Easy Steps for noobs]
'VRTheme template' method by VillainROM team [Tested with Jelly Bean builds]
'Universal Flasher Tool' method [NOT tested with Jelly Bean builds]
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
⊗ Decompile the .apk method [Technical way] ⊗
⊗ How-to modify the SystemUI background ⊗​
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
1.- Extract the framework-res.apk from the path /system/framework, for do this just decompress the main .zip of your ROM
2.- Decompile the framework-res.apk with Android-Utility if you are on Linux & MAC (this a powerful tool and very simple to use, please read all the OP of @TommyTommatoe) if you are on Windows then use APK Tool
3.- Go to the path /res/drawable-nodpi
4.- Rename the image that you want use as background_holo_dark.png (remember that the image needs to be a resolution of 480x800 for a better experience)
5.- Paste the image on the folder /res/drawable-nodpi for replace the original one
8.- Compile the framework-res.apk
9.- Sign the framework-res.apk
10.- Here you have an example of the needed folders to make your modded apk flashable through recovery, the META-INF folder contain the script to make flashable the files if you want modify for show some custom text during the installation, go to the path /com/google/android/updater-script and modify the lines that i mark there. Then place the SystemUI.apk in the path /system/app (as you can see this just follow the structure of the folders in the main .zip of all the ROM's)
11.- Compress the folders META-INF and system in one .zip, name it as you want.
12.- Enjoy the MOD
⊗ How-to modify the Dialer background ⊗​
1.- Extract the Contacts.apk from the path /system/app, for do this just decompress the main .zip of your ROM
2.- Decompile the Contacts.apk with Android-Utility if you are on Linux & MAC (this a powerful tool and very simple to use, please read all the OP of @TommyTommatoe) if you are on Windows then use APK Tool
3.- Go to the path /res/drawable-nodpi
4.- Rename the image that you want use as background_dial_holo_dark.png (remember that the image needs to be a resolution of 480x800 for a better experience)
5.- Paste the image on the folder /res/drawable-nodpi for replace the original one
8.- Compile the Contacts.apk
9.- Sign the Contacts.apk
10.- Here you have an example of the needed folders to make your modded apk flashable through recovery, the META-INF folder contain the script to make flashable the files if you want modify for show some custom text during the installation, go to the path /com/google/android/updater-script and modify the lines that i mark there. Then place the SystemUI.apk in the path /system/app (as you can see this just follow the structure of the folders in the main .zip of all the ROM's)
11.- Compress the folders META-INF and system in one .zip, name it as you want.
12.- Enjoy the MOD
⊗ Drag & Drop Method [Easy Steps for noobs] ⊗
⊗ How-to change the SystemUI background ⊗​
1.- Extract the framework-res.apk from the main zip of your ROM and open it with a double clic
5.- Go to the path /res/drawable-nodpi
6.- Rename the image that you want use as background_holo_dark.png (remember that the image needs to be a resolution of 480x800 for a better experience)
7.- Drag and drop the image on the folder /res/drawable-nodpi for replace the original one
8.- Here you have an example of the needed folders to make your modded apk flashable through recovery, the META-INF folder contain the script to make flashable the files if you want modify for show some custom text during the installation, go to the path /com/google/android/updater-script and modify the lines that i mark there. Then place the SystemUI.apk in the path /system/app (as you can see this just follow the structure of the folders in the main .zip of all the ROM's)
9.- Compress the folders META-INF and system in one .zip, name it as you want.
10.- Enjoy the MOD
⊗ How-to change the Dialer background ⊗​
1.- Extract the Contacts.apk from the main zip of your ROM and open it with a double clic
2.- Go to the path /res/drawable-nodpi
3.- Rename the image that you want use as background_dial_holo_dark.png (remember that the image needs to be a resolution of 480x800 for a better experience)
4.- Drag and drop the image on the folder /res/drawable-nodpi for replace the original
5.- Here you have an example of the needed folders to make your modded apk flashable through recovery, the META-INF folder contain the script to make flashable the files if you want modify for show some custom text during the installation, go to the path /com/google/android/updater-script and modify the lines that i mark there. Then place the SystemUI.apk in the path /system/app (as you can see this just follow the structure of the folders in the main .zip of all the ROM's)
6.- Compress the folders META-INF and system in one .zip, name it as you want.
7.- Enjoy the MOD
⊗ How-to change the Toggles of the notification area ⊗​
1.- Extract the SystemUI.apk from your ROM and open it with a double clic.
2.- Go to the path /res/drawable
3.- Here you need replace the two images named: btn_off.png and btn_on.png
4.- When you have your images ready just drag and drop both images on the folder /res/drawable to replace the originals.
5.- Go to the path /res/drawable-hdpi and find all the images for the toggles, example: toggle_2g_1.png
6.- When you have your images ready just drag and drop both images on the folder /res/drawable-hdpi to replace the originals.
7.- Here you have an example of the needed folders to make your modded apk flashable through recovery, the META-INF folder contain the script to make flashable the files if you want modify for show some custom text during the installation, go to the path /com/google/android/updater-script and modify the lines that i mark there. Then place the SystemUI.apk in the path /system/app (as you can see this just follow the structure of the folders in the main .zip of all the ROM's)
8.- Compress the folders META-INF and system in one .zip, name it as you want.
9.- Enjoy the MOD
⊗ Extra Tutorials ⊗
⊗ How-to change the Lockscreen Icon to Swype [Technical way] ⊗​
1.- Extract the framework-res.apk from the path /system/framework, for do this just decompress the main .zip of your ROM
2.- Decompile the framework-res.apk with Android-Utility if you are on Linux & MAC (this a powerful tool and very simple to use, please read all the OP of TommyTommatoe) if you are on Windows then use APK Tool
3.- Go to the path /res/drawable-hdpi
4.- Rename the image that you want use as ic_lockscreen_handle_normal.png (remember, the stock image it's of 162 x 162 px)
5.- If you want change the icon when you "push" too, you need to change the image named ic_lockscreen_handle_pressed.png too
5.- Paste the images on the folder /res/drawable-hdpi for replace the original ones
8.- Compile the framework-res.apk
9.- Sign the framework-res.apk
10.- Here you have an example of the needed folders to make your modded apk flashable through recovery, the META-INF folder contain the script to make flashable the files if you want modify for show some custom text during the installation, go to the path /com/google/android/updater-script and modify the lines that i mark there. Then place the SystemUI.apk in the path /system/app (as you can see this just follow the structure of the folders in the main .zip of all the ROM's)
11.- Compress the folders META-INF and system in one .zip, name it as you want.
12.- Enjoy the MOD
⊗ How-to add the Carrier Name on the status bar [Technical way] ⊗​
1.- Extract the SystemUI.apk from the path /system/app, for do this just decompress the main .zip of your ROM
2.- Decompile the SystemUI.apk with Android-Utility (this a powerful tool and very simple to use, please read all the OP of TommyTommatoe) if you are on Windows then use APK Tool
3.- Go to the path /res/layout and open the status_bar.xml file
4.- Find this line:
Code:
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
5.- Above of that line insert this one:
Code:
<com.android.systemui.statusbar.phone.CarrierLabel android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textColor="@android:color/transparent" android:background="@drawable/carrier_logo" android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_alignParentLeft="true" />
6.- Save the .xml file and exit
7.- Go to the path res/drawable-hdpi and inside put the image that you want use, named as carrier_logo.png Note: The image must be of 100 x 45 px
8.- Compile the SystemUI.apk
9.- Sign the SystemUI.apk
10.- Here you have an example of the needed folders to make your modded apk flashable through recovery, the META-INF folder contain the script to make flashable the files if you want modify for show some custom text during the installation, go to the path /com/google/android/updater-script and modify the lines that i mark there. Then place the SystemUI.apk in the path /system/app (as you can see this just follow the structure of the folders in the main .zip of all the ROM's)
11.- Compress the folders META-INF and system in one .zip, name it as you want.
12.- Enjoy the MOD
⊗ 'Universal Flasher Tool' method ⊗
NOT tested on Jelly Bean builds​
The "Universal Flasher Tool", it's a tool developed by Spanish cookers and it's very easy to use:
First of all, download the latest version from here (the link it's on the bottom of the post) For the people who knows spanish will be very useful if you read all the OP.
When you have the downloaded file, unzip it, inside you find 6 files:
- META-INF folder
- MORPH folder
- tools folder
- XTRAS folder
- MOD.config file
- README.txt file
As I explain here the "fast and easy" way, the only things that you need are:
- META-INF folder
- MORPH folder
- MOD.config file
On the META-INF folder, it's the installation script (/META-INF/com/google/android/update-script) from here, the only things that you can add/modify it's the sentence ui_print(" "); and inside of the quoutes " " write the text that you want show on the recovery, for example:
ui_print(" ");
ui_print(" <GaboWinter Mods> ");
ui_print(" <made with> ");
Honestly, for the very very noob modders i'm not recommend change anything from here, be careful!
On the MORPH folder you can find two folders data and system, the files that you want change must be placed inside of the system folder, this is a recreation of the original paths from the zip of the main ROM so, if you want change the background of the System UI you need to recreate the path (just create the folders) /system/framework/framework-res.apk/res/drawable-nodpi and inside put the file (background_holo_dark.png) that you want set, just place the image and nothing more.
This step can be used to modify multiple files, just create the folders (paths) inside the system folder
On the MOD.config file you can find some tweaks, for example, you can set if you want or not clean the dalvik-cache when the script of installation finish, i recommend to you read the .txt file it's very simple.
As this method only changes the exact file (.png's) the mods must work on every version of your ROM (the paths never change), that's because with this we don't use the .apk's. Have in count that this method works pretty well with images but no with .xml's and other files, if you want mod some code then follow the [Technical Steps]
Good stuff.
Can I just ask what the font is that's used in the ROM design?
scayre32 said:
Can I just ask what the font is that's used in the ROM design?
Click to expand...
Click to collapse
Thanks mate, well actually it's Roboto Font
Enviado desde mi GT-I9100 usando Tapatalk 2
I meant
the font from your signature and some of the wallpapers that were made for the previous versions. Should have made that clearer, sorry.
Nice I always wanted to try to mod stuff thanks for the tutorials.
scayre32 said:
the font from your signature and some of the wallpapers that were made for the previous versions. Should have made that clearer, sorry.
Click to expand...
Click to collapse
Oh, sorry but i don't have that info. Actually @cyberboob it's who design that stuff, but i asked already when he tell me i pass you the information
shadowblade330 said:
Nice I always wanted to try to mod stuff thanks for the tutorials.
Click to expand...
Click to collapse
Thank you mate, i'm glad of give a little help
Enviado desde mi GT-I9100 usando Tapatalk 2
Use lockscreen mod on CM9 and it messed up my phone.
thanks
thanks gabo for sharing..i dont know bout others but this makes my phone more awesome
rakeshishere said:
Use lockscreen mod on CM9 and it messed up my phone.
Click to expand...
Click to collapse
What error gives you? Some fc?
I check the files, the issue it's caused for the lockscreen files, the framework of CM9 it's different than the one used by @bajee11, his mod only works on Resurrection Remix, i'm gonna edit the post with that warning
Thanks for the feedback and hope this can be solved soon
Enviado desde mi GT-I9100 usando Tapatalk 2
rakeshishere said:
Use lockscreen mod on CM9 and it messed up my phone.
Click to expand...
Click to collapse
This is a guide to create your own Mod, the Mod are provider here works with Resurrection Remix ics others rom has different version of framework-res.apk . Use this guide with ur own files of ur Rom
GaboWinter said:
What error gives you? Some fc?
I check the files, the issue it's caused for the lockscreen files, the framework of CM9 it's different than the one used by @bajee11, his mod only works on Resurrection Remix, i'm gonna edit the post with that warning
Thanks for the feedback and hope this can be solved soon
Enviado desde mi GT-I9100 usando Tapatalk 2
Click to expand...
Click to collapse
Yep, going by your post as these mods work with any ROM. I tried lockscreen mod (LockScreen_Carrier_No_Vib_White_CWM) and boot was stuck on CM9 29/5 nightly build.
At later point, I checked the lockscreen mod thread, it was clearly mentioned by
@bajee11 that it only works on RR 2.0 or AOKP based ROM.
Ok, OP updated for put the warnings about the non Resurrection Remix or AOKP based ROM's
Thanks to everyone for the feedback and sorry the inconveniences
PWOAH! THIS IS AWESOME! And to think i was considering paying for a theme.
rootingdestroyer said:
PWOAH! THIS IS AWESOME! And to think i was considering paying for a theme.
Click to expand...
Click to collapse
Glad you like it mate and hope be useful
Well, if you need one mod with some especific background just tell me
Enviado desde mi GT-I9100 usando Tapatalk 2
Hi,
Thanks for this tip but for rom stock for exemple, in contacts.apk there are no
/res/drawable-nodpi
and no
background_holo_dark.png
In which folder is it ?
Thanks
Ok GaboWinter asked me to explain this for someone asking about the sig I made.
Basically the "rr" and opened "x" are not fonts... but shapes I made using the pen tool in photoshop. The rest is a font called Orbitron ....that I edited into a certain angle by going to Edit -Transform- SKEW. Then apply effects to.
sikuland said:
Hi,
Thanks for this tip but for rom stock for exemple, in contacts.apk there are no
/res/drawable-nodpi
and no
background_holo_dark.png
In which folder is it ?
Thanks
Click to expand...
Click to collapse
Well i'm not sure that this works on stock, the files contained are differents than a Custom ROM and the mods need this files from Custom, sorry.
But i'm gonna search something that can help you
cyberboob said:
Ok GaboWinter asked me to explain this for someone asking about the sig I made.
Basically the "rr" and opened "x" are not fonts... but shapes I made using the pen tool in photoshop. The rest is a font called Orbitron ....that I edited into a certain angle by going to Edit -Transform- SKEW. Then apply effects to.
Click to expand...
Click to collapse
Thanks for the explanation mate
Enviado desde mi GT-I9100 usando Tapatalk 2
That squares image in your other post looks amazing on my phone with the custom font. Thanks so much You're awesome!
rootingdestroyer said:
That squares image in your other post looks amazing on my phone with the custom font. Thanks so much You're awesome!
Click to expand...
Click to collapse
I'm glad that like you mate and thanks a lot for your words
Enviado desde mi GT-I9100 usando Tapatalk 2
Update
New OP update!
Added:
How-to change the Lockscreen Icon to Swype [Technical Steps]

[GUIDE][MOD] Add Pie Controls to your ROM with ease!

How to Add Pie Controls to your 4.+ ROM with ease
Any and all feedback is welcome/encouraged! Lets Make an awesome ROM together!
What You Need:
PC
A program to decompile/recompile apk's ( I prefer Virtuous Ten Studio)
The latest LMT Launcher
The settings.apk and framework-res.apk from your ROM
Since I have already typed up all of the code, I will just provide you with it and tell you where to place it. :laugh:
Step 1: Install your framework for your apk tool of choice, and decompile your settings.apk. Decompile your LMT Launcher apk as well + uninstall any previous version from your device.
Step 2: To get the easiest step out of the way, inside of the decompiled LMT launcher, open the AndroidManifest.xml file and delete the below line. Now save and recompile.
Code:
<category android:name="android.intent.category.LAUNCHER" />
Step 3: Navigate to the res>xml folder inside of you decompiled settings apk and open the settings_headers.xml file.
Paste the code below where you feel fit, I have chosen to place the code under the
"<intent android:action="com.android.settings.MANUFACTURER_APPLICATION_SETTING" />" line.
Code:
</header>
<header android:title="@string/navigation_settings" />
<header android:id="@id/pienav_settings" android:title="@string/pienav_label">
<intent android:targetPackage="com.android.lmt" android:action="android.intent.action.MAIN" android:targetClass="com.android.lmt.LMT" />
Step 4: Navigate to the res>values folder inside of you decompiled settings apk and open the strings.xml file. Paste the following code at the bottom of the file above the </resources> line
Code:
<string name="navigation_settings">Navigation</string>
<string name="pienav_label">Pie Controls</string>
Step 5: Navigate to the res>values folder inside of you decompiled settings apk and open the ids.xml file. Paste the following code at the bottom of the file above the </resources> line
Code:
<item type="id" name="pienav_settings">false</item>
Save everything and recompile your settings
How to Flash:
I have made a zip file with necessary folders and updater script, all you have to do is place your modded LMT Launcher in the data/app folder and your modded Settings in the system/app folder, then flash it!
reserved
I followed your instructions and I was able to recompile the Settings.apk (AOKP 4.2.2 Galaxy Nexus) but after pushing the apk to the system and applying proper permissions, the Settings app doesn't show up on my app drawer. I also used VTS to compile it and (I think) I installed the framework-res.apk correctly. Any idea what went wrong?
daggerxXxsin said:
I followed your instructions and I was able to recompile the Settings.apk (AOKP 4.2.2 Galaxy Nexus) but after pushing the apk to the system and applying proper permissions, the Settings app doesn't show up on my app drawer. I also used VTS to compile it and (I think) I installed the framework-res.apk correctly. Any idea what went wrong?
Click to expand...
Click to collapse
Download the Pie Flasher here, & put your settings.apk inside of the system app folder and put your modded lmt launcher.apk inside of the data app folder, then flash.
Make sure you didn't remove the "<category android:name="android.intent.category.LAUNCHER" />" line from your settings.apk

CM12 superuser mod without computer

Since Serajr 'one click' superuser mod only works on stock ROM, you have to use apktool to achieve the same on CM. Here's how you can do it on your phone. Only tested on official CM12 on Xperia Z1c, with a clean flash of /system, (unmodified), but probably can be applied elsewhere, maybe with some adjustment.
1. Follow steps 1 and 2 in this post, (except for the part about copying theme files) - http://forum.xda-developers.com/sony-xperia-z1-compact/general/tweak-theme-computer-t3279649 Note that the /system/framework/SemcGenericUxpRes/SemcGenericUx file is not present in CM ROM, so instead you would copy /system/framework/org.cyanogenmod.platform-res.apk. Also copy /system/framework/services.jar to the same directory.
2. Import the first 2 files as framework, according to step 3 in the link above, then tap on services.jar, and 'decompile all'. You will end up with a folder called 'services-src'.
3. Using a root browser and capable text editor, (I used Mixplorer and Jota+), follow instructions to mod PackageManagerService.smali file here - http://forum.xda-developers.com/showpost.php?p=62909773&postcount=4
Notes on this step: This file is over 60,000 lines long, which is why I specified 'capable' above. Many text editing programs won't handle it very well. Even if they can display it OK, you're going to need something that has a good search function, and copy/paste ability or it will be a big headache trying to do this on a phone. I found the first line to edit somewhere around line 8,700, by searching for 'compareSignatures'. The tutorial recommends using the word 'cannot' to help find the second one, but that didn't work for me. I used 'compareSignature' for that also, and just used the arrows to jump ahead through the search results until I found it.
4. Once the mods are made, save and exit. Then go back to apktool, and tap on 'services-src' folder and choose 'recompile'. You will end up with a file called 'services.apk'. All that is in the 'apk' is a classes.dex file. Use Mixplorer or RTB to extract the classes.dex from the apk. Then, with Mixplorer, go into your original services.jar, (that you copied into apktool folder), and delete the classes.dex file in there. Then go back to your new classes.dex, that you extracted from services.apk, and copy it into the services.jar. Using Mixplorer, you don't have to unzip/rezip or extract anything. Just long-press your new classes.dex, choose copy, then go into the jar just by tapping it, and then paste.
5. Move the new services.jar to /system/framework and reboot, (of course back up your original just in case).
The only way I know to test su mod is to attempt to use something that claims to require it, so I tested it with this - http://forum.xda-developers.com/cro...t-xperia-z5-systemui-particle-effect-t3206206 (the same thread as above). See screenshots for success verification.
very nice

[Guide] 3Min Battery Mod(Step By Step Instructions) using BatchApkTool

Hi guys, i really love the 3Min battery Mod from @gharrington 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:
- @gharrington for his Mod&Guide.
- bursoft for Batch ApkTool.
- @bdorr1105 for his Thread.
- https://androidmtk.com for the Guide&Tools.
Awesome tutorial.. I am looking to add it into a modified stock rom for a Samsung tablet that I have.. Do you know of any easy to follow tutorials for that? i am very new to this part of android..lol.. i am usually on the flashing end and now i am trying to help out for this tab because it has no custom roms until mine. Again, awesome tutorial.
glockman4519 said:
Awesome tutorial.. I am looking to add it into a modified stock rom for a Samsung tablet that I have.. Do you know of any easy to follow tutorials for that? i am very new to this part of android..lol.. i am usually on the flashing end and now i am trying to help out for this tab because it has no custom roms until mine. Again, awesome tutorial.
Click to expand...
Click to collapse
Ty much appreciated. It has been a while since I created this thread since then I have stopped using this mod because it's kind of a headache to do it for every update add to that since Google already enabled the battery percentage inside the battery there was no need any more for the mod. Anyway it's still great to be able to change from time to time. Regarding the tutorial I am sorry to say I haven't tried to create a custom ROM so I can't help you much with that but I am sure there are a lot of tutorials but will require some time to search. Good luck with your project.

Theme Overlay Mods

Any settings made in the value files found within framework-res.apk can be overlaid with new values if an archive called framework-res is placed in /system/media/theme/default.
The framework-res archive is just a zip file without the .zip extention and must contain a file called theme_values.xml
The format of the contents of theme_values.xml is critical and all value entries placed in the <MIUI_Theme_Values> section:
Code:
<?xml version="1.0" encoding="utf-8"?>
<MIUI_Theme_Values>
inset lines here
inset lines here
inset lines here
</MIUI_Theme_Values>
If you already have a framework-res file in /system/media/theme/default, this means you already have some overlaid settings. Just merge your wanted settings into the same file being careful not to contradict existing lines.
I have attached the decompiled value files that contain the majority of what you may wish to play with. Copy and paste lines from these files into theme_values.xml with your edited values.
The value files come from 6.12.29 but are almost universal across all MIUI8 ROMs.
I have also included a file called framework_tweaks.xml which is my quick reference for useful tweaks - it is by no means exhaustive. Remove my comments from lines if you copy directly from this file.
The big advantage in modding this way is that it is very easy to re-edit the mod and easily reversed by simply deleting the file. This is much easier than decompiling and recompiling the parent file every time you want to change something. Furthermore, some files simply will not recompile successfully.
Other overlay files that can be created and placed in /system/media/theme/default
com.miui.home
values from MiuiHome.apk
Commonly used to change grid size for launcher
com.android.systemui
values from MiuiSystemUI.apk
Commonly used to change Status bar and toggles grid
framework-miui-res
values from framework-ext-res.apk
Commonly used to set toggles grid columns
Mods that are pure overlays will be attached here.
A comprehensive MIUI Home Launcher grid mod will be added next time I run a ROM with stock launcher
Contributions to the mods welcome
This is amazing!!!
After trying so hard to decompile/recompile/package/sign etc the framework-res.apk just to change two values in dimens.xml AND FAILLING
This is SOOOO much easier!
THANK YOU SO MUCH FOR THIS!
@ugene1980 Download TickleMyAndroid from its XDA Thread for decompile/recompile apks - it will do everything you need. Don't re-sign framework files or system apps.
Note that the full complement of framework files consist of the following:
framework-ext-res.apk
mediatek-res.apk
framework-res.apk
miui.apk - rename this to miui-res.apk to be recognized as a framework file
miuisystem.apk - rename this to miusystem-res.apk to be recognized as a framework file
jajk said:
@ugene1980 Download TickleMyAndroid from its XDA Thread for decompile/recompile apks - it will do everything you need. Don't re-sign framework files or system apps.
Note that the full complement of framework files consist of the following:
framework-ext-res.apk
mediatek-res.apk
framework-res.apk
miui.apk - rename this to miui-res.apk to be recognized as a framework file
miuisystem.apk - rename this to miusystem-res.apk to be recognized as a framework file
Click to expand...
Click to collapse
Nice, i'll give it a try, hope it works for miui 9.
I'm assuming mediatek-res.apk won't be needed if the device uses a SD835 instead of a mediatek processor?
@ugene1980 It works on MIUI9. You assume correctly
Can I use this mod to create AMOLED theme? And which app will be themed?
Coz MIUI theme manager failed to theme other than icon and wallpaper on MIUI 9 (Marshmallow).
Thanks.
Hi, thanks so much for your hints.
I've created two mods for MIUI9 on MiMix2 8.1.26 Beta rom, com.miui.home and framework-miui-res.
The mods flaulessly work, but only if the phone is rooted.
- Firstly rooting was needed because I had to put the files on /system and change permissions... but once checked I created a flashable zip that makes the work from TWRP.
- Once created the flashable .zip... rooting is not needed to modify system partition... but it doesn't work without root.
- Looking at same files but inside /data/system/theme (files created by themes app) I discovered some things to try:
-- Put 0755 permission with 9801 owner and group
-- Make framework-miui-res with the same structure... with filters.xml and framework-miui folder
- No way... I cannot make it work without root... and all the attempts worked very well if the phone is rooted.
Do you know how to make it work withour rooting?
Best regards.
---------- Post added at 04:06 PM ---------- Previous post was at 04:04 PM ----------
jajk said:
@ugene1980 Download TickleMyAndroid from its XDA Thread for decompile/recompile apks - it will do everything you need. Don't re-sign framework files or system apps.
Note that the full complement of framework files consist of the following:
framework-ext-res.apk
mediatek-res.apk
framework-res.apk
miui.apk - rename this to miui-res.apk to be recognized as a framework file
miuisystem.apk - rename this to miusystem-res.apk to be recognized as a framework file
Click to expand...
Click to collapse
Only to get your attention
@Huexxx It could be an sepolicy issue. What version Android and what version security update will determine how hard it is to get something foreign in System to execute.
jajk said:
@Huexxx It could be an sepolicy issue. What version Android and what version security update will determine how hard it is to get something foreign in System to execute.
Click to expand...
Click to collapse
Alright, I'll look deeper inside the logs.
Thanks for the point.
Enviado desde mi Mi MIX 2 mediante Tapatalk

Categories

Resources