1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

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

Discussion in 'Team Inversion Conversion' started by xkape, Jan 14, 2011.

  1. xkape
    Offline

    xkape Premium Member Theme Developer Premium Member

    Joined:
    Jul 27, 2010
    Messages:
    3,876
    Likes Received:
    20
    Trophy Points:
    0
    Location:
    OH-IO
    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.
    Last edited: Jan 15, 2011
  2. xkape
    Offline

    xkape Premium Member Theme Developer Premium Member

    Joined:
    Jul 27, 2010
    Messages:
    3,876
    Likes Received:
    20
    Trophy Points:
    0
    Location:
    OH-IO
    Upon rereading this.. please note that no matter what the forum decided to post as my words, in the paths, there ARE NO SPACES. and also, it's platform-tools, not.. platf rm-tools
  3. Mbk
    Offline

    Mbk Android For Life Theme Developer Premium Member

    Joined:
    May 4, 2010
    Messages:
    4,169
    Likes Received:
    4
    Trophy Points:
    0
    LOL... I think you scared everyone to death...lol...

    I think that maybe for most just the JDK, setting the path (just the path to the bin folder), and APKManager is sufficient to do most of their stuff...

    well that and as you mentioned 7Zip, and perhaps Notepad++ or Textpad to do the XML viewing and editting...

    then once they get their feet wet they can go to SDK...

    ADB is really not needed as much imho, although it's handy I guess for some, but most are rooted so they can merely just transfer them
  4. xkape
    Offline

    xkape Premium Member Theme Developer Premium Member

    Joined:
    Jul 27, 2010
    Messages:
    3,876
    Likes Received:
    20
    Trophy Points:
    0
    Location:
    OH-IO
    I agree, I never use ADB... i just stuck it in there to kind of "cover all"
  5. Mbk
    Offline

    Mbk Android For Life Theme Developer Premium Member

    Joined:
    May 4, 2010
    Messages:
    4,169
    Likes Received:
    4
    Trophy Points:
    0
    LOL... yeah, I think you frightened the crapola out of those that took a look...:icon_eek::icon_eek: ..... all of this is more than likely too daunting for many....

    maybe a guide like this but in steps?? that might not scare most so much...:)
  6. dfuser312553
    Offline

    dfuser312553 New Member

    Joined:
    Aug 27, 2010
    Messages:
    2,084
    Likes Received:
    0
    Trophy Points:
    0
    Cool guide:bling:
  7. Devildog8791
    Offline

    Devildog8791 Theme Developer Theme Developer

    Joined:
    Sep 17, 2010
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    0
    SDK Manager

    I have been using APK Manager in Linux for about a month because I always had problems trying to get it set up in Windows. I am trying to follow your guide and I would like to add something. When you first extract SDK, "platform-tools" is not in there. You might want to add that the user needs to run SDK Manager at least once to get it to populate in there.

    That is just my 2 cents since I came across that while setting this up. I'll let you know how it goes. Thanks for the guide. It is a pain in the a** switching between Windows and Linux just to decompile an apk.
  8. Mbk
    Offline

    Mbk Android For Life Theme Developer Premium Member

    Joined:
    May 4, 2010
    Messages:
    4,169
    Likes Received:
    4
    Trophy Points:
    0
    To run APKManager in Windows all you need is JDK really....
  9. Devildog8791
    Offline

    Devildog8791 Theme Developer Theme Developer

    Joined:
    Sep 17, 2010
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    0
    Now you tell me...JK. I got it going, but I had to stray off of this guide to do it. It got me started though and it's much appreciated.
  10. xkape
    Offline

    xkape Premium Member Theme Developer Premium Member

    Joined:
    Jul 27, 2010
    Messages:
    3,876
    Likes Received:
    20
    Trophy Points:
    0
    Location:
    OH-IO
    Devildog, if you don't mind, post up what you did. I will add it to the OP (with credit of course). Maybe we can make this a good one stop thread for getting started. God knows I wish I had a guide when I was trying to figure all this out..lol
  11. xkape
    Offline

    xkape Premium Member Theme Developer Premium Member

    Joined:
    Jul 27, 2010
    Messages:
    3,876
    Likes Received:
    20
    Trophy Points:
    0
    Location:
    OH-IO
    OP updated with Devildog's info.. which was a lot :)
  12. Mbk
    Offline

    Mbk Android For Life Theme Developer Premium Member

    Joined:
    May 4, 2010
    Messages:
    4,169
    Likes Received:
    4
    Trophy Points:
    0
    I'm gonna be honest here, I feel that first part is way too much of unnecessary things to accomplish the second part....JMHO
  13. xkape
    Offline

    xkape Premium Member Theme Developer Premium Member

    Joined:
    Jul 27, 2010
    Messages:
    3,876
    Likes Received:
    20
    Trophy Points:
    0
    Location:
    OH-IO
    Always better to have too much than too little.. :)
    If all someone is doing is editing images though, yeah, 7zip is about it.

    BUT, we all take steps of progression towards things more complicated, editing xmls, changing colors, adding code, etc... At least with this, pretty much everything is covered.
    I hated scouring the internet trying to find someone that had kind of the same question and then filling in the blanks myself as pure guessing. Then, if it doesn't work, you don't know why ....so its hard to fix.
  14. Mbk
    Offline

    Mbk Android For Life Theme Developer Premium Member

    Joined:
    May 4, 2010
    Messages:
    4,169
    Likes Received:
    4
    Trophy Points:
    0
    I'm just sayin that the name of this thread, and what I understood you intended it for, was for editting XMLs using APKManager to decompile....

    with that perspective in mind, all of the rest just confuses the issue for those that you were trying to help in the first place,,,,
    again it's jmho, but I would hate to see members get discouraged because they think they need to do all this and decide not to even attempt it...
  15. B-boy™
    Offline

    B-boy™ Team B-boy™/Jedi Counsel Theme Developer Premium Member

    Joined:
    Oct 10, 2010
    Messages:
    1,893
    Likes Received:
    7
    Trophy Points:
    0
    Location:
    central Az
    Wish I had this tut a month ago.... lol.. good job xkape.. I thought it was well put and easy to understand... :)
  16. Mbk
    Offline

    Mbk Android For Life Theme Developer Premium Member

    Joined:
    May 4, 2010
    Messages:
    4,169
    Likes Received:
    4
    Trophy Points:
    0
    lol... yeah for you since you went thru all the trial; and error stage and understand all of it now........ you sayin you did all that? :D
  17. B-boy™
    Offline

    B-boy™ Team B-boy™/Jedi Counsel Theme Developer Premium Member

    Joined:
    Oct 10, 2010
    Messages:
    1,893
    Likes Received:
    7
    Trophy Points:
    0
    Location:
    central Az
    Actually, yeah I did play around a whole lot on my own.. haven't used a tut for 9patching but taught myself rather... and on getting errors recompiling, I used some bootleg conversation on a theming thread that wasn't the easiest to understand... so all in all, I think this thread is great for people that wanna edit xml's but don't know how to decompile an apk when it errors... maybe I haven't been down all the roads you have, but I've been down some roads... anyway, thanks again xkape
  18. Mbk
    Offline

    Mbk Android For Life Theme Developer Premium Member

    Joined:
    May 4, 2010
    Messages:
    4,169
    Likes Received:
    4
    Trophy Points:
    0
    I believe a thread like this is fantastic, and applaud xkape for starting it... but I'm wondering why all the added stuff that members won't need to decompile and edit XMLs....
    You've always been a proud person BBoy, that's what probabvly drove you to get to where you are now.... but not everyone has that much drive to attempt all of this... so I'm just voicing what is my opinion about it...
  19. B-boy™
    Offline

    B-boy™ Team B-boy™/Jedi Counsel Theme Developer Premium Member

    Joined:
    Oct 10, 2010
    Messages:
    1,893
    Likes Received:
    7
    Trophy Points:
    0
    Location:
    central Az

    Um, I wasn't even saying anything about what you said Mbk.. of course we all have our own opinions... and I agree with what you said, but even tho it might be "too much" info.. it's well written so that it's understandable... I didn't have that kind of assistance and I'm sure you had even less... but I don't stir the pot on issues not purtaining to me, I just wanted xkape to know I think the thread will help a lot... plus it's in a section not too many reg users will be perusing through so I'm sure it will be a useful tool.... sorry if I came across like that man, you've helped me more than most.... :)
  20. xkape
    Offline

    xkape Premium Member Theme Developer Premium Member

    Joined:
    Jul 27, 2010
    Messages:
    3,876
    Likes Received:
    20
    Trophy Points:
    0
    Location:
    OH-IO
    B-boy.. thanks man.. thank Devildog too though.. he added a lot to this.

    Mbk... i understand your concern about turning noobs off. I don't know what you mean though about the thread title. I called it an ADB and APK Manager How-To. All those 1st steps are is setting those 2 apps up.

    Again, like I told Devildog though.. you see areas of improvement, post em up or PM them to me. I will add them right in. I want this How-To to be a complete, easy to understand and follow walk thru for all users of all knowledge levels. I don't know everything, that's for sure. You know that cause most of my questions get directed at you...lol

    Like B-boy said.. For him, probably for you and defiantely for me, something like this was not around. It was all just trial and error and lots of frustration. That probably got me way more knowledge than I would have had without this due to self troubleshooting "in the dark" so to speak but... there are ( at least I think there are) lots of talented image makers/designers, etc.. out there that would love to be able to just change it but don't because all this apk, adb, java randomness scares them.
Search tags for this page
adb was not found apk manager
,
apk manager change name
,

apk xml editor

,
edit apk xml files
,
edit xml android apk
,

how to edit android xml files

,
how to edit android xml files in windows
,

how to edit xml files android

,

how to use apk manager

,
resources.arsc editor
,
xml apk editor
,

xml editor apk

,
xml editor apk using via android
,
xml editor.apk
,
xml.apk