-
Notifications
You must be signed in to change notification settings - Fork 249
Home
Welcome to the ApkAnalyser wiki!
ApkAnalyser is a static, virtual analysis tool for examining and validating the development work of your Android™ app. It's a complete tool chain which supports modification of the binary application with more printouts. You are then able to repack, install, run and verify the result from logcat. ApkAnalyser also supports resource analysis, and you can decode XML, look up resource references and detect potential issues in your app.
Exploring code and xml
- Explore package/classes/methods/fields
- Look up package/classes/methods references
- Look up field read/write accesses
- Disassemble dalvik method's bytecode with highlighting syntax
- Decode Android XML files with highlighting syntax
Architecture and dependency
- Display UML package/class diagrams
- Highlight dependencies of packages/classes
- Paint method call graph
- Find a label in resources and strings in code
Injection and deodexing
- Modify APK file with some predefined Davik bytecode injections
- Uninstall/resign/install/launch APK file
- Logcat viewer with debug level filters
- Support odex applications and libraries
Resource Analyser
- List resource IDs and its contents
- Look up resource references in xml, code or by other resource IDs
- Find unused resources by resource ID or files
- Find system resource (@android) references
- Detect some resource potential issues
-
Download the ApkAnalyser jar file from downloads
-
Copy the jar file to your local disk and execute the following command in the command prompt to start ApkAnalyser:
java -Xmx1024m -jar ApkAnalyser.jar
ApkAnalyser will consume lots of memory for analyzing the dalvik bytecodes. it may run out of memory, so the max heap size is better to be explicitly incrased by "-Xmx1024m"
Before the analyzing, you need to setup the following configurations:
File -> Set paths
1 Classpaths - where to look for packages and libraries, it can be retrieved from one of the following sources:
-
android.jar - the jar file in android sdk, e.g. C:\android-sdk-windows\platforms\android-8\android.jar. Here recommand to use the correct version as your device.
-
system libraries from build - in target build folder, e.g. /out/target/product/xxx/system/framework/framework.jar or /out/target/product/semcsdk/system/framework/framework.jar
-
system libraries on device - non-odex libraries on target device, e.g. /system/framework/framework.jar (should be no corresponding .odex file in that folder)
-
odex system libraries on device - odex libraries on target device, e.g. /system/framework/framework.odex
-
a folder - where contains java class files
2 Android SDK - alternatively, a platform folder in the Android SDK tab, for example C:\android-sdk-windows\platforms\android-15. ApkAnalyser will then import all the jar files in that folder.
3 APK file - the file to analyse, it can be retrieved from:
-
somewhere out of the phone...
-
/data/app/XXX.apk on device
-
/system/app/XXX.apk on device - if you want to modify it and install it back, you may have to uninstall the original app manually, see Trouble Shooting
File -> Settings
adb executable - the location of adb, for example C:\android-sdk-windows\tools\adb.exe
File -> Analyse
Start analysing the app.
You may refer to Tutorials to get some examples on how to use it.
3 tutorials about how to modify the apk file with more debugging printouts
Formats and examples of Dalvik bytecode injections
Since ApkAnalyser is open source, we would be really happy if you would work together with us to improve this tool. If you have any ideas, feel free to contact us, either through the comments of blog post, or by checking out the ApkAnalyser forum thread on XDA forum, or send an email directly to [email protected]