Skip to content

GabMar/ApkCategoryChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APK CATEGORY CHECKER

Author: Gabriele Martini

DESCRIPTION

A Command-Line Program written in Java to decode an APK file or a directory containing APK files using ApkTool and Dex2Jar and check what Framework it's been used to build the APK.

COMMAND LINE PARAMETERS

Parameter Description
-p The Path of an APK or the Path of a directory containing APKs
-csv Export the results in a CSV file with specified path
-k Keep the directory of the encoded APK
-deep Number of threshold to detect if defined APK is hybrid

USAGE EXAMPLE

  • To analyze the directory containing the ApkCategoryChecker.jar and put the CSV result file in the same directory, open a terminal, navigate in the directory and type:

    java -jar ApkCategoryChecker.jar -p . -csv .

  • To analyze a directory or an APK file and put the CSV result file in a different directory, open a terminal, navigate in the directory containing the 'ApkCategoryChecker.jar' file and type:

    java -jar ApkCategoryChecker.jar -p /Path/of/The/Directory/or/APK/To/Analyze -csv /Destination/Path/for/Result/File

  • If you want to maintain the directory containing the decoded APK, add the parameter -k:

    java -jar ApkCategoryChecker.jar -p /Path/of/The/Directory/or/APK/To/Analyze -csv . -k .

  • To set the level of Analysis (number of web resource files to search) use the parameter -deep:

    (example with choosed level 4)

    java -jar ApkCategoryChecker.jar -p /Path/of/The/Directory/or/APK/To/Analyze -csv . -deep 4

FILE RESULT FORMAT

For now the only supported output format is CSV with the following columns

Column Description
App_ID The id of analyzed APK
APK_File_Name The APK name
APK_File_Path The path of analyzed APK
APK_Package The package of APK
Main_Framework The Main Framework used to build the APK
Base_Framework The Base Framework used to build the APK
HTML Number of ".html" file used to build the APK
JS Number of ".js" file used to build the APK
CSS Number of ".css" file used to build the APK
Android_Debuggable The value of Debuggable parameter in AndroidManifest.xml
Android_Permissions List of Android Permission
Android_MinSdkVersion Value of minSdkVersion
Android_MaxSdkVersion Value of maxSdkVersion
Android_TargetSdkVersion Value of targetSdkVersion
File_Size(bytes) File size (in bytes) of APK
Start_Analysis_Time(milliseconds) UNIX Time of start
Duration_Analysis_Time(milliseconds) UNIX Time of duration
Decode_Success Flag to indicate the success of the decoding (0 success, 1 fail)

CSV CONTAINING THE COLLECTION OF .JS FILES

Regardless of the format result file chosen, the script generates a file with .csv extension containing the following values

Column Description
appID The id of analyzed APK
jsFiles List of js files contained in the APK

RECOGNITION FRAMEWORKS METHODS

This section explains how each framework is recognised.

Framework Recognition method Reliability
Apache Cordova If is present the string "org.apache.cordova" in "/res/xml/config.xml" AND if is present the file "CordovaActivity.class" Strong
Phonegap If is present the string "http://phonegap.com/ns/1.0" in "/res/xml/config.xml" AND if is present the file "CordovaActivity.class" Medium
Enyo If is present the string "enyo.machine" AND "enyo.kind" in a .js file Medium
IBM Worklight If is present the string "com.worklight.androidgap" in "/res/xml/config.xml" AND if is present the file "WLDroidGap.class" Strong
IUI If is present the file "IUI.class" Medium
Kivy If is present the string "PythonActivity" in the "AndroidManifest.xml" Medium
Mobl If is present the file "MoblGap.class", AND if present a file with extension ".mobl" Strong
MoSync If is present the string "MoSyncService" in the "AndroidManifest.xml" Medium
Next If is present the string "nextwebapp" in a file, AND if is present the file "NextWebApp.class" Strong
Quick Connect If is present the string "function QCNativeFooter", AND if is present the string "qc.handleError" in a file Medium
Rho Mobile If exists the file "rho.dat" Medium
Sencha If is present the strings "Ext.create" AND "Ext.application" in a file javascript Strong
Titanium If is present the file "TitaniumModule.class", AND if is present the file "TiActivity.class" Strong

MINIMUM REQUIREMENTS

This software requires Java 1.7 or higher

THIRD-PARTY APPLICATIONS:

Apktool: https://github.com/iBotPeaches/Apktool

Dex2Jar: https://code.google.com/p/dex2jar/

Apache Commons CSV: http://commons.apache.org/proper/commons-csv/

Apache Commons CLI: http://commons.apache.org/proper/commons-cli/usage.html

About

A Program written in Java to check what Framework it's been used to build the APK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages