[APP][CM7] Modified Mms.apk - Desire HD Themes and Apps

Publishing the messaging app I modified for my taste. Maybe someone might like it.
Modifications include:
Enter key instead of Smiley
7 lines to enter message
No avatars in message list
Install instructions:
Backup current Mms.apk from /system/app
Replace Mms.apk with attached one and set permissions if you broke them
Reboot phone
Select black theme (white theme is unmodified)
Select not to send message on Enter click
Created with apktool by decompiling, recompiling and replacing the compiled xmls inside signed original Mms.apk. Attached the xmls if anyone might want to check the diffs or use for other version.
Apk taken from cm-7.2.0-ace so it will work on Desire HD running CyanogenMod 7.2. Other devices or ROMs might not work so don't complain. Will make the same modification for White theme if there will be request.
Enjoy

Related

Theme Porting Guide

Well Im not great at directions so this is the best i can do.
Summary
There are 2 ways that I know to port a theme to your device.
1. Using the metamorph app if its a metamorph theme.
2. Using 7zip ect.. if its a flashable theme. (most common)
Metamorph Instructions
1. First things first is to download the theme that you want to port.
2. Your theme will be a zip file containing only image files from apk's
3. Put the zip file on your sd card
4. Make sure your device is set to 320x480 resolution or metamorph app will not work.
5. Open metamorph app and start a new project.
6. Locate your zip file and let all the apks load up.
7. Install each apk one at a time. Do not install any jar files as they will cause your phone not to boot.
8. Reboot and your Theme should be working on your phone.
Flashable Theme Porting Instructions
Its not that difficult, once you get the hang of how 7zip works it will be your best freind. Its just a process of dragging and dropping images from one apk to another all within 7zip.
What the metamorph app does is takes themed images and places them into the correct apks res\drawable folders in your system.
Knowing what metamorph does as an app, you can do this manually using 7zip.
1. Download the theme that you want to port. It will be a system folder with an app,framework, and font folder inside of it.
2. Open up that system folder with 7zip
3. Make a copy of the system folder of your current rom and open up that system with 7zip as well. You should now have 2 different 7zips open. Make sure to keep track of witch is witch.
4. Open up the app folder of the themed system and open up the first apk thats in there.
5. Go into the res\drawable folder in the apk in both your system and the themed system.
6. highlight and drag and drop only the images from that folder to the same folder in the other base apk. Make sure to NOT highlight any xmls.
7. Do the same for any images in any other drawable folders the are mdpi.
8. If there are only hdpi folders and no mdpi folders than you will have to convert those images to mdpi size before using them. If there are both, than only use the mdpi images.
9. When finished overwriting those images in that first apk, go back to the other apks in the app folder and do the same thing. You can do all of this from with in 7zip. No need to exit 7zip in this entire process.
10. Open up the themed framework folder and you will see a framework-res.apk file. Open up that file, you will see the same res\drawable folders.
11. Also open up the framework-res.apk from the base theme in the other 7zip as well. And overwrite the images just like the other apks making sure not to overwrite any xmls.
12. Back out of that back into the framework folder itself, if there is a services.jar in the theme than you will want to use overwrite that file as well.
13. Back out of the framework folder, If there is a fonts folder in the theme, You will want to overwrite those files as well.
14. Now you are done modifying your base theme with all the images from the theme.
15. You can now close the themed 7zip that you downloaded and leave open the 7zip containing you newly modified apks. Create a folder on your desktop called "system". Inside that, create a folder called "app", "framework", and "fonts"
16. Move only the modified apks that you replaced images in into the correct folders in your new system folder.
17. Make an androidupdate.tar with 7zip out of your new system folder and you are ready to flash it using nomorootfs method.
Tips:
Using the shift button to highlight mutiple images saves time.
Using the ctrl button to highlight images with xmls between them aaves time.
Switching views to have all images at the top and xmls at the bottom saves time.
If i forgot steps, I appologize.
Excellent guide.
The only thing I would mention is that most of the time services.jar is specific to a particular rom and as such may not work correctly with the target rom. As services.jar really only contains themed elements for the titlebar, you are better off using colorChanger's, apkTool or a hex editior to manually change the titlebar colors.
Also, in some cases (Like ProLauncher) the apk's must be signed. I prefer to use the test keys and this handy context menu here.
simple direct and effective. thanks again for all you do sir.
myn said:
Excellent guide.
The only thing I would mention is that most of the time services.jar is specific to a particular rom and as such may not work correctly with the target rom. As services.jar really only contains themed elements for the titlebar, you are better off using colorChanger's, apkTool or a hex editior to manually change the titlebar colors.
Also, in some cases (Like ProLauncher) the apk's must be signed. I prefer to use the test keys and this handy context menu here.
Click to expand...
Click to collapse
Thanks for the info man.
BTW, HAPPY BIRTHDAY MYN
Dzo Odex sample with standard theme
Thanks for this info. This will help a million. Could you also put light on how to odex it?
Eg: Dzo's odexed sample of donut has plastic theme, can it be changed to a standard android theme using the steps above and then odex it to create a androidinstall.tar?
Nice guide.
Thanks for making this.
Ill probably start trying to theme when i finish school in 2 weeks or so.
how to convert hdpi to mdpi

[HOW TO] Do it yourself guide for theme editing

