[Q] Help with a theming issue - Droid 2 Themes and Apps

Im trying to start theming, as i have only been in the android club for about a month. The issue im having is with xml files. Everywhere i read, its like, open in notepad to edit. I open them in notepad and all i get is a bunch of gibberish symbols and letters. Is there any special way that i need to use to edit xml files?
Any help is appreciated, Thanks.
Sorry if this is a repeat, used the search but not in depth, so please dont flame.

I spent a long time searching for how to do this as well. Easiest way is to use APK manager.
Go download it from here: http://forum.xda-developers.com/showthread.php?t=695701
Basically you put the apk you want to edit into the edit folder and decompile it. Then go into the projects folder and the xml files created will be readable. Edit them using textpad, notepad, w/e you want. Once you are done load apk manager backup, select the same project and then compile the apk. Thats the gist of it, its a tiny bit more complex but you should get it after trying it. Also if you are looking to edit something like services.jar I found you can rename it to services.apk and it will decompile the smali for you so it can be edited. Just play around with APK manager and it should do everything you will need.

sweet, thanks for the help. hopefully ill have a nice theme on here in a couple weeks. thanks

yeah, if you want a full look into any apk you're going to have to decompile it unless you know what you're looking for in the hex of a compiled xml... also with a decompiled apk you can see alot of stuff such as how the .9 borders (or what ever you wanna call em) are done so make sure they stretch the same way

Related

editing 9.pngs

ok so i did a lil reading after trying to alter the 9.pngs i would get force closes on my phone i take it this is cause i didn't edit these properly with the correct editor .....is there any 9.pngs i can alter without eclipse ????
i know i did it before but now i just get alot of fc ..and reboots if i try to alter ......
i've always modified roms to my liking so i could use any advice i can get from you themers out there that know what there doing ....
thanks in advance
No, you do not have to use Eclipse.
If you modify the PNG files you will need to compile them, you can use the APKmanager program to do this. I had problems and so I used Eclipse.
Can you give and over view of the step you are taking when you edit your PNGs, what program(s) and then how you are placing them back into your APK or back on your device.
i'm just using paint.net program on my cp to alter all the framework pngs .....but i guess i didn't realise about the 9.png's ....what would be easier to alter the 9.pngs eclipse or apkmanager
Have a look at this thread, which I think maybe you already have.
http://forum.xda-developers.com/showthread.php?t=1008695
The first and second post have a document to read and then later down in the thread is a write up about 9.png.
If you load the Android SDK, there is a tool, draw9patch, that will let you edit the PNGs to make them into 9.png files.
If you are just editing PNG files and then do not need to be 9.png then I think any software can be used for editing.

You're all going to hate me, but how do I go about creating a CM7 Theme?

I looked around and found a whole lot of nothing.
halp
Re
To create a theme your going to want to edit the visual ui of the phone. A good place to start is the systemui.apk and the main theme of the phone, in cm7's case, the cyanbread and system themes witch you can also find in system/app. Bassically with the systemui.apk and theme you are editing of your choice will be the finished product if your just starting, making a theme from scratch is a bit more complicated. As for boot animations that I believed is located in data/local and fonts should be in a folder for them selves I cannot think of the topr off of the top of my head but it is easy to identify I'm sure.
the way I edit and make themes is use the above apk's and just go crazy with transparencys and colors in gimp. Be in mind your going to need a Linux based os to edit the apks and place and take them from your zip rom your theming. I also think ther might be a apks editor for windows but idk what it is called.
Re
To create a theme your going to want to edit the visual ui of the phone. A good place to start is the systemui.apk and the main theme of the phone, in cm7's case, the cyanbread and system themes witch you can also find in system/app. Bassically with the systemui.apk and theme you are editing of your choice will be the finished product if your just starting, making a theme from scratch is a bit more complicated. As for boot animations that I believed is located in data/local and fonts should be in a folder for them selves I cannot think of the the closer off of the top of my head but it is easy to identify I'm sure.
the way I edit and make themes is use the above apk's and just go crazy with transparencys and colors in gimp. Be in mind your going to need a Linux based is to edit the apks and place and take them from your zip Tom your theming. I also think there might be a apks editor for windows but idk what it is called.
ya you are going to need to have the android sdk setup for the ADB and then you will use something like apk manager for pulling, extracting, decompiling, image edits, or xml edits which you can find here:
http://forum.xda-developers.com/showthread.php?t=695701
you will need the SDK setup first
which can be found here:
http://forum.xda-developers.com/showthread.php?t=834748
and here
http://developer.android.com/sdk/index.html
then you need to know simple ADB commands like:
"adb pull /system/app/Mms.apk" and push command which is "adb push Mms.apk /system/app/"
more commands here:
http://developer.android.com/guide/developing/tools/adb.html
and
http://androidforums.com/evo-4g-all-things-root/187820-how-adb-commands.html
it is also a GOOD idea to learn to use Eclipse for the compiling of the .9.png files which cannot be just simply edited and saved like a normal .png file can.
NOTE: the best way to edit the .9.png files are going to be with the Draw9Patch tool that is included in the SDK and draw the black lines (guides) this is located in the tools folder and then you use Eclipse to compile .. get rid of the black lines pretty much.
info about the .9.png can be found here:
http://forum.xda-developers.com/showthread.php?t=487001
info for eclipse, like how to set it up and download it is here:
http://developer.android.com/sdk/eclipse-adt.html#installing
does say to use the classic version of Eclipse.
once you have all of that figured out then you are pretty good. But there are other stuff to learn to like the programs themselves and stuff .. you will have to look on Google a lot .. I know that there isnt anything much there about any of this stuff .. I kid you not .. it took me a good 2 days to figure out how to use the apk manager and eclipse and how to alter the .9.png files. That was from getting bits and pieces off the web and a lot of trial and error .. the support around here sucks so dont expect much.
there is also a video that shows you how to setup the sdk along with the eclipse that is here
http://www.youtube.com/watch?v=OIL1UouA4dE
just use the previous links above to get the stuff like the sdk is at version 10 now and then the Eclipse Classic.
If this is too much for you to do and figure out then you are out of luck.
Yeah, I've used ADB and Eclipse before. I'm quite ****e at Eclipse, but I guess I could mozy around a bit and see if I could get the hang of it enough to do themes. I'm really eager to do that stuff.
Anyway, is there anything I'll have to look out for in regards to turning my phone into a lovely paperweight?
wauterboi said:
Yeah, I've used ADB and Eclipse before. I'm quite ****e at Eclipse, but I guess I could mozy around a bit and see if I could get the hang of it enough to do themes. I'm really eager to do that stuff.
Anyway, is there anything I'll have to look out for in regards to turning my phone into a lovely paperweight?
Click to expand...
Click to collapse
eh nothing that I have come across or know about.
so if you know ADB and a little with eclipse . what exactly are you trying to figure out?
Right now I'm trying to figure out how to open the APK. I used WinRAR to open the file and now when I try to open it in Eclipse, it just opens WinRAR. >_>
wauterboi said:
Right now I'm trying to figure out how to open the APK. I used WinRAR to open the file and now when I try to open it in Eclipse, it just opens WinRAR. >_>
Click to expand...
Click to collapse
the easiest and the best method is to use that apk manager that I linked in there and use that to extract the apk after you pull it from the phone using ADB
I usually use the adb pull /data/app and adb pull system/app to get all the apk files out at the same time.
after they are out you will put the ones you want to alter (up to 10 at a time) into the place apk here for modding folder and then open apk manager terminal ..
1) type 22 to select the apk that you want to mod.
2) then you will type 1 to extract it.
3) then you can go to the projects folder to see the extracted apk contents.
- usually the images that you want to alter will be in the res/drawable or the
res/drawable-hdpi or res/rawable-hdpi longfinger
- also some of the apps that do not use the .9.png files you will have to find
the image in two folders ... one for portrait mode and landscape mode.
alter the images you want and put them in the original folder.
4) then you will optimize the images which is option number 2.
5) then you will sign the apk which is number 3.
- if it is a system app select the correct option
6) then you will see an unsignedsomething.apk in the place apk here for modding.
7) to sign the apk you will hit number 4.
8) and then number 5 to zipalign the apk.
when you go back to your place apk here for maodding folder you will see that the unsignedsomething.apk is now signedsomething.apk
then you will push that to your phone using the adb/push something.apk /sdcard
then simply install the apk from the phone ... may have to uninstall the original app first.
winrar will not open the apk .. 7zip will . but i rarely use this as I cannot see the thumbnails for the images and cannot optimize the apk with it or anything else for that matter.
Here is a link to the wiki for the T-Mobile Theme Engine.
http://code.google.com/p/tmobile-themes/w/list

