Good APK Modification Tutorial? - General Questions and Answers

Hey Everyone,
I'm looking to get back into de-compiling, modifying, and recompiling APKs again (after many many years) and I'm finding it a bit difficult this time around. For starters, why are there so many "drawable-xxxx" folders now and how do I know which folder to modify the .png files that I want to customize? Also, how do I go about modifying the .xml file for an app to change the font color/style, theme, etc.?
Does anyone know of a good resource to refresh my memory on all of this?
Thanks for the help!

BMWPower06 said:
Hey Everyone,
I'm looking to get back into de-compiling, modifying, and recompiling APKs again (after many many years) and I'm finding it a bit difficult this time around. For starters, why are there so many "drawable-xxxx" folders now and how do I know which folder to modify the .png files that I want to customize? Also, how do I go about modifying the .xml file for an app to change the font color/style, theme, etc.?
Does anyone know of a good resource to refresh my memory on all of this?
Thanks for the help!
Click to expand...
Click to collapse
Hi,
I've made some, I don't claim they're the best or something, but I think it's a good place to start.
For everything I could think of: [GUIDE][INDEX]How to modify an apk
For colors and png:
[GUIDE][THEMING]How to find in the code what you want to theme
[THEME & GUIDE][XDA]XDA Reloaded
My last guide was the INDEX, in previous guides I use methods to sign or align apks that I don't really recommend anymore. Read the index first for signing and aligning, then other guides
I also have made themes, the link is in my signature, click it to see

Related

Making your own mods

ok im sorry if this is posted i have been looking all day on XDA and other forums nothing so far. im trying to learn how to make my own mods im not looking for a step by step guide but more a point in the right direction to some of the programs that are used maybe the file names and types (i have my own image editing program) just looking for a little help i guess. i am trying to make my own slider right now if you have any useful tips or anything please help me out thanks in advance
So you are looking to modify the images? If so this is not so much a mod but a theme. Changing the graphics is one thing but to make an actual mod like Cookies HomeTab or MaxSense, takes modding the actual file structure and the writing of code.
So if you are looking to just modify the graphics and theme of the phone look into modifying manila graphics. You want a program like CFC_GUI. This will allow you to download the manila image files and see there size and upload your own. You will still need something like GIMP or Photoshop to make your own image into a png of the proper size. You can also use a program called Mode9 to resize the size of the image allowed in a certain spot or even it's location all together. There are other things you can do and this would be getting more into modifying manila.
thank you! yeah im more thinking about themes i will let the pros handle the heavy stuff i have photoshop and Jasc PSP so thanks this was a lot of help i will look for that program.
Here is a post that gives a pretty good description on how to edit the graphics.
Post of other thread

Theming question...

So I'm getting the hang on some basic theming and just had a question that I'm not completely sure about.
In most of the res folders, you have several different folders that contain images.
Can someone explain to me the difference between some of these folders? The ones I'm asking about are drawable and drawable-hdpi.
Any help will be greatly appreciated...
hacku said:
So I'm getting the hang on some basic theming and just had a question that I'm not completely sure about.
In most of the res folders, you have several different folders that contain images.
Can someone explain to me the difference between some of these folders? The ones I'm asking about are drawable and drawable-hdpi.
Any help will be greatly appreciated...
Click to expand...
Click to collapse
dont quote me, but from what i gather its for different phones that use different resolutions. Our phone used the hdpi folders but on occasion it may pull an image from the plain drawable folder. I read somewhere that the galaxy s currently uses the mdpi. I have yet needed to change one of those images.
Stick to hdpi, and if after you put the apk on your phone, an image is still stock then hunt in the drawable.
hope that helps.
bad4u6669 said:
dont quote me, but from what i gather its for different phones that use different resolutions. Our phone used the hdpi folders but on occasion it may pull an image from the plain drawable folder. I read somewhere that the galaxy s currently uses the mdpi. I have yet needed to change one of those images.
Stick to hdpi, and if after you put the apk on your phone, an image is still stock then hunt in the drawable.
hope that helps.
Click to expand...
Click to collapse
That's what I figured and just wanted to some clarification. Thanks...

[Q] Handcent Skin Packs

