I know that there are a good number of Atrix users who are new to android, new to theming with android, or like me - both. It can take hours to find the right information to make the changes that you want to make, only to find out that those types of changes are phone specific and that guide that you finally found after hours of searching doesn't even apply. I ask that all Atrix themers contribute to this thread with their knowledge, processes, and best practices for theming the Atrix. This way, we can share knowledge amongst each other as well as set up some accurate guide for other Atrix themers just getting started.
Contents:
Post 1 of this thread:
apk Manager Guide
Framework Assistant - tool to push/pull framework-res.apk
Editing OR removing the status bar clock color in services.jar
Post 2 of this thread:
Setting the notification dropdown shade to transparent
I'll start off with a post that I made yesterday in response to someone's question about apk Manager.
1. apk Manager Atrix Guide
The file I am going to discuss here is /system/framework/framework-res.apk. This file contains most of the elements involved in theming your phone. There are many other smaller locations to edit, but this file contains the bulk.
Before we get started on using apk Manager, we should understand a few things about framework-res apk. This file consists of a few important elements:
regular png image files - these are standard png images and can be edited with your image editing program and saved without any problems.
draw-9 png image files - these are special types of png images denoted by a .9.png in the filename. The android system reads these filenames and recognizes the image as a stretchable image. The system knows how to stretch the image based on a 1px wide border that the image has. This border contains black dots/lines along each of the four edges that tell the system how to stretch it - if you mess with this border then the way the image stretches will changes and you may not be able to decompile/recompile the apk. The following link provides info on editing draw-9s, but I found it easiest to extract them with apk Manager, edit in gimp without touching the border, and then recompiling with apk M. More info on draw-9 pngs
xml files - these files are in binary code in the framework-res.apk. The apk needs to be decompiled in order to return these to human readable code. Also, many of your xml files are hidden within the resources.arsc file in the framework-res.apk and cannot be accessed unless you decompile.
In order to make any changes to the xml files or the draw-9 pngs within framework-res.apk you need to decompile it rather than extract it. Extracting the framework-res.apk with a program like winzip simply unzips the file and does not break the code back down to an editable format. Decompiling the framework-res.apk with a program like apk Manager will actually break down the resources.arsc file into the sepereate xmls folders (values, etc.) and also restore the instructions border to draw-9 pngs.
Draw-9 images not edited correctly will not stretch properly in the system and may cause decompilation/recompilation errors. XML files not edited correctly may also cause recompilation errors. It is very important to pay attention to the log.txt file for any errors that may be occurring during your decompilation/recompilation process.
Download apk Manager
Now here is what I've learned about apk Manager:
put framework-res.apk in the place-apk-here-for-modding folder
run the script
enter 22 to select an apk, then 1 to select your apk
press 9 to decompile the apk
go into the projects/framework-res.apk/res/drawable-hdpi folder and edit your pngs or xmls (maintain the border)
go back to the script once your done editing and enter 11 to compile
when asked if it is a system apk enter y
when asked if you want to extract other files too enter y Do not skip this step, apk Manager will seem to produce a working framework-res.apk if you skip this step but when I did it soft bricked my phone
go into the keep folder that was created and delete any pngs that you changed in the projects folder
if you change any xml files, you will also need to delete the resources.arsc file from the keep folder (this is because mane of the xml files are compiled into this resources.arsc, so to tell apk manager to rebuild it with the new xml, we need to delete the original)
go back to the script and press any key to continue
your recompiled framework-res will be in the place-apk-here-for-modding as unsigned-framework-res.apk
extract unsigned-framework-res.apk using winzip, or similar program (this is being it is compressed incorrectly)
go into the folder where you just unzipped the framework and zip it up with the compression mode set to Store - call it framework-res.apk
you are ready to go with a properly editing framework-res.apk, put it on your phone any way you like
Make sure that you have no errors when de-compiling or re-compiling. It might seem like everything is going ok, but you could end up soft bricking your phone if you don't check the log.txt in the apk Manager main folder. Check the log.txt after every decompile and recompile to ensure that you don't have a damaged framework-res.apk.
The output in log.txt should like like this for a proper decompile:
Code:
--------------------------------------------------------------------------
|Sun 05/01/2011 -- 20:11:47.57|
--------------------------------------------------------------------------
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
Could Not Find C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
I: Loading resource table...
I: Decoding resources...
I: Copying assets and libs...
And like this for a proper recompile:
Code:
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
(skipping index file 'C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\other\..\projects\framework-res.apk\assets\images\Thumbs.db')
(skipping index file 'C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\other\..\projects\framework-res.apk\assets\webkit\Thumbs.db')
The system cannot find the file specified.
If you get any errors about your images or xml then you need to fix them before you can recompile.
#framework-assistant2. Framework-res.apk Assistant
Here is a tool which I use regularly to pull the current framework-res.apk from my phone, as well as to push any updated framework-res.apk to my phone. To use this batch program you need to:
Download the View attachment 584667
Extract the zip to whereever you want the program to reside
To pull your current framework-res.apk - run the Framework-Assistant.bat and tell it to pull
To push an updated framework-res.apk - place the updated framework-res.apk in the bin/push folder, run the Framework-Assistant.bat and tell it to push the updated framework-res.apk
It is always a good idea to tell it to back up the current before pushing a new
As with any and all framework-res.apk pushes, this has the ability to soft brick your phone depending on the framework-res.apk you push, or anything else for that matter. Use at your own risk.
Here are my steps to edit framework-res.apk from start to finish which might help those unfamiliar with the process:
Run Framework-Assistant.bat and answer y to pull the current framework-res.apk from the phone, but n to push the latest version (this will simply retrieve the current framework-res.apk from your phone)
Copy that framework-res.apk from the Framework Assistant/bin/pull fodler into the place-apk-here-for-modding folder of apk Manager
rename framework-res.apk to something distinguishable, I add the current time (ex: framework-res-1016.apk). Trust me, things can get messy if you end up making a few passes with different edits, you need to keep your stuff straight.
Run Script.bat in the apk Manager folder, 22 to select which apk to use, then 9 to decompile
Go into the projects/framework-res-1016.apk folder and make any changes you wish. Most png changes will be in drawable-hdpi, xmls are pimarily located in the values and layout folders.
Once I've finished making updates, run Script.bat again, 22 to select the proper apk, then compile with 11 - follow all compilation steps above all the way through zipping it as store.
Place the new framework-res.apk in the Framework Assistant/bin/push folder and run Framework-Assistant.bat
Choose y to both pull and push the framework-res.apk (I find its always a good idea to pull your latest working framework-res.apk from the phone before dropping a new one in)
If you anticipate more edits, go back to apk Manager and paste the new framework-res.apk in the place-apk-here-for-modding fodler of apk Manager and rename it with the current time attached (ex: framework-res-1023.apk)
Delete the unsignedframework-res-1016.apk and the unsignedframework-res.apk fodler (just to keep things clean)
You now have an edited framework-res.apk on your phone and are set to fix this little issues you missed on this pass, just run the apk Manager Script.bat again, enter 22 to access your latest framework-res.apk (framework-res-1023.apk) and repeat the process.
#framework-assistant3. Editing OR removing the status bar clock in services.jar
You will need:
Some zip program, I use winrar
JDK - Java Development Kit Get the JDK
baksmali to decompile and recompile the classes.dex file - View attachment baksmali.zip
Notepad++ free editor for code editing (I recommend this program for any/all code editing, apart from hex)
Here is how to change the status bar clock color:
Install the JDK
Extract baksmali to your computer
Retrieve services.jar from the /system/framework folder
Extract services.jar using your zip program (right click on the file and choose to extract)
One of the extracted files is classes.dex, copy it into the baksmali folder
Run decompile.bat in the baksmali folder - this will decompile classes.dex and place the contents in a new folder called classout
Navigate to classout\com\android\server\status
The next step involves changing clock color:
open StatusBarIcon.smali with Notepadd++ and find this entry
Code:
.line 61
const v6, -0x1
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
const v6, -0x1 identifies the color of the status bar clock. I changed this value to "const v6, -0xff000000 to set my clock to black. Essentially the last 6 digits of this entry will determine the color of the clock. Set the last six to any html color code (google it) to set your clock color. I have only tried black here as it is all I needed, so I can't personally guarantee that anything else will work.
The next step involves removing the clock:
open StatusBarPolicy.smali with Notepadd++ and find this entry
Code:
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
It should be under ".line 592", now add this line underneath the line just mentioned:
Code:
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Once your done editing, save the file
Navigate back to the baksmali folder and run recompile.bat - this will rename the original classes.dex file to orig-classes.dex, and the recompiled file is saved as classes.dex
Zip up the new classes.dex along with the META-INF folder that was extracted from services.jar as, you guessed it, services.jar Leave the compression setting on Normal
Put services.jar back in your system/framework folder
This is all that I know how to do with servies.jar right now, if anyone has some additional good info please post it to this thread and I will add it on.
Can't believe I forgot to thank all those who have contributed both directly and indirectly to my knowledge thus far: Nottach, NyugenHuu, KennethPenn, riral, tonecreationz, gera4eva, HFHimself, and many random threads I found on the wonderful xda forums.
1. Setting the notification dropdown shade to transparent
Instructions:
Download Baksmali Tool - directions for use are at the end of post 1
Open the services.jar file for example with winzip, 7z, winRar, or whatever. Unzip the classes.dex file into the folder with decompile.bat and recompile.bat from the Baksmali Tool zip.
Run decompile.bat - this will decompile classes.dex into a new folder called classout folder. Browse to classout/com/android/server/status and open the file called StatusBarService.smali with a text editor like notepad.
Search for "const/4 v5, 0x2", it should be under ".line 1629". Just change this to "const/4 v5, -0x3" and save the file.
Run recompile.bat - this will recompile the classout folder into classes.dex and rename the original file to orig-classes.dex
Open again the services.jar file with any zip tool and overwrite the classes.dex file with the one just created.
Now search the drawable-hdpi/status_bar_background.png file in the framework-res.apk and make it transparent.
Push the updated framework-res.apk and services.jar back to the /system/framework/ directory on your phone.
- credit for this info goes to tonecreationz
Much more information is available from The Ultimate Android Themeing Guide By Jairomeo, Manup456, ArmyRanger251, Stericson, Brandenk, SirMez, Beagz, david1171_ - link provided by nottach
the resources file was never rebuilt after it gets recompiled after I delete it from the keep folder. does yours?
Yes, if your resources.arsc is not being rebuilt then it means that you have errors in your process. Post the contents of your log.txt here.
jimbush3 said:
Yes, if your resources.arsc is not being rebuilt then it means that you have errors in your process. Post the contents of your log.txt here.
Click to expand...
Click to collapse
There is a ton of errors. I think reason could be because of the way the original framework was built? i am using gingerblur as a base. Here is my log: http://conceptvisionz.net/uploader/images/log.txt
After I delete the files from the keep folder, they're never replaced w/ my new files when the apk is compiled. What happened??
NguyenHuu said:
There is a ton of errors. I think reason could be because of the way the original framework was built? i am using gingerblur as a base. Here is my log: http://conceptvisionz.net/uploader/images/log.txt
Click to expand...
Click to collapse
Problems start here for you:
Code:
W: Cant find 9patch chunk in file: "drawable-hdpi/statusbar_background.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/title_bar_portrait.9.png". Renaming it to *.png.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
libpng error: Read Error
ERROR: Failure processing PNG image C:\Android\tools\apk_manager\other\..\projects\framework-res.apk\res\drawable-hdpi\statusbar_background.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Android\tools\apk_manager\other\..\projects\framework-res.apk\res\drawable-hdpi\title_bar_portrait.9.png
statusbar_background and title_bar_portrait are not proper draw-9 pngs. You will need to fix these before you can recompile. This error will keep apk Manager from using anything in your projects folder when it compiles.
Here are valid pngs for those two images. If you are unable to fix yours, try replacing your with these in the projects/framework-res.apk/res/drawable-hdpi folder and then try to compile again.
{
"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"
}
- statusbar_background.9.png
- title_bar_portrait.9.png
calvin398 said:
After I delete the files from the keep folder, they're never replaced w/ my new files when the apk is compiled. What happened??
Click to expand...
Click to collapse
Check your log.txt, chances are that there are some draw-9 pngs that are causing apk Manager to fail its processes. Post the log here if you would like me to look at it.
jimbush3 said:
Problems start here for you: statusbar_background and title_bar_portrait are not proper draw-9 pngs. You will need to fix these before you can recompile. This error will keep apk Manager from using anything in your projects folder when it compiles.
Here are valid pngs for those two images. If you are unable to fix yours, try replacing your with these in the projects/framework-res.apk/res/drawable-hdpi folder and then try to compile again.
View attachment 584896 - statusbar_background.9.png
View attachment 584897 - title_bar_portrait.9.png
Click to expand...
Click to collapse
Thanks, I am still experimenting with it. I manage to recompile fine now. Reading logs really does help. I manage to get my menu to show the color I want. Now just need to work on the secondary menu when when you press more. It is tricky because the main menu popup you can use standard color codes #ff808080 is the gray I used and works fine. But for the secondary menu you cant use color codes, it fails compilation.
EDIT: so i finally got it to work (the secondary menu) but adding in textColor and remove text appearance item.
So for main popup bottom menu, this is the field to edit: TextAppearance.Widget.IconMenu.Item, change the textColor directly to a color of your choice in this format #ffffffff (white), mines is #ff808080 (dark gray).
For the secondary menu for areas that has a "more", find this field: Theme.ExpandedMenu, and just add in a textColor entry. You can copy and paste the one from TextAppearance.Widget.IconMenu.Item. remove the text appearance item.
3 days work finally solved, thanks everyone. Now the theme is a bit more flush with certain third party apps.
NguyenHuu said:
Thanks, I am still experimenting with it. I manage to recompile fine now. Reading logs really does help. I manage to get my menu to show the color I want. Now just need to work on the secondary menu when when you press more. It is tricky because the main menu popup you can use standard color codes #ff808080 is the gray I used and works fine. But for the secondary menu you cant use color codes, it fails compilation.
Click to expand...
Click to collapse
Nicely done and thanks for the guides, we need more of that.
jimbush3 said:
Where are you editing to change the colors displayed? I'm not sure what secondary menu you are referring to.
Click to expand...
Click to collapse
i got it, look at my posted, i edited above.
I've been able to track down most of the colors that I want to adjust in the xml files, however I cannot seem to find where the corporate email is getting its color from. The image below shows the white text that I can't find out how to change. Had anyone been able to locate the source for this?
Also, does anyone know where to edit the clock in the status bar's color?
jimbush3 said:
Also, does anyone know where to edit the clock in the status bar's color?
Click to expand...
Click to collapse
yeah it's in services.jar, http://forum.xda-developers.com/showthread.php?t=549309
Thanks Nguyen, I had actually decompiled the classes.dex from services.jar a little while back; but without a guide I had absolutely no idea what I was looking at. Its a bit more complicated than framework-res. Once I get in there and make the changes I'll add something about editing services.jar to the first post of this thread.
Look for the .line 61
The below changes it to green from white
Code:
.line 61
const v6, -0x1
to
.line 61
const v6, 0xFF4CFF00
0xFF4CFF00 - wouldn't a straight white be 0xFFFFFFFF?
I'm coming from an html background and through all the xml edits I've done and whatnot, the white color code is FFFFFFFF. So, to go to black my code should be 0xFF000000, right?
**edit, actually I just threw that second code you posted, 4CFF00, into gimp and it gave me a bright green. Maybe you meant the bloew code changes from white to green?
jimbush3 said:
0xFF4CFF00 - wouldn't a straight white be 0xFFFFFFFF?
I'm coming from an html background and through all the xml edits I've done and whatnot, the white color code is FFFFFFFF. So, to go to black my code should be 0xFF000000, right?
**edit, actually I just threw that second code you posted, 4CFF00, into gimp and it gave me a bright green. Maybe you meant the bloew code changes from white to green?
Click to expand...
Click to collapse
I worded it weird. Guess I shouldve said from white to green instead of to green from white.
jimbush3 said:
0xFF4CFF00 - wouldn't a straight white be 0xFFFFFFFF?
I'm coming from an html background and through all the xml edits I've done and whatnot, the white color code is FFFFFFFF. So, to go to black my code should be 0xFF000000, right?
**edit, actually I just threw that second code you posted, 4CFF00, into gimp and it gave me a bright green. Maybe you meant the bloew code changes from white to green?
Click to expand...
Click to collapse
yeah that would be white all Fs. The first two FFs control alpha, while the ohter 6 are just like html hex colors.
I got in there today and blacked out my clock, thank you both for the help. I've also added the steps and some useful tools to the first post for editing the status bar clock.
I'm so damn close to having my phone the way I want, for this week at least, but I've run into a new snag and don't know where to look yet. I edited the following code in styles.xml:
<item name="windowBackground">@drawable/screen_background_dark</item> under <style name="Theme">
and I changed it to @drawable/menu_bg, which referenced a background image I created and replaces the screen_background_dark which points to the black color in the drawables.xml file. For the most part this works perfectly, as seen here:
The only problem is, and this really is the only one I've found, is my alarm settings screen:
If I change that one value back to black then the alarms screen show up perfectly fine, black background, white alarm text, etc. I'm not ever sure where to start to look for the solution to this one. Maybe I should just sleep:
Related
Noobs guide to theming
Credit:
tommytomatoe For patiently walking me through the install/setup/how to process.
Glossary
How to PORT a theme to your ROM
Compiling APK's
How to make your compiled APK ready for a ZIP
How to install zipalign-Step by Step!
Running Zip Align in command prompt
If you've ever wanted to port a theme to your ROM or wanted to extract a clock or a MOD from one theme and move it over to your rom, then THIS THREAD IS FOR YOU!
What you'll need to download
1)7-ZIP http://www.7-zip.org/download.html
What this thread will not show you.
How to modify .9.png's. I have already made a thread just for .9.pngs located here:http://forum.xda-developers.com/showthread.php?t=1140034
How to extract APK's from a theme based on your same ROM.
Once you've downloaded seven ZIP, download a theme that you would like to extract from and port it over to your rom. What I like to do is make three folders. Label them: Original, Modified and Stripped.
{
"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"
}
Original Folder-Put the downloaded ZIP in this folder along with any APK's you extract from the "Stripped Folder."
Modified Folder-Also put a copy of the APK's you extract from the Stripped folder here. You'll be placing all png's in this folder, so DO NOT EVER extract these apk's.
Stripped Folder-This is the folder you'll extract apk's in their full form. You do this by right clicking on the mouse, then select "extract."
After you've placed the ZIP into the "stripped folder", you'll want to right click on the zip>7-ZIP> and select "extract to folder /*.*/"
Click through in the folder until you find all the apk's. Usually this path works: /system/app/
You've found the APK's...now what?
Now that you've found the apk's you should the most common apk's themed are:
HtcDialer.apk-htc_pin_asset_pressed.png,htc_pin_asset_rest.png are the phone buttons
Phone.apk-phone_default_incall_300.pngx4 are the android guy you see when calling, phone_end_pressed.9.png,phone_end_rest.9.png are the end call buttons
SystemUI.apk-status_bar_close_on.9.png-Status bar close, statusbar_background.png- the top notification bar that holds the clock and battery, status_bar_item_background_normal.9.png-is the background for the status bar notifications,
Fusion.apk-Need m10editor to mod but holds the 3d clock, home screen and lockscreen rosie
Idlescreen_base.apk-Need m10editor to mod but holds the icons you see on the lockscreen along with their background
Mms.apk-message_conversation_others.9.png,message_conversation_me.9.png the text message graphics that holds the text. "Conversation bubbles"
Rosie.apk-Holds the menu icons you see when you press, "Menu"
The two other main APk's are:
com.htc.resources.apk
framework-res.apk
Both are located in system/framework folder
FIND your graphics and PORT
It's fairly simple to open up an APK. Just right click on the APK>Select Extract File to:>
Then you'll be able to view all the png's in that APK. Click and drag them to another folder so you don't get them confused with other png's in that folder you won't be using.
Copy all the png's you would like to port in their own folder. Here's an example of my personal setup for keeping track of PNG's and what folder they go into. Pretty simple.
Transferring the PNG's back into the APK that corresponds to your ROM.
You should now have organized all the PNG's you want in their folders and are ready to transfer these png's into an APK.
You should now download the EXACT ROM or THEME that you are on and extract the APK's for that theme. You do NOT need all of theme. You only need the ones you've modified. I put these APK's in the MODAPK folder.
Then right click on the APK you would like to transfer the png's to. Right click>7-Zip>Open Archive. Then click through until you get to the drawable-hdpi folder. Or the same folder you acquired the png's from the other apk.
This is what your screen should look like once you've right clicked on an APK> Selected 7-ZIP>Open Archive, you should see the following:
DRAG your PNG's into drawable-hdpi
Now, you'll want to select all the images that need to be ported and drag them into the drawable-hdpi folder.
You're 90% done. Copy these APK's to a zip and flash! If you do not know how to create a zip, find a theme that is based on your ROM. Do the same steps to open archive via 7-ZIP. Then delete whatever Apk's are in that ZIP that you're not going to use. (NOTE: You should leave at least one apk in the folder otherwise the folder will collapse.) Then just transfer your APK's into the zip. Make sure you transfer ONLY APK's that haven't been extracted!
Setting up APKTools & Decompiling APK's
This could have been started in another thread, but it goes hand in hand with theming. When you know how to decompile an APK you can edit the XML.
There are many reason why someone would want to edit XML. One example is to INVERT MMS. This is done by editing the XML within the Mms.apk.
I had a very difficult time setting this up but thanks to tommytomatoe he gave me a no brainer step by step guide to setting up apktools.
Requirements:
Download ApkTools here>>APKTOOLS
Okay. Here is what I recommend you do.
First, framework res apk is actually 1.apk not 2.apk...but my method will take care of that.
Place apktool.jar, apktool.bat, and aapt.exe in "C:\Windows". That is the correct folder. Find it by clicking on your my computer, then your harddrive "C" be default. A folder called Windows will be there.
Next test to see if it worked. Open cmd prompt and type "apktool". You should get a bunch of stuff.
Now. Make a folder on your desktop. Call it whatever you you like.
"cd" to it. I use Unix so I don't know windows paths...but here is how I do it. Type "cd", then space, and drag the folder into the prompt. You'll see it when you get there.
Inside your folder place the framework-res.apk and any apk you want to mod. If it is a sense rom also get com.htc.resources.apk.
Now. I assume you've successfully "cd" into the folder via cmd prompt. Now run "apktool if framework-res.apk" and "apktool if com.htc.resources.apk" pressing enter after each command.
What you just did was install 1.apk and 2.apk the correct way.
Now type the magic line: apktool d NAMEOFAPK.apk
For example..
apktool d framework-res.apk
That will decode framework res.
Let me know how it goes.
Click to expand...
Click to collapse
-tommytomatoe
Items to note about the above process:
1)You must use the framework-res.apk and com.htc.resources.apk from YOUR ROM. It contains "coding" for lack of a better word that apktools uses to encrypt..I guess, the apk's.
Other greats links that will help you Decompile apk's
http://forum.xda-developers.com/showthread.php?t=1133485
How to install APK Manager
I've started to use APKManager for Compiling APK's and also had trouble installing/setting up. Here's my how to guide to getting it done.
Download APK Manager here>>APKMANAGER
1)Once downloaded, unpack/unzip and place the apk_manager_4.9 in the same directory your ADB is located. Specifically, adb.exe. My directory is as follows:
C:\android-sdk-windows\platform-tools\apk_manager_4.9
If you don't have it installed in this directory, you will won't be able to compile Apk's.
Compiling APK's
After you decompile an APK for whatever reason such as editing an XML, you'll eventually need to compile it.
Open RUN by holding down the windows button and "R" then enter in cmd
The fastest way to get to your *.*.apk is to highlight and copy the explorer bar address,
then go into command prompt type:
cd
After cd, hit space, then right click on your mouse and paste.
You should now be in the directory of your APK.
Just to recap, to Decompile an apk, type apktool d *.*.apk in the command prompt. (Pictured Below)
You'll then see your decompiled apk folder. In this example, it's SystemUI
Compiling Command-Apktool
To compile the apk, go into command and type:
apktool b *.*.apk In this example, I'm using SystemUI.apk so...
apktool b SystemUI
Inside the decompiled SystemUI.apk folder you'll see a newly created folder called, "build" and "dist" (Pictured Below)
The dist folder contains your compiled apk that just needs signatures(META-INF) and zipalign to be ready. The build folder contains the compiled apk in a folder format. If you're just modifying a couple xml's then you can copy them from the build/apk/res/*.* and paste them into your apk using 7-zip. Just know, the values folder you see when the apk is decompiled will not be shown and many other folders may not be available as well. This is when you're going to have to use the apk from dist folder.
How to make your compiled APK ready
The compiled apk is found in the dist folder. You can't use it yet, because it needs the original META-INF folder(signatures) and AndroidManifest.xml.
The fastest way to get these is to go back to your apk. In this example, we'll use SystemUI.apk. More than likely the apk you're using has already been decompiled in the same directory. To prevent and over-write, put the apk in it's own directory and extract it. (Pictured below)
You should see the META-INF folder and AndroidManifest.xml in the apk you just extracted. (Pictured below)
I recommend you copy these to the dist folder containing your apk. You'll be dragging these into that apk using 7-zip. To do this, right click on the apk and select, "Open Archive", then drag your META-INF folder and AndroidManifest.xml into the open dialogue box. (Pictured Below)
Congrats! Your apk is now signed BUT IS NOT READY until zipaligned.
How to install zipalign
What you'll need first
Android-sdk located here>> http://developer.android.com/sdk/index.html
ZIPalign reference Article tutorial information.
Once you've installed Android-SDK, go into the tools folder. My directory path is: C:\Program Files\Android\android-sdk\tools You're could be different.
What we're going to do is make it where you can use zipalign in any directory along with draw9patch while where there.
In the tools folder, copy zipalign.exe and draw9patch.bat. Place it in the c:\windows directory. NOTE: Any executable files you place in this folder you'll be able to access anywhere while running cmd prompt.
Running zipalign in command prompt
Now that you've installed zipalign in c:\windows we can access it from anywhere. Let's give it a test.
Go to your res folder which contains the newly signed apk in command prompt.Then type:
zipalign -fv 4 SystemUI.apk SystemUI-new.apk
After running you should have a new apk named: SystemUI-new.apk seen in my example below.
Congrats again. You now have a signed apk and have run it through zipalign. It's now ....finally ready to be put back into a zip file for flash or pushed via adb.
Verizon Banner
Great Work!
How would I change the verizon banner from the slide lockscreen?
Moyeto said:
Great Work!
How would I change the verizon banner from the slide lockscreen?
Click to expand...
Click to collapse
Thanks! You mean where it says Gingeritis 3D? I haven't a clue. That's a chingy question.
EDIT:
Your thumbnail is too small to read. Sorry.
Awesome work raider working on one now Ill update the progress
Hey man great guide. Works perfect. I am trying this on the Evo 3d.
Pretty impressed, good S***
Thanks for this awesome guide. This **** just works! =D
Sent from my PG86100 using Tapatalk
mayfield103 said:
Thanks for this awesome guide. This S$*$ just works! =D
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
No problem. I'll try to continue adding to it so other soon to be Dev's are stumped on simple stuff. Most of this stuff only takes minutes to setup but hours to find out how and most threads only cover bits and pieces which can consume you for hours.
Yo raider, how would you go about removing the clock, battery and alarm clock from the status bar? I'm currently running gingervitis 3d, but I like to have this option or the know how too when changing to another ROM in the future.
sent from my Gingeritis 3D mecha using XDA Premium App
Hey raider my port is coming along nicely just a couple questions: when replacing some of the pngs in the phone apk it replaces them but puts them at the bottom of the list instead of the same place is that OK? And two when I replaced the bar in the drop down that has the clear notifications button on it nothing changed its still the stock bar is it in a different place.
I have no idea what's goin on? =D
great tutorial.
nice job raider! Keep it up We need more tutorials like this.
Just wanted to say thanks again for this
Go check out my port!!!
http://forum.xda-developers.com/showthread.php?p=16760544#post16760544
absolutzero1906 said:
Just wanted to say thanks again for this
Go check out my port!!!
http://forum.xda-developers.com/showthread.php?p=16760544#post16760544
Click to expand...
Click to collapse
Great job man. Understanding the porting process is the first thing anyone should learn if they want to start theming.
Sent from my ADR6400L using XDA Premium App
Nice additions rader. I'm glad to see you still adding to this(i need it... Lol) , maybe some more studying and I'll get the gingeitis port working right.
Sent from my ADR6400L using Tapatalk
A brother wanted to say thanks for the help and for sharing the coldest theme for
Android. I hit your donation, and wanted to say thanks. I could only imagine all the hard work it takes. Good looking. I still have a lot of ?'s,lol....
tdk55 said:
A brother wanted to say thanks for the help and for sharing the coldest theme for
Android. I hit your donation, and wanted to say thanks. I could only imagine all the hard work it takes. Good looking. I still have a lot of ?'s,lol....
Click to expand...
Click to collapse
No Problem, and thanks for the donation!
hi guys...please help me to solve my problem HERE,my thumb just for u who can solving my problem
Wooow! Thanks bro... I'll try it
how to change background of settings menu?
some one please help me.
how to change the background of settings menu?it is black in color.i want to replace a image instead of black color. I am using the stock rom sense 3.5 in htc explorer.which apk should I edit? framework-res.apk or com.htc.resources.apk?
[Advice/Reference/Guide] The Definitive APK Modding & Theming Thread... [12/08/13]
{
"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"
}
XperienceD said:
This is why I love Virtuous Ten, as you can install multiple resources.
Click to expand...
Click to collapse
jacknb1ack said:
wow, i didnt know there is tools like that
Click to expand...
Click to collapse
After reading jacknb1ack's comment I felt compelled to re-write this whole thread to accommodate for the various PC Programs that you use to do all of your apk modding which can and do make things a hell of a lot quicker. I've wrote this as something I would have liked to have come across when I first joined because I know there is a lot to take in, and hearing you need to decompile, edit this or that xml, recompile, sign etc etc etc can be off putting for some especially if you struggle to get a program or apktool setup to begin with.
Knowing how to use command prompts will be beneficial in the long run so I've wrote a detailed guide below which covers it from start to finish along with how to Sign and Zipalign your apks, pulling them from the computer and so on. I've also covered some Theming basics with links to everything you're ever going to need, which will be extra handy if you're just getting started.
Minimum Requirements:
A Rooted Phone.
Java SE Runtime Environment
Java SE Development Kit
Any of the apk modifying methods below.
7-Zip or WinRar
Theming Requirements:
Notepad++
Photoshop, GIMP or any other image editing software.
Patience. :silly:
To avoid any java not found issues you need to set up the PATH for it in Environment Variables, you can find a short Guide on how to HERE. This is how mine looks...
Code:
[B]C:\Program Files (x86)\Java\jre6\bin;[/B]
I would advise that you also install the Android SDK but if you don't want to you can download this APK_Mod.zip that you can extract to a folder and place it anywhere you want on your Computer (I recommend C:\APK_Mod) and run any adb, apktool, zipalign or signing command prompts from it. You can find a more detailed guide for this method below.
But first off all here are some of the most common Programs that you can use to modify and theme your apks, and I'll start with one of the best...
Virtuous Ten Studio (VTS)
Virtuous Ten Studio (VTS) is the ultimate solution for the modification of android applications.
This program allows you to manage entire Android projects within an easy to use and familiar environment.
The intended group of users covers anyone from a themer over ROM devs up to the smali gods known for their awesome mods of existing apks.
The modifcation of smali code is one of the biggest features in VTS. You can easily decompile, edit and recompile any apk or jar file.
However, the application is not limited to smali files. You can edit almost any file found inside an apk or jar.
Virtuous Ten Studio is also the official successor to the highly important M10Tools released last year by the Virtuous Team.
You can easily edit any m10 file from Sense apps in order to resize or change them.
Additionally VTS brings support for un- and repacking of boot images (boot.img), a job that previously required a cygwin installation with the dsixda kitchen.
Since VTS' own implementation is a native windows solution, which means you don't need dsixda or cygwin anymore.
VTS has been designed to run on Windows, has been in development for nearly two years and has gone through many stages of testing.
Today VTS is a highly respected full blown Android IDE (Integrated Develoment Environment) suited for all your reverse engineering tasks.
Click to expand...
Click to collapse
- www.virtuous-ten-studio.com
AndroidSuite 2013
AndroidSuite 2013 what it does
Decodes and encodes Dex files
Decodes and encodes APK files (Previously bugged in APKManager)
Gives a console output
Flash boot.img (fastboot)
Flash update.zip (fastboot)
reboot/reboot fastboot mode
Sign unsigned apks
Click to expand...
Click to collapse
- (App) Androidsuite 2013 v117 (01/04/2013) Jelly Bean Support!
Tickle My Android 5.4
Tickle My Android, or TMA for short, is a command line tool for Windows that uses apktool to help you pull and decompile files from your Android phone or tablet.
But it can also:
change the battery icon,
change the WiFi icon,
change the signal icon,
change the emoticons,
change the notification toggles,
change the transparency of the statusbar (if the rom allows it),
add Ice-Cream Sandwich-style transitions
zipalign apk files,
sign new apk files,
sign recompiled apk files in the same way as the original,
deodex apk and jar files,
backup personal data and transfer to a brand new device,
resize and change boot animations,
change fonts,
add sounds from other devices,
create backup-generating flashable zip files
..and now comes in Portuguese and French!!
Click to expand...
Click to collapse
- [TOOL]Tickle My Android 5.4 - DE/RECOMPILE APPS, CHANGE ICONS...AND MORE!!!!
ApkManager V6.1
1. Based on ApkManager 4.9 by Daneshm90 (Big thanks to him)
2. Updated Apktool V1.5.2 by iBotPeaches & Brut.Alll
3. Updated Aapt v0.2
4. Default compression level set to “0?
5. 512Mo as default allowed heap size
6. 3 ready for use fake frameworks : “other\wanam1.apk”… (for Lidroid framework editing)
7. Add a “Decompile all files” feature (option 25)
Click to expand...
Click to collapse
- wanamlite.com
Command Prompt Editing
Basically this is just manually doing what all of the programs above need to do in order to decompile, recompile, sign and zipalign apks so it's worth knowing how to modify apks this way for occasions when the above programs for whatever reason gives you issues.
Use Linux or a Mac?
See the following threads for more information on using apktool on other Operating Systems...
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
Getting APKs To Your PC
You have two options here...
1. Use a file manager on your Phone to copy and paste files to your SD, then connect to your PC and use Windows Explorer to copy and paste to your desired location.
2. ADB. Open a command prompt window in the ADB folder (see below) and type/copy the following command...
Code:
adb pull /system/app/ Original_apps
...which will pull the whole app folder to your computer and create a new folder called Original_apps, which you can then simply copy apps to the main folder ready to be modified (keep the Original_apps folder as a backup). Then do the same for your framework folder...
Code:
adb pull /system/framework/ Original_framework
...want to pull your Phones whole system...
Code:
adb pull /system/ Xperia_Z_System
...you can rename "Xperia_Z_System" to whatever you want.
Further Information: [WINDOWS][TUT]ADB tutorial, setting up ADB, usefull commands, collecting debug info.
This is a zip of the apktool folder I currently use - APK_Mod.zip - which as said above also contains the ADB files needed to pull and push apps from your Phone, or you can check out the following links...
[Tool] ADB Fileexplorer
[TOOL][WINDOWS] Android Apktool
Installing Resources
For apktool to work you need to install the resources needed by your apks for de and recompiling, and those resources are other apks, the first apk regardless of your Phones manufacturer is going to be your framework-res.apk. The second apk you need is dependent on the manufacturer so you need to check your framework folder for another apk such as twframework.apk or SemcGenericUXpres.apk, in some cases it might even be the SystemUI.apk but you would need to check if you have issues with the other two. Put those two apks in the APK_Mod folder to begin with then open a command prompt window. The easiest way for me is holding the shift key then right clicking the mouse and selecting Open command window here, but if you're not able to do that then click your Start button and search for Command Prompt, then open it. You then need to point it to the relevant folder, so type cd then copy and paste the location of the folder (cd C:\APK_Mod) and hit enter.
The install commands are...
Code:
[B]apktool if[/B] framework-res.apk
...and for the second...
Code:
[B]apktool if[/B] SemcGenericUXpres.apk
Decompiling
The command for decompiling is...
Code:
[B]apktool d[/B] framework-res.apk
...and so on for each individual apk you want to modify. A new folder will be created that is named after the apk you are modding, then you can edit xmls, smali files and .9png images. You'll notice that there are a lot more folders when you decompile an apk, that's normal as those folders are from the resources.arsc and where you'll find the xml files you may need to edit to make the changes you want.
Recompiling
When you've done editing it's time to recompile, using the command...
Code:
[B]apktool b[/B] -insert folder name-
...and if you've edited your files correctly then it should compile with no errors and create a folder named dist in the decompiled folder along with a new apk.
Signing
Before using the new apk you will need to sign it, to do this you need to extract (open the apk and simply drag and drop them to the dist folder) from the original apk the resources.arsc (only if you haven't changed anything in the values folder, the AndroidManifest.xml and META-INF folder (if it exists), then copy them into the new apk. In WinRar it will give you the option to choose the compression method, and it's vital that you choose Store as the compression method because if you don't then you WILL BOOT LOOP after restarting your Phone!
NOTE: If you have edited anything in the values folder then extract the resources.arsc from the new apk and copy (drag and drop) it back in the same manner described above.
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.
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
Zipaligning
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
The command for zipaligning is...
Code:
[B]zipalign -v 4[/B] framework-res.apk ZAframework-res.apk
...notice the "ZA", again that can be anything you want so long as it differs from the original name, I use ZA for an obvious reason, and again don't forget to rename it before using on your Phone.
Getting apks back to your Phone
It's just a reversal of how you got them off your Phone to begin with, use a file explorer and put your apk on your SD Card, then move it to the Phones System folder and change it's permissions to rw-rw-r, then move and replace it with the original. Most apps should continue to work but if you change your framework-res or SystemUI you will most likely need to reboot. Or you can use adb to push and install them. Check the previous link for the commands.
If all the above has worked correctly you should now have your modified apk installed with the changes you've made displayed on your Phone.
Theming & Modifying
This is where the fun begins, once you've got setup to decompile your apks then obviously you're going to want to mod them, so here's a few pointers to clear up what seems like a daunting process to new comers...
To start with you'll probably just want to start with replacing images, so if that's all you want to do for now then here's a quick tip, you DON'T need to decompile or sign your apks!, simply edit and rename your replacment images on you computer, preferably using the same or similar dimensions then drag and drop them back into the right folders in the apk, always using Store as the compression method, but PLEASE NOTE; .9 pngs can be replaced in the same way, but if you want to edit them in Photoshop for example then you need DO need to decompile them.
A few things to note...
Smali code is real Developer territory, it's Matrix code to me , thankfully there's usually a guide to follow so you can simply copy and paste code without having to fully understand how it works, so don't fret about this.
.9pngs are simply png images with a 1 pixel border. You can edit anything within that border but anything on or over will give errors when building. Unless you're creating an image from scratch then you can leave the border as it is, it's that simple! Sure there's a bit more to .9png editing but you can find a few links below that go into more detail about .9s and how they work.
xmls are relatively simple and edited with Notepad++, much simpler to understand than smali and again, there's usually a guide to be found for most mods you may want to make yourself, but if you're feeling brave you can experiment with it when you have a basic understanding of how it works.
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.
.9png Editing
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, and 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
Xposed Framework
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
[Guide] Porting XTheme themes
[Guide] Xposed Framework/TabletUI (Noob-Friendly)
[INDEX][WiP] List of APPs & MODs that use XPOSED Module
[MOD][XPOSED][4.0+] XThemeEngine beta5 - Theme engine for any rooted phone
CyanogenMod Theme Chooser
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
[Tool] [Theme Creator] [CM/Avatar] Theme creator tool
[Tool] nhnt11's XML Generator Revived V2+Extended UPDATED!
[DEV/GUIDE]Creating APKs for use with TMobile Theme engine
[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]
-·=»‡«=·-[JB][CM10] Theme Engine Template Updated To V4 [8-7-12][XHDPI/HDPI]-·=»‡«=·-
See a few post below for more...
thnaks
thank you so much
very hepful guide
looking for dis
Thank you so much,
This should be sticky!
Make a noob, into a senior user.
Sent from my Anzu using xda premium
Flashable Clockwork Mod (CWM) zip
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.
See below for a CWM.zip Template but first some helpful links...
ERRORS encountered in CWM Recovery
[Tool]easy flasher v4 (ur own update.zip)
[TUT] [for NOOB] editing updater-script for noobs!
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation
[Utility-Tool][DEVandThemers]CWMflashpack.zipCreatorV1{TheCollective}w/EdifyScripting
This is my Theme_CMW_Template.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 Ice Green ResMods theme...
...so just edit it using Notepad++ to your liking.
When adding files to your zip add them using Normal as the Compression Method...
...and that's pretty much it. Remember to remove the text files I've added otherwise they will be flashed to your folders too.
Deodexing
The first thing I do when installing the latest firmware is Deodex it, mainly because having a deodexed ROM is easier to modify and you'll find a lot of the modifications that are are in the Themes And Apps sections require you to have a deodexed ROM. I use the dsixda's Android Kitchen to deodex and @pankaj88 has written a great guide here - [GUIDE] How to DEODEX stock ODEXED ROM using dsixda's kitchen - so you can do it yourself, or you can give the following tools a try.
philos64 said:
The differences between Odex and Deodex Files...
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space The odexed file structure works well as an optimization tool. Since these .odex files contain preliminary load information about each system app, the OS knows what to expect when it’s booting up, and consequently, loads all these apps faster.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
For instance, on a non-rooted device you’ll find
system/app/Phone.apk ===> as well as ===> system/app/Phone.odex
Click to expand...
Click to collapse
- [GUIDE] - The differences between Odex and Deodex Files
[TOOL][WINDOWS]Universal Deodexer[ALL DEVICES!!]
abcdjdj said:
Hi everyone,
Alokbina and I have created a tool which allows users to very easily deodex apks from a rom. This tool is very useful for Rom developers too. For now only windows is supported but we will try our best to make the same tool for linux too and make the tool as user friendly as possible. And, please don't forget to thank alokbina too.
NOW EVEN ON XDA PORTAL - http://www.xda-developers.com/android/deodex-all-the-things-with-universal-deodexer/
Requirements:-
--->Java installed on your PC
--->system/framework folder from your rom
--->apks from that SAME ROM with the respective .odex file
--->Patience and a calm head (common sense included)
You can watch this video for setting up and using the tool -
Click to expand...
Click to collapse
[FIXED][UPDATE - V3][TOOL][WINDOWS]Universal Deodexer[ALL DEVICES!!]
adityaf said:
CARBONITE TOOL
Features
1)Deodex your stock ROM (android 2.x 3.x 4.x)
2)This tool automatically pull your apps from phone to PC
3)One click deodexer,
4)Just click Deodexer_from_phone
5)All apps and framework will be deodexed.
6)Automatically makes .zip file flash from CWM.
BUGS
Sometimes it does not deodex androidpolicy.jar just run script once again!
Click to expand...
Click to collapse
- [TOOL]CARBONITE TOOL [Dedeoxder tool][All devices]
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 this far into the history of Android there are numerous guides for numerous mods and tools to help with a variety of tasks and the following links are going to be a big help...
U.I Modding
Tutorial :- Changing App Icons
[TUTORIAL]How to Theme Your MMS
[How-to] Edit the "About Phone" display
How To Colorize Lock Screen Clock in Jellybean
[TUTORIAL] How to add various framework/Settings mods
[TUTORIAL] Where to find the colors for making a theme
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie!
[TUTORIAL][ICS][GB][JB]How to change Android's black background
Text...
Text Color Guide
[GUIDE][REF]Changing System Text Settings
Statusbar...
[MOD][TUT] Merge The WiFi And Signal Icons
[GUIDE][MOD][SYSTEMUI] How to add 0.0K/s meter on statusbar 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
Misc...
Some Extra Theming and Moving the Power Widget Down
[HOWTO] Integrating/Adding applications to the settings menu
[GUIDE] How to get Transparent App Drawer [Launcher2.apk or Trebuchet.apk]
[GUIDE][Mods][All Devices]How to add/ Change Clocks to Analog/ Digital with Seconds
Various Tools...
[TOOL][BETA]Miui Theme Converter/Convert apk Themes!!!
[TOOL][JAVA]"The Rom Fumbler" aka "The Battery Icon Creator"[V29.0]
[TOOL]Boot Animation Factory-Create,Preview and Manage Boot Animations
Useful Links
findicons.com
colorschemer.com
[GUIDE] Tips for themers
Ultimate Online Theme Kitchen
[GUIDE] Want to learn how to theme?
[GUIDE] Smali coding guide for beginners
General Questions about Themes GO HERE!!!!!
[Guide] How to port themes to T-Mobile Theme Chooser
[Collection] ICON SETS | Over *750* different Icon Packs
[TOOL] Remote Theme Injector - theme your favorite paid apk
[TEMPLATE] Icon Packs/Themes for Apex, Nova, Holo, ADW, and more!!
[INFO] Custom framework-res.apk resources.arsc using vendor overlays
If you feel something more should be added to this thread please feel free to suggest it.
Credits & Thanks:
@_calum_
@Diamondback
@ebs512
@Rizal Lovins
@Ticklefish
@wanam
@rovo89
@Annex1
@ebs12
And not forgetting @iBotPeaches and @Brut.all for making it possible with - [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files
one query
after i decompile the apk,i edit the my xmls in project folder....then what to do next?
EDIT:- I figured it out
abhisheak.bansal said:
one query
after i decompile the apk,i edit the my xmls in project folder....then what to do next?
Click to expand...
Click to collapse
Continue editing or recompile and test your changes.
Wow!! It should be sticky. Really usefull guide, it explain so much things... thanks again
Useful Guide, Thanks
soooo happy u came out with this
will u add how to make it a theme that someone else can flash?
keep up the good work
zainthesnipe said:
soooo happy u came out with this
will u add how to make it a theme that someone else can flash?
keep up the good work
Click to expand...
Click to collapse
Thanks, glad to see it's helping some People, and I will add that yes.
zainthesnipe said:
will u add how to make it a theme that someone else can flash?
Click to expand...
Click to collapse
Done.
Could you make a short guide to show
how to zipalign using dsixda's Android Kitchen
When I select zipalign all...
It says no working folder found...
what does it mean...?
Kajendran said:
When I select zipalign all...
It says no working folder found...
what does it mean...?
Click to expand...
Click to collapse
You haven't set up the folder. http://forum.xda-developers.com/showpost.php?p=5626300&postcount=3
Updated.
Thx For Guide:laugh:
when i try to install the resources i get this error:
Code:
'java' is not recognized as an internal or external command,
operable program or batch file.
i have java installed, what am i doing wrong?
Setup the path for it. See an "adb for noobs" guide for setting the path up.
Sent from my CM9'd Arc
XperienceD said:
Setup the path for it. See an "adb for noobs" guide for setting the path up.
Sent from my CM9'd Arc
Click to expand...
Click to collapse
i already did that, maybe i did it wrong, ill check again.
---------- Post added at 09:55 AM ---------- Previous post was at 09:51 AM ----------
ok i did it wrong, now i fixed it and it still doesn't work
any ideas?
i just need to sign a zip
OverLo4d said:
any ideas?
i just need to sign a zip
Click to expand...
Click to collapse
I'd remove Java then reinstall it, add your path then try again.
HOW TO THEME SAMSUNG ROMS (GALAXY 3 MAYBE OTHERS)
Hello guys. I have had many requests to do this so here it is.
Let' s just get started.
NOTE : - THIS GUIDE CONTAINS VARIOUS METHODS WHICH I PERSONALLY USE TO THEME. THERE ARE SOME OTHER DIFFERENT WAYS IN WHICH YOU CAN DO THIS.
WHAT ALL YOU NEED TO THEME??
APK Manager 5.0.2 : - Will be used for decompiling/compiling frameworks. Please don' t use the new version APKMulti-Tool 1.0.1 for now..
APKTool : - This you need to place in your \windows\ folder.
Java SDK : - This is necessary for the decompiling/compiling process. Also required in many patches for frameworks.
GIMP : - This is the image editing software which we are going to use to edit/resize PNGs.
Android SDK : - Again not of much use in this guide but always good to have for learning.
WinRAR : - This will be used for opening the APKs for adding PNGs after editing.
Notepad++ : - This we will use for opening the various XML/smali files for editing code.
Unedited base framework : - Its necessary that its unedited because it may lead to errors(like error compiling .9.PNGs)
Hex Colours : - You' ll need hex colour values for using them in various XMLs. This here is a nice website for that.
Lots of patience : - Now this skill you have to develop on your own.
HOW TO SETUP EVERYTHING FOR MAKING/PORTING THEME??
1) Download APK Manager 5.0.2(Not APK Multi Tool 1.0.1) from the above mentioned link. Extract the contents to any of your drives.
2) Download APKTool (Main program as well as the dependancies for you respective OS). Extract both the .tars contents to :\windows\.
3) Download the latest version (7u2 currently) of JDK(Java SDK) from the site mentioned above and install it.
4) GIMP, Notepad++ : - Download from above mentioned site and install them.
5) WinRAR : - I guess you should be able to get this on your own.
6) Unedited base framework : - If you already have then good. If you don' t then please download from above link.
7) Android SDK : - Download either the zip or .exe from above mentioned site and set it up accordingly. (Note : - This step can be skipped)
CHECK WHETHER THE FRAMEWORK YOU HAVE IS COMPILE-ABLE (UNEDITED) OR NOT.
Before starting, always check. For this, place the framework-res.apk in \apkmanager\place-apk-here-for-modding\. Now start the script. Select Option 22(Set current project) and then select the project. Then select Option 9(Decompile apk). Let it decompile. After that, select Option 11(Compile apk). Select "YES" for "Whether it is system app". Select "YES" for "Whether you want to include original files". Let it compile.
If the compilation process goes smoothly without any errors, then you have the correct(unedited) framework which can be used for theming.
{
"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"
}
EDITING VARIOUS XMLS : -
For information purpose, if you want to know what is an XML, then here is a nice read.
Decompile first : -
Place your framework-res.apk(should not be renamed after decompiling, so please rename before only) in the folder place-apk-here-for-modding. Start up script and decompile it(option 9). After decompiling, goto Projects folder. You will find your decompiled framework there.
Similarly, using the above method, decompile your twframework-res.apk(should not be renamed after decompiling, so please rename before only).
If you are porting a theme, then decompile the framework-res.apk and twframeowrk-res.apk from the theme to be ported also.
1) Editing Notification colour in notification drawer.
Files to be edited : - status_bar_latest_content_event.xml in \projects\framework_name\res\layout\.
* Goto \projects\framework_name\res\layout\.
* Open status_bar_latest_content_event in Notepad++.
* You will find 3 lines for editing the colour of the notifications.
1) android:id="@id/title". This is the title of the notification
2) android:id="@id/text". This is the description of the notification.
3) android:id="@id/time". This is the time of the notification
*Edit HEX value for "android:textColor" instance for the 3 above lines as per your likings. Or if you are porting from a theme, then just open the same XML file(i.e. status_bar_latest_content_event) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.
2) Colour of horizontal progress bars : -
Files to be edited : - progress_horizhontal.xml in \projects\framework_name\res\drawables\.
* Goto \projects\framework_name\res\drawables\.
* Open progress_horizontal in notepad++.
* The progress bar uses 3 colours to set the colour which goes from top to bottom. You have to set three colors: start, end and middle.
1) <item android:id="@id/background"> is for the unused part of the progress bar.
2) <item android:id="@id/progress"> is for the used part of the progress bar.
* Edit all the HEX values as per you linkings. Or if you are porting from another theme, then just open the same XML file(i.e. status_bar_latest_content_event) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.
3) Changing secondary font colour : -
Files to be edited : - zzz_tw_secondary_text_sub.xml in \projects\framework_name\res\color\
* Goto \projects\framework_name\res\color\.
* Open zzz_tw_secondary_text_sub.xml in notepad++.
* Look for the following instance,
Code:
<item android:state_window_focused="false" android:color="#HEXCOLOR_VALUE" />
<item android:color="#HEXCOLOR_VALUE" />
* Replace the HEXCOLOR_VALUE that is already there with the one of your choice.
* Note : - The default colour is blue in Samsung ROMs. Hex value #FF81BEE1.
4) Setting menu text colour to white in menus for black background : -
Files to be edited : - styles.xml in \projects\framework_name\res\values\.
* Goto \projects\framework_name\res\values.
* Open styles.xml in notepad++.
* Press CTRL+F and search for "TextAppearance.Widget.IconMenu.Item".
* The searched part will be like as shown in the following : -
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[B]?textColorPrimaryInverse[/B]</item>
</style>
**Change the above code to as shown below : -
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[B]@color/bright_foreground_dark[/B]</item>
</style>
* Then for text colour in "MORE" menu lists, press CTRL+F and search for "Theme.ExpandedMenu".
* The searched part will be as shown in the following : -
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">[B]?textAppearanceLargeInverse[/B]</item>
<style>
** Change the above code to as shown below : -
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">[B]?textAppearanceLarge[/B]</item>
<style>
5) Adding 1 percent battery mod to theme : -
Files to be edited : - stat_sys_battery.xml and stat_sys_batery_charge.xml in \projects\framework_name\res\drawable\.
* Goto \projects\framework_name\res\deawable\.
* Open stat_sys_battery.xml in notepad++. If there are no drawable values for 1% batterymod PNGs then, delete everything in that XML and copy paste the following code : -
Code:
[URL="http://pastebin.com/qRMqS2sy"]Click here for the pastebin data[/URL].
* Now open stat_sys_battery_charge.xml in notepad++. Check if there are drawable values for 1% battery mod. If there isn' t, then delete everything in that XML and add the following link : -
Code:
[URL="http://pastebin.com/pUxknPci"]Click here for the pastebin data[/URL].
6) Provider, Carrier, Ongoing-Title, Notifications-Title, Clear-Button, noNotificationsTitle : -
Files to be edited : - status_bar_expanded.xml in \projects\twframe_name\res\layout\
* Goto \projects\twframe_name\res\layout\.
* Open status_bar_expanded.xml in notepad++.
* Search for the lines : -
1) android:id="@id/plmnLabel". This is the Carrier name.
2) android:id="@id/spnLabel". This is the Provider name.
3) android:id="@id/ongoingTitle". This is the Ongoing-Title.
4) android:id="@id/latestTitle". This is the Notifications-Title.
5) android:id="@id/clear_all_button". This is the text of the Clear-Button.
6) android:id="@id/noNotificationsTitle". This is the text when no notification is displayed
* For each of the IDs above, there will be attribute android:textColor="<HEX_VALUE>". Edit the hex value as per your requirement. Or if you are porting from another theme, then just open the same XML file(i.e. status_bar_expanded) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.
7) Colour of the text when the text fiels is selected : -
Files to be edited : - styles.xml in \projects\framework_name\res\values\.
* Goto \projects\framework_name\res\values\.
* Open styles.xml in notepad++.
* Press CTRL+F and search for "<style name="TextAppearance">". There you will find "textColorHighlight" attribute just below.
* Change the HEX value for the attribute as per your requirement.
HOW TO COMPILE THE .APK BACK
Well here comes the big part. The part which usually causes the problems. You should consider the following points for this. The compilation process will go smoothly only if : -
You have not resized, replaced any .9.PNGs in the decompiled framework. If you want to you will have to do as I have described below in second post or else you will get compile errors. Lots of them.
You have not added any extra lines in XMLs which redirect to the PNGs(drawables) in the framework. If you have, make sure you have added the extra PNG to the framework as well.
**HOW TO COMPILE USING APKMANAGER : -
After you have made all the necessary edits to the framework, open up the script again.
Select option 22 and the select the project which you want to compile.
Then select option 19(Compression level for APKs) and select 0 for that.
You should see the compression level and the name of the project displayed above in the first line of the window.
After all that, select option 11(Compile APK). Select "Y" when it asks if its system APK. Select "Y" if it asks to include original files from APK or not.
Let it build the APK. If it builds successfully, then the most difficult part is finished.
[*]Minimize the script for a while. You will see a new folder named as "keep". Go to this folder and delete all the XMLs and the PNGs that you have edited. Don' t worry about the XMLs that you had edited in "values" folder. And also delete "resource.arsc" from the keep folder (Only if you have edited XMLs).
After you have done all that, maximize the script and press enter. Let it compile.
You will see your new compiled APK in the folder "place-apk-here-for-modding" in the form of unsigned<FILE_NAME>.
THIS WILL BE CONTINUED. STILL SOME MORE LEFT.
THEMING RELATED WITH PNGs
1) Popups :-
Figure 2.1
Present in : - framework_name\res\drawables-mdpi\
Name of the PNGs are : -
popup_bottom_bright.9.png
popup_bottom_dark.9.png
popup_bottom_medium.9.png
popup_center.dark.9.png
popup_center_medium.9.png
popup_full_bright.9.png
popup_top_bright.9.png
popup_top_dark.9.png
Please note that these are .9.PNGs. And they need to be .9.PNGs only. Normal PNGs will not work.
How to port from another ROM : - These .9.PNGs don' t require porting usually. Just take it from the theme you are trying to port and place it in your \res\drawable-mdpi\ folder using WinRAR.
Note : - This is to be done after you have completed editing and compiling the APK. Using WinRAR.
2) Backgrounds of menus : -
Figure 2.2
Present in : - framework_name\res\drawable-mdpi : -
Name of the PNGs are : -
menu_background.9.png : - This the background for one grid element.
menu_background_fill_parent_width.9.png : - This is the background of the whole grid element.
menu_more_bg.9.png : - The background of the menus when you select "More" menu.
menu_separator.9.png : - The separators(grid lines) between the various menus.
Please note that these are .9.PNGs. And they need to be .9.PNGs only. Normal PNGs will not work.
How to port from another ROM : - These .9.PNGs don' t require porting usually. Just take it from the theme you are trying to port and place it in your \res\drawable-mdpi\ folder using WinRAR.
Note : - This is to be done after you have completed editing and compiling the APK. Using WinRAR.
3) Notification bar and notification background(All related PNGs) : -
Figure 2.3
First six PNGs present in : - framework_name\res\drawable-ldpi except divider_horizontal_bright which is in framework_name\res\drawable-mdpi.
Last six PNGs present in : - twframe_name\res\drawable-ldpi or drawable-mdpi.
Names of the PNGs are : -
statusbar_background.9.png : - Can be a normal or a .9.PNG. Preferably a .9. As its black in most themes, no need to port. But if you want to you will have to follow method described below(Give me some time for the method).
status_bar_item_background_normal.9.png : - Background of the notifications on statusbar in idle condition. If you want to you will have to follow method described below.
status_bar_item_background_pressed.9.png : - Background of the notifications on the statusbar when the notification is selected. If you want to you will have to follow method described below.
divider_horizontal_bright.9.png : - The line which divides the notifications. Can be copied directly from the theme to be ported.
stat_sys_battery_[XX] : - These are the battery PNGs during normal use. Where [XX] refers to number between 0 and 100.
stat_sys_battery_chargeanim[XX] : - These are the battery charging PNGs. Here [XX] refers to a number between 0 and 100.
Other status bar PNGs : - All of them are of the form stat_sys_[X]_[Y]. By looking at the PNG itself you can identify which is for what.
quick_panel_music_bg.9.png : - This PNG is in twframework-res.apk\drawable-mdpi. This is the PNG for the music quick panel in the notification drawer. If you want to port this PNG from other theme then you will have to follow method described below.
quick_panel_list_bg_01.9.png : - This PNG is in twframework-res.apk\drawable-mdpi. This is the background for the titles such as "Ongoing", "NoNotifications", etc. It is a .9.PNG. Can be directly resized and used.
Quick panel icons : - These PNGs are in twframework-res.apk\drawable-ldpi. These are of the form quick_panel_icon_[NAME]_on/off. Are normal PNGs. Can be resized directly and placed in APK using WinRAR.
status_bar_header_background_01 : - This is present in twframework-res.apk\drawable-ldpi. This is the background for the quick panel. Is a normal PNG. Can be resized directly and placed in APK using WinRAR.
Unused notification drawer area : - The unused area in the notifications drawer is covered by status_bar_background.9.png.This is present in twframework-res.apk\drawable-ldpi. If porting from a theme, then you will have to use the method described below.
status_bar_close_on : - Present in twframewor-res.apk\drawable-ldpi. This is the PNG which defines the bottom of the notifications drawer.
EDITING/PORTING .9.PNGS
Let' s start off with the basics of what is a .9.PNG. Well there is a nice quick read about it here.
So what is the problem with .9.PNGs?? You will get info about it in my pastebin here.
**HOW TO EDIT (DECOMPILE METHOD) : -
Firstly, if you want to edit properly these PNGs, then you have to do it when the APK is in decompiled form. So decompile APK first.
Also, if you are porting a theme, decompile the APK from that theme also.
I am assuming the name of the PNG to be "btn_default_pressed.9.png". Open btn_default_pressed.9.png from the base theme using GIMP and also open the same PNG from the theme you want to port.
Note the the dimensions of the btn_default_pressed.9.png of our theme and the resize the same PNG from the theme you want to port accordingly.
Notice the borders of the .9.PNG of our base theme. You will notice some black solid lines. Now these are the lines that define the PNG. And these should not be touched or edited.
Now go to the PNG that you resized earlier. Using the rectangular select tool in GIMP, select the area of the PNG excluding the 1 px borders. And then copy it.(Figure 2.4 and 2.5).
Then go to the "btn_default_pressed.9.png" of our framework and then select the same area (i.e. excluding the 1 px borders) and press DELETE. The area will become empty.(Figure 2.6).
Then press CTRL+V(Paste).(Figure 2.6).
Save it. While saving you will be asked to export image. Select "Merge visible layers" and save.
There you have it. 1 PNG ported. Similarly, you can port other .9.PNGs. The important ones. Capish??
Figure 2.4
Figure 2.5
Figure 2.6
Reserved 2.
Finally.. Cool bro... Gonna Learn from this once you add info on smali editing..
Thanks for this tutorial!
akoshun said:
Thanks for this tutorial!
Click to expand...
Click to collapse
There is still lot more to go. Its late here so I will continue tomorrow.
wow man. This is like spoon feeding
Thanks a lot
vikraam said:
wow man. This is like spoon feeding
Thanks a lot
Click to expand...
Click to collapse
Well this will be big I guess. I already ran out of characters in first post.
could u also post wat languages do we need to know to start porting ? like XML etc
good job,i can not waiting to try.
Thread stuck
AacidD said:
could u also post wat languages do we need to know to start porting ? like XML etc
Click to expand...
Click to collapse
Well you don t need much prerequisite. Yeah XML would be good. The basics of it.
dhirend_6d said:
<QUOTE SNIPPED>
Click to expand...
Click to collapse
AWESOME!!
Really nice work, I would never have the patience to do sth. like this.
One thing I noticed in your APK Multitool picture though is, that the compression level is set to 9. That never worked for me while editing system apks, I think it is better to set it to 0.
Ghost In The Ruins said:
Really nice work, I would never have the patience to do sth. like this.
One thing I noticed in your APK Multitool picture though is, that the compression level is set to 9. That never worked for me while editing system apks, I think it is better to set it to 0.
Click to expand...
Click to collapse
Thanks. Actually, it should work though. What I do in the end is extract the resources.arsc from the .apk in the end and then again place it in the .apk using WinRAR with compression level "Store". So only the PNGs remain compressed.
dhirend_6d said:
Thanks. Actually, it should work though. What I do in the end is extract the resources.arsc from the .apk in the end and then again place it in the .apk using WinRAR with compression level "Store". So only the PNGs remain compressed.
Click to expand...
Click to collapse
Never thought of it doing it this way. I usually use different apk tool versions, one for decompiling and one for compiling. Took ages to get it work that way ^^
Compiling really should be the next part of your tutorial, it was always the most frustating thing to me and I imagine newbies might feel the same way.
Anyway, keep up the good work
Hi, I see a different picture in APK Multi-Tool, may be it's the problem of version, right?and can you tell me what's wrong after I selected Option 11?
(Sorry, I can't attach a picture like you...)
Arlisdoder said:
Hi, I see a different picture in APK Multi-Tool, may be it's the problem of version, right?and can you tell me what's wrong after I selected Option 11?
(Sorry, I can't attach a picture like you...)
Click to expand...
Click to collapse
Yep, different version. Something is wrong with your project. Most likely a .9.png is wrong formated. Check your log. There should be dozens of public.xml and language errors. You can ignore these. On top of these there should be the real problem. "*.9.png malformed" or something like this.
Arlisdoder said:
Hi, I see a different picture in APK Multi-Tool, may be it's the problem of version, right?and can you tell me what's wrong after I selected Option 11?
(Sorry, I can't attach a picture like you...)
Click to expand...
Click to collapse
I don t know which version of APKMultitool you are using. That s very different layout. But check the log that is there in APKManager folder. If you could attach the log then maybe I could say what the problem is.
EDIT : - Mot probably it is .9.PNG error as said by GhostInTheRuins above.
OK, now I attach my log and hope you can tell me what problem it is. Thanks.
I made some changes to my SystemUI.apk, and I pushed it back, then rebooted, only to find my status bar had disappeared.
So, I restored to my backup, and made 4 copies of the SystemUI.apk to try to find out where the problem lay.
Copy 1: No change
Copy 2: Decompiled and Compiled with apktool. No other change.
Copy 3: Decompiled with apktool. Changed one png. Compiled with apktool
Copy 4: Decompiled with apktool. Edited text in strings.xml and changed a few colours. Compiled with apktool.
Out of these 4, only the first one worked. The rest had my status bar gone. Hence I have arrived at the conclusion that something had gone wrong in either the compiling or decompiling stages. I didn't sign the apk because I read that system apps should not be signed.
Just to make sure, these were the steps I took.
1. Retrieve SystemUI.apk, framework-res.apk, and SemcGenericUxpRes.apk
2. Install frameworks with apktool
3. Decompile SystemUI.apk
4. Make any changes
5. Compile
6. Place on SD card
7. Change \system\ to be RW
8. Copy SystemUI.apk from sd card, and overwrite the one in \system\app
9. Ensure permissions are set to rw-r-r (644)
I have not much idea what else could have gone wrong, but then again, I'm just a newbie who follows others' guides and might have missed out on doing something. Perhaps some kind soul would be able to point that out?
Well, apktool is using smali/baksmali to compile/decompile classes.dex/apk_name.odex file.
The problem can occur when you use different baksmali version when you decompile and also not the right version to compile (as the system expects it to be). You can also experience issues if the apk is not zipaligned properly (check down who to do that)
apktool has the smali/baksmali code inside it so you will need to get the newest version for it for JB for example.
You can check why the status bar is not there when you monitor the logcat and look for DEX related logs in the beginning.
You can also use smali/baksmali on your own: http://code.google.com/p/smali/wiki/DeodexInstructions
and just place the generated classes.dex in the apk
then zipalign -f 4 filein.apk fileout.apk (http://developer.android.com/tools/help/zipalign.html)
then push back fileout.apk (sytemui.apk in your case)
I've been looking for ways on how to customize our carrier label but found none. Fortunately, I've found this great thread http://forum.xda-developers.com/showthread.php?t=1570956 which gave me the idea so I started modifying my device and I was able to customize it, so I decided to share it with you guys since this site has been a great help for a beginner like me. So here's how:
Requirements
1. Apktool
2. Notepad++ or any xml editor
**Since modifying this is so complicated, I attached the edited xml which will replace your current xmls.**
Download the attached zip and extract it.
Open strings.xml and find this line (its in the endline )
<string name="iamLinker">InsertYourTextHere</string>
change the text in red font to your desired text and save
Extract your SystemUI
move the following xmls to /res/layout -- look for layout-ldpi as well
status_bar_expanded.xml
tw_status_bar_expanded.xml
tw_status_bar_expanded_dual.xml
move the following xmls to /res/values
strings.xml
styles.xml
recompile and push the modified SystemUI.apk
then reboot.
And that's it! Don't forget to hit thanks if this helps!
emmantot said:
I've been looking for ways on how to customize our carrier label but found none. Fortunately, I've found this great thread http://forum.xda-developers.com/showthread.php?t=1570956 which gave me the idea so I started modifying my device and I was able to customize it, so I decided to share it with you guys since this site has been a great help for a beginner like me. So here's how:
Requirements
1. Apktool
2. Notepad++ or any xml editor
**Since modifying this is so complicated, I attached the edited xml which will replace your current xmls.**
Download the attached zip and extract it.
Open strings.xml and find this line (its in the endline )
<string name="iamLinker">InsertYourTextHere</string>
change the text in red font to your desired text and save
Extract your SystemUI
move the following xmls to /res/layout -- look for layout-ldpi as well
status_bar_expanded.xml
tw_status_bar_expanded.xml
tw_status_bar_expanded_dual.xml
move the following xmls to /res/values
strings.xml
styles.xml
recompile and push the modified SystemUI.apk
then reboot.
And that's it! Don't forget to hit thanks if this helps!
Click to expand...
Click to collapse
Really nice ... but this is the wrong place to post.
Please move this to the Galaxy Star General forum.