Link to this headingAPKs
Layout after unzipping the APK:
- AndroidManifest.xml Details application metadata, components, permissions and other information
- classes.dex Java CLASS files compiled into DEX (Dalvik Executable) format to be executed by Dalvik Virtual Machine
- /META-INF/ Contains hashes of application resource files and certificate information (used to sign the application)
- /lib/ Libraries used by application developed by third-party organization(s)
- /res/ Raw resources used by application
- /assets/ Application assets, such as pictures, JavaScript files, etc.
- resources.asc File containing pre-compiled resources used by application (e.g., XML layout file)
You can extract packages from Android without root access with Apk Extractor
Link to this headingSignatures
Jar Signing (v1):
- All entries in the META-INF/MANIFEST.MF file
- Does not protect all files in the apk
APK Signature Scheme (v2):
- Signature and Hash of the entire APK file
APK Signature Scheme (v3):
- Same as v2 but also includes a chain of past certificates from older versions of the application.
Link to this headingAndroid Manifest File
android:allowClearUserData
If set to false the application is not able to delete the userdata folder. This is set to true by default.
android:debuggable
If set to true the application debugable. This is set to false by default.
android:requestLegacyExternalStorage:
If the target API is < 29 then its set to true by default.
If the target API is > 29 then its set to false by default.
If set to true ignore Android 10 restrictions to segment the /sdcard/ folder to app specific locations.
android:networkSecurityConfig:
Sets the Android Builtin Certificate Pinning information Network Security Config examples
android:hasFragileUserData:
When set to true give the user an option to keep the app data when uninstalling the app. The default value is false.
android:fullBackupContent:
Set XML file for what files can be backed up.
If you dont want anything to be backed up use data-extraction-rules
android:usesCleartextTraffic
If the target API is < 27 then its set to true by default.
If the target API is > 27 then its set to false by default.
This prevents Insecure Connections to be made.
Third party libraries may not honor this flag.
WebView honors this attribute for applications targeting API level 26 and higher.
This flag is ignored on Android 7.0 (API level 24) and above if an Android Network Security Config is present.
This attribute was added in API level 23.
android:sharedUserId
Apps signed by the same signing certificate can view and modify each other data directory
compileSdkVersion:
Link to this headinguses-sdk Tag
android:minSdkVersion
The Android system will prevent the user from installing the application if the system’s API Level is lower than the value specified in this attribute. If not specified than the Default is API 1
android:targetSdkVersion
- This means that the App was designed and tested for this API version. This also is used in Android compatibility issues.
android:maxSdkVersion
- This is the maximum API version and will not be installed on a device that does not meet the Requirement
Link to this headingConvert APK to readable Java
Use the apk2jar.sh:
Get links from APK:
Apktool to LinkFinder
Link to this headingJADX
Case Insensitive Class Renaming:
If there is a class with a capital B and an Lowercase b by default it will rename the class. This is good for reading the code but is bad for hooking since this is not the correct class.
To change this Go to File -> Preferences -> Rename -> System case sensitivity Uncheck.
Link to this headingReverseAPK
- Analyze AndroidManifest.xml
- Static analysis
Run on APK:
Link to this headingQark Static Analysis on APK
Run on APK:
Run on Java Files:
Link to this headingInstalling Packages
If you encounter INSTALL_FAILED_TEST_ONLY then this is a debug app and must be installed with the -t flag.
If you encounter INSTALL_PARSE_FAILED_NO_CERTIFICATES then this apk is not signed. Sign with the instructions in the next section.
Install APK:
Install Test Build:
Link to this headingModifying APKs
Link to this headingSigning APK
Unzip the APK to a directory:
Decompile the APK:
Change the Manifest File:
Rebuild the APK:
Resign the apk:
Check Signature:
Link to this headingDeobfuscation
Unpacking the Packed Unpacker: Reverse Engineering an Android Anti-Analysis Native Library
Path to the payload: Android Edition