Help with skins

If I want to use the rosie from one skin, and the lockring from another, etc., do I have to decompile all the apk's or can I just move these things around with a file explorer? Also when I tried to decompile the base skin from here http://forum.xda-developers.com/showthread.php?t=1144572 I get a bunch of errors?? I was using apk manager and honestly don't know wtf I'm doing, but I wanted to try. I haven't found a noobish enough tutorial for this stuff. Any help/ advice would be greatly appreciated.
You can usually move the .pngs around however you want without using any apk manager. Just use 7zip on a PC or Springy on a Mac, and open the apk without extracting it. Resign it after editing, install, and you should be good to go.

[Q] Problem with SystemUI.apk/res/layout/status_bar_expanded.xml

Sorry for all the questions lately, even though I'll probably have more.
I'm working on the SystemUI.apk from IE20 and my method of compiling consists of using the keep folder method and deleting all the files I changed with apk manager 4.9.
Now I can change the Status_bar.xml and status_bar_tracking.xml without a hitch, however if I delete status_bar_expanded.xml from the keep folder (whether I change anything in it or not) I get force closes when I get it loaded onto my phone.
There's no error in the log so I'm pretty lost...So I was wondering if there's something else I have to do that anyone knows of?
Thanks if you can help!
The only thing that should be deleted are images that you edited (if you didn't edit any images just leave the folder). But if you edited ANY xml ONLY delete the resourses.arc from the keep folder. But don't delete any individual xml's from keep. And yes the size will change because of the compression used in apk mgr.
good day.
chopper the dog said:
The only thing that should be deleted are images that you edited (if you didn't edit any images just leave the folder). But if you edited ANY xml ONLY delete the resourses.arc from the keep folder. But don't delete any individual xml's from keep. And yes the size will change because of the compression used in apk mgr.
good day.
Click to expand...
Click to collapse
Thanks for the response,
However, by not deleting the xmls I edited in the keep folder it seems it just replaces them with the stock files.
Soo...This stopped the force closes, but none of my edits took.
Maybe it's time to to switch to a linux build environment...I'm frustrated to say the least. Google'd every possible problem and nothing...
EDIT: But before I do that could someone possibly try to compile this SystemUI.apk with a color edit in the res/layout/status_bar_expanded file?
Would highly appreciate this ^^^

[Q] Recompiling java files back into classes.dex then back into apk files

I used dex2jar to decompile classes.dex , and used jdgui to convert those files into java files to edit, now I don't know how to recompile back, I'm not even sure it will work properly, or at all, but worth a try, I was trying to mod the vanilla Messaging app and remove all the attachment options for videos, pictures etc. because it's a waste of space, any help?
Use baksmil n smil tool ita simple.....
don't forgot hit thanx....
Probably might not work. The java files you get aren't quite the right ones. They will give you an idea of what to edit in the smali though.
Seeing as it is the stock messaging app, you would be better to download the source of the app from AOSP, edit that and compile. As said above, dex2jar does not give perfect Java code, so even if you did recompile it, you might not get a working app.
Or you could use baksmali to decompile the app to .smali format, and then use smali to recompile after editing the .smali files (not as easy to edit as Java source files).
The Smali Files are the machine language file type thing isn't it?, I've learnt the basics at Uni (using Spim), and understand what each thing does, but as it isn't directly coded, there isn't enough comments, for me to do anything with, I need to have some kind of info about what this does and what that does.
And about AOSP, I've tried downloading the source and It should be all downloaded and I've tried compiling it for my device (Sony Ericsson Xperia Ray (ST18i, Urushi) but it always comes up with errors, so I have put that stuff aside and gone back to attempting to mod some apps (First time, newbie), but I don't know where the Messaging App would be and how to change it. Sony Ericsson have Source Code for their Stock rom right?, I have tried getting hold of that, but have no idea how to read the file, and edit it, so it's much like AOSP. How to read files and how to edit and compile them?.

Categories

Resources