So now that Handcent has released skin packs I've been trying to find a way to basically rip open the skinpack APK and replace the images and whatnot to create my own skins. I haven't found a solution thus far and I was hoping the experts here could help me out. I've opened it up in APK Edit and attempted to swap images but it won't install. I'm not sure where I went wrong but I'm curious on how one of you would approach the process.
I assumed APK Edit would resign the *.apk file but maybe that's what I'm missing. I'll keep pecking away at it and see what I can come up with but any assistance would be aweome.
Hi
Any news on this? Would really like to see some Custom skins soon.. and the ability to create own... and customize for example the popup and such
Bump for interest
Kyo Kenshin said:
So now that Handcent has released skin packs I've been trying to find a way to basically rip open the skinpack APK and replace the images and whatnot to create my own skins. I haven't found a solution thus far and I was hoping the experts here could help me out. I've opened it up in APK Edit and attempted to swap images but it won't install. I'm not sure where I went wrong but I'm curious on how one of you would approach the process.
I assumed APK Edit would resign the *.apk file but maybe that's what I'm missing. I'll keep pecking away at it and see what I can come up with but any assistance would be aweome.
Click to expand...
Click to collapse
Try MetaMorph
http://code.google.com/p/android-metamorph/wiki/MetaMorph

Change the default orange highlight color

Android seems to prefer orange color. It's used in highlight focused edit control. Also, in Gingerbread it's used to indicate you scroll to top/bottom.
How do I change the color, I really don't like it and want something bluish.
Thanks!
I have been wondering this for a while too! Anyone know?
Would interrest me too...
No one knows???
List selector resource ... but it is in the os applications which you cannot access without rout access
I have root but don't completely understand what u mean. Could you add a little detail please
Thanks in advance
From what I know resource are located in /system/framework/framework-res.apk.
Now you have to Disassemble this apk , modify the png's you are interested in , reassemble the apk an copy back to phone.
Now .. disassemble/assemble you can use apk-tool.
You should search for list_selector_background_focus.9.png and other list_selector....png modify those .
I don't know how to copy the reassembled apk back to the phone as I don't have a rooted phone and can't guarantee it will work, but if there are no other replies from more experienced users ... you can give it a try
Youll find the images in framework-res.apk/res/drawable-mdpi.
If your new to Modding and the like I'd advise apk-manager.It uses apk-tool but is more user friendly and will allow you to push(copy) the edited framework. There's a link for it in my sig.
Hope this helps.
Find a ROM, metamorph or Theme you like and apply it. Quickest and easiest solution!

Themed Calendar

