[GUIDE][INDEX]How to modify an apk - Android Themes

How to modify an apk​
Intro:
I’ve done several threads about how to theme and other similar topics but the info is sparse, so this ultimate guide/index will seat proudly in the theme section of XDA and will be updated when new things come, and as I learn more. This isn’t a beginners guide, I’m here trying to be as complete as possible, with links, references, ...
This initial version of the thread isn't here to stay, if you could contribute to this thread, it would mean the world to me, and would clearly help the community (of course I'll mention you for your contribution )
And keep at mind that I’m just an enthusiast, nothing more, and that this thread has been made only by me, so it's far from perfect. If I made any mistakes or if you want to add something please let me know.
Legal aspect:
Using this knowledge to infringe copyright is not only illegal, it’s detrimental to the community. The only legal case, and the only usage of this info condoned, is using it to theme OPEN SOURCE apps (because most of the time, commercial apps forbid reverse engineering in their policies). So don’t worry, theming AOSP is legal. You can always ask the permission of the devs for an authorization to customize their apps, make sure to ask before modding, and distributing the result.
Now I’m not a lawyer, but you can learn more on the legal aspect of reverse engineering on this Stackexchange post.
Summary of this thread:
I-Requirements
II-Download APKs
III-Decompile
IV-What and how to modify
V-Recompile
VI-Sign and Zipalign
VII-Installing the apk
VIII-Other ways to theme your device
IX-Theming related topics
X-Not covered topics
XI-Mods Center
XII-Reserved​

I-Requirements​
A)Java:
It's essential, almost mandatory, the Java Development Kit (JDK) and Java Runtime Environment (JRE) must be installed to use java based tools.
How to install the JDK and JRE
(download and follow the instructions, it’s pretty simple)​
Then, set the path to "java home", you need to do that in order to use java properly within your terminal:
Here’s a tutorial I found​
To check if everything is okay, open a terminal anywhere and enter java --version. If it returns the version of the JDK and JRE you’re good.
B)Android SDK:
Unfortunately we aren’t able to download the Android SDK alone anymore, I used to consider it as a requirement, but now I don’t because some people don’t have the space to install the whole Android Studio IDE just to use the Android SDK.
C)Others:
I suppose that list is going to expand, those two above are the main ones, but if there's something else you need, I'll make sure to put it here

II-Download APKs​
This sounds stupid to take one whole post for that, but sometimes it’s a drag, so here are some ways you can grab the apk you want to modify.
A)APKs form your phone:​Every app you installed from the playstore is under /data/app. With a root explorer like the excellent MiXplorer, you can browse to it and see the icons representing the apps on your phone.
There is an apk called base.apk, that’s the one you want.
Sometime there might be parts called split_....apk along with base.apk, for the excraction of those you’ll need tools like the amazing app called SAI (Split APK Installer), it’s a graphical interface so I’ll assume you’ll figure out how to use it yourself
SAI on the Play Store​
B)From internet:​My two trusted sources I use: APK Mirror, XDA Labs (gone for now)
I also use this chrome module, it has simplified my life sooooo much, it’s provided by the APKmirror team: Toolbox for Google Play Store™
C)Your Sources:​If I missed any good and trusted website, let me know

III-Decompile​This is getting serious now.
If you want to modify the apk, you need to have what’s inside: the code.
A)Resources: Decompile Binary XMLs to Human-Readable XMLs:​We use APKtool for that, it decompiles the resources.arsc file to the res folder, and decodes binary XMLs to human-readable XMLs.
1-How to install APKtool:​How to install APKtool​
2-How to use APKtool:​There are 3 main commands you need to know about:
apktool d [nameoftheapk].apk​Used to decompile the apk. There are several options you can use with that command, they're specified in APKtool's documentation (in the credits).
apktool if [nameoftheframework].apk​Used to set the framework files to decompile properly APKs. Usually some OEMs add framework APKs into Android for their apps to work, so we need to find and copy them, then “install” them with the apktool if command to APKtool. You can learn more about that on APKtool's website (in the credits).
apktoool b [nameoftheapk].apk​Used to recompile the apk. The final apk can be found inside the decompiled apk’s folder, in a subfolder named dist. You can also use various options with that command (listed in the documentation, link in the credits).
B) Decompile Classes.dex to smali:​APKtool also convert classes.dex files to .smali files, but keep at mind that you won’t be able to see the java source code in those files.
The .dex extention is for Dalvik Executable, which is very self-explanatory, and is also a binary format. APKtool turn them into .smali files, which are Human-readable files, not in java, but still! And if you want to modify the code, you’ll have to learn smali. (covered in the next part, good luck with that lol)
C)Read java source code :​There’s actually a way to see the java source code of an Android app, using some tools:
JD-GUI (or any other java decompiler)
Dex2jar
First turn the classes.dex files into .jar files with this command using Dex2jar:
./d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk​
(Execute the .bat if you’re on windows)
Quick explanation:
./d2j-dex2jar.sh: execute the dex2jar script
-f: replace the previous jar file named the same as output_jar.jar
-o output_jar.jar : set a name to the output jar file
apk_to_decompile.apk: name of the apk file you’re taking care of
Then read the jar file using JD-GUI (or any other java decompiler). It’s a quite simple software, lite weight, and you can download and run the java version without installing anything else.
Dex2jar isn’t updated anymore (since 2015), so there are errors when decompiling. You’ll be able to get a .jar file but it’ll be incomplete or not identical to the original one, that’s why this tool doesn’t allow one to modify java source directly. But you can get a great understanding of how this app works.
C) Nice tools from the XDA community:​• Tickle My Android (TMA) by @Ticklefish
A tool that ease the work with APKtool, amazing one!
• APK Easy Tool by @evildog1
Also works with APKtool, I don’t use it often, but it is great!
• Other tools:
Let me know
Credits, links for this part:
Stack Overflow Post
Documentation for APKtool
Another SO Post
@Rizal Lovins ’
" [Share Latest Apktool 4.2.2/Guide/Tutorial/] How to Decompile/Compile/Sign Apk/Jar "
@A_U ’s
" [GUIDE][HOW-TO] Decompile and Compile apps using Apktool in 5 Simple Steps "

IV-What and how to modify​This part is gigantic, I'll try to include as much link as I can, this part isn't supposed to stay like that very long, as it contains very few of the hundreds of guide about theming in XDA. Help me out by suggesting some links.
​A)Resources (XML):​​1-Tools​To edit XMLs you can use whatever text editor you want, but I’d recommend Visual Studio Code. It has solid plug-ins that may come handy to avoid mistakes when editing.
You can also sort of visualize XMLs with Android Studio's Layout Inspector.
You have to open the apk’s folder in Android Studio and browse to the desired xml. Opening the resource manager will aslo allow you to visualize the XML files to a certain extent, but it's not cristal clear (see the screenshot) so I don’t use that very often, but it’s good to know.
Spoiler: Screenshot
{
"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"
}
2-What’s xml​This subject is very long, you can learn a lot of things. Here are some links (increasingly detailed) to learn about XML:
A Post in [GUIDE] Want to learn how to theme? by @theimpaler747
Google’s "Guide" (very complete): that google link is about resources in general, so it explains XMLs but not only XMLs
A Reference for Codenames in XMLs
3-Modifications:​You can modify deeply the UI by editing XMLs, here are some guides to make you familiar with some techniques. Again this is a very vast field, it deserve a thread itself, and this list clearly isn"t finished. Here are my favourites ones:
XML 101 by @Ticklefish
[GUIDE][RES] Android Animation XML resources for Activity Transition by @niranjan94
Find the code you want to modify by @Raiz (Me lol)
[TUTORIAL] Where to find the colors for making a theme by @KBanause
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie! by @joehanh88
[Reference] Interactive Phone Modification [GUIDE] by @pstevep , this is AN ABSOLUTE UNIT OF INDEX!
[Tutorial][APP] PinP Shortcuts | How to Implement Picture in Picture Mode [API 26+] by @Geeks Empire
[Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM by @MishaalRahman
Let me know
4-Precaution:​When modifying apks, some errors can be very frustrating, yet very easy to fix. Here are some usual cause of struggle:
Not properly set JAVA_HOME
The tools used (like apktool.jar) aren’t chmod +x (aren’t allowed to be executed)
You have to add java -jar [command] before every .jar tools commands for it to run
Tell me, don't be shy
For every tool related bug, please refer to their GitHubs, sometimes you’ll find a solution by searching. And XDA threads are also plenty of answers! (and if you’re really not lucky maybe stack overflow can help).
B)Smali:​That’s a tough one. First, if you want my advice, editing them with Visual Studio Code and the smali plugin is way easier to find mistakes. There’s also a smali plugin for Android studio (and IntelliJ based IDE) made by Jesus-Freke, it is called smalidea.
Now I found one reaaallllyy awesome thread here on XDA about smali:
[GUIDE][SMALI]Understanding and Creating Smali Mods & General Smali Questions by @Goldie
Something else maybe? Tell me
This is my reference, I’m still learning smali tho, this list may be updated, but this thread is pure gold, go check it out!
Credit for this part:
Resources:
@Ticklefish , for XML 101 (but also for TMA), this is really one of my favourite thread on XDA
All the other members mentioned in the above list
Smali:
@Jesus-Freke , for his work on smali, baksmali (integrated in APKtool) and smalidea
@Goldie , for the amazing thread explaining smali

V-Recompile​You've done the hardest part, now what's left is repacking that thing together.
A)How to recompile:​It’s pretty simple, do it with apktool with this command:
apktool b [nameoftheapk].apk​You can add several options, here’s the full list.
The -c option to me is the most useful, because it allows to leave the signature unchanged for system apks. It’ll be deprecated soon (APKtool v2.6.0), so you’ll have to do the trick manually.
What -c (--copy-orginal) does: “Copies original AndroidManifest.xml and META-INF folder into built apk. Scheduled for deprecation.”
A bit of details, good to know:
“META-INF contains apk signatures. After modifying the apk it is no longer signed. You can use -c / --copy-original to retain these signatures. However, using -c uses the original AndroidManifest.xml file, so changes to it will be lost.”
And
“After [d]ecode, there will be new folders (original / unknown) in the decoded apk folder
original = META-INF folder / AndroidManifest.xml, which are needed to retain the signature of apks to prevent needing to resign. Used with -c / --copy-original on build
unknown = Files / folders that are not part of the standard AOSP build procedure. These files will be injected back into the rebuilt APK.”
Apktool uses aapt2, the tool used in Android Studio to compile your app. You can learn more on what it is here.
B)Troubleshooting:​First, remember that you can use aapt1 (used by default) and aapt2 when recompiling, try both if you run into some issues with the first.
If you have an issue with APKtool's dummy values, go on the Github Issue I opened, the problem is now solved.
Most common error, and simple to solve are the following:
-Name of the file not written correctly:​
Code:
brut.directory.DirectoryException: java.nio.file.NoSuchFileException: Firefoxr
Solution: The correct name is Firefox not Firefoxr, how dumb can I be?
​-Aapt errors: (here a folder isn’t recognized):​
Code:
W:invalid resource directory name: /Users/Raiz/Desktop/apktool/Firefox/res navigation
Solution: Use aapt2, the folders not recognized are because aapt1 (used by default) is older than aapt2, so if you see an error like this, use the option “—use-aapt2”
​-Xml Errors:​
Code:
W: /Users/Raiz/Desktop/apktool/framework-res/res/values/styles.xml:1185: error: Resource entry Theme.Holo already has bag item textEditSuggestionItemLayout.
Solution: These errors are quite easy to fix, just go to the file at the line mentioned then fix the error. Usually it a doubled line, a synthax error, …
Unfortunately APKtool isn’t able to correct string typos, it’s up to you to write in correct English (definitely struggling with that on my side lol).
For other more specific errors, copy/pasting the error message in the google search bar will most certainly redirect you to a Github error, or a post in The Official APKtool XDA Thread. You can find answers by searching, so search thoroughly before asking, it’ll save you some time.
And what is troubleshooting without
[UNIVERSAL][LOGCAT]How to get & read a logcat/ Troubleshoot your own issues!
by @Stryke_the_Orc​
Credit for this part:
APKtool issues on Github
The APKtool documentation
@iBotPeaches for this amazing tool

