top of page

How to edit android applications the easy way

So you've found an android application that you think will look better if you could add this or that? So now if you have noticed an android application is just a normal zip file and can be opened with a normal windows zip program. The problem is when you edit or replace a photo in there and re-install the app on your phone it is still the same or it doesn't work at all and wont even install.

I will guide you step by step on how to edit  a simple android application. Make sure you have administrative permissions on your user.

Firstly as always you need to get your tools up and running before editing any application. The tools you will need is the decompiler and the compiler which is one thing.

The second is the apk signer. This signs the application telling the android OS that it is safe to install this application.

I have put this in one zip file for you to download and extract anywhere on your computer.

STEP #1

Copy your application you want to edit to the folder where you extracted the files.



Rename It to something simple. Like: from android48032.apk to android.apk.

Hold shift down and right mouse click in the extracted folder then click "Open command window here".

STEP #2

Type in the command window the following code without the quotation marks: 

​"apktool d apkname.apk" (Replace the text "apkname" with the name of your android application)



If you spelled the application name right it should start decompiling your android application to that folder. The name of the folder will be the same as the text you replaced "apkname" with but without the extension.



Do not close the command window yet! we will be needing it later on again to compile/build the application.

STEP #3

STEP #4

Now go into the decompiled folder and into "res" in there should be folders like "drawable..." and "values".

Folders with the name "drawable..." usually holds picture files.

Folders with the name "values..." usually holds text values.



To edit a picture it is usually easier to open the picture that is in the decompiled folder in a picture editor like GIMP or Adobe Photoshop. You can try paint i have not yet tried it myself. When you are done editing the photo save it to its original location and overwrite it. Make sure if you save it that you save it as a png again otherwise it might loose its transparent quality and make a mess of the application. If there is more than one drawable folder (wich there probably is) you will have to search for the same picture and edit it more than once so it looks the same. The reason there is soo many drawable folders is simple. Many android devices have different resolution screens and it is pointless to load a full HD picture if you can load one that is a little less quality that will look the same and improve performance on the application.



To edit a line of text is alot more complicated:

Open the values folder of your language (english is "values" with nothing else).

Find the document with the name "strings.xml" and open it with notepad.

This is where it gets crazy:

It looks like alot of nothing but it is very structured here is an example



"<string name="app_name">AppMonster Pro</string>" 

as you can see the first part (<string name) is only saying what kind of a variable this is. This is a string. The next part after the = in quotation marks ("app_name") is the name of the variable. The part right there after (AppMonster Pro) is the contents of the variable. The contents of the variable is the part we want to edit.

Now all you need to do is find the variable holding the value you want to edit and change it to whatever you want it be.

The variable name usually gives a good description of what the variable does.



When you are done playing with the applications contents proceed to STEP #5. Be sure to never delete a file or variable. The application will install but it will "Force Close" when you run it on your phone.

STEP #5

To recompile or build the application again is simple. In your open command window type the following code:

"apktool b apkname" (be sure to type it without an extension. That means do not type .apk at the end.)



Now you have a built .apk file but if you try to install this to your phone it will not work because it has lost its signature. Follow STEP 6 to sign your application. 

STEP #6

Click on "Browse" (pictures for the noobs)

Navigate to your extracted folder and enter your folder of the decompiled application the one with the apkname.

In there ther should be a folder with the name "dist" select the apkname.apk in there.

Click on "Sign files" (pictures for the noobs) As you can see you can sign many files at once so if you edit alot of applications first edit them all and place them in a folder and sign them all at the same time.

When the app is done you can close it and go check in that "dist" folder and there now should be a file with the name of apkname_signed.apk. The signed apk is the application that you can install on your android device without any problems.

There you go a simple (for noobs not soo simple) way to edit your android applications.

 

Note: I did not write any of these applications I am only describing how i would edit an android application

This is all thanks to the guys over at XDA-Developers. I lost the links were I got these tools soo sorry that i can't give credit to the real developer.

bottom of page