Module apk :: Class APK
[hide private]
[frames] | no frames]

Class APK

source code

APK manages apk file format

Instance Methods [hide private]
 
__init__(self, filename, raw=False) source code
 
is_valid_APK(self) source code
 
get_filename(self)
Return the filename of the APK
source code
 
get_package(self)
Return the name of the package
source code
 
get_androidversion_code(self)
Return the android version code
source code
 
get_androidversion_name(self)
Return the android version name
source code
 
get_files(self)
Return the files inside the APK
source code
 
get_files_types(self)
Return the files inside the APK with their types (by using python-magic)
source code
 
get_raw(self)
Return raw bytes of the APK
source code
 
get_dex(self)
Return the raw data of the classes dex file
source code
 
get_elements(self, tag_name, attribute)
Return elements in xml files which match with the tag name and the specific attribute
source code
 
get_element(self, tag_name, attribute)
Return element in xml files which match with the tag name and the specific attribute
source code
 
get_activities(self)
Return the android:name attribute of all activities
source code
 
get_services(self)
Return the android:name attribute of all services
source code
 
get_receivers(self)
Return the android:name attribute of all receivers
source code
 
get_providers(self)
Return the android:name attribute of all providers
source code
 
get_permissions(self)
Return permissions
source code
 
get_details_permissions(self)
Return permissions with details
source code
 
get_min_sdk_version(self)
Return the android:minSdkVersion attribute
source code
 
get_target_sdk_version(self)
Return the android:targetSdkVersion attribute
source code
 
get_libraries(self)
Return the android:name attributes for libraries
source code
 
show(self) source code
Method Details [hide private]

__init__(self, filename, raw=False)
(Constructor)

source code 
Parameters:
  • filename - specify the path of the file, or raw data
  • raw - specify (boolean) if the filename is a path or raw data

get_elements(self, tag_name, attribute)

source code 

Return elements in xml files which match with the tag name and the specific attribute

Parameters:
  • tag_name - a string which specify the tag name
  • attribute - a string which specify the attribute

get_element(self, tag_name, attribute)

source code 

Return element in xml files which match with the tag name and the specific attribute

Parameters:
  • tag_name - a string which specify the tag name
  • attribute - a string which specify the attribute