VI-Sign and Zipalign​
We must sign an app after having modified it, so it can be installed properly on our devices. System Apps MUST keep the same signature they had before modifying, or else the app will continuously force close, and it may even result in bootloops and other bad things.
To keep the signature take the META-INF folder from the not decompiled apk (browse it as a zip file) and put it in the newly recompiled apk (browse it as a zip file too, if there is already a META-INF folder, just replace it)
Links to build and platform tool:
Platform-tools: https://developer.android.com/studio/releases/platform-tools​Build-tools: Have to be downloaded from sdk manager in android studio​
A)Official way:​Tool used in the correct order:
1)keytool (included inside java)
2)zipalign from build tools (29.0.2 here, but use the latest )
3)apksigner from build tools (29.0.2 here, but use the latest) (+the lib folder containing apksigner.jar)
Where are build tools?
Mac: ~/Library/Android/sdk/build-tools/[your buld-tool version]/
Linux: ~/Android/sdk/build-tools/[your buld-tool version]/
Windows: C:/User/yourusername/AppData/Local/Android/sdk/build-tools/[your buld-tool version]/
Disclaimer: Using jarsigner is also possible (tool natively included in java jdk), if you use it, make sure you zipalign AFTER signing.
Make sure that apksigner (and lib) as well as zipalign are in the folder you’re apk is in.
Make sure they’re all executable (check that using chmod) and on mac os, make sure your terminal has full disk access (I had a hard time figuring this out lol).
​1-Generate keystore:​This is pretty simple, we’ll use keytool, at tool antively included in java jdk. We’ll need only one thing before using apksigner : the keystore.jks file (or a separate certificate and private key, but that’s more complicated)
keytool -genkey -v -keystore ~/Desktop/apktool/keystore.jks -alias Raiz -keyalg RSA -keysize 2048 -validity 10000​
Just replace the alias (here Raiz) by a familiar name, you have to remember it! (here’s why)
Also replace the name of the jks file (but not it’s extension, even though it can be .keystore, I had less issues with .jks)
Quick explanation of what does what in the command:
keytool : the command to use keytool obviously
-genkey : generate the keystore
-v : display verbose
-keystore : set the path to the future file
~/Desktop/apktool/keystore.jks : Path and name of the future file, you can call the keystore whatever you want to.
-alias Raiz : specify the alias used, it can be whatever you want, but remember it, it’s like a publisher name
-keyalg RSA : specify the algorithm used for the key, here it’s RSA (here’s a bit of history)
-keysize 2048: the size of the key in bits
-validity 10000: validity in days, here 10000 days
1*- Generate key.pk8 and cert.pem:​This is a quote from another thread (by @wilskywalker), this isn't necessary, but can come handy when signing zip, so I'll leave that here anyway.
You will need the following download:
OpenSSL [LINK]
[...]
Code:
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8
Click to expand...
Click to collapse
2- Zipalign:​​./zipalign -v 4 firfox-mod.apk firefox-aligned.apk​Quick explanation:
-v : verbose
4 : align on 4 bits, putting another value will align the wrong way, just keep 4
firefox-mod.apk: name of the input apk, can be anything
firefox-mod-aligned.apk: name of the output apk, can be anything too
3-Sign the apk with apksigner:​
./apksigner sign --ks keystore.jks firefox-mod-aligned.apk​
Quick explanation:
sign: the command use to sign
--ks keystore.jks : specify the keystore file (the same one we generated seconds ago)
firefox-mod-aligned: the input apk (the one we just aligned), note that the apk will be signed and there won’t be any output apk this time
And you’re done, you can check that it has been properly signed with this command:
./apksigner verify firefox-mod-aligned​
Where firefox-mod-aligned is the apk signed we want to check
​3*-Sign the apk with apksigner using .pk8 and .pem files:​
./apksigner sign ---key key.pk8 --cert certificate.pem firefox-mod-aligned.apk​
Credits, links for this part:
How to sign an app (by Google)
apksigner documentation
keytool documentation
zipalign documentation
Stack Overflow post
@Rizal Lovins ’ Guide
B) Unofficial ways:​Some amazing devs and contributors at xda provided us with tools to sign with ease APKs (without having to think about all of that),I didn’t fully tested every one fo them, but you can try them as an alternative if the “official way” didn’t worked out well.
Here they are:
APK easy tool by @evildog1
APK Sign/Zipalign/Install by @aureljared
Uber APK signer (Github)

VII-Installing the apk​Your theme should be ready by now, but how do you want to install it?
There are several ways to get an apk inside your phone, I’ll go over the ones I think are the most common.
A)Regular apk install:​Just install it duh… (here you go if you need a little help).
B)Flashable zip:​I do recommend making flashable zips, because they’re pretty useful when installing modded system apps. So what is it?
1-Folders:​A flashable zip contains 2 folders: META-INF and a folder which will mimic the path to the apk we want to install. Inside that succession of folders, we’ll put our modified apk, and when flashing, the modded apk (inside the zip) will replace the original one inside your phone.
E.g: create system/priv-app/systemUI/systemUI.apk to install a modified systemUI.apk file by replacing the original one
Click to expand...
Click to collapse
E.g: create data/data/com.mixplorer/databases/data.db to replace the original data.db file inside this folder
Click to expand...
Click to collapse
Once you get those folders done (and the apk inside of it), it’s time to write the edify script that’ll flash the zip file.
2-Edify Script:​Edify is the language the script will be written in.
The file containing the script is located in /META-INF/com/google/android/updater-script (the name of the file is updater-script, naming it something else would make it ignored by your custom recovery)
Open this document with a text editor, and start coding!
We want to copy/paste the content of our zips onto the system (and replace files), so here’s the precise things we’ll do:
a-(OPTIONAL)Your “intro”:
Using the ui_print(" "); command, we can make some really cool looking ASCII art. You can write comments at whatever steps you want with this command, it’s pretty handy!
ui_print("Your Message here");​b-Mount the system partition:
​run_program("/sbin/busybox", "mount", "/system");​
c-Extract the content of the zip to /system:
package_extract_dir("system", "/system");​d-Unmount the system partition:
unmount("/system");​This is very basic, you can do so much more with edify script! Set the progress bar progress, set permissions to certain files, delete folders and/or files,...
3-Sign your zip:​You need to sign your zip after compressing it! The process looks like the one with key.pk8 and certificate.pem files, so I'll refere again to the same thread for that. (In the Credits)
I've covered the basics, now it's index time, you can go further with the links in the credits, and you can suggest me more!
Credits:
[WIP] How to Write an Updater-Script with Edify Code by @Karadorde
That one covers how to sign your zip:
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation [19.01.13] by @wilskywalker
My Very Own Script by Me
More Links:
[GUIDE] Create your own Flashable ZIP with custom updater-script and addon.d script by @Primokorn
[TUTORIAL] The updater-script completely explained by @KINGbabasula
Spoiler: Bonus
4-How to make a working progress bar​First “create” the progress bar that can go up to 100%
show_progress(1.000000, 0);​Then set the progress after each steps: (here I set it at 10%)
Code: set_progress(0.100000)​
C)ADB sideload:​Adb allows one to flash zips through command line using a custom recovery.
How to install adb​Now how to sideload an apk using adb:
Make sure your phone is plugged, and your PC allowed to use adb on your device. (the last steps of the guide I linked on how to install adb on your pc)
Reboot to recovery
For TWRP : Advanced → ADB Sideload For CWM : Install → Install Zip from Sideload
Code: adb sideload path/to/flashable.zip
And that’s it, congrats
D)Aroma Installer:​They’re very cool, yet I’m not really familiar with those.
This concept origins from XDA Inactive Recognized Developer @amarullz , and is used by the OpenGApps team for their Aroma package. Needless to say its work eased the task for many others, feel free to leave a thank on the threads:
Q’n’A about Aroma Installers: [Q&A] AROMA Installer - [Dev Move To DevDB]
Q’n’A about Edify and Aroma: (by @Dblfstr) Aroma, Edify, updater script Question and Answer thread
A tool to create them: [TOOL][3-10-13] Aroma App Package Creator v1.3.2 (by @commandersafi)

VIII-Other ways to theme your device​Making the whole apk is often long, and doesn’t leave much control over the theme to the user, alternative ways of theming let users control how they want the theme to be applied. Those 2 ways won’t be covered by me (as I don’t know enough about them yet), that's why, for this part, every input in welcomed
A)Magisk Modules:​This is now a pretty common and convenient way to distribute APKs and mods, so I had to cover it. Here’s a link to an official developer guide, it covers a good part of it, if you have an input, it is welcome!
https://topjohnwu.github.io/Magisk/guides.html​
B)Substratum Themes:​I don’t even need to tell you what is substratum, as it is pretty famous (along with Magisk), but let’s say you’re totally new.
Substratum is a theme engine that allows you to control what element of your system you want to be themed, and apply themes with the possibility of disabling theme at some point in time. So how to make a substratum theme ?
Links:
Video from the XDA chanel on YT
Another one from XDA on YT
Theme template form the official Substratum Github

IX-Theming related topics​All of the things I couldn't fit in the previous sections are here, make an input, I'll make sure to add it if it's relevant
A)Design Basics:​Now I don’t have especially fine taste in terms of designing, but I’m trying to learn!
Here are some links:
The Android Design Resources Forum in XDA
XDA Article about icon design
Material.io
Matrial.io YT channel
B)Boot Animations:​Here are some helpful threads and links:
[TUTORIAL]How to make your own boot animations (with sound if you want) by @despotovski01
[GUIDE] How To Make Bootanimation by @jackeagle
[GUIDE][TUT]make/Port any bootanimation|||USING VIDEO/FRAMES by @deathviper
C)Icon Packs:​[GUIDE]How to create icon packs for Go/Nova/Apex/Holo/ADW/LauncherPro/XperiaHome by @iamareebjamal
D)Port OEM Apps:​[GUIDE/TIPS] How to Port OEM Apps / Vendor Apps to Your Current ROM by @Rizal Lovins , this one is a wealth of information! really good and unique
D)Build.prop:​[Tweaks][Guide]Build.prop Tweaks by @bravonova

