Skip to content

Reverse engineering Android APK's. This is has been documented for reference.

Notifications You must be signed in to change notification settings

sahmed1o/Reverse-Engineering-Android-APK-s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reverse-Engineering-Android-APK-s

This is a reference to reverse engineer personal applications built in order to do modifications, as well as to check the source of android applications built by others to determine if theirs any malicious content stored in the apps.

The include files in this repo are the tools needed to reverse engineer the APK's, these can be downloaded from the official sources.

(Windows)

Download ApkTool, its needed to reverse engineer the apk files, link is here: https://ibotpeaches.github.io/Apktool

Installation instructions can be found here: https://ibotpeaches.github.io/Apktool/install/

Instructions from apktool git:

  1. Download Windows wrapper script (Right click, Save Link As apktool.bat)
  2. Download apktool-2 from here: https://bitbucket.org/iBotPeaches/apktool/downloads/
  3. Rename downloaded jar to apktool.jar
  4. Move both files (apktool.jar & apktool.bat) to your Windows directory (Usually C://Windows)
  5. If you do not have access to C://Windows, you may place the two files anywhere then add that directory to your Environment Variables System PATH variable.
  6. Try running apktool via command prompt

Decompiling APK from directory, in this case the directory is titled "ReverseEngineering":

D:\ReverseEngineering > apktool.jar d fileName.apk

After modifications are done, to recompile folder to APK from ReverseEngineering directory use the following command with apktool:

D:\ReverseEngineering > apktool.jar b fileName

Signing the apk if not signed:

  1. check if apk is signed:
"C:\Program Files\Java\jdk1.8.0_152\bin\keytool" -list -printcert -jarfile fileName.apk
  1. if not signed use the keytool in the java bin directory to sign apk:

2.1. create key signature
"C:\Program Files\Java\jdk1.8.0_152\bin\keytool" -genkey -keystore keyName.keystore -validity 1000 -alias aliasName

2.2. use jar signer to sign the apk with the key signature

"C:\Program Files\Java\jdk1.8.0_152\bin\jarsigner.exe" -keystore keyName.keystore -verbose fileName.apk aliasName

To find the Key Alias and Certificate Fingerprints: Copy keytool.exe and keystore into C:\Program Files\Java\jdk1.8.0_152\bin directory. Open the command prompt from directory and use the following command:

keytool -list -v -keystore .keystore 

Or from any directory open the command prompt and use this command with path to keytool:

"C:\Program Files\Java\jdk1.8.0_152\bin\keytool" -list -v -keystore .keystore 

Password for key signature can be cracked with any password cracker.

About

Reverse engineering Android APK's. This is has been documented for reference.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published