Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dmpatel151282/81186c4f1c75386546d8625f56c1b73f to your computer and use it in GitHub Desktop.
Save dmpatel151282/81186c4f1c75386546d8625f56c1b73f to your computer and use it in GitHub Desktop.
1. Download latest apktool version.
2. Download the batch file and aapt.exe.
3. Create a folder anywhere in the PC and put all the apktool.jar, aapt.exe and the batch script in that folder.
4. Open command prompt.
5. Navigate to the folder where you placed apktool.jar, batch script and the aapt.exe.
6. Now, you need to install the file using the " IF " command.
7. Type the following command.
apktool if name-of-the-app.apk
8. For decompiling use the command "d". The "d" stands for decompile.
apktool d name-of-the-app.apk
9. After the app is correctly decompiled, a new folder will be created in the same folder where you placed your app. This contains all the xml's and smali files which can be edited for different mode's.
10. To recompile the app use the following command " B ". The "b" simply means recompile.
apktool b name-of-the-app-folder
11. The final modded app will be in the "dist" folder located inside the original app folder created by apktool.
Signing the apk
1. open a new command prompt and change into the sign-apk directory using cmd
2. move the modified-unsigned apk into this folder
3. then type the following command -
java -jar signapk.jar certificate.pem key.pk8 path-of-the-folder-contaning-the-apk.apk path-of-the-new-signed-apk.apk
4. Once compiled, the signed apk will be found in the same folder.
@faugan
Copy link

faugan commented Apr 24, 2018

hello,
thanks for this tutorial,

i use this process to decompile/rebuild/signed the calendar apk of the android system but when i want to install in the phone, it keeps telling me "a package with same name followed by a different signature....."
so application not installing

how to use the same signature

@OkubeEmmanuel
Copy link

@Faugun, you need to uninstall the calendar app on your phone before you can install the apk you tampered with. It should however work on another android device that doesn't use the same calendar app.

@DJohnston79
Copy link

DJohnston79 commented Sep 27, 2018

Hey guys ,

I am trying to get the 4g+ icon to show up on my pixel using bouygues here in france. I previously had a nexus 5x and on certain roms(ex: aosp extended and octos) the 4g+ icon would popup and I would notice an increase in data speed.

Ive dug into the matter and apparently in systemui.apk there is an xml where the setting for the lteplus icon is set to be hidden. I've tried to edit this and another line according to a post I was referred to on github , but after recompiling with apktool, I get a bunch of errors.

Could somebody more knowledgeable with apktool or compiling apps try and compile the app for me, please?

I've attached some images so you can see what I am talking about . The line is "config_hidelteplus=true"

https://imgur.com/a/nlEkIhG

@Alireza-Razavi
Copy link

It's a simple and perfect tutorial for apktool.
thank so much.

@AliakseiMat
Copy link

Where to find signapk.jar?

@Staz0r
Copy link

Staz0r commented May 2, 2021

Where to find signapk.jar?

http://www.mediafire.com/file/h5fob1afzt1p4ss/SignApk.rar/file
Password : SanketN8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment