Decided to make this thread for people like me who do not know how to decompile an apk. This is totally a step by step guide. Following this exactly will produce the results you were looking for. This is how I changed the system background thanks to katracho for the instructions after you decompiled the apk:
Again, this is how I did it:
First you need 4 things.
You need to set a path for ADB so the computer can modify the path statement that will enable an MS-DOS window opened in Microsoft Windows as well as older programs to locate files that may be required to run the program.
Now time for the fun stuff:
To view the file you just decompiled:
After you have modified the file and are ready to compile and finish your project:
And that is it. If you read all the selections in Apk Manager then you will see the selections for how to put the files back into you phone.
Sorry this is so long but I wanted to make sure that even people like me know exactly how to decompile apks.
Anything you want me to add or delete, please let me know.
Code:
[U][I][COLOR=red]PLEASE FOLLOW THE STEPS EXACTLY: I AM NOT RESPONSIBLE FOR
UNDESIRED RESULTS OR YOU MAKING YOUR PHONE INTO A DOOR
STOP.[/COLOR][/I][/U]
First you need 4 things.
- Latest Java installed -> Java
Make sure if you are using a 64 bit Windows 7 OS that you install the same version for JAVA. - Download Apk Manager - Link ->Apk Manager
- Download Apk Tools - Link ->Apk Tools
- Download Apk Tools Installer - Link ->Apk Tools Installer
- Open the C:\ directory on your computer and make a folder called apk_manager
- Extract Apk Manger to that folder.
- Open apk_manager folder. Inside you will find a folder called "other". Take note of that.
- Extract Apk Tools to "other" in apk_manager folder
- Extract Apk Installer to same.
You need to set a path for ADB so the computer can modify the path statement that will enable an MS-DOS window opened in Microsoft Windows as well as older programs to locate files that may be required to run the program.
- Navigate to My Computer
- Right click
- Properties
- Advanced System Settings
- Advanced
- Environment Variables
- System variables
- Scroll down and highlight Path
- Edit
- Type C:\AndroidSDK\tools;C:\AndroidSDK\platform-tools
- Click OK 3 times to exit
1. Make sure Java is installed:
2. Open Environment Variables.
4. Hit new.
6. Type: Classpath
In Variable value:
7. Type: ".;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip;" WITHOUT QUOTES
Next do the EXACT same thing in System variables.
8. Type: JAVA_HOME (in caps)
In Variable value
9. Type: C:\Program Files\Java\jdk1.6.0_27;%JAVA_HOME%\bin
In Variable Name
11. Type: QTJAVA
In Variable value :
12. Type: C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip
2. Open Environment Variables.
The first thing you should see when you open the environment variable screen on your computer is 2 boxes.
1. User variables for (insert your computer name here)
2. System variables.
3. Go to User variables for (computer name)1. User variables for (insert your computer name here)
2. System variables.
4. Hit new.
Next you should see a screen pop up saying New User Variable
Variable name:
Variable value:
In Variable Name:Variable name:
Variable value:
6. Type: Classpath
In Variable value:
7. Type: ".;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip;" WITHOUT QUOTES
Next do the EXACT same thing in System variables.
If you scroll down in System variable you should see JAVA_HOME.
If not hit new:Pop up screen will appear.
In Variable name8. Type: JAVA_HOME (in caps)
In Variable value
9. Type: C:\Program Files\Java\jdk1.6.0_27;%JAVA_HOME%\bin
You should also see (if you scroll down further) QTJAVA. If not;
10. Hit newIn Variable Name
11. Type: QTJAVA
In Variable value :
12. Type: C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip
That should solve all the path issues.
Now time for the fun stuff:
- Plug phone into computer.
- Open the apk_manager folder and find a file called Script. Double click to run.
Again, this is how to decompile an apk. Will also show how to recompile in this post.
- Read through ALL the options apk_manager provides. Then read them again.
- Type 0 for adb pull. (This option will actually pull the file from where ever it is on phone).
- Once you selected that option, you will see:Where do you want adb to pull the apk from?
Example of input : /system/app/launcher.apk
Type input:YOU HAVE TO KNOW EXACTLY WHAT FILE AND WHERE THE FILE IS LOCATED AT!!!!
- Once selected you will see:Pulling apk
What filename would you like this app to stored as ?
Eg (launcher.apk)
Type input: - Name the file whatever you want. I would suggest the same name it already has.
- Next you will see:Would you like to set this as your current project (y/n)?
Type input: - Type y then hit enterAfter that is done you will see the "Please make your decision:" line again.
- Type 9 to Decompile apk (again, this is how I did it)
You will see: Decompiling apk
To view the file you just decompiled:
- Goto apk_manager on your C:\ directory
- Open apk_mananger
- Open "Projects" folder (no quotes). Inside you will find the file you just decompiled.To view the xml files you are modifying, you need to right click on the xml file and choose notepad. Also notepad++ works on just about any code available.
After you have modified the file and are ready to compile and finish your project:
- Type 11 to compile apk - You will see:Building Apk
Is this a system apk (y/n)
Type input: - For the sake of argument, this will be a system apk. Type y - hit enterYou will see:
Aside from the signatures, would you like to copy over any additional files that you didn't modify from the original apk in order to ensure least # of errors (y/n)
Type input: - Type y - hit enter. (Again, this is what I did)
You will see the program extracting then:
Everything is OK
Folders: (# of folders it made)
Files: (# of files it extracted)
Size: (size of the files)
Compressed (size of compressed files)
In the apk manager folder u'll find a keep folder. Within it, delete everything you have modified and leave files that you haven't. If you have modified any xml, then delete resources.arsc from that folder as well. Once done then press enter on this script.
Press any key to continue... - Press any key to continue You will see the program compressing the files.
And that is it. If you read all the selections in Apk Manager then you will see the selections for how to put the files back into you phone.
Sorry this is so long but I wanted to make sure that even people like me know exactly how to decompile apks.
Anything you want me to add or delete, please let me know.