I really didn't like that wooden calendar and it's colors, so I changed it a little bit.
There is only one color that I couldn't find. (picture number 2)
Special Thanks to biopsin for helping me to build this,
and thanks to cheatman for looking in to it.
If you want to try it, just download the zip file and flash it via recovery.
Does anyone know why I can't change those colors?
Hey guy,
I'm sorry but I can't help you. But i like your app. Please don't give up!
odysseus84 said:
Hey guy,
I'm sorry but I can't help you. But i like your app. Please don't give up!
Click to expand...
Click to collapse
I'm trying, but I haven't found a way to edit that xml. I don't have any problem
with other xmls but this one... I don't know what's wrong.
Looks like some great work there mate. As for your odd xml file problem, I'm not sure there's much you can do. I've had problems like that with a couple of apk's and I've never found a reliable fix. Sorry
Decompile the apk using apktool or apkmanager .... n den edit the xml....n compile agn
Sent from my GT-P1000 using XDA Premium App
agc93 said:
Looks like some great work there mate. As for your odd xml file problem, I'm not sure there's much you can do. I've had problems like that with a couple of apk's and I've never found a reliable fix. Sorry
Click to expand...
Click to collapse
Yeah, I've had this problem before with a framework.
Thats a nice theme. The wooden calendar wasnt really bad, but your theme makes it really nice!
I realy like your theme. The contacts.apk and the phone.apk are "woody ugly" too. Would you theme theese apps too?
Can you post your said XML alone as an attachment (the already modified and original)? I'd like to take a look at it.
As some resources (files in the /res folder) are shared between apps through the framework, changing anything shared might result in an inconsistency and FC the app.
A workaround might be to completely decompile the framework as a dependency and modify it there. It would result in a more dramatic change, but it would cross over to other apps such as the contacts, dialer and calendar simultaneously.
PS: this also applies to the browser, email app, contacts and so on, depending on what you change.
cheatman said:
completely decompile the framework as a dependency and modify it there.
Click to expand...
Click to collapse
but How?
by using what software?
I face similar issue and tried with apktool and apkmanager with no hope.
Would u give me a hand?
odysseus84 said:
I realy like your theme. The contacts.apk and the phone.apk are "woody ugly" too. Would you theme theese apps too?
Click to expand...
Click to collapse
I've already woked on both of them, you can find them in Themes and Apps section.
cheatman said:
Can you post your said XML alone as an attachment (the already modified and original)? I'd like to take a look at it.
As some resources (files in the /res folder) are shared between apps through the framework, changing anything shared might result in an inconsistency and FC the app.
A workaround might be to completely decompile the framework as a dependency and modify it there. It would result in a more dramatic change, but it would cross over to other apps such as the contacts, dialer and calendar simultaneously.
PS: this also applies to the browser, email app, contacts and so on, depending on what you change.
Click to expand...
Click to collapse
So there are lots of things that should be checked.
I uploded the xml here. There are 3 colors in this xml and I can't change any of
them. The xml is in layout folder and there is another xml with the same name in
layout-land folder. I've tried working on this one as well but the result is the
same as the other one.
Anyway, thanks for looking in to it, mate.
sohrab1985 said:
I've already woked on both of them, you can find them in Themes and Apps section.
Click to expand...
Click to collapse
Yes, i know that. They are nice but they don't look as good as the calendar (cause blue). Maybe you can change the colours to a few dark colours like your calendar (it's perfect for Meizu's Dark Theme)
What ever is come... thanks for your work
Sent from my GT-P1000 using Tapatalk
odysseus84 said:
Yes, i know that. They are nice but they don't look as good as the calendar (cause blue). Maybe you can change the colours to a few dark colours like your calendar (it's perfect for Meizu's Dark Theme)
What ever is come... thanks for your work
Sent from my GT-P1000 using Tapatalk
Click to expand...
Click to collapse
I see what I can do.
Ok, in the XML I can see you have three variations of brown/orange. Judging by the colors, I suspect this is the default XML, before editing it.
The colors are #ffbe801d, #ffede3c2 and #ff503200. What values are you trying to set instead of these? What I mean is, how EXACTLY are you replacing the actual text in the XML:
#ffbe801d becomes: ???
#ffede3c2 becomes: ???
#ff503200 becomes: ???
This is important as the color representation is not the basic HEX code encountered in regular web dev (for example). It's a 16-bit hex representation with alpha. The first two elements (ff) stand for 100% opacity.
C.
cheatman said:
Ok, in the XML I can see you have three variations of brown/orange. Judging by the colors, I suspect this is the default XML, before editing it.
The colors are #ffbe801d, #ffede3c2 and #ff503200. What values are you trying to set instead of these? What I mean is, how EXACTLY are you replacing the actual text in the XML:
#ffbe801d becomes: ???
#ffede3c2 becomes: ???
#ff503200 becomes: ???
This is important as the color representation is not the basic HEX code encountered in regular web dev (for example). It's a 16-bit hex representation with alpha. The first two elements (ff) stand for 100% opacity.
C.
Click to expand...
Click to collapse
Yeah, that's right, this is the default xml.
I edit the xml same as other xmls which I edit without any problem, I just open
the xml in a text file and change the value I want to edit and then I save it and
after that I compile it with Apk Manager.
I just want to change them to something like gray, for example I want to change
#ffbe801d to #ff787878 and #ffede3c2 to #ffbcbcbc. It dosen't matter if they
are not exactly these colors, like I said before I just want to make them gray
For the third one, I don't think it changes those two colors that I want to change.
Btw, thanks for helping.
Well, I've looked into it and I can:
1. Fully Decompile the APK. It doesn't need any shared resources from external packages.
2. Edit the XMLs accordingly. I have also seen that you were very thorough in your theme creation process.
It's all good apparently, however, I am unable to recompile everything back. The APK tool reports some missing resources. For some reason, there is a dependency that is not satisfied, although the package decompiles correctly (I have never seen a similar package before).
I'll have to scour some Google documentation before I'll come up with a relevant result, so it may take a while. I'm not gonna let it fly, though. The entire process should be plain smooth and must be doable anyway.
Hi
I have no issues bulding the calendar. If u send me your edited files i can try build it for you..also chech if apktool is up to date, using older ver. will hand out errors..
Edit
Tested these colors
#ffbe801d becomes: ff6090bf
#ffede3c2 becomes: ff9198b1
#ff503200 becomes: ff001d50
ref. : http://www.color-hex.com/
and it builded ok
Sent from my GT-P1000 using XDA Premium App
cheatman said:
Well, I've looked into it and I can:
1. Fully Decompile the APK. It doesn't need any shared resources from external packages.
2. Edit the XMLs accordingly. I have also seen that you were very thorough in your theme creation process.
It's all good apparently, however, I am unable to recompile everything back. The APK tool reports some missing resources. For some reason, there is a dependency that is not satisfied, although the package decompiles correctly (I have never seen a similar package before).
I'll have to scour some Google documentation before I'll come up with a relevant result, so it may take a while. I'm not gonna let it fly, though. The entire process should be plain smooth and must be doable anyway.
Click to expand...
Click to collapse
I'm sorry for putting you throurgh all of this, it's not really a big deal, mate.

Categories

Resources