X-Not covered topics​Why don’t you talk about … ? That’s theming tho! And what about … and …? What is this thread!
I understand, these are legit claims, but I can’t cover everything. That’s where YOU come in play, you certainly know things that I don’t, so please, if you have any knowledge about something I didn’t mentioned above, please let me know!
I’m trying to make this thread as complete as possible, so I’d be very grateful if you could share a little about your knowledge .
Thank a bunch!
I know I already said that 10000000 times, but really, it would be awesome to have inputs!

XI-Mods and Wallpapers:​Let me take a tangent from the original purpose of this thread. This was supposed to be all about guides, but I thought about that twice and I think that's a good idea.
Basically, this here will list some of the amazing mods and themes around xda.
The goal here is to crack open those and see how they work, this would represent an immense work that I'm not able to take on right now, so I may leave links here, and you'll do the jobs of understanding how they work. Maybe at some point I'll write some here (with the credits of the OP of course!), but certainly not now.
Links:
Offline Google LLC App Wallpapers by @[email protected]

XII-Changelog:
For each update I'll bump this thread, so that you can enjoy latest links​04-01-2021 Update:
Happy new year! I went through my long list of watched threads, and found the gems I kept selfishly, they're yours now !
Added:
[GUIDE] Create your own Flashable ZIP with custom updater-script and addon.d script
[UNIVERSAL][LOGCAT]How to get & read a logcat/ Troubleshoot your own issues!
[GUIDE/TIPS] How to Port OEM Apps / Vendor Apps to Your Current ROM
[Tweaks][Guide]Build.prop Tweaks
[GUIDE]How to create icon packs for Go/Nova/Apex/Holo/ADW/LauncherPro/XperiaHome
[TUTORIAL] The updater-script completely explained
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie
[Reference] Interactive Phone Modification [GUIDE]
[Tutorial][APP] PinP Shortcuts | How to Implement Picture in Picture Mode [API 26+]
Offline Google LLC App Wallpapers
[Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM

Thanks for this, useful for sure. This is mostly on Windows. There's a way to do this directly on the phone ( most of it anyway).
I use an app called: Apkeditorpro.
I use version 1.9.10 cause i don't like the ui in the newer version.
In it you can :
-edit xmls directly.
-decode the smali and edit them, and view the java code and edit it with no extra tools.
-extract or replace files
-and rebuild the apk when finished. It'll show you a list of compile errors if any when building to review. If the build works it signs it and offers to remove old app and reinstall the new apk.
I found it very useful in editing theme overlays or add fonts in fonts tab in settings.
I am like you an enthusiast in all things modding. Still learning smali/ java editing. Hope we can learn together and from each other
Merry Christmas

Hi is it also valid for Xiaomi apk?

Braain said:
Hi is it also valid for Xiaomi apk?
Click to expand...
Click to collapse
Yep, it's valid for almost anything (any apk at least), feel free to ask here if you encounter problem, I'll do my best to help

Hi I started working with Riru-Enhanced mode for Storage Isolation and some mistakes I made now it's oky now I want to try to modify the handset apk because Xiaomi Redmi 7 is andro system android carefully

Raiz said:
04-01-2021 Update​
Click to expand...
Click to collapse
The First Update of this thread is out!, check out the post I quoted to see the list of threads I added, I also integrated them to the main guide (with proper credits), but I think making a list for each update more convenient for you readers.
I recommend to bookmark those thread or to watch them, because some are really amazing!

[QUOTE = "Raiz, post: 84227321, membro: 8020437"]
Il primo aggiornamento di questo thread è uscito !, controlla il post che ho citato per vedere l'elenco dei thread che ho aggiunto, li ho anche integrati nella guida principale (con i crediti appropriati), ma penso che fare un elenco per ogni aggiornamento più conveniente per voi lettori.
Consiglio di aggiungere quei thread ai preferiti o di guardarli, perché alcuni sono davvero fantastici!
[/CITAZIONE]

Great gems, indeed. Let me add this to the collection:
[Samsung only]How to modify stock font app (SamsungOne.apk, SamsungSans.apk, or Fondation.apk)
This post describes it using ApkEditorPro directly on the phone. It could work on other devices if you know what your stock font app is. It's a simple drag and drop your custom files in the right place.

Related

[HOW TO] Compile/Decompile ICS Apk easily|100% working

We are all here to learn, take from community and give back to community!!!
@Lord ClockaN
Hya guys, after A LOT of requests, I decided to share with the community something that I found really REALLY useful for Dev's but also for other users too that want to mess up with compiling and decompiling process. Usually, non problems at all with that, but since ICS come out, many dev\users are not able to decompile\compile properly many ics apk (not all). This guide will ensure you a good result, 100% working, easy, and fastest way to mess up with ics for theming and resizing purposes, or whatever you want
BIG THX to my friend and Dev teammate @Bichon for this
Credits
@Beachon (yes, again)
@Xavierjohn22, the amazing author of AutoApktool! Visit his thread HERE, click his thanks button, and support his work with donations, and my personal thanks to author for this tool which is the most powerful and easiest tool ever.
@Brut_all for Apktool
@XDA Community
@Google
About Apktooll
Please consider to visit the original thread about this tool, because what I'm explaining here is just 1\10 of the real skill of this tool. You can do basically whatever you want with AutoApktool, themers will love it, Dev's will appreciate it a lot, I'm sure.
Why can't we use Apktool???
Well, you can, but it's more difficult, that's it.
Why do you say "must use 1.4.1 apktool version"??
The reason why is that since 1.4.2 version, apktool generate java code while recompiling process is going on, and this lead to errors that 9/10 makes decompile process fail.
Requirements (Windows environment, mine is Seven 64 bit)
Java (last version)
JDK (last version)
JDR (last version, usually included in JDK or Java)
SDK (last 3.0 version for ICS source code)
Auto_Apktool 2.0.0 (DOWNLOAD THIS ONE NOT OTHERS!!!)
HOW-TO (NOTE: before start, select Apktool version with option 21, YOU MUST CHOOSE 1.4.1 version!!)
1) Download and simply unpack Auto_ApkTool 2.0.0
2)Click on "autoapktoolmain.bat", prompt will open
{
"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"
}
3)put the apk you want to mess up with in "_INPUT_APK"
4) you can chose more than one option to decompile (option 6 is strongly recommended)
5) when option 6 is being selected, drag the apk from _INPUT_APK folder into the windows prompt and click enter
6) A Note window will appear, and will show IF the decompiling process has been done properly. Once you close that window, you will see the decompiled folder in _INPUT_APK folder
7) do your edits (xml, snali, or png, doesn't matter)
8) recompile with option 7 (NOTE: this time you MUST drag all the FOLDER, NOT the apk)
9) Once recompiling finished, open the decompiled folder, go to "dist" folder, and here you got your edited apk
10) you MUST sign the apk with option 10 (NOTE: drag the apk from dist folder to the prompt, then press enter, and in the SAME folder, a signedxxx.apk will appear)
11) Rename the apk, and push it |NOTE: you can push the apk with 62 option or with sdk typing:
Code:
adb remount
adb push xxx.apk system/app
adb reboot
That's it
Now I can start theming, massive thanks
Sent by wiggling my big toe in a IceColdSandwich
Absolutely awesome. So easy to use . I can stop beating my head against the wall. Thank you thank you thank you.
Sent from my Inspire 4g using xda premium
Just a quick Q? I've been using a tool I slapped together from ApkManager to decompile ICS .apks. I've themed the Mms.apk and others. I use it daily and seems to work. Yesterday I wanted to mod the smali code, its decompiled to Human readable BUT not understandable. I tried it with a few apps I built with 4.0x APIs and the code is no where near the same format as it is when I used Eclipse. Is that standard? I've only ever modified XML code mainly in themeing Stock ICS apps. My Question is: Am I suppose to understand the format in which it decompiles the java code? I cant yet post outside links to give an example but I'll get a sample of what I mean.
PS I'm away from my lappy, so, I haven't tested this tool to see if it does the same. But a quick ex. Would be that my statements in my main activity reads like
line 8
.something something 0,x03 v
When in eclipse ist reads
Intent suck it = new intent(Activity.this, Activity);
Just a short idea until I get home.
Sent from my Galaxy Nexus using xda premium
Clemzon said:
Just a quick Q? I've been using a tool I slapped together from ApkManager to decompile ICS .apks. I've themed the Mms.apk and others. I use it daily and seems to work. Yesterday I wanted to mod the smali code, its decompiled to Human readable BUT not understandable. I tried it with a few apps I built with 4.0x APIs and the code is no where near the same format as it is when I used Eclipse. Is that standard? I've only ever modified XML code mainly in themeing Stock ICS apps. My Question is: Am I suppose to understand the format in which it decompiles the java code? I cant yet post outside links to give an example but I'll get a sample of what I mean.
PS I'm away from my lappy, so, I haven't tested this tool to see if it does the same. But a quick ex. Would be that my statements in my main activity reads like
line 8
.something something 0,x03 v
When in eclipse ist reads
Intent suck it = new intent(Activity.this, Activity);
Just a short idea until I get home.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
So, are u saying that you can't read a smali files when decompiled?
Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
Well, kinda. Just not the standard form like you can read the java in eclipse. I'll be home in an hour and I'll link you to a sample of my code.
Edit: it might just be because I'm a beginner developer but here's a sample.
http://db.tt/AJ7FHgf9 just in case.
I don't know how to modify that smali.
If its normal, sorry to have wasted your time.
Sent from my Galaxy Nexus using xda premium
Edit: Some code I threw together to present an example. ApkManagerX(my modded version) and AutoApk produces the exact same results. I might just be stupid.
Smail
http://db.tt/PFDnwZj9
Java
http://db.tt/9v4me5du
Is the smali suppose to look like that?
Sent from my Galaxy Nexus using xda premium
Yes, that's normal smali code. I hate it
Yay!.. this is going to take awhile.
Sent from my Galaxy Nexus using xda premium
sigurd_LU said:
Yes, that's normal smali code. I hate it
Click to expand...
Click to collapse
Eheh so true
Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
compile framework
need a little help, I'm wondering framework-res.apk edit, decompile (6) is ok, did not even do some editing on it, but when compiling again (7), these errors have language folders (do not put all but the same errors)
D: \ edit-apk \ Auto_ApkTool_2.0.0 \ AutoAPKTool2.0.0 \ _INPUT_APK \ framework-res \ res \ values ​​\ plurals.xml: 79: error: Multiple substitutions in non-specified positional format, did you mean to add the formatted = "false" attribute?
D: \ edit-apk \ Auto_ApkTool_2.0.0 \ AutoAPKTool2.0.0 \ _INPUT_APK \ framework-res \ res \ values ​​\ plurals.xml: 79: error: Found tag </ item> where </ plurals> is expected
error: Multiple substitutions in non-specified positional format, did you mean to add the formatted = "false" attribute?
error: Found tag </ item> where </ plurals> is expected
error: Multiple substitutions in non-specified positional format, did you mean to add the formatted = "false" attribute?
error: Found tag </ item> where </ plurals> is expected
error: Multiple substitutions in non-specified positional format, did you mean to add the formatted = "false" attribute?
error: Found tag </ item> where </ plurals> is expected
error: Multiple substitutions in non-specified positional format, did you mean to add the formatted = "false" attribute?
error: Found tag </ item> where </ plurals> is expected
error: Multiple substitutions in non-specified positional format, did you mean to add the formatted = "false" attribute?
error: Found tag </ item> where </ plurals> is expected
error: Multiple substitutions in non-specified positional format, did you mean to add the formatted = "false" attribute?
error: Found tag </ item> where </ plurals> is expected
error: Multiple substitutions in non-specified positional format, did you mean to add the formatted = "false" attribute?
how do I fix this?