To get started, read the posts below by tsachi.
Then give this a glance - Do it yourself guide for theme editing
More Resources:
http://forum.xda-developers.com/showthread.php?t=982300
https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en
http://forum.xda-developers.com/showthread.php?t=916814
Info on how to edit the items in notification bar:
+ http://forum.xda-developers.com/showpost.php?p=11158662&postcount=3
All credit belongs to the original authors. I am simply gathering all this information to make it easier.
For any help or support, post in this thread and we will try to help you the best we can.
Expanded Information
Introduction
The link in OP gives you instructions on how to replace images, but it lacks information for the inexperienced themer. Here is some background information and some more details on the steps before and after you insert new images in your framework.
System Icons and background images sit in two main files: framework-res.apk and twframework-res.apk. Within these files there is a res directory, and under that you have the folders containing data. Google has guidelines on icon design, although themers usually ignore those in order to get a different from stock look. One thing you would notice is that there are a lot of repeated icons. For example, framework-res.apk has both drawable-hdpi and drawable-hdpi-v4. The first is there for compatibility with older APIs (anroid 1.6 or older) so I am not sure why it is still there, but if you remove it your phone will not like it.
Each application has its own res folder where the launcher icon and other visuals are kept. There are, however, a lot of applications that reference the framework.apk for visuals. An example is the dialer that calls on some background images from both framework-res and twframework-res.
There are 2 types of images that you would encounter. Normal icons and images are non-scalable. They take a certain amount of real estate on the phone, and that’s it. Example of these are the battery levels and notification icons. The other type is the .9 images. These are images that are going to be stretched to fit whatever space is needed. An example of that are the menu backgrounds. The .9 images have a special format. The one pixel border around them defines how they stretch and how content is displayed in them. It is highly recommended to follow the standards in order to get repeatable and consistent look. Android SDK has a tool to help with .9 file design: draw9patch.bat.
Important note: The .9 files show the borders ONLY when de-compiled. If you grab a file from the framework directly you will not see that line. It is therefore required to compile the .9 files after you make them. You can use apk manager or ThemePro-JAVA to recompile the framework apk after modifying the files.
Definitions for which image is used where sit in the xml files under the drawable folder. These are compiled xml files, you can’t edit them with a text editor. For this introduction I will not go into modifying xml files. Each apk also has a resources file that describes what is in there. If you add, remove, or rename files in the apk you will have discrepancy with the resource file and the theme will not work (more likely you will be stuck in an infinite bootup loop)
Before you start:
Warning: frameworks are highly linked with other files. You can’t just take a framework from one ROM and put it in another. Always keep a backup of the original files ready to be installed (see below), otherwise you may need to re-flash the ROM. Frameworks are also sensitive to compression. DO NOT use winzip to handle the files, it can cause problems with the final apk file.
There are several things you would need before you start
A rooted phone
SDK installed on the computer
A zip handling software other than winzip (winRAR and 7-zip are both good options)
Auto-sign (http://forum.xda-developers.com/showthread.php?t=471634) or signing tool (http://forum.xda-developers.com/showthread.php?t=473580)
Create a backup
Grab the framewor
k-res.apk and twframework-res.apk from your phone. They are located in the system/framework folder. You would need them as a starting point for your modification and you need them for a backup
Create a clockwork installation file of the original files (see post below)
Name the installation framework-original.zip, or something else that would be easily recognized in
case of trouble, and then copy it to your internal sd card.
After you are done modifying files
Create an installation file (see post below)
Give the file a name that is easy to recognize and copy it to your internal sd card
Reboot into recovery
Select install zip from card -> choose zip from sdcard
Select the installation of the new framework and confirm the installation
Reboot
If you are stuck in an infinite boot-up cycle
Take the battery out
Using 3-key combination boot into recovery (up-down volume + power. Hold until the AT&T screen cycles back, then release)
Install your original framework backup and reboot
Creating clockwork installation
After you have finished modifying the files, the best way to get them to the phone is through clockwork installation. Make sure that you have the original update.zip file on the sdcard. If you have a rooted phone, you probably have that already, but if not you can install ROM manager from the market and run it to get the update in place.
To create the installation file follow these steps:
Create a folder \framework
Place your modified framework files in that folder
Back in the main folder, create the following folder tree: \META-INF\com\google\android
In the android folder create a text file named update-script
WARNING: Do not name your framework file "update.zip"! You need both the original update.zip and the framework one for the installation.
Note: Although copying of the framework files may be possible, it is highly risky. In my experience installation from clockwork is the easiest
Puzzle Lock Screen Mod
Here is information for people who want to modify the look of the puzzle lock screen. It is only the list of images to replace, not the coding to change functionality.
The files sit in framework-res.apk under res\drawable-hdpi. The files are zzz_unlock_puzzle...
puzzle pieces
zzz_unlock_puzzle_noti_icon_call.png : Missed call piece in the floating state
zzz_unlock_puzzle_noti_icon_call_fit.png : Missed call when it gets to the unlock spot
zzz_unlock_puzzle_noti_icon_unlock.png : General unlock floating
zzz_unlock_puzzle_noti_icon_unlock_fit.png : General unlock at the unlock spot
Same for messages and voicemail.
Background
zzz_unlock_puzzle_bg.png : The image that shows on the lock screen. This should be semi-transparent if you want to show the regular screen background
zzz_unlock_puzzle_bg_pressed.png : Image that shows while dragging the puzzle pieces. Usually a slight modification of the regular background
zzz_unlock_puzzle_bg_land.png : The landscape version
Music player
zzz_unlock_disk... and zzz_unlock_ctr_pr... are the files related to the player.
zzz_unlock_ctr_bg.9.png is the background for the music controls
Text background
Overlaying the unlock image is text. That text can have background that is more opaque than the rest of the unlock screen.
The attached image shows the three regions. These regions also apply to the glass unlock.
Note: These are .9 files and should be done right to ensure correct stretching and text boundries.
Other files
There are some extra background files in the frameworks but I haven't been able to find where they go. There are also some files to control the clock numbers zzz_unlock_clock_...
Working with APK manager
What is APK manager?
APK manager is a tool for decompiling / recompiling apk files. If you want to change anything other than images, it is a must have.
The basics
The basic flow when using APK manager is
Place apk file in place-apk-here-for-modding folder
run the Script.bat file
Type 22 and select the file you want to work with
Type 9 and wait for it to finish decompiling
Modify the items you want modified (they will be in the projects folder)
type 11 to recompile
Sounds easy? It is, and it isn't. There are several places where things can go wrong. Here are a few of the things to watch for:
Bad starting file
This is mostly true for framework files that went through several cycles of modifications. The framework is forgiving to having extra items, or having bad .9 images (see post above about .9 images). Some people may have replaced images without recompiling the framework in a way that breaks internal links. If this happens you will very likely see error messages during the decompile stage. If that happens check the log file and correct things. One of the most common errors is .9 files replaced with regular images. See this post for how to solve this.
Things may not always be "fixable", so the best approach is to get the original framework that is the base for the one you need. Having a clean start can save a lot of headaches later on.
Overwriting your changes
When you recompile, assuming everything worked ok, you are prompted if this is a system file. Most likely you want to say yes. This ensures that the original signature is copied over. You will also be prompted if you want to copy some files over from the original. BE CAREFUL!. There are people who say you reduce the risk of errors if you copy things that didn't change. Personally, if I changed anything that required recompilation (mostly added new images or modified xml files) I always choose not to copy extra files. If you do choose to copy some files over, pay attention to the next step. Do not hit any key until you remove the modified files. You will need to go to the newly created "keep" folder (in the top apk manager directory) and remove any image that you changed and any xml that you modified. Also, if you modified xml files to add new images you need to delete "resources.arsc".
Failed rebuild
APK manager is trying to minimize work by only compiling newly changed items. If you built an apk and realized you have an error, or want to add more changes, I recommend removing the cached build. Go to the projects folder and delete the "build" folder. I've had cases where the new items didn't catch.
Removed items
I highly recommend to leave icons that you do not need. I've had occasions where I removed things that I thought had no more reference, but then ended with endless boot-loops. For example, if you modify the xml to only show 6 out of the 101 battery charge animations, leave the remaining icons in your project.
If you're stuck
Look at the log file. That would usually give you an answer. Also, if you are working on a recent GB ROM you probably need to get the beta 5 version. Version 4.9 will have problems compiling the newer files.
Thanks for the info!!! I have been wanting to play with themes for a while. Now I gots the knowledge.
sent from my Cap using the app.
Thanks for this post...I'll be looking into this for sure.
tsachi said:
After you have finished modifying the files, the best way to get them to the phone is through clockwork installation. Make sure that you have the original update.zip file on the sdcard. If you have a rooted phone, you probably have that already, but if not you can install ROM manager from the market and run it to get the update in place.
To create the installation file follow these steps:
Create a folder \framework
Place your modified framework files in that folder
Back in the main folder, create the following folder tree: \META-INF\com\google\android
In the android folder create a text file named update-script
WARNING: Do not name your framework file "update.zip"! You need both the original update.zip and the framework one for the installation.
Note: Although copying of the framework files may be possible, it is highly risky. In my experience installation from clockwork is the easiest
Click to expand...
Click to collapse
Thanks for this.. Question In #4 above the text file in the android folder. Is that an empty file? no extension? Thanks for your help.
TorqueWrench001 said:
Thanks for this.. Question In #4 above the text file in the android folder. Is that an empty file? no extension? Thanks for your help.
Click to expand...
Click to collapse
The file has no extension but it isn't empty. It contains the installation instructions. Typical instructions would be:
copy_dir PACKAGE:framework SYSTEM:framework
which copies everything in the frameworks folder in the zip file to the system/framework folder on the phone
Sent from a captivate running phoenix using XDA app
https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en
http://forum.xda-developers.com/showthread.php?t=916814
Good info
Thanks, been wanting to play with themes for a while now!!!!!
This needs a bump for all those requesting themes to be made.
This needs to be a sticky. I detailed guide is just what was needed. I been wanting to play around with themes but always end up doing something stupid so it never works. Now I have some more knowledge and hopefully can avoid that mistake.
Thank you, one of the links has the info I need to fix my text color issue in my notification/menu window!
Sent from a phone using an app.
Why it's not pinned it's beyond me. We have a thread pinned for must have apps that aren't even must have apps, but not this.
That was do to some how me missing this thread for the post few months. It is corrected now. Stuck
Since the thread is getting more life, I just added info on lock screen (fourth post)
Sent from my captivate running the latest firefly
Resorce dump
Well now that this is not going to fall to the depths of page 500, ill unload some rubbish into it.
http://android.modaco.com/content/zte-blade-themes-and-design-customisation/328510/guide-theme-editing-and-related-things/
http://forum.xda-developers.com/showpost.php?p=9066440&postcount=1
http://forum.xda-developers.com/showthread.php?t=593932
http://forum.xda-developers.com/showthread.php?t=695701
http://forum.xda-developers.com/showpost.php?p=8105110&postcount=2
http://developerlife.com/tutorials/?p=309
http://www.droidforums.net/forum/team-inversion-conversion/116419-so-you-want-edit-xmls-more-adb-apk-manager-how-basics.html
http://www.colorschemer.com/online.html
http://www.colorsontheweb.com/colorwizard.asp
Edit: I purposefully did not include descriptions in the links. If you dont know what your doing reading all but the last two links in there entirety will help get you on your way.
whiteguypl said:
Well now that this is not going to fall to the depths of page 500, ill unload some rubbish into it.
http://android.modaco.com/content/zte-blade-themes-and-design-customisation/328510/guide-theme-editing-and-related-things/
http://forum.xda-developers.com/showpost.php?p=9066440&postcount=1
http://forum.xda-developers.com/showthread.php?t=593932
http://forum.xda-developers.com/showthread.php?t=695701
http://forum.xda-developers.com/showpost.php?p=8105110&postcount=2
http://developerlife.com/tutorials/?p=309
http://www.droidforums.net/forum/team-inversion-conversion/116419-so-you-want-edit-xmls-more-adb-apk-manager-how-basics.html
http://www.colorschemer.com/online.html
http://www.colorsontheweb.com/colorwizard.asp
Edit: I purposefully did not include descriptions in the links. If you dont know what your doing reading all but the last two links in there entirety will help get you on your way.
Click to expand...
Click to collapse
Very nice, I will add these to OP with details about each link.
I'm quite happy that this has been pinned finally. Now to get to work. I haven't decided on which ROM I want to do, or even if I wanna port another theme or make my own. SO MANY CHOICES!!

[Guide/Reference] The Basic APK & Theming Thread... {15/11/15}

Hi there.
The greatest thing about Android is that you can change just about every element of the U.I, and if all you want to do is change a few images it's as simple as copying and pasting, but this guide will teach you how to...
[*]Use ADB Commands
[*]Deodex
[*]Decompile
[*]Recompile
[*]Sign
[*]Zipalign
...in an easy to follow manner that will have you theming your own apks in no time. There are many many GUI programs which I'll link to below that automate the following process but experience has taught me that it's important to know the basic process for when those programs don't work, are no longer maintained or you just don't like them for whatever reason etc, and to be honest command line editing for me is just as quick, and I personally prefer the ability to have everything in one folder. So lets begin.
Some Requirements:
A Rooted Phone.
A BACKUP OF YOUR PHONE!
Java - Do this first if you don't have it installed already.
Notepad++ - An essential program for xml editing!
Photoshop or Gimp - You'll need one of these for image editing.
7-Zip or WinRar - Required for apk editing.
Patience. :silly:
Use Linux or a Mac? See the following threads for more information on using apktool on other Operating Systems...
[WIN/LINUX][Decompile/Compile] Quick Mod Tool 4.0 [decompile and compile with speed]
APK Manager for Mac OS X
[Linux][UTILITY][TOOL] APK Multi-Tool
[tutorial] decompiling,recompiling and signing in linux (27-01-2013)
How to install and use Apktool with Ubuntu
​
Quick Tips;
.apk files are applications on your Phone, but when they''re on your computer you can browse them exactly like you would a .zip file, so set your default zip program as the default program for handling apks which will makes things much easier when working with them.
Download themes for your Phone, for other Phones too even and compare the res folders and screen shots of the theme as that will give you a good idea of what image you need to look for when modding your own apks.
If all you want to do is change images then you don't even necessarily need to decompile, you can just drag and drop images in to an apk to replace a stock image so long as they have the same file name.
For more complex mods like changing text colors and layouts (.xml files) and editing .9 png images then you will have to decompile.
​
{
"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"
}
Most of us will have Java already installed, but if you don't then get it installed before doing anything else. To save you the time and hassle of figuring out what else you need to download etc I've made a zip for you to download which contains Apktool and ADB.
Download APKTool_CMD.zip to a location of your choice, preferably the C:\ drive which will give you a folder to work from. This is how mine currently looks...
Once your folder is setup, java and other tools installed, you're going to want to get any apks you want to theme off your Phone and there are numerous different ways to this, but we're going to use adb commands to pull files to your computer so we need to open a command prompt window in your Apktool folder. To do this simply hold the shift key then right click your mouse in the Apktool folder and select "open command window here", or just click on the included command prompt.bat.
I like to pull the whole system as soon as I'm rooted as it gives me a backup of stock files which I can then copy and deodex to be themed.
The command to pull your whole system is...
Code:
[B]adb pull /system/ Z1C_368[/B]
...you can choose something other than Z1C_368 as your folder name but it will create that folder in your Aktool folder. Alternatively you can just download individual folders, the commands are as follows...
Code:
[B]adb pull /system/app/ Z1C_368 app
adb pull /system/priv-app/ Z1C_368 priv-app
adb pull /system/framework/ Z1C_368 framework[/B]
...or pull individual files...
Code:
[B]adb pull /system/framework/framework-res.apk[/B]
...so now you should have a APKTool_CMD folder with another folder within it and at least your app, priv-app and framework folders in that, which we can use for the next step.
The tool I use is this - [Tool/Utility] JoelDroid Lollipop Batch Deodexer. While I will deodex all the files I've pulled to my computer experience and battery life has taught me to only deodex the apps I've themed on the phone, rather than run a fully deodexed ROM.
Before you can do anything else you need to install your framework-res.apk and SemcGenericUxpRes.apk/twframework.apk, which will put two apks at C:\Users\YourPCName\apktool\framework which are the resources apktool uses to work its magic. The two commands to install your two resource apks are...
Code:
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
The command for decompiling is...
Code:
[B][U]apktool[/U] [U]d[/U][/B] framework-res.apk
...which will create a folder named like for like except for the .apk extension, and in this folder is where you'll find a couple of folders, the main one always being the res folder as it's in this folder that you'll find your images and xmls to edit. First glance of a decompiled res folder can be overwhelming, 596 folders in my frameworks, but we only need to focus on a handful in the majority of apks, and they are...
drawable
drawable-xhdpi-v4 (drawable-xxhdpi-v4 depending on your device)
layout
values
...you may need to delve into others sometimes but it's very rare that I've had to.
Once you've finished making your mods you need to recompile your apk using the following command...
Code:
[B][U]apktool[/U] [U]b[/U][/B] framework-res
...notice you only use the folder name here. If you get any errors here due to a bad edit apktool will usually tell you, in a roundabout way, you just need to read the code it throws up then retrace your steps, correct any bad edit and try again. If all goes smoothly you'll now have a new folder called dist, which contains your newly modified apk, but you can't use that just yet.
This is where 7-Zip or WinRar comes in to play. We need to extract from the original apk the Android.Manifest.xml and META-INF folder, into the dist folder, then from the new apk extract the resources.arsc also into the dist folder, then drag and drop all three files back into the new apk, but NOTE, it's important that you choose store as the compression method, any other will break the apk, and if you replace a broken framework-res.apk you will bootloop.
And signing is as simple as that. Alternatively you can use the following command...
Code:
[B]java -jar signapk.jar testkey.x509.pem testkey.pk8[/B] framework-res.apk.apk framework-resS.apk
...notice the extra "S", the output name has to differ from the input name otherwise it will give an error, if done right it will create a new apk called framework-resS.apk, just remember to rename it back to the original before using it on your Phone.
[TOOL] pySignare - Quickly Sign APKs [Windows]
Signing For The Play Store
If you plan on Publishing a Theme or any other app/apk to the Play Store then using the above method to sign your apks just wont work because you need to give it an individual signature that is unique to you, thankfully @AndroidGraphix has written a great guide that will show you how, it's a bit more fidgety than the above method but simple enough to follow...
AndroidGraphix said:
Click to expand...
Click to collapse
- Noobs guide to signing an APK with a Private Key​
DISADVANTAGES OF UNALIGNED APKs
Quite understandably, situation would be reserved for unaligned application packages. Resource reading would be slow and memory usage would be on the higher end of the spectrum. It would also depend on how many unaligned applications are present. For example, if less number of applications with an unaligned home application, you’d see slower application launch times. This is the best case scenario. For a worst case scenario, having a number of unaligned applications will result in the system repeatedly starting and killing processes, struggling with lags and huge battery drain.
Click to expand...
Click to collapse
- SOURCE
Move your new signed apk into your APKTool_CMD folder, you can overwrite your original if you want, and use the following command...
Code:
[B][U]zipalign -v 4[/U][/B] framework-res.apk ZAframework-res.apk
...notice the ZA, zipaligning creates a new apk which has to be named different from the original, but use what you want, it'll need renaming again before you use it.
So now we need to transfer your apk back to your Phone, you can do it by copying to your SD, then to your system, change permissions, then copy to the right folder, but that's not only time consuming but highly tedious too, so a simpler method is to use adb using the push command as this allows us to push straight to the system overwriting the original with the correct permissions too. To use this method you'll need you'll need an unsecure kernel and/or Chainfires adbd Insecure app. Try the app first but if you still can't mount and push files read this thread - [HOW TO]Make your favorite kernel adbd insecure to run ADB as root on /system and try again.
Rename your zipaligned apk to it's original name, then we need to mount the system before we can push direct to the the system, and the command for that is...
Code:
adb remount
...then we need to make sure we're pushing our apk to the right folder on the Phone, so for the framework-res it's...
Code:
[B][U]adb push[/U][/B] D:\Xperia\Z1C_368\APKTOOL\framework-res.apk /system/framework
...yet for the SystemUI it's...
Code:
adb push D:\Xperia\Z1C_368\APKTOOL\SystemUI.apk[B][U] /system/priv-app/[/U][/B]SystemUI
...if it's any one of those two then generally you need to reboot, so just type...
Code:
adb reboot
...your Phone will restart and if you've done everything right your new mods should be displayed, happy days. So that's it for how to use command prompt for modifying apks.
So now you know how to prepare an apk for editing your going to want to theme it obviously, and the following links will help you with that.
XML 101 - XML Modding Made Easy!
How To Edit Resources
The Ultimate Android Themeing Guide
[GUIDE] Smali coding guide for beginners
[Reference] Interactive Phone Modification [GUIDE]
[TOOL] Android Drawable Resizer Tool
[GUIDE] Want to learn how to theme?
[Guide] demystifying build.prop [Valid entries]
General Questions about Themes GO HERE!!!!!
[INFO] Custom framework-res.apk resources.arsc using vendor overlays
[Tutorial][NICS Themer] Create Your Own Themed apk & Become a Themer
​
U.I Modding
Tutorial :- Changing App Icons
[TUTORIAL]How to Theme Your MMS
[How-to] Edit the "About Phone" display
[Tutorial][VIDEO] Add/integrate apps into Settings app!
[TUTORIAL] Where to find the colors for making a theme
[MOD][GUIDE]LockScreen Clock with seconds[ANY ROM]
[TUTORIAL] How to add various framework/Settings mods
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie!
[HOWTO] Integrating/Adding applications to the settings menu
[TUTORIAL][ICS][GB][JB]How to change Android's black background
[GUIDE][Ultimate]Theme Apps To Dark Theme | Theme Whole System | Newbies Here! 12/11
​
Text...
Text Color Guide
[GUIDE] Tips for themers
[GUIDE][REF]Changing System Text Settings
​
Statusbar...
[MOD][TUT] Merge The WiFi And Signal Icons
[GUIDE][MOD][SYSTEMUI] How to add 0.00KB/s meter on statusbar GB/ICS/JB
[TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!
[How-To]Removing Battery Percentage, Adding Toggles,Battery Circles to Statusbar
[GUIDE][Mods][All Devices]How to add/ Change Clocks to Analog/ Digital with Seconds
​
The three best/most popular GUI programs are...
@Diamondbacks - Virtuous Ten Studio
@Ticklefishs - [TOOL] Tickle My Android
@BDFreaks - [Tool]Advanced ApkTool
...there are others but these are I what I tend to see referred to the most.
TIP:
Restoring modified files if you mess up is easier and quicker with a CWM.zip, especially if you're modifying any framework apks! Just because an apk might build with no errors doesn't mean it won't give you any when installed to the Phone.
I hope after reading this explanation you're left wondering what all the fuss is about, as it really is quite simple. I'll use the following two images, btn_default_pressed_holo.9 & status_bar_close_off.9 to illustrate the basic point of the borders...
Decompiled .9pngs:
Recompiled .9pngs:
Those borders control which part of the image is stretched (Left & Top) and where on the image content will be displayed (Right & Bottom). We'll use Draw 9-patch which is for editing the borders of decompiled .9pngs and lets you see how the image, when stretched, will be displayed on the Phone. Notice that the borders are different sizes, well that's because I only want/need a certain part of the image to stretch to get the desired look on the Phone.
...in the image below the left side shows the stretched image and desired effect should look on the Phone and the right side shows how it would look if I had edited the borders incorrectly or used none at all...
You can get away by not using a border but you would need to edit your image to specific dimensions to accommodate for the stretching, for example it might look fine for a simple OK button but it might not look right if you used the same .9png for a screen press which stretches the whole length of the screen, so you're better off just using them to begin with, plus you'll more than likely get errors down the line while decompiling or recompiling your apk.
The use of the border is made even more clear when you add text to an image. For my status_bar_close_off.9 I've filled all four sides of the image (except for an empty pixel in all four corners as that is the max amount of border you can use) as I need it to stretch the image just how I've edited it...
...but if I used the same sized left side border as the btn_default_pressed_holo.9 then this is how it would look on the Phone...
...which is obviously not the look I'm trying to achieve, as the left side border is causing the image to stretch incorrectly.
So that's basically it, depending on the image you're editing you can usually leave the borders alone but if you create one from scratch then you might need to play about with them if your images doesn't look quite right when used on the Phone. Here's a few links that will assist you further, especially the batch editing...
How to edit .9.pngs
[TUTO] Create your 9.png !
[UTILITY][TOOL] 9patchPngSuite [Windows&Linux]
How to draw NinePatch images with Photoshop - .9.PNG
[TOOL][Multi-Platform][.9.png][ALL DPIs] Android Resizer Tool
[Tutorial][Commentary] How To Batch Edit .9PNG/PNG Images
[tool] 9compiler - batch process for themers android
ClockworkMod Recovery zips are used for flashing individual files to whole ROMS and can be a life saver if you push a badly edited apk to your Phone that results in a bootloop. There's also a few programs that can assist you with that too, but if all you're doing is replacing a few files all you really need is a template, then it's just a matter of creating the Phones folder setup in the zip which is simply creating folders: system\app - system\media\audio etc then dragging and dropping your files into it. A basic understanding of the updater script is essential, a ROM.zip will more than likely wipe your Phone whereas a Theme.zip may just replace files but it might delete some also.[/QUOTE]
See below for a CWM.zip Template but first some helpful links...
[Tool]easy flasher v4 (ur own update.zip)
[Tool][Windows/Linux] Android Flashable Zip Creator
[Utility-Tool][DEVandThemers]CWMflashpack.zipCreatorV1{TheCollective}w/EdifyScripting
ERRORS encountered in CWM Recovery
[TUT] [for NOOB] editing updater-script for noobs!
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation
​
This is my Restore_zip which is set up so you can add your own files to the framework and apps folders in the main system location, but you can easily add other folders to it if you want to add things like fonts, tones or anything else, just remember to add folders within folders if that's where the files you want to include are such as tones, media\audio\alarms for example.
If you navigate to META-INF\com\google\android you will find the updater-script which controls how the zip works and the text you see when you run it in CWM. As this zip is just for basically over writing files you don't need to edit anything except for a few lines...
...this is how I've edited it for my theme...
...so just edit it using Notepad++ to your liking.
When adding files to your zip add them using Normal as the Compression Method...
...Remember to remove the text files I've added otherwise they will be flashed to your folders too.
And that's pretty much it, the only way you're really going to learn is by reading then putting into practice what you've read and picking stuff up along the way, fortunately there are numerous guides for numerous mods and tools to help with a variety of tasks.
Notable credits and thanks to @iBotPeaches and @Brut.all for making it possible with - Apktool
Useful Suff...
rovo89 said:
In this thread, I'm presenting a framework which gives you the possibility to modify your ROM - without modifying any APK (developers) or flashing (users)!
...
Advantages:
No need to modify any APKs. This means:
No need to decompile, change things in smali, compile, sign, ...
It will work for odexed and deodexed ROMs.
Your mod is not bound to a specific version of the ROM. Unless there is a major change in the methods called for a certain functionality, your mod will continue to work even when you upgrade your ROM. Hell, it will probably even work with different ROMs.
Multiple mods can be installed at the same time, even if they change the same package. So you can use these battery icons and those quick toggles. Even hooking the same method twice is possible. Of course, this only works properly if the mods are not trying to do incompatible things.
It does its magic at runtime. That means you can implement options to let the user decide if they prefer the bikeshed to be painted in red or blue. Or you can have some extra logic for certain ROMs without building different mod versions.
It can be disabled easily without having to reflash.
It's open source.
Click to expand...
Click to collapse
- [FRAMEWORK ONLY!] Xposed - ROM modding without modifying APKs
Annex1 said:
CM10.1-THEME_BOOK
Theme book was created by Annex and Ebs512. I've been asked alot of questions from how to get started? what do I need to get started? to What Graphics program do I use? etc. We made a real simple theme guide to help get you started. This is in Layman Terms.. Nothing fancy.
ONLY THING FANCY IS MY FLASH BOOK
YOU MUST HAVE A FLASH PLAYER INSTALLED TO VIEW THIS!!!
Click to expand...
Click to collapse
- [GUIDE] HOW TO THEME CM10.1 - Animated Book
[Guide] Porting XTheme themes
[How to] XMLGenerator.jar + batch script v2.0
[Guide] Xposed Framework/TabletUI (Noob-Friendly)
[Tool] Drawable XML generator for CM7 theme chooser
[Guide] How to port themes to T-Mobile Theme Chooser
[Tool] [Theme Creator] [CM/Avatar] Theme creator tool
[INDEX][WiP] List of APPs & MODs that use XPOSED Module
[Tool] nhnt11's XML Generator Revived V2+Extended UPDATED!
[DEV/GUIDE]Creating APKs for use with TMobile Theme engine
[Tool][PortCx] Port CM Themes to Xtheme Engine in One Click!
Theme-Porter [v1.0] [Any Firmware / Rom Compatible] [WINDOWS]
[GUIDE] T-mobile theme engine for the faint at heart (non-linux users)
[1/30/2013] Mega 4.2.1 BlackBean Theme Template [XXHDPI/XHDPI/HDPI/TVDPI]
[MOD][XPOSED][4.0+] XThemeEngine beta5 - Theme engine for any rooted phone
[APK][Xposed] ResXploit : Theming your android the easiest way! No decompiling APKs!
-·=»‡«=·-[JB][CM10] Theme Engine Template Updated To V4 [8-7-12][XHDPI/HDPI]-·=»‡«=·-
Hi Guys, I tried to do a small tweak to my ROM like just a color change to signal bars, as mentioned in the XDA university, but once the apk is pushed to system/app and restarted, it went to bootloop. I just changed the color of a image file using GIMP (as mentioned), then dint work, so just tried decompiling SystemUI.apk and then recompiling then folder without any changes and push to system folder, even that dint work, then i saw this thread, i tried the replacing the resources.arsc from old apk (opened using winrar, and dragged to my folder), the opened my new recompiled SystemUI.apk with winrar and added this resources.arsc file which i extracted with compression option as Store, then pushed it bcak to /system/app folder , every time i pushed i connected the phone in recovery mode. But still in bootloop, the moment i replace the apk with original one, it works, can some one pls point out what am I doing wrong ?
Hardware - I9100 - galaxy S2
ROM - JellyBAM 3.3
Kernel - Siyah 5.1+
thanks,
merin
merin_83 said:
Hi Guys, I tried to do a small tweak to my ROM like just a color change to signal bars, as mentioned in the XDA university, but once the apk is pushed to system/app and restarted, it went to bootloop. I just changed the color of a image file using GIMP (as mentioned), then dint work, so just tried decompiling SystemUI.apk and then recompiling then folder without any changes and push to system folder, even that dint work, then i saw this thread, i tried the replacing the resources.arsc from old apk (opened using winrar, and dragged to my folder), the opened my new recompiled SystemUI.apk with winrar and added this resources.arsc file which i extracted with compression option as Store, then pushed it bcak to /system/app folder , every time i pushed i connected the phone in recovery mode. But still in bootloop, the moment i replace the apk with original one, it works, can some one pls point out what am I doing wrong ?
Hardware - I9100 - galaxy S2
ROM - JellyBAM 3.3
Kernel - Siyah 5.1+
thanks,
merin
Click to expand...
Click to collapse
Hi There
Try using 7zip to update the apk instead of winrar. if that doesn't work, post your logcats,
Thanks
trevd said:
Hi There
Try using 7zip to update the apk instead of winrar. if that doesn't work, post your logcats,
Thanks
Click to expand...
Click to collapse
I will try that when i get back home today, and is there any option i need to set when using 7zip like store mode ?
thanks,
merin
hi, I tried with 7zip, 1st i just opened the recompiled zip with 7zip and dragged and dropped the resources file from original apk to this archive, and pushed to phone , still boot looping, and then tried to right click on the resource file from original apk, and selected add to 7zip archive, and changed the archive format to .zip/compression mode to Store and saved, then pushed to phone, still boot looping. So here i have attached the logcat, hope that is correct how i have done it, after rebooting the phone, i typed in consle logcat > log.txt and it was waiting for device, once in boot loop i did ctrl + c, then it exited. Please let me know if you need more info, do i need to attach my original SystemUI.apk and framework-res.apk ??
Happy New Year !!!
thanks,
merin
Nice tuts I will try at home :thumbup:
Sent from my ST18i using xda premium
merin_83 said:
then i saw this thread, i tried the replacing the resources.arsc from old apk (opened using winrar, and dragged to my folder), the opened my new recompiled SystemUI.apk with winrar and added this resources.arsc file which i extracted with compression option as Store, then pushed it bcak to /system/app folder , every time i pushed i connected the phone in recovery mode. But still in bootloop, the moment i replace the apk with original one, it works, can some one pls point out what am I doing wrong ?
Click to expand...
Click to collapse
Hi.
Are you copying the AndroidManifest.xml and META-INF folder from the original to the new apk too?
Actually i did the exact thing you said yesterday, when i found in the youtube, and it worked thank you!, but dint copy the resource file (but had some fc's when opening camera 1st time), may thats the reason,,, so i should copy AndroidManifest.xml and META-INF and resource file ?, and is this a standard procedure when we do a recompile every time ? or it varies with situation ?
thanks,
merin
Hey hi guys....can any 1 tell me how to set boot image which i want hmmmmm
Sent from my HTC Desire HD using xda app-developers app
merin_83 said:
so i should copy AndroidManifest.xml and META-INF and resource file ?, and is this a standard procedure when we do a recompile every time ? or it varies with situation ?
Click to expand...
Click to collapse
It's how I do it every time and never have an issue (unless I've screwed up somewhere), so yes.
sagar4all007 said:
Hey hi guys....can any 1 tell me how to set boot image which i want hmmmmm
Click to expand...
Click to collapse
oh okey thank you XperienceD, does it make a difference if we just use apktool or Androidsuite for decompiling and building ?
thanks,
merin
merin_83 said:
oh okey thank you XperienceD, does it make a difference if we just use apktool or Androidsuite for decompiling and building ?
thanks,
merin
Click to expand...
Click to collapse
I think androidsuite uses apktool for its decompiling and build it just uses it through a ui as apktool is command line so its more a preference of use for you
Sent from my GT-N7000 using XDA Premium HD app
ttibbetts83 said:
I think androidsuite uses apktool for its decompiling and build it just uses it through a ui as apktool is command line so its more a preference of use for you
Click to expand...
Click to collapse
What he said. I've set this up for when such programs don't always work.
How about some links for how to guide for Ubuntu user and some links on .XML file editing I was doing .apk mods on windows then started messing around with Ubuntu and find its I little more work to get it setup but all an all it to me is a better environment for android then windows IMOA
Sent from my GT-N7000 using XDA Premium HD app
ttibbetts83 said:
How about some links for how to guide for Ubuntu user
Click to expand...
Click to collapse
After a quick search for android theming ubuntu there doesn't seem to be a lot of information for it, and this post...
Nikkopt said:
What and where have you heard about Ubuntu helping on theming? It depends on personal taste and choice. You also have much more tools to help you graphically on windows and mac os.
Click to expand...
Click to collapse
from this thread - Which version of Ubuntu is recommended for theming? suggests why.
here are some links for ubuntu installs that will help with .apk modding on ubuntu for those who want it
how to setup apktool on ubuntu
http://my.opera.com/ubuntunerd1/blog/2012/08/20/how-to-apktool-with-ubuntu-under-construction
ubuntu version of paint.net
http://pinta-project.com/
xaraxtreme looks to be a good program from what i have read but i have not tryed it out yet
http://www.xaraxtreme.org/download.html
gimp is avalable through ubuntu software center and for .xml ubuntu has built in editer software just by right click and open with text editer
hex color website http://www.procato.com/rgbfind/
Nice guide my friend :good:
if anyone get apktool doesn't work on apk JB 4.2.2 ROM you can use this Latest apktool http://d-h.st/cze
Rizal Lovins said:
Nice guide my friend :good:
if anyone get apktool doesn't work on apk JB 4.2.2 ROM you can use this Latest apktool http://d-h.st/cze
Click to expand...
Click to collapse
Thanks Rizal.

[HOW-TO] Theme TouchWiz to be AOSP!

How To Theme TouchWiz Based ROM to look like AOSP!!​
Ok guys I decided to share my theming method with you guys. This is mainly intended for all developers and or ROM developers!
If you have TouchWiz based ROM (Some devices below) you can theme it to have an AOSP feel to it.
Devices:
Galaxy SII
Galaxy SIII
Galaxy Note
Galaxy Note II (Tested by Me )
Some others as well...
Whats Needed:​*APKTool DOWNLOAD HERE
*JAVA DOWNLAOD HERE
*7-ZIP DOWNLOAD HERE
*TouchWiz Base ROM
*SystemUI.apk (in system/app) **FROM TOUCHWIZ ROM**
*SystemUI.apk (in system/app) **FROM AOSP or CM10 ROM**
*Framework-res.apk and TWFramework-res.apk (in system/framework) **FROM TOUCHWIZ ROM**
*Zipalign tool
*Root Explorer App (Get from Google Play Store)
*Holo Launcher (Also get from Google Play Store)​
Lets Get Started:​Follow all of the steps below carefully and you should have an AOSP Themed TouchWiz ROM in no time ​
1. Download the Holo Launcher from the Google Play Store.
(When you run the launcher you will see that you will have an AOSP themed launcher and you will have AOSP system icons [messaging, phone, settings, ect..])
2. You need to install APKTool next. (If you already have this installed then skip this step)
*Download the APKtool files (link above)
*Put the files into your C drive. Make a folder in the root of your C drive called apktool.
*All of your files should go inside that folder (apktool)
*Go to CMD or Command Prompt and type in
Code:
cd C:\apktool
*That should redirect you to the apktool. If it worked then lets move on...
3. Get the framework-res.apk and TWFramework-res.apk (in system/framework) and place it in the apktool folder.
4. In the Command Prompt you will need to direct CMD to the APKtool folder. Then you must install the framework files by doing:
Code:
apktool if framework-res.apk
and
Code:
apktool if twframework-res.apk
Now your framework files are successfully installed. If you have an error in the CMD window then you must check your JAVA.
5. Now get your systemui.apk files from both AOSP (CM10) and TouchWiz ROM. Rename the AOSP systemui.apk to systemuiaosp.apk (so you dont get the touchwiz and aosp systemui's mixed up)
6. Make a backup of the TouchWiz systemui.apk in another folder called "Backup" ****YOU WILL NEED THIS LATER*****
7. Now you should have both systemuiaosp.apk and systemui.apk in the apktool folder. Now you must decompile both files by using these commands:
Code:
apktool d systemuiaosp.apk
and
Code:
aptkool d systemui.apk
You should have 2 more folders (systemuiaosp and systemui).
8. Here comes the actual theming of the systemui. Open both systemuiaosp and systemui folders side-by-side. And now you need to navigate to the drawable-xhdpi folder in both.
***FOLLOW THESE NEXT STEPS CAREFULLY OR YOU WILL HAVE AN ERROR***
9. Find the files you want to replace. They should all be PNG files. DO NOT JUST ADD PNG FILES FROM THE SYSTEMUIAOSP TO THE SYSTEMUI. YOU WILL GET ERRORS WHEN COMPILING THE FILE!! There are XML files (we will not edit in this tutorial) that use those PNG files with those extension names. So you can't just add files from one to another. For example:
If you have an icon you want to change but its only for that AOSP then it wont run on the TouchWiz. If you have a WiFi icon that has a name of AOSP_Wifi_1 and on the other systemui it says TOUCHWIZ_Wifi_1 you cant just delete the one that says TouchWIZ_WIFI_1 and replace it with the AOSP one. The XML files dont tell it to run the AOSP_WIFI_1. So you must ONLY REPLACE FILES WITH SAME EXTENSION NAME!!
10. You can go ahead and transfer files from the SystemuiAOSP to the systemui. Note what i said above!! If you have lets say 6 wifi icons for systemuiAOSP and 6 icons for systemui (touchwiz) you can rename the AOSP PNG files to match the TouchWiz ones so the XML files will know what to run.
I personally suggest only transferring Wifi Icons, Battery Icons, and Signal Icons. These are your most important ones to transfer! You can also transfer the Bluetooth and Airplane mode icons also.
11. After you have transfered the files over and you feel like you have done it correctly then you can go ahead and Compile the SystemUI folder by using this code:
Code:
apktool b systemui semidone.apk
12. If you did all the steps correctly above then apktool will build the apk file with no issues. If you have errors then you did not pay attention carefully. (You may want to try another CM10 ROM to get icons from).
13. Now here is where 7-Zip and your backup file comes into play. Open 7-Zip twice (2 windows). In the first window direct 7-zip to the semidone.apk file. And the second one to your backup file which should be SystemUI.apk (in the backup folder).
14. In the SystemUI.apk click on the RES folder and then find the Drawable-xhdpi folder. Delete the entire Drawable-xhdpi folder. Now in the other window (semidone.apk) go to RES and then transfer the entire Drawable-xhdpi folder into the SystemUI.apk window.
15. Now your SystemUI.apk in the Backup folder is your new modded one. But before you can use it you must zipalign it using any zipalign tools out there. I just use DSIxda's kitchen to do it since I make ROMs with it.
16. Now you can go ahead and transfer the SystemUI.apk onto your phone's SD card.
17. Download Root Explorer. Now go ahead and navigate to your SD card and click the SystemUI.apk file and then click copy or move. (whichever one you like).
18. Now navigate to your system/app folder and paste and overwrite the original one. (You will need to set root explorer to Read/Write). Now you can go ahead and reboot your device.
If you did everything correctly you should now have a themed launcher and a themed status bar with AOSP Icons!​
I don't ask for donations so if this tutorial helped you then please hit that Thanks button!​
MINE
Mine AGAIN
I was just looking for a thread like this... not sure if i have enough time and will to do it but i am very glad you post it!
thanks a lot!!!
ExcaliberX said:
I was just looking for a thread like this... not sure if i have enough time and will to do it but i am very glad you post it!
thanks a lot!!!
Click to expand...
Click to collapse
Your welcome. I hope it works for you!
So are there any screenshots showing exactly what changed? I'd like most of the UI to have an AOSP feel to it not just some parts. Does this theme all or just bits and pieces?
Shmi117 said:
So are there any screenshots showing exactly what changed? I'd like most of the UI to have an AOSP feel to it not just some parts. Does this theme all or just bits and pieces?
Click to expand...
Click to collapse
Well as said above it themes the launcher (holo) and the status bar icons are aosp.
thanks I was hoping to see where you find the blue background bars in the S2 in the settings menu SecSettings.apk or trframework or framework or systemUI I have looked everywhere and changed colors of .9pngs forever and it never phased them. obviously I never found the right one to change. would you happen to know and could you post here or pm me thanks. have a decent ROm that doesnt really need blue gray bars dominating the screen.

Building Your Own LG Themes

Introduction
This is going to be a long post! A few weeks ago I started thinking about making my own themes for my LG G5. I had installed some custom roms previously and used substratum a bit but I have always ended up going back to xpirt's Fulmics rom, which doesn't allow this. I started to think how I could do this and have today got to the first stage of being able to change the colours of my phone to precisely what I want, not only for the settings but in some of the stock apps. I thought I would share this with the community and provide some step by step instructions so you can try it yourself. This should work on LG G6, V10, V20 & V30 if you use an app made for these phones but I have no way of testing this so don't hold me to it. This has taken me about 5 full days to work this out and there is still more that I need to do.
I am not in anyway a developer or coder and have very little knowledge of Java so if anything goes wrong here it is likely that I will not be able to help you. I absolutely am a noob at this and do this only for a hobby, using just my common sense and our friend Google to overcome the problems I have come across. Saying that, I will try to offer assistance if I can.
I managed to make my theme from reverse engineering a free LG theme app that was readily available. If you do this method though please consider getting approval from the app developer first. There is a template on here posted by Raafat here. While this was helpful it was only basic and I could not work out exactly what to do. Reverse engineering an app was much easier. Here is how I did it with step by step instructions:
******DISCLAIMER******
I am in not responsible for what you do to your phone. If you decide to try and theme your phone make a backup first or be prepared to do a full reset if anything goes wrong. You do this at your own risk.
1. Programmes
The programmes/software needed for theming are:
• Notepad++
• Apktool
• Android Studio (I used version 2.3 as I was getting an error on re-signing with 3.0)
2. Installing Frameworks Using Apktool:
• Firstly, delete the files in your local temp directory. To do this open ‘Search’ and type in %temp% and delete all files in this folder. You may not be able to delete some of the files. This does not matter
• Next, extract the framework files from your rom/custom rom. For Fulmics 5.5 this was:
Frameworks-res.apk
lge-res.apk
• At a guess I would say that any rom will have these files named exactly as they are above, but I am not sure if these have been altered by xpirt for his rom so you may not be able to use them across other roms.
• Open a command prompt and navigate to the folder where the framework files are kept. This is easiest in a folder called C:/apktool so create a folder in your C:/ drive and place them there. You can of course name the folder or locate it where you want though.
• Use apktool to install the frameworks using this command in the command prompt in C:\apktool
apktool if framework-res.apk
apktool if lge-res.apk
• Once this is done you should find the following files Installed here: C:\Users\[your username]\AppData\Local\apktool\Framework
1.apk
2.apk
• If, like me, you get an error with apktool that says it cannot write to C:\Users\[your username]\AppData\Local\apktool\Framework and instead has placed them in the temp folder then go into the Local folder using the pathway above and create a folder called 'apktool' and then a subfolder called 'framework'. Try the commands again and it should then work.
• You should also find the following files in the C:\apktool folder (if that is the folder you are using). If they are not here you may have to copy and paste them from the apktool github download.
apktool.jar
apktool.bat
• If you have found these files then you are set to go with decoding the theme/app you have chosen as a basis to amend.
3. Decoding APKs Using Apktool
• Download the apk/app you want to use. I used Backup and Restore app from Play to get the app I wanted to use onto my PC. Once you have this on your PC place the main APK/app in the same folder as the apktool.bat and the apktool.jar (for me this this was C:\apktool)
• Point the command prompt at this place and type the following:
apktool d [app name]
• A folder with the name of the app you just decoded will appear in the directory that you use (in this case C:\apktool)
• In this folder you should find another folder called assets. There may be more sub APKs here in subfolders. This subfolder will likely be assets>overlays
• All the sub APKs in here will have to be decoded otherwise you will have different signing keys and the app, once compiled again, will not work. Decode all the sub APKs in this same folder. You will have to copy the following files to the folder you are decoding the sub APKs in. These are:
apktool.jar
apktool.bat
• Decode every sub apk using the command apktool d [sub_apkname]
• You should now have the same number of folders in the drive as the number of sub APKs, if you decoded them all.
4. Changing the Colours and other Themes from the Decoded APKs Using Notepad++
• Many theme APKs will have internal APKs, such as common, settings, phone, systemui, calendar etc, etc. This is what I have worked out so far:
Common: Changes the switches, brightness bar and the text headings in settings, changes swipe left panels in apps such as gallery, changes background, message icon & phone icon colour in contact/phone app, statusbar background, separating lines in settings (some themes do not have these), background bar of setting title (i.e. wireless network, device etc), settings text colour, secondary text (i.e. the text you see under Wifi and Bluetooth which shows you what you are connected to), the headings in apps such as clock where it shows 'Alarm' 'World Clock' 'Timer' etc
System UI: Changes the quick settings tiles & text and the non-heading text in settings
• To change the colour of these you have to amend the colors.xml located in one of the folders in the assets>overlays and then the folder of the overlay you want to change. I used Notepad++ to do this. Navigate to 'res' folder and then usually something like 'values-xxxhdpi-v4'. There is sometimes more than one color.xml file so you may need to look in more than one folder and amend all the color.xml files. The colours are at the end of the lines of text and will be standard Android colour coding, such as ffffffff (white) or 00000000 (black) or any other colours.
5. Building APKs & Signing with Android Studio
• If you are building the sub APKs from an app (these are the ones inside an APK such as common, systemui, phone etc) I found it best to use a different folder. For this I used C:\apktool builder
• Copy and paste the folder from the decoded APK (e.g. the [appname].LGE.common folder) that is in the asset>overlays folder to the apktool builder folder above
• Once you have made the colour amendments it is time to build the amended themes. To do this you will need Android Studio
• Open the splash screen of Android Studio and instead of the 'Open' command use the 'Import Project' command and navigate to the folder you want to import
• When opening Android Studio you have to configure the frameworks otherwise you will not be able to sign the app. This warning should come up automatically. THIS MUST BE DONE FOR IT TO WORK
• Navigate and find your APK in apktool builder and import it. If you do this more than once you will be prompted to overwrite the settings a few times.
• Go to ‘Build’ along the top and choose ‘Generate Signed APK’. If this is the first time it will ask for the Key Store Path. You will need to choose ‘Create New’. Select a place to store this key (I chose C:\apktool Builder) and input the passwords and the other data in the boxes. You must put a two-digit country code in the last box, for example US, UK etc). For ease I kept most of these very simple. For example, password was 'asdfgh'
• Once this has been completed and if there are no errors (warnings are ok) then it will generate a signed sub APK and save it to the location you are in (in this case C:\apktool builder). Copy and paste that sub APK over the one in the C:\apktool folder where the original sub APK was kept.
• Once you have done this then you need to sign the main app APK. Do the same as above and build in Android Studio. If there are no errors it will save it to your directory (in my case C:\apktool\[app name].
• Copy and paste this APK into your phone, apply the theme and it should work.
Everytime you amend a sub apk you will have to re-sign it through Android studio and then re-sign the main app apk. Once you get the hang of it though it is fairly straight forward.
6. Other Things
Nothing else in the app will change at this point. The name, wallpaper jpegs, screenshots and icons will all be the same. I am working on this at the moment but they don't actually need changing that much. The difficult thing for me is how to change the 9.png icon files and still get them to work. Once I have worked this out I will be able to finish it off.
7. Screenshots
Attached are some screenshots of how my phone now looks. I have made a few different apk's with different colours so I can now change this daily if I want a change (see post 2 for updated screenshots).
8. Thanks/Credits
@xpirt - Made it easy to get the framework files I needed for apktool and for a great custom rom!
@Raafat - for giving me the idea and the initial information
@iBotPeaches - for developing apktool.
.
Building Your Own LG Theme
I've been able to fine tune the themes over the past few weeks and have been able to colour the settings icons on the main settings page as well as putting a background behind it. I've also been able to theme the switches initially getting over a problem of the 'off' switch not showing. Here is some updated screenshots of a green/grey&blue theme.
I've also attached the updated blue & red theme from the initial post. I've not fully completed this yet though as I started to concentrate on the green/grey&blue theme as I preferred that.
Could someone make a stock theme just dark? I found one on play store but is not the best thing (it changes system sounds and other things that i don't like) I'd like a full stock theme but dark. Thanks in advance
Help
Can you help me? I tried changing package names in .json file and added new icons in the theme. I don't understand why it is failing on apply. It was running properly with only color change before doing this.
[email protected] said:
Can you help me? I tried changing package names in .json file and added new icons in the theme. I don't understand why it is failing on apply. It was running properly with only color change before doing this.
Click to expand...
Click to collapse
Here is the apk.
I probably won't be able to get round to this until the weekend due to work commitments but will have a look and let you know.
strikerman10 said:
I probably won't be able to get round to this until the weekend due to work commitments but will have a look and let you know.
Click to expand...
Click to collapse
Take your time, and thanks. ?
[email protected] said:
Take your time, and thanks. ?
Click to expand...
Click to collapse
In case you haven't checked the apk I provided earlier, I have found and fixed some package name errors but the result is still same. It get stuck at 90% and then fails. I have changed icons too, is there anything needed to do in public.xml ? New apk is attached below.
strikerman10 said:
I probably won't be able to get round to this until the weekend due to work commitments but will have a look and let you know.
Click to expand...
Click to collapse
Did you took a look at it?

Categories

Resources