So you want to edit xml's or more... an ADB. APK Manager How-To (Basics)

powder

Member
Joined
Dec 29, 2009
Messages
73
Reaction score
0
Location
the evergreen state
Yeah you get better error descriptions with eclipse imo, so i prefer to use it to compile the .9's. APK Manager is better for xml's for me, because eclipse doesn't seem to like single xml's most of the time. It wants to see a package so it can tell you if all of your paths are right.
 

YankInDaSouth

Theme Developer
Theme Developer
Joined
Jul 8, 2010
Messages
3,186
Reaction score
370
Location
Sharpsburg, GA
Website
www.wix.com
Yeah you get better error descriptions with eclipse imo, so i prefer to use it to compile the .9's. APK Manager is better for xml's for me, because eclipse doesn't seem to like single xml's most of the time. It wants to see a package so it can tell you if all of your paths are right.

Yeah, I agree about the error info in eclipse too. I never did try it to compile an xml though, I've always stuck with apk manager.

OK, so I guess it's not that unorthodox then :D I just never recall seeing eclipse mentioned to compile the .9's ... thought I'd throw my 2 cents in. I'll crawl back in my hole now :laugh:
 

powder

Member
Joined
Dec 29, 2009
Messages
73
Reaction score
0
Location
the evergreen state
I've successfully compiled a couple single xml's with eclipse, but it's very hit and miss. I still try it occasionally though, just to be a rebel or something lol.
 

YankInDaSouth

Theme Developer
Theme Developer
Joined
Jul 8, 2010
Messages
3,186
Reaction score
370
Location
Sharpsburg, GA
Website
www.wix.com
I've successfully compiled a couple single xml's with eclipse, but it's very hit and miss. I still try it occasionally though, just to be a rebel or something lol.

Well, xml's are still a little iffy for me ... I think I'll stick with apk manager :) Not ready to be a rebel just yet! lol
 

droidx8791

Member
Theme Developer
Joined
Dec 11, 2010
Messages
188
Reaction score
0
Location
South Georgia
Help

Would someone please do this one favor for me I'll be willing to pay a fee to do this so i can see the way it should be done and i can hopefully go from there? I'm not sure I'm editing the xml correctly to give the right path for android to find it. I'm trying to change the transparent background in the contacts apk for the ultimate droid theme for Liberty Rom. Any takers?
 

pistol_pete

Member
Joined
Mar 7, 2010
Messages
375
Reaction score
0
Would someone please do this one favor for me I'll be willing to pay a fee to do this so i can see the way it should be done and i can hopefully go from there? I'm not sure I'm editing the xml correctly to give the right path for android to find it. I'm trying to change the transparent background in the contacts apk for the ultimate droid theme for Liberty Rom. Any takers?

Read the last 2 posts HERE.

Then you need to add a background into the drawable-hdpi folder for it to pull up. Has to be named custom_background_dialer.png
 
Last edited:
OP
xkape

xkape

Premium Member
Premium Member
Theme Developer
Joined
Jul 27, 2010
Messages
3,882
Reaction score
37
Location
OH-IO
If liberty uses the alternate contacts, forget what its called, that dang thing refuses to accept anything but the black background. I have tried themeing every part of that thing i can think of with no luck.
 

droidx8791

Member
Theme Developer
Joined
Dec 11, 2010
Messages
188
Reaction score
0
Location
South Georgia
Pete that's the posts I was following but it says @ drawable. It doesn't need to say @ drawable hdpi finger? Cause that's where its at. Just wondering.

Sent from my DROIDX using DroidForums App
 

pistol_pete

Member
Joined
Mar 7, 2010
Messages
375
Reaction score
0
I modded mine just like it shows. And you're right it is in the drawable-hdpi-finger folder, but it reads it out of there.
 

powder

Member
Joined
Dec 29, 2009
Messages
73
Reaction score
0
Location
the evergreen state
Anything cool going on here? I've been working on a theme chooser theme for cm7. Had to create a few smali files and redo a few xml's from cyanbread. Gonna throw it in eclipse tomorrow morn and see if it will compile.
 
Joined
Feb 10, 2011
Messages
110
Reaction score
0
Location
Las Vegas
Since I see a lot of people trying to figure out how to get into theming and such, might as well share my knowledge...

I would also like to thank Devildog8791 and say that he went thru and added a lot to this via PM (which I then pasted here). He also made it a lot more detailed and easier to follow along for everyone..yes, even noobs... :)


Things you will need:

-APK Manager located here. It is the one from post #226. It uses apktool version 1.3.1 instead of the newest one, 1.3.2. The new version has some bugs that have not been worked out yet.
-Android SDK located here. There are two different files for Windows: a zip file and an .exe file. I downloaded the zip file, but you can try the .exe file.
-7zip located here. Make sure you pick the right installation for your setup (32-bit or 64-bit)
-Java JDK located here. Make sure you pick the right installation for your setup (32-bit or 64-bit)

Before I begin, please keep in mind that this is just how I did it. Maybe it's perfect, maybe its wrong, BUT... it worked for me.

NOTE: PLEASE READ THIS
Unless you are going to be pushing apks to your phone or pulling them directly from the phone, you do NOT need to bother with steps 3-6 and 9-11. You also only need to add the Java stuff to your Environment Variables.

OK here is how I set all this up and in the order that I did it.




1) Install the Java JDK. You probably don't need to, but I rebooted after the installation was complete.
2) Install 7zip.
3) Extract the android SDK file and move the extracted folder to the root of the C: drive. I renamed the folder "androidsdk", but you can rename it whatever you want. On my computer, the SDK is at C:/androidsdk (whatever you name this and anything in its filepath, make sure there are NO SPACES).
4) Go into your sdk folder and run "SDK Manager".
5) When the "Android SDK and AVD Manager" screen opens up, select "Available packages". Select the packages you want to install and click on "Install Selected". If the "Choose Packages to Install" screen comes up automatically, then select "Accept All" and click "Install". This will take a few minutes. Go ahead and get a drink and stretch your legs.
6) When your packages get done downloading and installing, close the "Installing Archives" and the "Android SDK and AVD Manager" screens.
7) Extract the APK Manager zip file and move the extracted folder to your user file. Mine is located at C:\Users\Tim\apk_manager_4.9.
8) Now you need to set your environment variables. To do this, click on "Start" and then right click on "Computer". Left Click "Properties" and in the left pane you will see "Advanced system settings". Click on that and it will open up a new window called "System Properties". Click on "Environment Variables" at the bottom of the screen.
9) Now that you are in the Environment Variables screen, you want to look at the top part of the screen first. Under "User variables for <your name here>", click on "New...".
10) In the "Variable name" section, type in ADB.
11) In the "Variable Value" section, type in C:\androidsdk\platform-tools\adb.
12) Now go to the bottom part of the screen and find "Path" on the left side under "Variable".
13) Double-click that "Path" section and it will bring up the edit screen.
14) Go to the end of the "Variable value" section and add the following: ;C:\Program Files\Java\jre6\bin;C:\Program Files\Java\jdk1.6.0_23\bin;C:\androidsdk;C:\androi dsdk\platform-tools;C:\androidsdk\tools. Verify that the bin file locations for java are in the same place as indicated here. They should be the same, but check it to be safe. Also, don't forget to change the name to whatever you named your sdk folder. One last thing is to make sure you have a semi-colon in between each path as indicated.
15) Click "OK" when done and close all the windows.
16) Reboot your computer.

Now that you have your environment variables set, you should be good to go to use APK Manager. One thing that you might have to do is set up your adb drivers for your phone. I have a Droid Incredible and I went to this site to get mine set up. If you have a Motorola Droid 1 (which most on this site do), then it should set up with the proper drivers when you plug it in the computer. My wife has a Droid 1 and that is what happened for me.

So, now you have 7zip, SDK, Java and APK Manager installed, setup and ready to use. Fantasmagorical!

Great, now, what the hell do you do with it...lol

1) You decide on an apk file (let's choose phone.apk) to use. You can grab it from the stock ROM your using, pull it off your phone, whatever...
2) Now that it is on your computer, move it into the APK Manager's "place-apk-here-for-modding" folder.
3) Run the script.bat and select option 22. Then choose the apk (project) you want to work with.
4) Now select option 9 to decompile the apk.
5) Once that's done select option 11 to recompile the apk. If it asks you if it's a system app (y/n) then you are in business. If it says there is an error, it is most likely that the apk has some .9.png images without guides. If this occurs, grab the stock images and stick them in by using 7zip and choose "open archive".
6) OK, so it works fine, now what? Just choose "N" and when it's done, go to the "place-apk-here-for-modding" folder and delete the "unsignedphone.apk" file.
7) Now go back to the script and choose option 9 to decompile again.
8) Once it's decompiled, navigate to the "projects" folder and go into the phone.apk folder.
9) Make all your xml edits.
10) Now, go back to the script and choose option 11. Choose "Y" and then choose "Y" again.
11) Now, go into the "KEEP" folder and delete the resources.arsc file and also delete every single xml you edited. Then go back to the script and "press any button to continue".
12) Once that is done, you are done. Go into the "place-apk-here-for-modding" folder and you will see an unsignedphone.apk file.
13) Put it in an update.zip that you can install to your phone and then rename it to phone.apk.
14) If you are wanting to now stick your own images in, use 7zip and select "open archive" and then drag your images into the proper folders.
15) Close 7zip and select "yes" to the box that pops up.
16) Now you are ready. Move the zip file to your phone, reboot into recovery and install it.

Okay I get it for the most part but I just don't know if when you are typing in the variable value is it supposed to be "Program Files" or "ProgramFiles"?

Sent from my M860 using DroidForums App
 

Devildog8791

Theme Developer
Theme Developer
Joined
Sep 17, 2010
Messages
142
Reaction score
0
Okay I get it for the most part but I just don't know if when you are typing in the variable value is it supposed to be "Program Files" or "ProgramFiles"?

Sent from my M860 using DroidForums App

I just copied and pasted the path, but it needs to be "Program Files". You are in Windows, right?
 
Top