[TOOL][MIUI] Lockscreen-Debugger

Hello everyone,
I hope this is the right forum. Wanted to post in dev-forum, but not sure if I may or not...
Anyway: I want to introduce my latest MIUI project.
Current working name is "ls debugger". Suggestions are welcome
For downloads, changelog and bugs have a look at post #2
Description:
I found the hole LS testing progress (edit, zip, usb mount, copy, apply, ...) annoying, so I started this program.
It is still in beta state. There are still some errors or force closes because I haven't implemented all error check functions.
The reason why I started this thread now, is that I want some feedback and maybe new ideas and suggestions.
Requirements:
- Java Runtime Version 7
- (MIUI Lockscreen for 2.3 based builds) Don't know if v4 LS will work. Test and tell me
Instructions:
The usage is really simple.
After unzipping the file you'll have 5 files/folders:
- advanced (folder)
- wallpaper (folder)
- MIUI-LS-Tester.jar (executable)
- bgtWeather.db (9sweather db-file)
- systemCPs.db (calls, texts, contacts for ContentProviders [not finished])
You can replace the wallpaper and advanced folder with your own, but no guarantee that it will work.
Some features aren't implemented (unlocker and variables of elements. e.g.: #unlocker.move_x)
Have a look at the given manifest file and you'll see what will work and what won't.
You can start the program with doubleclick the 'MIUI-LS-Tester.jar' or open a terminal, move to the location where you've extracted the zip file and type:
Code:
java -jar MIUI-LS-Tester.jar
In the terminal you will get some information about the parsing and other informations.
At first a window with 2 textfields appears. In this you have to set the width and height of your lockscreen.
If you have a config.xml file you can set the variables on the right side in the "config.xml" tab (after a click on 'Preview').
To get a preview you have to open your manifest.xml and click on 'Preview'.
Also you can choose another font.
After a click on 'Preview' you'll get 3 more buttons.
Screenshot:
I think it's clear what this buttons will do
It saves a screenshot of the left panel in <MIUI-LS-Tester.jar-Location>/preview/lockscreen_preview_x.jpg
create mtz:
this will create a mtz file.
After a click you can choose some things. Add your font, wallpaper, previews...
Afterwards you can create/modify the description.xml file
Thats it
toggle buttons:
this will toggle the Trigger-Buttons.
Because they are not visible in your lockscreen you can do this with this button.
On the top of the right panel you can set some variables.
I think it's clear, so no description.
If you modified your manifest.xml (and the ls debugger is still open) just click on preview and the changes will be loaded.
Credits:
my brother: for helping me with the "calculator"
picard666: for some help and suggestions
jdom team: for the best java xml parser.
jfont-chooser team and david from stackoverflow: for the fontchooser.
zentus: for the sqlite lib.
pomenx: from the miui team for manifest reference thread @ xda.
GNU: for their java port of getopt
songd for the java pre processor
regards
-v1r0x
Download:
December 30, 2012
LS-Debugger alpha b121230.1
October 31, 2012
LS-Debugger alpha b121030.2
October 24, 2012
LS-Debugger alpha b121024
June 19, 2012
LS-Debugger alpha 4
April 28, 2012
LS-Debugger alpha 3
April 24, 2012
LS-Debugger alpha 2
March 27, 2012
LS-Debugger alpha
Changelog:​
Text,DateTime and Image implemented
ToolTip-Text for Text, DateTime and Image (displays the given name of the element)
ElementGroup implemented
VarArrays implemented
ContentProvider for weather apps implemented (only 9s-weather)
ContentProvider for calls/texts implemented (db-file included)
FontChooser implemented
category-attribute implemented (only for Text at this time)
rotate and AA works for Image, Text and DateTime
screen_width/_height has to be set on start
the last dir will be stored in a file. No annoying dir-changing
implemented "where" for ContentProvider => mistake in the db-file (fixed on next update)
added an option for a background image (stored in folder "wallpaper" like on miui)
fixed the db-file
rotate Text/Image (re-set bounds)
By hitting the button 'Screenshot' a screenshot will be stored in folder 'preview' (Button appears after hitting 'Preview')
parse Time-Tag
Button to create a zip/mtz file
create a description.xml (after hit the zip button)
Added checkboxes to (de)select wallpaper, preview-folder and font for the mtz file
review the config-file
=> width, height, path and font will be stored
review create/modify of the description.xml
only digits are allowed for some textfields (width/height and texts/calls)
=> no annoying checks and/or errors
config.xml
NumberChoice
NumberInput
StringChoice
StringInput
CheckBox
MusicControl
Image (without 'music_album_cover')
Text (without 'music_display')
parse (normal) Buttons (not MusicControl)
Added a scrollbar for low screen resolutions
minor fixes
added a button which shows system- and program-information (for debugging). It's the quadratic button on the bottom left corner of the control-panel
added more output information (creating the mtz file will give more output)
fixed a font bug (if the font wasn't a ttf the program crashed)
added a splash screen
updated to Java 7
New Fixes (October 31, 2012):
Drag&Drop support for manifest.xml file
push mtz via adb (note: don't forget to set right path in "File" menu!!!)
added a "?"/help/about menu
added command line args support. (-dx is the debug level. 0 means only errors, 1 more, 2 more than 1 and 3 full debug. -f <file-path> so you don't have to set it everytime using the menu. -s to hide splash, -S to enable splash [default])
cleaned up the code
description.xml modding can now be done in a tab and not only while creating the mtz
"live" support. You can change font, battery state/level, messages, sms/texts without hit "preview" again
DateTime and Text supported in live-feature (the one above)
bug fixes of latest features
new layout of the control center, including the button section (the don't "popup" anymore.)
Bugs/Not yet implemented:​Important:
parse variable-elements (e.g. #unlocker.move_x)
parse Unlocker
parse MusicControl
Buttons
MusicControl overlays triggers
parse config.xml => only AppPicker left
parse animations
Update variables during runtime (primarily for unlocker and animations) [10% done!]
Secondary:
complete DateTime attributes
complete Text attributes
complete Image attributes
connect db-Files for every weather app
complete v4 support
refactor code
I have a request:
I want to include as much as possible weather-provider and/or other contentprovider.
So, here my request:
If you want to support and help me and this program, please post an App with ContentProvider and a modified db-File + the ContentProviderBinder uri.
I hope someone helps.
-v1r0x
Not able to see the full view
v1r0x said:
Hello everyone,
I hope this is the right forum. Wanted to post in dev-forum, but not sure if I may or not...
Anyway: I want to introduce my latest MIUI project.
Current working name is "ls debugger". Suggestions are welcome
Description:
I found the hole LS testing progress (edit, zip, usb mount, copy, apply, ...) annoying, so I started this program.
It is still in beta state. There are still some errors or force closes because I haven't implemented all error check functions.
The reason why I started this thread now, is that I want some feedback and maybe new ideas and suggestions.
Requirements:
- Java Runtime
Instructions:
The usage is really simple.
After unzipping the file you'll have 5 files/folders:
- advanced (folder)
- wallpaper (folder)
- MIUI-LS-Tester.jar (executable)
- bgtWeather.db (9sweather db-file)
- systemCPs.db (calls, texts, contacts for ContentProviders [not finished])
You can replace the wallpaper and advanced folder with your own, but no guarantee that it will work.
Some features aren't implemented (unlocker and variables of elements. e.g.: #unlocker.move_x)
Have a look at the given manifest file and you'll see what will work and what won't.
You can start the program with doubleclick the 'MIUI-LS-Tester.jar' or open a terminal, move to the location where you've extracted the zip file and type:
Code:
java -jar MIUI-LS-Tester.jar
In the terminal you will get some information about the parsing and other informations.
At first a window with 2 textfields appears. In this you have to set the width and height of your lockscreen.
If you have a config.xml file you can set the variables on the right side in the "config.xml" tab (after a click on 'Preview').
To get a preview you have to open your manifest.xml and click on 'Preview'.
Also you can choose another font.
After a click on 'Preview' you'll get 3 more buttons.
Screenshot:
I think it's clear what this buttons will do
It saves a screenshot of the left panel in <MIUI-LS-Tester.jar-Location>/preview/lockscreen_preview_x.jpg
create mtz:
this will create a mtz file.
After a click you can choose some things. Add your font, wallpaper, previews...
Afterwards you can create/modify the description.xml file
Thats it
toggle buttons:
this will toggle the Trigger-Buttons.
Because they are not visible in your lockscreen you can do this with this button.
On the top of the right panel you can set some variables.
I think it's clear, so no description.
If you modified your manifest.xml (and the ls debugger is still open) just click on preview and the changes will be loaded.
Credits:
my brother: for helping me with the "calculator"
picard666: for some help and suggestions
jdom team: for the best java xml parser.
jfont-chooser team and david from stackoverflow: for the fontchooser.
zentus: for the sqlite lib.
pomenx: from the miui team for manifest reference thread @ xda.
regards
-v1r0x
Click to expand...
Click to collapse
Hi , thx to tis application i able to cutomize my ls easier..
bt wad i encounter is...once i run the application i might not able to see the full view of it...
my laptop resolution are 1200 x 800
i tried change the resolution to LS resolution to 480 X 500 and i maximized the application window it still the same...
any idea ???
Uploaded with ImageShack.us
thanks for your reply.
My resolution is 1920x1200, so I forgot to check other resolutions.
I'll try it later on another screen resolution and upload an updated version.
v1r0x said:
thanks for your reply.
My resolution is 1920x1200, so I forgot to check other resolutions.
I'll try it later on another screen resolution and upload an updated version.
Click to expand...
Click to collapse
Thanks alot man...it will be nice if all resolution can be supported...
i am waiting for it
v1r0x said:
Hello everyone,
I hope this is the right forum. Wanted to post in dev-forum, but not sure if I may or not...
Anyway: I want to introduce my latest MIUI project.
Current working name is "ls debugger". Suggestions are welcome
Description:
I found the hole LS testing progress (edit, zip, usb mount, copy, apply, ...) annoying, so I started this program.
It is still in beta state. There are still some errors or force closes because I haven't implemented all error check functions.
The reason why I started this thread now, is that I want some feedback and maybe new ideas and suggestions.
Requirements:
- Java Runtime
Instructions:
The usage is really simple.
After unzipping the file you'll have 5 files/folders:
- advanced (folder)
- wallpaper (folder)
- MIUI-LS-Tester.jar (executable)
- bgtWeather.db (9sweather db-file)
- systemCPs.db (calls, texts, contacts for ContentProviders [not finished])
You can replace the wallpaper and advanced folder with your own, but no guarantee that it will work.
Some features aren't implemented (unlocker and variables of elements. e.g.: #unlocker.move_x)
Have a look at the given manifest file and you'll see what will work and what won't.
You can start the program with doubleclick the 'MIUI-LS-Tester.jar' or open a terminal, move to the location where you've extracted the zip file and type:
Code:
java -jar MIUI-LS-Tester.jar
In the terminal you will get some information about the parsing and other informations.
At first a window with 2 textfields appears. In this you have to set the width and height of your lockscreen.
If you have a config.xml file you can set the variables on the right side in the "config.xml" tab (after a click on 'Preview').
To get a preview you have to open your manifest.xml and click on 'Preview'.
Also you can choose another font.
After a click on 'Preview' you'll get 3 more buttons.
Screenshot:
I think it's clear what this buttons will do
It saves a screenshot of the left panel in <MIUI-LS-Tester.jar-Location>/preview/lockscreen_preview_x.jpg
create mtz:
this will create a mtz file.
After a click you can choose some things. Add your font, wallpaper, previews...
Afterwards you can create/modify the description.xml file
Thats it
toggle buttons:
this will toggle the Trigger-Buttons.
Because they are not visible in your lockscreen you can do this with this button.
On the top of the right panel you can set some variables.
I think it's clear, so no description.
If you modified your manifest.xml (and the ls debugger is still open) just click on preview and the changes will be loaded.
Credits:
my brother: for helping me with the "calculator"
picard666: for some help and suggestions
jdom team: for the best java xml parser.
jfont-chooser team and david from stackoverflow: for the fontchooser.
zentus: for the sqlite lib.
pomenx: from the miui team for manifest reference thread @ xda.
regards
-v1r0x
Click to expand...
Click to collapse
Hi is me again...
i successfully create a lockscreen...and transfer it to my phone...bt the lockscreen i create was found at "Theme" instead of "Lockscreen Style" and when i applied the lockscreen that found at "Theme" my theme was revert to original MIUI Theme...
is it i missed out sumthing ?
http://db.tt/CyvDqJy9
Please don't quote the complete post
Did you use the "create mtz" of my program?
because there is something really wrong.
Instead a font- and preview-folder there are files named:
Fonts\Arial.ttf
and
preview\preview_lockscreen...
I'll have a look at it later. I'm not at home and have no choice for testing and debugging.
v1r0x said:
Please don't quote the complete post
Did you use the "create mtz" of my program?
because there is something really wrong.
Instead a font- and preview-folder there are files named:
Fonts\Arial.ttf
and
preview\preview_lockscreen...
I'll have a look at it later. I'm not at home and have no choice for testing and debugging.
Click to expand...
Click to collapse
Oppps...Sorry...
ya...i using yr way to create it..
the Font\Arial.ttf exist - i using other font for my LS.
the preview\preview_lockscreen exist - i "Screenshot" 1st den only i "Create mtz"
Alright..spent quite a long time on tht LS...hope it can be applied successfully ^^
kezn715 said:
Hi , thx to tis application i able to cutomize my ls easier..
bt wad i encounter is...once i run the application i might not able to see the full view of it...
my laptop resolution are 1200 x 800
i tried change the resolution to LS resolution to 480 X 500 and i maximized the application window it still the same...
any idea ???
Click to expand...
Click to collapse
ok, i've added a scrollbar which hopefully solve your problem
kezn715 said:
Oppps...Sorry...
ya...i using yr way to create it..
the Font\Arial.ttf exist - i using other font for my LS.
the preview\preview_lockscreen exist - i "Screenshot" 1st den only i "Create mtz"
Alright..spent quite a long time on tht LS...hope it can be applied successfully ^^
Click to expand...
Click to collapse
I've tested it and can't reproduce it
On my system the folders created correct.
But i've found a little bug. If no preview-folder exists or the default font is used (if you haven't choosen one with "File>Select Font") the creation of the mtz crashes but the program didn't close. So make sure everything exists.
Can you tell me which OS you use? Maybe its a bug of an older windows version and/or linux, mac.
Also, did you tried to start the program in a terminal/cmd/console and checked the output?
If not and you'll get errors while creating the mtz (and you've checked the things in the red marked paragraph), then send me the output of the program and your ls. So I can do some tests.
I don't really understand what this program does. Sorry. Does this program preview any miui ls or what does it do?
Sent from my Galaxy Nexus using Tapatalk 2
cowsquad said:
I don't really understand what this program do. Sorry. Does this program preview any miui ls or what does it do?
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Yes, it preview a miui ls, so you don't have to zip, flash and install it for testing.
Or if you only want a preview (if no preview img exists)
Also it can create a mtz file, description.xml file and include font, wallpaper and/or preview.
And you can create screenshots.
At first I only wanted a preview function, but over the time it got more functions and if I have enough time and fun I'll maybe extend it to an complete ls-builder
Thanks For Updated !!!
i will give it a try later and back to u again..
i download the
April 23, 2012
LS-Debugger alpha2
http://minus.com/mru3I60gz/1f
bt seems like there is no scrollbar ?
There should be a scrollbar if the LS (or the Control Panel) is larger than your screen resolution.
Maybe you have to maximize the program window (only in width) to see the scrollbar.
I'm new to java gui programming, so maybe I will find a better method for this
edit: @kezn715: can you tell me which operating system you use? Could be a OS problem
edit2: I've changed something on the scrollbar (no big thing, just resized the window) and added a new button which give some information about the running program. At this time only information about the windows (width and height). I will add some more useful information in the future
v1r0x said:
There should be a scrollbar if the LS (or the Control Panel) is larger than your screen resolution.
Maybe you have to maximize the program window (only in width) to see the scrollbar.
I'm new to java gui programming, so maybe I will find a better method for this
edit: @kezn715: can you tell me which operating system you use? Could be a OS problem
edit2: I've changed something on the scrollbar (no big thing, just resized the window) and added a new button which give some information about the running program. At this time only information about the windows (width and height). I will add some more useful information in the future
Click to expand...
Click to collapse
Hmm...is it necessary to use the default font for the LS ?
using win 7 (32 bit)
---------- Post added at 09:18 PM ---------- Previous post was at 09:09 PM ----------
kezn715 said:
Hmm...is it necessary to use the default font for the LS ?
using win 7 (32 bit)
Click to expand...
Click to collapse
I already maximized the window...still cant find the scroll bar
[/URL] Uploaded with ImageShack.us[/IMG]
kezn715 said:
Hmm...is it necessary to use the default font for the LS ?
using win 7 (32 bit)
Click to expand...
Click to collapse
no, you can use every font you want. But if you don't choose one and create the mtz including the font, it will throw an exception
kezn715 said:
I already maximized the window...still cant find the scroll bar
Click to expand...
Click to collapse
i don't know whats the problem.
If I create an LS with w:480 and h:1800 my LS-Tester window has about 1100px height and with a scrollbar I can scroll down the 1800px.
But it seems not to be a OS related problem
The program shouldn't create a window which is larger than your screen resolution.
Edit: ok, maybe I found the problem.
Replace your MIUI-LS-Tester.jar with the attached file and test. Did this fix the problem?
v1r0x said:
no, you can use every font you want. But if you don't choose one and create the mtz including the font, it will throw an exception
i don't know whats the problem.
If I create an LS with w:480 and h:1800 my LS-Tester window has about 1100px height and with a scrollbar I can scroll down the 1800px.
But it seems not to be a OS related problem
The program shouldn't create a window which is larger than your screen resolution.
Edit: ok, maybe I found the problem.
Replace your MIUI-LS-Tester.jar with the attached file and test. Did this fix the problem?
Click to expand...
Click to collapse
Haha...Finally the scroll bar is there !!! Thx alot man...
So wad is the problem for the LS that i made .... any idea ?
what exactly do you mean?
the mtz output file?
I don't know what's wrong there.
You could check, after the mtz is created, if there is a "fonts" or "preview" folder in the same folder where the MIUI-LS-Tester.jar is located.
If not, there's maybe a bug in the File.seperator of java.
So tell me what you got
v1r0x said:
what exactly do you mean?
the mtz output file?
I don't know what's wrong there.
You could check, after the mtz is created, if there is a "fonts" or "preview" folder in the same folder where the MIUI-LS-Tester.jar is located.
If not, there's maybe a bug in the File.seperator of java.
So tell me what you got
Click to expand...
Click to collapse
Alright...i will give it a try...and sorry for being late reply...cuz i being buzy with presentation thing...
will update here once i tried it...
No problem
I've another idea: which java version do you use?
Maybe they changed something in java 7 or your version is too old

[THEME][8 TOOLS] GIMP Theme Batch Processor [+ .9.png REVERSE ENGINEER] [2014-04-23]

{
"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"
}
It uses Python-Fu GIMP Processor to execute the job.
Even not being a GIMPer, one can much benefit of the functions here presented as no previous knowledge of it (or whatever drawing tool) is required to do things.
Click to expand...
Click to collapse
Each part of the tool is explained below.
Installation
- You will need Java installed
- Download GIMP and install. I suggest the releases from Partha's Place. If possible, install 64-bit.
- Extract the contents of KTheme.Plugins.20140423.zip (3.97 MB) to yours GIMP plugin folder (usually "C:\Users\Your_Name\.gimp-2.8\plug-ins"). (Re)Start GIMP and you will find a new menu as above.
- If riding a Windows 32-bit GIMP, do as follow with Notepad++:
Open your GIMP installation path and edit \lib\gimp\2.0\environ\default.env
It should look like this
Code:
# Example entry in files like these
# FOOPATH=/path/to/foo/stuff
PATH=${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin
PYTHONPATH=${gimp_installation_dir}\32\lib\gimp\2.0\python
Just add the red part and save it.
Code:
# Example entry in files like these
# FOOPATH=/path/to/foo/stuff
PATH=[B][COLOR="Red"]${PATH};[/COLOR][/B]${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin
PYTHONPATH=${gimp_installation_dir}\32\lib\gimp\2.0\python
This is necessary and mandatory as the original GIMP PATH does not know where 'java' is installed.
Click to expand...
Click to collapse
1 - Create Theming Workspace
Input Folder: Should contain all apk's that you wanna decompile. You may provide the same folder structure that is inside the ROM like:
Code:
c:\gimp\in\system\
c:\gimp\in\system\app\
c:\gimp\in\system\app\SecCalculator.apk
c:\gimp\in\system\app\SecEmail.apk
c:\gimp\in\system\framework\
c:\gimp\in\system\framework\framework-res.apk
c:\gimp\in\system\priv-app\
c:\gimp\in\system\priv-app\SystemUI.apk
Click to expand...
Click to collapse
Output Folder: Where the tool will generate the output of the decompilation process
Click to expand...
Click to collapse
Platform: Select the Platform you are decompiling. Options are:
- AOSP / CM : will install only framework-res.apk;
- TouchWizard : will install framework-res.apk and twframework-res.apk;
Click to expand...
Click to collapse
Framework Folder: The folder that contains framework-res.apk and twframework-res.apk (for now). They should be from the same ROM/firmware correspondent to the apk's you are decompiling. You even can provide the folder inside the input folder (if you intend to decompile the framework too) like:
Code:
Framework Folder = C:\gimp\in\system\framework\
Click to expand...
Click to collapse
Decompilation Type: Select through 4 levels of decompilation:
- Full (slower)
- Sources Only (faster compile/decompile)
- Resources Only (faster compile/decompile)
- Drawable Resources Only (will leave only \res\drawable*\ images)
Click to expand...
Click to collapse
That's all .. now you have your workspace ready!
2 - Theme Batch Processor
Over those images extracted in the previous tool or over a set of them, you may apply many transformations in batch mode.
Input Folder: Where images to be processed are stored. It only will be read and no modifications applied to it. Only PNGs and JPGs will be processed. Other file types will be only copied.
ATTENTION: Be careful. If you provide "C:\" as "Input Folder" the tool WILL copy every single file within that drive to the output folder ... not good ... MIND WHAT YOU ARE DOING.
Click to expand...
Click to collapse
Output Folder: Where processed images will be saved to.
Click to expand...
Click to collapse
Convert to GrayScale: Selectable. Will be done at first. The output image will be always in RGB regardless this option. Indeed, if no option is selected, the tool will process the images just converting all to RGB.
GIMP: Image > Mode > GrayScale
Click to expand...
Click to collapse
Rotation Angle: If greater than 0 will be applied a rotation with the specified angle to the images.
GIMP: Layer > Transform
Click to expand...
Click to collapse
Use Colorify: Mark this to enable its usage. Colorify and Hue-Saturation can not be selected at same time to run.
Colorify With: Select the color to be applied to the images.
GIMP: Colors > Colorify
Click to expand...
Click to collapse
Brightness Value: Select the increase/decrease of Brightness to be applied to the images.
Contrast Value: Select the increase/decrease of Contrast to be applied to the images.
GIMP: Colors > Brightness-Contrast
Click to expand...
Click to collapse
Gaussian Blur X and Y: Provide the amount of pixels for X and Y axis to be applied a Gaussian Blur to the images.
GIMP: Filters > Blur > Gaussian Blur
Click to expand...
Click to collapse
Affected Hue: Which basic color (or master) the change of Hue/Lightness/Saturation should apply.
Hue/Lightness/Saturation: Values to be applied to all images.
GIMP: Colors > Hue-Saturation
Click to expand...
Click to collapse
Invert Color: Selectable.
GIMP: Colors > Value Invert
Click to expand...
Click to collapse
Opacity: The amount of opacity that will be applied to all images. 100 corresponds to NO Opacity change.
GIMP: Colors > Curves > Alpha Channel
Click to expand...
Click to collapse
Now run and enjoy!
3 - Battery Batch Creator
This tool will:
(a) Resize images regarding or disregarding its original size;
(b) Rename files to produce animations accordingly;
(c) Apply 2 different sharpness algorithms;
(d) Inject another PNG in all images at foreground or background
Input Folder: Where images to be processed are stored. It only will be read and no modifications applied to it.
ATTENTION: Be careful. If you provide "C:\" as "Input Folder" the tool WILL copy every single file within that drive to the output folder ... not good ... MIND WHAT YOU ARE DOING.
Click to expand...
Click to collapse
Output Folder: Where processed images will be saved to.
Click to expand...
Click to collapse
Rename Replacing This: If renaming required, provide the string to be replaced.
Click to expand...
Click to collapse
By This: If renaming required, provide the string to replace the above string.
Click to expand...
Click to collapse
New Width and Height: If resizing, provide new widths and heights in pixels.
Click to expand...
Click to collapse
Keep Source Size: If selected, during resizing the image will be cropped to its original dimensions.
Click to expand...
Click to collapse
Sharpeness: Amount of Sharpeness to be applied to the images. (1st algorithm)
Click to expand...
Click to collapse
Unsharp Radius / Amount / Threshold: Values to be applied in this sharpeness process. (1st algorithm)
Click to expand...
Click to collapse
Inject Image: Select an PNG (mind itsd size) to be injected into all images.
Click to expand...
Click to collapse
Image Position: The above PNG will be injected into all images in Background or Foregound.
Click to expand...
Click to collapse
Now just run!
Two examples of its usage can be found here and here
4 - Battery XML Generator
Will create the XML required to reproduce the animation you've created with the images in the previous step.
Output Folder: Where the XML file will be saved.
Click to expand...
Click to collapse
XML Battery: The name of the XML file that will be saved.
Click to expand...
Click to collapse
PNG Name: The PNG name pattern to be used by the tool. Two parameters can be provided as the example below:
PNG Name: stat_sys_battery_<index><level>.png
<index> will be replaced by the ones you will provide below (optional)
<level> corresponds to the battery levels (0 to 100) (required).
Click to expand...
Click to collapse
Animation Steps: How many frames your animation contain for each battery level.
Click to expand...
Click to collapse
Indexes: The indexes of each battery level animation step. If provided, the same amount of "Animations Steps" have to be present. If not provided, the animation will be done over battery levels.
Click to expand...
Click to collapse
Duration (ms): The amount of miliseconds that each step will take. If provided, the same amount of "Animations Steps" have to be present.
Click to expand...
Click to collapse
An example of its usage can be found here.
5 - Compile 9.patch Images
Input Folder: Where images to be compiled are stored. It only will be read and no modifications applied to it. .9.PNG's will be compiled and anything else will be simply copied to the destination folder.
ATTENTION: Be careful. If you provide "C:\" as "Input Folder" the tool WILL copy every single file within that drive to the output folder ... not good ... MIND WHAT YOU ARE DOING.
Click to expand...
Click to collapse
Output Folder: Where processed images will be saved to.
Click to expand...
Click to collapse
666 - 9.patch Reverse Enginneering
Input Folder: Where yours compiled .9.png's images are stored. It only will be read and no modifications applied to it.
Click to expand...
Click to collapse
Output Folder: Where processed images will be saved to.
Click to expand...
Click to collapse
7 - Build, Sign and ZipAlign APKs
Input Folder: Where yours decompiled apk's are stored. It only will be read and no modifications applied to it.
Click to expand...
Click to collapse
Output Folder: Where the built, signed and zipaligned result apks will be stored.
Click to expand...
Click to collapse
Platform: Select the Platform you are building. Options are:
- AOSP / CM : will install only framework-res.apk;
- TouchWizard : will install framework-res.apk and twframework-res.apk;
Click to expand...
Click to collapse
Framework Folder: The folder that contains framework-res.apk and twframework-res.apk (for now). They should be from the same ROM/firmware correspondent to the apk's you are building.
Click to expand...
Click to collapse
9 - Create Flashable ZIP
Input Folder: Where your 'system' folder ready to be released work is. Yes, system folder ... you have to provide it with the same directory structure that will be used by VRTheme to flash it.
Tiny Example:
Code:
c:\gimp\in\system\
c:\gimp\in\system\app\
c:\gimp\in\system\app\SecCalculator.apk\
c:\gimp\in\system\app\SecCalculator.apk\res\
c:\gimp\in\system\app\SecCalculator.apk\res\drawable\
c:\gimp\in\system\app\SecCalculator.apk\res\drawable\background.png
c:\gimp\in\system\app\SecEmail.apk\
c:\gimp\in\system\app\SecEmail.apk\res\
c:\gimp\in\system\app\SecEmail.apk\res\drawable
c:\gimp\in\system\app\SecEmail.apk\res\drawable\background.png
c:\gimp\in\system\priv-app\SystemUI.apk\
c:\gimp\in\system\priv-app\SystemUI.apk\res\
c:\gimp\in\system\priv-app\SystemUI.apk\res\drawable\
c:\gimp\in\system\priv-app\SystemUI.apk\res\drawable\background.png
Click to expand...
Click to collapse
Output Folder: Where Flashable ZIP will be created.
Click to expand...
Click to collapse
ZIP File Name: Tool will append the extension.
Click to expand...
Click to collapse
.9.png's Special Treatment.
As you can see in the code, when a .9.png is found, first the tool duplicate the existent layer and then remove the guidelines from it. At the end, the tool reintegrates the guidelines by merging the modded layer to the source one.
Thanks:
.9.png Compile process was inspired on @F4bioo 's work at [tool] 9compiler
Please, share you experiences as you will get a LOT OF TIME back.
.
Kdio said:
Hi All
Just finalized my Theme Batch Processor and would like to share it with you all.
It uses Python-Fu GIMP Processor to execute the job.
Will process a given directory recursively modifying any PNG and JPG found applying the modifications that you will provide.
Copy and Paste the below python code into a new text document (use Notepad++ please) and save it as Whatever.py inside yours plugin's folder.
Restart Gimp and you will find it at Filters >> Theme Batch Processor...
Create a folder and copy to it all your raw content to be cooked. Better this way as the tool will overwrite all png's and jpg's.
Using your Notepad++, edit that 'Whatever.py' file and make the modifications accordingly to your needs. Some examples are already written and you may comment/uncomment them as you wish. Save the file and there is no need to restart GIMP. You may make successive changes during a same GIMP section.
There are a lot of others function that GIMP provide, in fact, anything you do with the mouse can be done with this batch. A lot more can be learned here and from GIMP help.
.9.png's Special Treatment.
As you can see in the code, when a .9.png is found, first the tool duplicate the existent layer and then remove the guidelines from it. At the end, the tool reintegrates the guidelines by merging the modded layer to the source one.
Please, share you experiences as you will get a LOT OF TIME back.
Code:
import os
from gimpfu import *
pdb = gimp.pdb
#################################################
# This is the routine that in fact executes the
# transformations and where you will edit
#################################################
class DoTransform:
def __init__(self):
pass
def applyMod(self, image, is_9):
drawable = pdb.gimp_image_get_active_drawable(image)
#####################################
# Image Level Mods
#####################################
##################
# Convert GrayScale
##################
#is_gray = pdb.gimp_drawable_is_gray(drawable)
#if is_gray == 0:
#pdb.gimp_image_convert_grayscale(image)
##################
##################
# Convert RGB
##################
is_rgb = pdb.gimp_drawable_is_rgb(drawable)
if is_rgb == 0:
pdb.gimp_image_convert_rgb(image)
##################
#####################################
# Layer Level Mods
#####################################
##################
# Prevents .9.png guidelines to be touched
##################
if is_9 == 1:
newlayer = pdb.gimp_layer_new_from_drawable(drawable, image)
pdb.gimp_image_insert_layer(image, newlayer, None, 0)
drawable = pdb.gimp_image_get_active_drawable(image)
width = pdb.gimp_image_width(image)
height = pdb.gimp_image_height(image)
pdb.gimp_image_select_rectangle(image, 2, 1, 1, (width - 2), (height - 2))
pdb.gimp_selection_invert(image)
pdb.gimp_edit_clear(drawable)
pdb.gimp_selection_none(image)
##################
##################
# Colorify with Plain Green (RGB #00ff00)
##################
#pdb.plug_in_colorify(image, drawable, (0.0, 1.0, 0.0))
##################
##################
# Increase/Decrease Brightness & Contrast
##################
#pdb.gimp_brightness_contrast(drawable, 30, 20)
##################
##################
# Gaussian Blur with Horizontal, Vertical radius (px)
##################
#pdb.plug_in_gauss_rle2(image, drawable, 1.0, 1.0)
##################
##################
# Modify hue, lightness and saturation from a hue range
# Example: from green to yellow
##################
#pdb.gimp_hue_saturation(drawable, 3, -60, 0.2, 0)
##################
##################
# Rotate 180 (1)
##################
#pdb.gimp_drawable_transform_rotate_simple(drawable, 1, TRUE, 0, 0, TRUE)
##################
##################
#Regroup the layers of .9.png
#to reintegrate the guidelines
##################
if is_9 == 1:
layer = pdb.gimp_image_merge_visible_layers(image, 0)
##################
################################################
# DO NOT EDIT BELOW THIS LINE
# Harmfull - Toxic - Radioactive
################################################
def themeProcess(input_folder):
doTransform = DoTransform()
for root, dirs, files in os.walk(input_folder):
for f in files:
themeFile = os.path.join(root, f)
filename, ext = os.path.splitext(themeFile)
# Processes only images (PNG & JPG)
if (ext != ".png"):
if (ext != ".jpg"):
continue
is_9 = (".9.png" in themeFile)
image = pdb.gimp_file_load(themeFile, themeFile)
doTransform.applyMod(image, is_9)
pdb.gimp_file_save(image, image.layers[0], themeFile, themeFile)
register(
"python-fu-theme-batch-process",
"Process images recursively",
"Process images recursively",
"Kdio",
"Kdio",
"2014",
"Theme Batch Processor...",
"",
[
(PF_DIRNAME, "input_folder", "Process Folder", "C:\gimp\in"),
],
[],
themeProcess,
menu="<Image>/Filters",
)
main()
Click to expand...
Click to collapse
Hey Mate... I came.
Sorry for not using GIMP
Please explain what it using for and canuse with photoshop? Thank
Hi Pas and ALL
Better explain the tool with an example. It's a simple one using 6 images but this is meant to be used with hundreds so ... lets see ...
If you succeeded installing the tool, a new option menu will appear as follows:
Clicking on it, the Tool Dialog window will appear
Input Folder: Is where your source images are stored.
Output Folder: Where the tool will generate the result images.
Restore Source Mode: The image mode that enters (indexed, grayscale or rgb) will be the same of the output, otherwise it will be outputted as RGB.
Executing:
I've picked 6 battery icons from you:
EDIT: to turn this exequible by everyone (using GIMP), grab the icons used in the View attachment example.zip.
Edited that file with Notepad++ uncommenting just the below lines and adjusting the colorify hue/saturation parameters accordingly:
- The 1st line tells Gimp to, whenever he finds green like pixel (3), decrease the hue by -60 and increase the lightness by 15
- The 2sd line rotates the image by 180º (1)
- Save before running
When the Tool is executed, you will see this result.
Got the idea now.
As you already use PS, give GIMP a try as it is very alike PS and has these enhanced features.
Nice regards.
.
pas2001 said:
Sorry for not using GIMP
Please explain what it using for and canuse with photoshop? Thank
Click to expand...
Click to collapse
very nice :good:
Sorry mate, I can't deal with gimp too.
The idea is great but I think (like pas2001) PS is more comfortable. I use it since nearly 10 years, and it have a lot of options.
Sorry mate
Sent from my GT-I9505 using XDA Premium 4 mobile app
*wii360* said:
PS is more comfortable. I use it since nearly 10 years, and it have a lot of options.
Click to expand...
Click to collapse
Don't be sorry.
PS probably has it's batch processor too so you may do it there but ... if PS doesn't have, maybe you can use GIMP only to do batch things for you.
For myself, GIMP is unbeatable.
Nice regards.
.
I use Gimp.
will try it.
great Idea Mate
Kdio said:
Don't be sorry.
PS probably has it's batch processor too so you may do it there but ... if PS doesn't have, maybe you can use GIMP only to do batch things for you.
For myself, GIMP is unbeatable.
Nice regards.
.
Click to expand...
Click to collapse
PS have a batch processor too, and u can record your own as you edit one image/icon. It's easier for me.
Sent from my GT-I9505 using XDA Premium 4 mobile app
xxmrgreenxx said:
I use Gimp.
will try it.
great Idea Mate
Click to expand...
Click to collapse
Hey xxmrgreenxx
Thank you dude for the words.
I've Ctrl+C/V almost everything there unless the .9.png safety routine that is very usefull for us indeed.
If you need any support on some functionality not yet showed on examples, please be welcome to ask ... I probably don't know the answer but we can learn together
*wii360* said:
PS have a batch processor too, and u can record your own as you edit one image/icon. It's easier for me.
Click to expand...
Click to collapse
That's great! Do you think it would deal automatically with all diversity of sizes in .9.png's guidelines correctly too?
If it has not a proprietary programing language, I may give it a try to port this to it.
Nice regards.
.
Do you think it would deal automatically with all diversity of sizes in .9.png's guidelines correctly too?
.
Click to expand...
Click to collapse
I didn't try it, I think NO.
for .9.png I'm using xUltimate-d9pc,this tool recompile only 9.png icons, and draw9parch. Do u know the tools?
Sent from my GT-I9505 using XDA Premium 4 mobile app
*wii360* said:
I didn't try it, I rhino NO.
for .9.png I'm using xUltimate-d9pc,this tool recompile only 9.png icons, and draw9parch. Do u know the tools?
Sent from my GT-I9505 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I keep my GIMP for editing .9.png ... why change to another tool ??? Not very productive.
For compiling them back, I would like to suggest your attention to:
[tool] 9compiler - batch process for themers android
As I'm doing now ...
I place all my decompiled project graphics inside 1 folder, \app , \priv-app and \framework altogether. Run that GIMP batch with my configs. Give all that result to 9compiler ... It's all done in 5 minutes.
Niceeeeee....
Thanks, It sounds better then my tools, I'll check that tomorrow.
Sent from my GT-I9505 using XDA Premium 4 mobile app
I same as wii360 mate use same tool and will see this too THANK
NEW GUI
@pas2001 @*wii360* @xxmrgreenxx @mochingnawy @jlmvc and all users
As you all can see at OP, I've made a little revamp in the interface. There is no more Notepad++ need. Just feed the parameters and go.
Nice regards.
Will rewrite the example later.
.
This seems cool ... downloading.
Sent from my GT-I9505 using xda app-developers app
@Kdio
can you add a resize Option to?
xxmrgreenxx said:
@Kdio
can you add a resize Option to?
Click to expand...
Click to collapse
Hi xxmrgreenxx
Yep ... seems possible but would not be advisable to change android png's sizes.
Could you please exemplify? May be a can do better regarding your objective.
Nice regards.
.
I know it is not necessary fpr .9.png's
But can be helpfull to only resize some Battery Icons to match them on Galaxy S2.
If i resize them with Irfanview the Output Images look very strange.
Or can U make me a resize Script for Gimp?
xxmrgreenxx said:
Or can U make me a resize Script for Gimp?
Click to expand...
Click to collapse
Sure dude ...
I got an appointment right now but will do and let you know ...
Just resize ? No crops ?
Just point your needs and I will provide.
Nice regards.
.
Crops?
Can u pls explain that!
i am not thaaaat PRO u think.
Only a little Thememaker

Just published ---> DexPatcher: Modify APKs at source-level using Java

we interrupt your scheduled programming to announce... DexPatcher
it might interest...
apktool / baksmali / smali users: like said tools it lets you patch APKs, but coding in java instead of smali.
Xposed developers: like Xposed it lets you mod APKs using java, but ahead of runtime and producing a standalone APK.
just published now, visit the project here...
[TOOL] DexPatcher: Modify Android DEX/APK files at source-level using Java
http://forum.xda-developers.com/android/software/tool-dexpatcher-modify-android-dex-apk-t3060854
​
thanks for your time!
Public service announcement: DexPatcher grew in scope and now bundles Apktool and dex2jar...
THE ALL-NEW DEXPATCHER PREVIEW IS UP !!!
Come take a look !
​

[GUIDE][THEMING]How to theme any Android App

I make (another) guide on how to theme, but it’s based on my experience. If moderators think this thread redundant , they are free to delete or close it.
This tutorial is for « every » operating system. In this tutorial I will change the color of some object of the XDA Labs app . There will be 2 part for this guide, the first is the general method and the second one is the description of what I’ve done on the XDA Labs app to theme it. Please , before asking , read the entire OP , maybe your answer is into it.
I’m running Ubuntu 16.04 LTS but the softwares are also compatible with windows and mac.
Which software I use :
• Inkscape (to make icons)
• Alpha Colour for Android (to see which aplha code correspond to which level of opacity)
• Pipette for Android (to identify colors on the app’s screenshot) No longer available , use this app, it's even more accurate
• ZipSigner for Android(to sign apk)
No longer available, for signing please refer to this tool
I-General Method :
1-First you need to set-up your PC’s environment:
• A 64-bit PC Processor ( 32-bit has too many bugs linked to aapt compatibility)
• Apktool or other reverse engineering tools properly installed
• Java 7 or above
• Notepad++ or any text editor
2-What you should know before theming:
A)Colors:
Modifying colors is quite simple a process, but you should first understand it.Then you can change the app as your mind tells you to.
1-A regular line in this file is built like this :
-<color name="[object’s id]">#[alpha channel][hex code]</color>
2-Meaning :
- Alpha channel : This is the 2 characters that change the opacity of the color
- Hex Code : This is the 6 characters that define the color itself
3-For example :
<color name="design_fab_stroke_end_outer_color">#0f000000</color>
- «design_fab_stroke_end_outer_color» is the id of the object I want to change the color from
- «0f» is the alpha channel of the initial color
- «000000» is the hex code of the initial color
4-To modify them :
Replace the hex code of the initial colors by the hex code of the color you want to add , be careful not to delete a piece of the line with the old hex code because it will cause errors on apktool. I use alpha colour app for Android to see levels of opacity and to find color’s hex code.
B)Pictures :
You want to change pictures inside the app , that’s simple :
• Search for the picture you want to change in the drawable folder or mipmap folder
• Folders you want to browse to find the pictures :drawable-xhdpi-v4 / xxhdpi-v4 / xxxhdpi-v4 for the « in-app » pictures , every mipmap folders for icons (sometimes icons are in drawable folders and there aren’t any mipmap folders).
• When you prepare the pictures , make sure they have the SAME SIZE as the original pictures.
• Rename the picture you have prepared to replace old ones with the SAME NAME AS THE OLDER PICTURES.
• Once you have renamed those pictures, put them into the folder where you found them.
C) App name :
• go to /res/values and open string.xml
• Modify this string : <string name="app_name">[The name you want]</string>
Example :<string name="app_name">XDA Evolved</string>
3-Now , we can start theming :
• Go to the apktool’s directory , and open a command prompt there (keep it open till the end)
• Enter this command :
Code:
java -jar apktool.jar d [the apk name.apk]
• There should be a new folder which has the name of your apk file. Open this folder.
• Then go to /res/values and open the colors.xml file
• Modify the colors
• Search for the pictures you want to change and change them as I have written above
• Open the terminal you kept open
• Enter this command :
Code:
java -jar apktool.jar b [the apk name.apk]
4-Before installing , signing :
I use an Android app called zip signer , with which I can sign apks from my phone.
• Open the app , click on input and browse for the apk you’ve put on your phone
• Click on the file when you’ve found it
• Click on Output and select the same apk file as in the first step
• Rename the path adding a « -signed » just before « .apk » at the end of the path.
• Select on the « key/mode » menu « platform »
• Finally , click on « sign the file » and wait till the end of the progress bar.
II-What I’ve done
1-Identifying :
Here is the list of the infos I’ve written down :
• Image Size
• The Hex code of the color I want to change :
- Take a screenshot of the color(s) you want to modify
- Open the screenshot on Pipette
- Tap on the lock button and click on the color , the hex code will be displayed at the bottom
• The Hex code of the color I want to add : Same process with Pipette
• The colors I want to add :
-Blue :3174f1
-Yellow :fbb002
-Background :47595c
-Background of the posts :2d2d2d
-the secondary color :c0c0c0
Click to expand...
Click to collapse
• The colors I want to change:
-Background color :212121
-Accent color :edb02d
-Primary color :353535
-The secondary color :#aaffffff
Click to expand...
Click to collapse
2-Editing and making new icon, etc.:
• I used Inkscape (free alternative to illustrator) because there were vector-designed icons.
• I used gimp to resize the picture after making them.
3-Decompiling the apk file :
• I typed in the terminal :
Code:
java -jar apktool.jar d XDALabs.apk
4-Replacing icons and other images :
• I put the pictures in the 3 drawable folders because it’s where I found them
5-Editing colors and the name :
• I went to /res/values and I opened colors.xml file and I replaced colors and some alpha channel :
Code:
<color name="accent">#ffedb02d</color>
<color name="accent_translucent">#ddedb02d</color>
<color name="background_dark">#ff212121</color>
<color name="dialog_bg_dark">#ff212121</color>
<color name="primary">#ff353535</color>
<color name="primary_bg">#ff353535</color>
<color name="primary_dark">#ff2b2b2b</color>
<color name="search_divider_dark">#ff212121</color>
<color name="search_list_results_bg_dark">#ff212121</color>
<color name="secondary_text">#ff727272</color>
to
Code:
<color name="accent">#fffbb002</color>
<color name="accent_translucent">#ddfbb002</color>
<color name="background_dark">#ff47595c</color>
<color name="dialog_bg_dark">#ff2d2d2d</color>
<color name="primary">#ff3174f1</color>
<color name="primary_bg">#ff2d2d2d</color>
<color name="primary_dark">#ff3174f1</color>
<color name="search_divider_dark">#ff2d2d2d</color>
<color name="search_list_results_bg_dark">#ff2d2d2d</color>
<color name="secondary_text">#ffc0c0c0</color>
• I opened strings.xml file and I replaced the app name line :
Code:
<string name="app_name">XDA Labs</string>
to
Code:
<string name="app_name">XDA Evolved</string>
6-Recompiling the new apk file :
• I opened the same command prompt and I typed this command :
Code:
java -jar apktool.jar b XDALabs
7-Signing the apk after install it :
• The same process as in the step 4 in the part one of my guide (I - 4).
8-Install the Apk :
• Uninstall the original app
• Install the signed version of the apk.
You can ask me on this thread about everything about the theming and I'll do my best to solve your problems, but do it in the respect and following the Forum Rules
You can go to themed XDA Labs version's thread clicking here.
And please , if you found this guide useful , press the thank button.
When I learn
Thank you for posting this. I always wanted to customize an android app, but have never had much success.
coluvatz12 said:
Thank you for posting this. I always wanted to customize an android app, but have never had much success.
Click to expand...
Click to collapse
Glad to hear that , thanks!
If you think this thread helped you , please press the thank button , I'm happy to see that my work is appreciated , Happy Theming !
nandakumar12 via PM said:
dude one doubt, how can i change the background color of an app, i cant find a code to change..??
Click to expand...
Click to collapse
First you should have installed the app and identified the hex code of the background color (E.G :#36ge87)
You can do it via Pipette , an app which identify hex code in a picture. Just take a screenshot and identify the colors via Pipette .
Then you will have to search for the hex code of the background color you identified with Pipette previously.
This step is on your PC , you opened the color.xml file in notepad++ or whatever it is , and you wrote the hex code of the background color in the search bar. Make the search and find all the lines that have the hex code in it.
If you found multiple line , try to modify one of the lines , compile the APK , sign it and install it on your phone to see if something changed. Do that until you find the line holding the background color.
Theming , at the beginning is pretty long on require patience and many test before finding which line is the good one .
I hope my answer will help you .
Happy theming !!???
DUVIDA
Hello friends of the forum xda developers Instead, this forum is a newbie Needed to take a doubts:
I have a mobile model with windows 10 installed that is stopped in the drawer without use
He has put windows phone 10
I would like to change it on an Iphone with COMPATIVEL System OR ate pie android EVEN Instalar 9,0
I wonder if this is possible and what procedures to take I assume of all the risks ok
Other question:
I have a moto g5 plus and the Manufacturer Promised me an Update for the oreo 8.1.0 but until the moment nothing arrived and the artist said that it has already been released but up to the moment without conditions of receipt
There is a rumor that will be released only in September
Someone confirms this information
I await any response
Marcelo - DJ KUKA
djkukapr said:
Hello friends of the forum xda developers Instead, this forum is a newbie Needed to take a doubts:
I have a mobile model with windows 10 installed that is stopped in the drawer without use
He has put windows phone 10
I would like to change it on an Iphone with COMPATIVEL System OR ate pie android EVEN Instalar 9,0
I wonder if this is possible and what procedures to take I assume of all the risks ok
Other question:
I have a moto g5 plus and the Manufacturer Promised me an Update for the oreo 8.1.0 but until the moment nothing arrived and the artist said that it has already been released but up to the moment without conditions of receipt
There is a rumor that will be released only in September
Someone confirms this information
I await any response
Marcelo - DJ KUKA
Click to expand...
Click to collapse
Don't know what you want to ask
Please be clear
All I can infer is that this doubt doesn't belong here look over the ROMs sections
Thanks!
GAURAV THAKKAR said:
Don't know what you want to ask
Please be clear
All I can infer is that this doubt doesn't belong here look over the ROMs sections
Thanks!
Click to expand...
Click to collapse
Don't worry , that's a random spam , that's why I ignored it.
And I don't think he'll respond .
RaiZProduction said:
Don't worry , that's a random spam , that's why I ignored it.
And I don't think he'll respond .
Click to expand...
Click to collapse
Since you've replied please check the Signing Apk Guide..
You've mentioned a thread dated 4 sep
Can you please link me to it?
GAURAV THAKKAR said:
Since you've replied please check the Signing Apk Guide..
You've mentioned a thread dated 4 sep
Can you please link me to it?
Click to expand...
Click to collapse
Fixed !
That was just a typo , what I really meant is the step four in the first part of the Guide , the I - 4 .
RaiZProduction said:
Fixed !
That was just a typo , what I really meant is the step four in the first part of the Guide , the I - 4 .
Click to expand...
Click to collapse
Trying to theme Instagram
Will ping you if any issue occurs
Thanks for the simplest and to the point guide I've seen ever
GAURAV THAKKAR said:
Trying to theme Instagram
Will ping you if any issue occurs
Thanks for the simplest and to the point guide I've seen ever
Click to expand...
Click to collapse
You're welcome , all the pleasure is for me :highfive:
Does this work similar for changing a boot logo?
hello. i got this after compiling. is this normal ?
{
"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"
}
thanks !
Tarwada said:
hello. i got this after compiling. is this normal ?
thanks !
Click to expand...
Click to collapse
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
Code:
java -jar apktool.jar if framework-res.apk
RaiZProduction said:
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
Code:
java -jar apktool.jar if framework-res.apk
Click to expand...
Click to collapse
sorry i don't get it. im not connecting my phone to the computer
im trying to theme an app called mewe :\
Tarwada said:
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
sorry i don't get it. im not connecting my phone to the computer
im trying to theme an app called mewe :\
Click to expand...
Click to collapse
Hey buddy to theme some apps you need the framework apk also because it's some how dependent on framework as far as I know
GAURAV THAKKAR said:
Hey buddy to theme some apps you need the framework apk also because it's some how dependent on framework as far as I know
Click to expand...
Click to collapse
what about the message i got above
Tarwada said:
what about the message i got above
Click to expand...
Click to collapse
The message above means that the file I asked you to gather from your system isn't in the Apktool folder.
Sometimes, some apps require a framework to theme them correctly , that's why I asked you to do that.
So if you have root you can copy it from the /system/framework folder and paste it into your download folder to transfer it to your PC.
If not I'll search for you some others solution ?.
i managed to do it using apk editor on my phone but there's one thing i can't theme it in the app
can you help me so i provide some pictures ?
no pressure at all
---------- Post added at 01:23 PM ---------- Previous post was at 12:53 PM ----------
RaiZProduction said:
The message above means that the file I asked you to gather from your system isn't in the Apktool folder.
Sometimes, some apps require a framework to theme them correctly , that's why I asked you to do that.
So if you have root you can copy it from the /system/framework folder and paste it into your download folder to transfer it to your PC.
If not I'll search for you some others solution .
Click to expand...
Click to collapse
i extracted the framework-res.apk from my phone (im rooted)
but when i compile i get the same error even if i didn't modify the app :\
help ?
Tarwada said:
i managed to do it using apk editor on my phone but there's one thing i can't theme it in the app
can you help me so i provide some pictures ?
no pressure at all
---------- Post added at 01:23 PM ---------- Previous post was at 12:53 PM ----------
i extracted the framework-res.apk from my phone (im rooted)
but when i compile i get the same error even if i didn't modify the app :\
help ?
Click to expand...
Click to collapse
Can you tell me precisely what you modified in your APK ?

Categories

Resources