androguard package¶
Subpackages¶
- androguard.core package
- Subpackages
- androguard.core.analysis package
- Submodules
- androguard.core.analysis.analysis module
Analysis
Analysis.add()
Analysis.create_ipython_exports()
Analysis.create_xref()
Analysis.find_classes()
Analysis.find_fields()
Analysis.find_methods()
Analysis.find_strings()
Analysis.get_call_graph()
Analysis.get_class_analysis()
Analysis.get_classes()
Analysis.get_external_classes()
Analysis.get_field_analysis()
Analysis.get_fields()
Analysis.get_internal_classes()
Analysis.get_method()
Analysis.get_method_analysis()
Analysis.get_method_analysis_by_name()
Analysis.get_method_by_name()
Analysis.get_methods()
Analysis.get_strings()
Analysis.get_strings_analysis()
Analysis.is_class_present()
BasicBlocks
ClassAnalysis
ClassAnalysis.AddFXrefRead()
ClassAnalysis.AddFXrefWrite()
ClassAnalysis.AddMXrefFrom()
ClassAnalysis.AddMXrefTo()
ClassAnalysis.AddXrefFrom()
ClassAnalysis.AddXrefTo()
ClassAnalysis.extends
ClassAnalysis.get_fake_method()
ClassAnalysis.get_field_analysis()
ClassAnalysis.get_fields()
ClassAnalysis.get_method_analysis()
ClassAnalysis.get_methods()
ClassAnalysis.get_nb_methods()
ClassAnalysis.get_vm_class()
ClassAnalysis.get_xref_from()
ClassAnalysis.get_xref_to()
ClassAnalysis.implements
ClassAnalysis.is_android_api()
ClassAnalysis.is_external()
ClassAnalysis.name
DVMBasicBlock
DVMBasicBlock.add_note()
DVMBasicBlock.clear_notes()
DVMBasicBlock.get_end()
DVMBasicBlock.get_exception_analysis()
DVMBasicBlock.get_instructions()
DVMBasicBlock.get_last()
DVMBasicBlock.get_last_length()
DVMBasicBlock.get_method()
DVMBasicBlock.get_name()
DVMBasicBlock.get_nb_instructions()
DVMBasicBlock.get_next()
DVMBasicBlock.get_notes()
DVMBasicBlock.get_prev()
DVMBasicBlock.get_special_ins()
DVMBasicBlock.get_start()
DVMBasicBlock.push()
DVMBasicBlock.set_childs()
DVMBasicBlock.set_exception_analysis()
DVMBasicBlock.set_fathers()
DVMBasicBlock.set_notes()
DVMBasicBlock.show()
ExceptionAnalysis
Exceptions
ExternalClass
ExternalMethod
FieldClassAnalysis
MethodAnalysis
MethodClassAnalysis
MethodClassAnalysis.AddXrefFrom()
MethodClassAnalysis.AddXrefTo()
MethodClassAnalysis.access
MethodClassAnalysis.descriptor
MethodClassAnalysis.get_method()
MethodClassAnalysis.get_xref_from()
MethodClassAnalysis.get_xref_to()
MethodClassAnalysis.is_android_api()
MethodClassAnalysis.is_external()
MethodClassAnalysis.name
StringAnalysis
is_ascii_obfuscation()
- androguard.core.analysis.auto module
AndroAuto
DefaultAndroAnalysis
DefaultAndroAnalysis.analysis_adex()
DefaultAndroAnalysis.analysis_apk()
DefaultAndroAnalysis.analysis_app()
DefaultAndroAnalysis.analysis_arsc()
DefaultAndroAnalysis.analysis_axml()
DefaultAndroAnalysis.analysis_dex()
DefaultAndroAnalysis.analysis_dey()
DefaultAndroAnalysis.crash()
DefaultAndroAnalysis.create_adex()
DefaultAndroAnalysis.create_apk()
DefaultAndroAnalysis.create_arsc()
DefaultAndroAnalysis.create_axml()
DefaultAndroAnalysis.create_dex()
DefaultAndroAnalysis.create_dey()
DefaultAndroAnalysis.dump()
DefaultAndroAnalysis.dump_file()
DefaultAndroAnalysis.fetcher()
DefaultAndroAnalysis.filter_file()
DefaultAndroAnalysis.finish()
DefaultAndroLog
DirectoryAndroAnalysis
- Module contents
- androguard.core.api_specific_resources package
- androguard.core.bytecodes package
- Submodules
- androguard.core.bytecodes.apk module
APK
APK.files
APK.find_tags()
APK.find_tags_from_xml()
APK.get_activities()
APK.get_all_attribute_value()
APK.get_all_dex()
APK.get_android_manifest_axml()
APK.get_android_manifest_xml()
APK.get_android_resources()
APK.get_androidversion_code()
APK.get_androidversion_name()
APK.get_app_icon()
APK.get_app_name()
APK.get_attribute_value()
APK.get_certificate()
APK.get_certificate_der()
APK.get_certificates()
APK.get_certificates_der_v2()
APK.get_certificates_der_v3()
APK.get_certificates_v1()
APK.get_certificates_v2()
APK.get_certificates_v3()
APK.get_declared_permissions()
APK.get_declared_permissions_details()
APK.get_details_permissions()
APK.get_dex()
APK.get_dex_names()
APK.get_effective_target_sdk_version()
APK.get_element()
APK.get_elements()
APK.get_features()
APK.get_file()
APK.get_filename()
APK.get_files()
APK.get_files_crc32()
APK.get_files_information()
APK.get_files_types()
APK.get_intent_filters()
APK.get_libraries()
APK.get_main_activities()
APK.get_main_activity()
APK.get_max_sdk_version()
APK.get_min_sdk_version()
APK.get_package()
APK.get_permissions()
APK.get_providers()
APK.get_public_keys_der_v2()
APK.get_public_keys_der_v3()
APK.get_public_keys_v2()
APK.get_public_keys_v3()
APK.get_raw()
APK.get_receivers()
APK.get_requested_aosp_permissions()
APK.get_requested_aosp_permissions_details()
APK.get_requested_permissions()
APK.get_requested_third_party_permissions()
APK.get_services()
APK.get_signature()
APK.get_signature_name()
APK.get_signature_names()
APK.get_signatures()
APK.get_target_sdk_version()
APK.get_uses_implied_permission_list()
APK.get_value_from_tag()
APK.is_androidtv()
APK.is_leanback()
APK.is_multidex()
APK.is_signed()
APK.is_signed_v1()
APK.is_signed_v2()
APK.is_signed_v3()
APK.is_tag_matched()
APK.is_valid_APK()
APK.is_wearable()
APK.new_zip()
APK.parse_signatures_or_digests()
APK.parse_v2_signing_block()
APK.parse_v2_v3_signature()
APK.parse_v3_signing_block()
APK.read_uint32_le()
APK.show()
APKV2SignedData
APKV2Signer
APKV3SignedData
APKV3Signer
BrokenAPKError
Error
FileNotPresent
ensure_final_value()
get_apkid()
parse_lxml_dom()
show_Certificate()
- androguard.core.bytecodes.dvm module
AnnotationElement
AnnotationItem
AnnotationOffItem
AnnotationSetItem
AnnotationSetRefItem
AnnotationSetRefList
AnnotationsDirectoryItem
AnnotationsDirectoryItem.get_annotated_fields_size()
AnnotationsDirectoryItem.get_annotated_methods_size()
AnnotationsDirectoryItem.get_annotated_parameters_size()
AnnotationsDirectoryItem.get_class_annotations_off()
AnnotationsDirectoryItem.get_field_annotations()
AnnotationsDirectoryItem.get_length()
AnnotationsDirectoryItem.get_method_annotations()
AnnotationsDirectoryItem.get_obj()
AnnotationsDirectoryItem.get_off()
AnnotationsDirectoryItem.get_parameter_annotations()
AnnotationsDirectoryItem.get_raw()
AnnotationsDirectoryItem.reload()
AnnotationsDirectoryItem.set_off()
AnnotationsDirectoryItem.show()
ClassDataItem
ClassDataItem.get_direct_methods()
ClassDataItem.get_direct_methods_size()
ClassDataItem.get_fields()
ClassDataItem.get_instance_fields()
ClassDataItem.get_instance_fields_size()
ClassDataItem.get_length()
ClassDataItem.get_methods()
ClassDataItem.get_obj()
ClassDataItem.get_off()
ClassDataItem.get_raw()
ClassDataItem.get_static_fields()
ClassDataItem.get_static_fields_size()
ClassDataItem.get_virtual_methods()
ClassDataItem.get_virtual_methods_size()
ClassDataItem.reload()
ClassDataItem.set_off()
ClassDataItem.set_static_fields()
ClassDataItem.show()
ClassDefItem
ClassDefItem.get_access_flags()
ClassDefItem.get_access_flags_string()
ClassDefItem.get_annotations_off()
ClassDefItem.get_ast()
ClassDefItem.get_class_data()
ClassDefItem.get_class_data_off()
ClassDefItem.get_class_idx()
ClassDefItem.get_fields()
ClassDefItem.get_interfaces()
ClassDefItem.get_interfaces_off()
ClassDefItem.get_length()
ClassDefItem.get_methods()
ClassDefItem.get_name()
ClassDefItem.get_obj()
ClassDefItem.get_raw()
ClassDefItem.get_source()
ClassDefItem.get_source_ext()
ClassDefItem.get_source_file_idx()
ClassDefItem.get_static_values_off()
ClassDefItem.get_superclass_idx()
ClassDefItem.get_superclassname()
ClassDefItem.reload()
ClassDefItem.set_name()
ClassDefItem.show()
ClassDefItem.source()
ClassHDefItem
ClassManager
ClassManager.add_type_item()
ClassManager.get_all_engine()
ClassManager.get_ascii_string()
ClassManager.get_class_data_item()
ClassManager.get_code()
ClassManager.get_debug_off()
ClassManager.get_encoded_array_item()
ClassManager.get_engine()
ClassManager.get_field()
ClassManager.get_field_ref()
ClassManager.get_item_by_offset()
ClassManager.get_lazy_analysis()
ClassManager.get_method()
ClassManager.get_method_ref()
ClassManager.get_next_offset_item()
ClassManager.get_obj_by_offset()
ClassManager.get_odex_format()
ClassManager.get_proto()
ClassManager.get_raw_string()
ClassManager.get_string()
ClassManager.get_string_by_offset()
ClassManager.get_type()
ClassManager.get_type_list()
ClassManager.get_type_ref()
ClassManager.set_decompiler()
ClassManager.set_hook_class_name()
ClassManager.set_hook_field_name()
ClassManager.set_hook_method_name()
ClassManager.set_hook_string()
CodeItem
ConstString
DBGBytecode
DCode
DalvikCode
DalvikCode.add_inote()
DalvikCode.get_bc()
DalvikCode.get_debug()
DalvikCode.get_debug_info_off()
DalvikCode.get_handlers()
DalvikCode.get_ins_size()
DalvikCode.get_insns_size()
DalvikCode.get_instruction()
DalvikCode.get_length()
DalvikCode.get_obj()
DalvikCode.get_off()
DalvikCode.get_outs_size()
DalvikCode.get_raw()
DalvikCode.get_registers_size()
DalvikCode.get_size()
DalvikCode.get_tries()
DalvikCode.get_tries_size()
DalvikCode.reload()
DalvikCode.set_idx()
DalvikCode.set_off()
DalvikCode.show()
DalvikOdexVMFormat
DalvikVMFormat
DalvikVMFormat.colorize_operands()
DalvikVMFormat.create_python_export()
DalvikVMFormat.disassemble()
DalvikVMFormat.fix_checksums()
DalvikVMFormat.get_BRANCH_DVM_OPCODES()
DalvikVMFormat.get_all_fields()
DalvikVMFormat.get_api_version()
DalvikVMFormat.get_class()
DalvikVMFormat.get_class_manager()
DalvikVMFormat.get_classes()
DalvikVMFormat.get_classes_def_item()
DalvikVMFormat.get_classes_names()
DalvikVMFormat.get_cm_field()
DalvikVMFormat.get_cm_method()
DalvikVMFormat.get_cm_string()
DalvikVMFormat.get_cm_type()
DalvikVMFormat.get_codes_item()
DalvikVMFormat.get_debug_info_item()
DalvikVMFormat.get_determineException()
DalvikVMFormat.get_determineNext()
DalvikVMFormat.get_field()
DalvikVMFormat.get_field_descriptor()
DalvikVMFormat.get_fields()
DalvikVMFormat.get_fields_class()
DalvikVMFormat.get_fields_id_item()
DalvikVMFormat.get_format()
DalvikVMFormat.get_format_type()
DalvikVMFormat.get_header_item()
DalvikVMFormat.get_len_methods()
DalvikVMFormat.get_method()
DalvikVMFormat.get_method_by_idx()
DalvikVMFormat.get_method_descriptor()
DalvikVMFormat.get_methods()
DalvikVMFormat.get_methods_class()
DalvikVMFormat.get_methods_descriptor()
DalvikVMFormat.get_methods_id_item()
DalvikVMFormat.get_operand_html()
DalvikVMFormat.get_regex_strings()
DalvikVMFormat.get_string_data_item()
DalvikVMFormat.get_strings()
DalvikVMFormat.get_strings_unicode()
DalvikVMFormat.get_vmanalysis()
DalvikVMFormat.list_classes_hierarchy()
DalvikVMFormat.print_classes_hierarchy()
DalvikVMFormat.save()
DalvikVMFormat.set_decompiler()
DalvikVMFormat.set_vmanalysis()
DalvikVMFormat.show()
DebugInfoItem
DebugInfoItemEmpty
EncodedAnnotation
EncodedArray
EncodedArrayItem
EncodedCatchHandler
EncodedCatchHandlerList
EncodedField
EncodedField.adjust_idx()
EncodedField.get_access_flags()
EncodedField.get_access_flags_string()
EncodedField.get_class_name()
EncodedField.get_descriptor()
EncodedField.get_field_idx()
EncodedField.get_field_idx_diff()
EncodedField.get_init_value()
EncodedField.get_name()
EncodedField.get_obj()
EncodedField.get_raw()
EncodedField.get_size()
EncodedField.load()
EncodedField.reload()
EncodedField.set_init_value()
EncodedField.set_name()
EncodedField.show()
EncodedMethod
EncodedMethod.access_flags
EncodedMethod.add_inote()
EncodedMethod.add_note()
EncodedMethod.adjust_idx()
EncodedMethod.code_off
EncodedMethod.each_params_by_register()
EncodedMethod.get_access_flags()
EncodedMethod.get_access_flags_string()
EncodedMethod.get_address()
EncodedMethod.get_class_name()
EncodedMethod.get_code()
EncodedMethod.get_code_off()
EncodedMethod.get_debug()
EncodedMethod.get_descriptor()
EncodedMethod.get_information()
EncodedMethod.get_instruction()
EncodedMethod.get_instructions()
EncodedMethod.get_length()
EncodedMethod.get_locals()
EncodedMethod.get_method_idx()
EncodedMethod.get_method_idx_diff()
EncodedMethod.get_name()
EncodedMethod.get_raw()
EncodedMethod.get_short_string()
EncodedMethod.get_size()
EncodedMethod.get_source()
EncodedMethod.get_triple()
EncodedMethod.is_cached_instructions()
EncodedMethod.load()
EncodedMethod.method_idx_diff
EncodedMethod.reload()
EncodedMethod.set_code_idx()
EncodedMethod.set_instructions()
EncodedMethod.set_name()
EncodedMethod.show()
EncodedMethod.show_info()
EncodedMethod.show_notes()
EncodedMethod.source()
EncodedTypeAddrPair
EncodedValue
Error
ExportObject
FakeNop
FieldAnnotation
FieldHIdItem
FieldIdItem
FieldIdItem.get_class_idx()
FieldIdItem.get_class_name()
FieldIdItem.get_descriptor()
FieldIdItem.get_length()
FieldIdItem.get_list()
FieldIdItem.get_name()
FieldIdItem.get_name_idx()
FieldIdItem.get_obj()
FieldIdItem.get_raw()
FieldIdItem.get_type()
FieldIdItem.get_type_idx()
FieldIdItem.reload()
FieldIdItem.show()
FieldIdItemInvalid
FillArrayData
FillArrayData.add_note()
FillArrayData.get_data()
FillArrayData.get_formatted_operands()
FillArrayData.get_hex()
FillArrayData.get_length()
FillArrayData.get_name()
FillArrayData.get_notes()
FillArrayData.get_op_value()
FillArrayData.get_operands()
FillArrayData.get_output()
FillArrayData.get_raw()
FillArrayData.show()
FillArrayData.show_buff()
HeaderItem
Instruction
Instruction.get_formatted_operands()
Instruction.get_hex()
Instruction.get_kind()
Instruction.get_length()
Instruction.get_literals()
Instruction.get_name()
Instruction.get_op_value()
Instruction.get_operands()
Instruction.get_output()
Instruction.get_raw()
Instruction.get_ref_kind()
Instruction.get_translated_kind()
Instruction.show()
Instruction.show_buff()
Instruction10t
Instruction10x
Instruction11n
Instruction11x
Instruction12x
Instruction20bc
Instruction20t
Instruction21c
Instruction21h
Instruction21s
Instruction21t
Instruction22b
Instruction22c
Instruction22cs
Instruction22s
Instruction22t
Instruction22x
Instruction23x
Instruction30t
Instruction31c
Instruction31i
Instruction31t
Instruction32x
Instruction35c
Instruction35mi
Instruction35ms
Instruction3rc
Instruction3rmi
Instruction3rms
Instruction40sc
Instruction41c
Instruction51l
Instruction52c
Instruction5rc
InstructionInvalid
InvalidInstruction
LinearSweepAlgorithm
MapItem
MapList
MethodAnnotation
MethodHIdItem
MethodIdItem
MethodIdItem.get_class_idx()
MethodIdItem.get_class_name()
MethodIdItem.get_descriptor()
MethodIdItem.get_length()
MethodIdItem.get_list()
MethodIdItem.get_name()
MethodIdItem.get_name_idx()
MethodIdItem.get_obj()
MethodIdItem.get_proto()
MethodIdItem.get_proto_idx()
MethodIdItem.get_raw()
MethodIdItem.get_real_descriptor()
MethodIdItem.get_triple()
MethodIdItem.reload()
MethodIdItem.show()
MethodIdItemInvalid
OdexDependencies
OdexHeaderItem
OffObj
PackedSwitch
PackedSwitch.add_note()
PackedSwitch.get_formatted_operands()
PackedSwitch.get_hex()
PackedSwitch.get_keys()
PackedSwitch.get_length()
PackedSwitch.get_name()
PackedSwitch.get_notes()
PackedSwitch.get_op_value()
PackedSwitch.get_operands()
PackedSwitch.get_output()
PackedSwitch.get_raw()
PackedSwitch.get_targets()
PackedSwitch.get_values()
PackedSwitch.show()
PackedSwitch.show_buff()
ParameterAnnotation
ProtoHIdItem
ProtoIdItem
ProtoIdItem.get_length()
ProtoIdItem.get_obj()
ProtoIdItem.get_parameters_off()
ProtoIdItem.get_parameters_off_value()
ProtoIdItem.get_raw()
ProtoIdItem.get_return_type_idx()
ProtoIdItem.get_return_type_idx_value()
ProtoIdItem.get_shorty_idx()
ProtoIdItem.get_shorty_idx_value()
ProtoIdItem.reload()
ProtoIdItem.show()
ProtoIdItemInvalid
SparseSwitch
SparseSwitch.add_note()
SparseSwitch.get_formatted_operands()
SparseSwitch.get_hex()
SparseSwitch.get_keys()
SparseSwitch.get_length()
SparseSwitch.get_name()
SparseSwitch.get_notes()
SparseSwitch.get_op_value()
SparseSwitch.get_operands()
SparseSwitch.get_output()
SparseSwitch.get_raw()
SparseSwitch.get_targets()
SparseSwitch.get_values()
SparseSwitch.show()
SparseSwitch.show_buff()
StringDataItem
StringIdItem
TryItem
TypeHIdItem
TypeIdItem
TypeItem
TypeList
Unresolved
clean_name_instruction()
determineException()
determineNext()
get_access_flags_string()
get_byte()
get_bytecodes_method()
get_bytecodes_methodx()
get_extented_instruction()
get_instruction()
get_instruction_payload()
get_kind()
get_optimized_instruction()
get_params_info()
get_sbyte()
get_type()
read_null_terminated_string()
readsleb128()
readuleb128()
readuleb128p1()
static_operand_instruction()
writesleb128()
writeuleb128()
- androguard.core.bytecodes.axml module
ARSCComplex
ARSCHeader
ARSCParser
ARSCParser.ResourceResolver
ARSCParser.get_bool_resources()
ARSCParser.get_color_resources()
ARSCParser.get_dimen_resources()
ARSCParser.get_id()
ARSCParser.get_id_resources()
ARSCParser.get_integer_resources()
ARSCParser.get_items()
ARSCParser.get_locales()
ARSCParser.get_packages_names()
ARSCParser.get_public_resources()
ARSCParser.get_res_configs()
ARSCParser.get_res_id_by_key()
ARSCParser.get_resolved_res_configs()
ARSCParser.get_resolved_strings()
ARSCParser.get_resource_bool()
ARSCParser.get_resource_color()
ARSCParser.get_resource_dimen()
ARSCParser.get_resource_id()
ARSCParser.get_resource_integer()
ARSCParser.get_resource_string()
ARSCParser.get_resource_style()
ARSCParser.get_resource_xml_name()
ARSCParser.get_string()
ARSCParser.get_string_resources()
ARSCParser.get_strings_resources()
ARSCParser.get_type_configs()
ARSCParser.get_types()
ARSCParser.parse_id()
ARSCResStringPoolRef
ARSCResTableConfig
ARSCResTableEntry
ARSCResTablePackage
ARSCResType
ARSCResTypeSpec
AXMLParser
AXMLParser.comment
AXMLParser.getAttributeCount()
AXMLParser.getAttributeName()
AXMLParser.getAttributeNamespace()
AXMLParser.getAttributeUri()
AXMLParser.getAttributeValue()
AXMLParser.getAttributeValueData()
AXMLParser.getAttributeValueType()
AXMLParser.getName()
AXMLParser.getPrefix()
AXMLParser.getText()
AXMLParser.is_valid()
AXMLParser.name
AXMLParser.namespace
AXMLParser.nsmap
AXMLParser.text
AXMLPrinter
PackageContext
ResParserError
StringBlock
complexToFloat()
format_value()
get_arsc_info()
- androguard.core.bytecodes.mutf8 module
- Module contents
- androguard.core.resources package
- androguard.core.analysis package
- Submodules
- androguard.core.androconf module
- androguard.core.bytecode module
Buff
BuffHandle
BuffHandle.add_idx()
BuffHandle.end()
BuffHandle.get_buff()
BuffHandle.get_idx()
BuffHandle.length_buff()
BuffHandle.peek()
BuffHandle.read()
BuffHandle.readNullString()
BuffHandle.read_at()
BuffHandle.read_b()
BuffHandle.readat()
BuffHandle.save()
BuffHandle.set_buff()
BuffHandle.set_idx()
BuffHandle.size()
BuffHandle.tell()
Exit()
FormatClassToJava()
FormatClassToPython()
FormatDescriptorToPython()
FormatNameToPython()
MethodBC
Node
PrettyShow()
PrettyShowEx()
SV
SVs
TmpBlock
disable_print_colors()
enable_print_colors()
get_package_class_name()
method2dot()
method2format()
method2jpg()
method2json()
method2json_direct()
method2json_undirect()
method2png()
object_to_bytes()
vm2json()
- Module contents
- Subpackages
- androguard.decompiler package
- Subpackages
- androguard.decompiler.dad package
- Submodules
- androguard.decompiler.dad.dast module
JSONWriter
JSONWriter.add()
JSONWriter.get_ast()
JSONWriter.get_cond()
JSONWriter.visit_cond_node()
JSONWriter.visit_ins()
JSONWriter.visit_loop_node()
JSONWriter.visit_node()
JSONWriter.visit_return_node()
JSONWriter.visit_statement_node()
JSONWriter.visit_switch_node()
JSONWriter.visit_throw_node()
JSONWriter.visit_try_node()
array_access()
array_creation()
array_initializer()
assignment()
binary_infix()
cast()
dummy()
expression_stmt()
field_access()
if_stmt()
jump_stmt()
literal()
literal_bool()
literal_class()
literal_double()
literal_float()
literal_hex_int()
literal_int()
literal_long()
literal_null()
literal_string()
local()
local_decl_stmt()
loop_stmt()
method_invocation()
parenthesis()
parse_descriptor()
return_stmt()
statement_block()
switch_stmt()
throw_stmt()
try_stmt()
typen()
unary_postfix()
unary_prefix()
var_decl()
visit_arr_data()
visit_decl()
visit_expr()
visit_ins()
write_inplace_if_possible()
- androguard.decompiler.dad.basic_blocks module
- androguard.decompiler.dad.control_flow module
- androguard.decompiler.dad.dataflow module
- androguard.decompiler.dad.decompile module
- androguard.decompiler.dad.graph module
GenInvokeRetName
Graph
Graph.add_catch_edge()
Graph.add_edge()
Graph.add_node()
Graph.all_preds()
Graph.all_sucs()
Graph.compute_rpo()
Graph.draw()
Graph.get_ins_from_loc()
Graph.get_node_from_loc()
Graph.immediate_dominators()
Graph.number_ins()
Graph.post_order()
Graph.preds()
Graph.remove_ins()
Graph.remove_node()
Graph.sucs()
bfs()
construct()
dom_lt()
make_node()
simplify()
split_if_nodes()
- androguard.decompiler.dad.instruction module
ArrayExpression
ArrayLengthExpression
ArrayLoadExpression
ArrayStoreInstruction
AssignExpression
AssignExpression.get_lhs()
AssignExpression.get_rhs()
AssignExpression.get_used_vars()
AssignExpression.has_side_effect()
AssignExpression.is_call()
AssignExpression.is_propagable()
AssignExpression.remove_defined_var()
AssignExpression.replace()
AssignExpression.replace_lhs()
AssignExpression.replace_var()
AssignExpression.visit()
BaseClass
BinaryCompExpression
BinaryExpression
BinaryExpression2Addr
BinaryExpressionLit
CastExpression
CheckCastExpression
ConditionalExpression
ConditionalZExpression
Constant
FillArrayExpression
FilledArrayExpression
IRForm
IRForm.get_lhs()
IRForm.get_rhs()
IRForm.get_type()
IRForm.get_used_vars()
IRForm.has_side_effect()
IRForm.is_call()
IRForm.is_cond()
IRForm.is_const()
IRForm.is_ident()
IRForm.is_propagable()
IRForm.remove_defined_var()
IRForm.replace()
IRForm.replace_lhs()
IRForm.replace_var()
IRForm.set_type()
IRForm.visit()
InstanceExpression
InstanceInstruction
InvokeDirectInstruction
InvokeInstruction
InvokeRangeInstruction
InvokeStaticInstruction
MonitorEnterExpression
MonitorExitExpression
MoveExceptionExpression
MoveExpression
MoveResultExpression
NewArrayExpression
NewInstance
NopExpression
Param
RefExpression
ReturnInstruction
StaticExpression
StaticInstruction
SwitchExpression
ThisParam
ThrowExpression
UnaryExpression
Variable
- androguard.decompiler.dad.node module
- androguard.decompiler.dad.opcode_ins module
Op
adddouble()
adddouble2addr()
addfloat()
addfloat2addr()
addint()
addint2addr()
addintlit16()
addintlit8()
addlong()
addlong2addr()
aget()
agetboolean()
agetbyte()
agetchar()
agetobject()
agetshort()
agetwide()
andint()
andint2addr()
andintlit16()
andintlit8()
andlong()
andlong2addr()
aput()
aputboolean()
aputbyte()
aputchar()
aputobject()
aputshort()
aputwide()
arraylength()
assign_binary_2addr_exp()
assign_binary_exp()
assign_cast_exp()
assign_cmp()
assign_const()
assign_lit()
checkcast()
cmpgdouble()
cmpgfloat()
cmpldouble()
cmplfloat()
cmplong()
const()
const16()
const4()
constclass()
consthigh16()
conststring()
conststringjumbo()
constwide()
constwide16()
constwide32()
constwidehigh16()
divdouble()
divdouble2addr()
divfloat()
divfloat2addr()
divint()
divint2addr()
divintlit16()
divintlit8()
divlong()
divlong2addr()
doubletofloat()
doubletoint()
doubletolong()
fillarraydata()
fillarraydatapayload()
fillednewarray()
fillednewarrayrange()
floattodouble()
floattoint()
floattolong()
get_args()
get_variables()
goto()
goto16()
goto32()
ifeq()
ifeqz()
ifge()
ifgez()
ifgt()
ifgtz()
ifle()
iflez()
iflt()
ifltz()
ifne()
ifnez()
iget()
igetboolean()
igetbyte()
igetchar()
igetobject()
igetshort()
igetwide()
instanceof()
inttobyte()
inttochar()
inttodouble()
inttofloat()
inttolong()
inttoshort()
invokedirect()
invokedirectrange()
invokeinterface()
invokeinterfacerange()
invokestatic()
invokestaticrange()
invokesuper()
invokesuperrange()
invokevirtual()
invokevirtualrange()
iput()
iputboolean()
iputbyte()
iputchar()
iputobject()
iputshort()
iputwide()
load_array_exp()
longtodouble()
longtofloat()
longtoint()
monitorenter()
monitorexit()
move()
move16()
moveexception()
movefrom16()
moveobject()
moveobject16()
moveobjectfrom16()
moveresult()
moveresultobject()
moveresultwide()
movewide()
movewide16()
movewidefrom16()
muldouble()
muldouble2addr()
mulfloat()
mulfloat2addr()
mulint()
mulint2addr()
mulintlit16()
mulintlit8()
mullong()
mullong2addr()
negdouble()
negfloat()
negint()
neglong()
newarray()
newinstance()
nop()
notint()
notlong()
orint()
orint2addr()
orintlit16()
orintlit8()
orlong()
orlong2addr()
packedswitch()
remdouble()
remdouble2addr()
remfloat()
remfloat2addr()
remint()
remint2addr()
remintlit16()
remintlit8()
remlong()
remlong2addr()
return_reg()
returnobject()
returnvoid()
returnwide()
rsubint()
rsubintlit8()
sget()
sgetboolean()
sgetbyte()
sgetchar()
sgetobject()
sgetshort()
sgetwide()
shlint()
shlint2addr()
shlintlit8()
shllong()
shllong2addr()
shrint()
shrint2addr()
shrintlit8()
shrlong()
shrlong2addr()
sparseswitch()
sput()
sputboolean()
sputbyte()
sputchar()
sputobject()
sputshort()
sputwide()
store_array_inst()
subdouble()
subdouble2addr()
subfloat()
subfloat2addr()
subint()
subint2addr()
sublong()
sublong2addr()
throw()
ushrint()
ushrint2addr()
ushrintlit8()
ushrlong()
ushrlong2addr()
xorint()
xorint2addr()
xorintlit16()
xorintlit8()
xorlong()
xorlong2addr()
- androguard.decompiler.dad.util module
- androguard.decompiler.dad.writer module
Writer
Writer.dec_ind()
Writer.end_ins()
Writer.inc_ind()
Writer.space()
Writer.str_ext()
Writer.visit_alength()
Writer.visit_aload()
Writer.visit_assign()
Writer.visit_astore()
Writer.visit_base_class()
Writer.visit_binary_expression()
Writer.visit_cast()
Writer.visit_catch_node()
Writer.visit_check_cast()
Writer.visit_cond_expression()
Writer.visit_cond_node()
Writer.visit_condz_expression()
Writer.visit_constant()
Writer.visit_decl()
Writer.visit_fill_array()
Writer.visit_filled_new_array()
Writer.visit_get_instance()
Writer.visit_get_static()
Writer.visit_ins()
Writer.visit_invoke()
Writer.visit_loop_node()
Writer.visit_monitor_enter()
Writer.visit_monitor_exit()
Writer.visit_move()
Writer.visit_move_exception()
Writer.visit_move_result()
Writer.visit_new()
Writer.visit_new_array()
Writer.visit_node()
Writer.visit_nop()
Writer.visit_param()
Writer.visit_put_instance()
Writer.visit_put_static()
Writer.visit_return()
Writer.visit_return_node()
Writer.visit_return_void()
Writer.visit_short_circuit_condition()
Writer.visit_statement_node()
Writer.visit_super()
Writer.visit_switch()
Writer.visit_switch_node()
Writer.visit_this()
Writer.visit_throw()
Writer.visit_throw_node()
Writer.visit_try_node()
Writer.visit_unary_expression()
Writer.visit_variable()
Writer.write()
Writer.write_ext()
Writer.write_ind()
Writer.write_ind_visit_end()
Writer.write_ind_visit_end_ext()
Writer.write_inplace_if_possible()
Writer.write_method()
string()
- Module contents
- androguard.decompiler.dad package
- Submodules
- androguard.decompiler.decompiler module
- Module contents
- Subpackages
Submodules¶
androguard.misc module¶
- androguard.misc.AnalyzeAPK(_file, session=None, raw=False)¶
Analyze an android application and setup all stuff for a more quickly analysis! If session is None, no session is used at all. This is the default behaviour. If you like to continue your work later, it might be a good idea to use a session. A default session can be created by using
get_default_session()
.- Parameters:
_file (string (for filename) or bytes (for raw)) – the filename of the android application or a buffer which represents the application
session – A session (default: None)
raw – boolean if raw bytes are supplied instead of a filename
- Return type:
return the
APK
, list ofDalvikVMFormat
, andAnalysis
objects
- androguard.misc.AnalyzeDex(filename, session=None)¶
Analyze an android dex file and setup all stuff for a more quickly analysis !
- Parameters:
filename (string) – the filename of the android dex file or a buffer which represents the dex file
session – A session (Default None)
- Return type:
return a tuple of (sha256hash,
DalvikVMFormat
,Analysis
)
- androguard.misc.AnalyzeODex(filename, session=None)¶
Analyze an android odex file and setup all stuff for a more quickly analysis !
- Parameters:
filename (string) – the filename of the android dex file or a buffer which represents the dex file
session – The Androguard Session to add the ODex to (default: None)
- Return type:
return a tuple of (sha256hash,
DalvikOdexVMFormat
,Analysis
)
- androguard.misc.RunDecompiler(d, dx, decompiler_name)¶
Run the decompiler on a specific analysis
- Parameters:
d (
DalvikVMFormat
object) – the DalvikVMFormat objectdx (
VMAnalysis
object) – the analysis of the formatdecompiler (string) – the type of decompiler to use (“dad”, “dex2jad”, “ded”)
- androguard.misc.clean_file_name(filename, unique=True, replace='_', force_nt=False)¶
Return a filename version, which has no characters in it which are forbidden. On Windows these are for example <, /, ?, …
The intention of this function is to allow distribution of files to different OSes.
- Parameters:
filename – string to clean
unique – check if the filename is already taken and append an integer to be unique (default: True)
replace – replacement character. (default: ‘_’)
force_nt – Force shortening of paths like on NT systems (default: False)
- Returns:
clean string
- androguard.misc.get_default_session()¶
Return the default Session from the configuration or create a new one, if the session in the configuration is None.
- androguard.misc.init_print_colors()¶
- androguard.misc.sign_apk(filename, keystore, storepass)¶
Use jarsigner to sign an APK file.
- Parameters:
filename – APK file on disk to sign (path)
keystore – path to keystore
storepass – your keystorage passphrase
androguard.session module¶
- androguard.session.Load(filename)¶
load your session!
example:
s = session.Load("mysession.ag")
- Parameters:
filename (string) – the filename where the session has been saved
- Return type:
the elements of your session :)
- androguard.session.Save(session, filename=None)¶
save your session to use it later.
Returns the filename of the written file. If not filename is given, a file named androguard_session_<DATE>.ag will be created in the current working directory. <DATE> is a timestamp with the following format: %Y-%m-%d_%H%M%S.
This function will overwrite existing files without asking.
If the file could not written, None is returned.
example:
s = session.Session() session.Save(s, "msession.ag")
- Parameters:
session – A Session object to save
filename (string) – output filename to save the session
- class androguard.session.Session(export_ipython=False)¶
Bases:
object
A Session is able to store multiple APK, DEX or ODEX files and can be pickled to disk in order to resume work later.
The main function used in Sessions is probably
add()
, which adds files to the session and performs analysis on them.Afterwards, the files can be gathered using methods such as
get_objects_apk()
,get_objects_dex()
orget_classes()
.example:
s = Session() digest = s.add("some.apk") print("SHA256 of the file: {}".format(digest)) a, d, dx = s.get_objects_apk("some.apk", digest) print(a.get_package()) # Reset the Session for a fresh set of files s.reset() digest2 = s.add("classes.dex") print("SHA256 of the file: {}".format(digest2)) for h, d, dx in s.get_objects_dex(): print("SHA256 of the DEX file: {}".format(h))
- add(filename, raw_data=None, dx=None)¶
Generic method to add a file to the session.
This is the main method to use when adding files to a Session!
If an APK file is supplied, all DEX files are analyzed too. For DEX and ODEX files, only this file is analyzed (what else should be analyzed).
Returns the SHA256 of the analyzed file.
- Parameters:
filename – filename to load
raw_data – bytes of the file, or None to load the file from filename
dx – An already exiting
Analysis
object
- Returns:
the sha256 of the file or None on failure
- addAPK(filename, data)¶
Add an APK file to the Session and run analysis on it.
- Parameters:
filename – (file)name of APK file
data – binary data of the APK file
- Returns:
a tuple of SHA256 Checksum and APK Object
- addDEX(filename, data, dx=None)¶
Add a DEX file to the Session and run analysis.
- Parameters:
filename – the (file)name of the DEX file
data – binary data of the dex file
dx – an existing Analysis Object (optional)
- Returns:
A tuple of SHA256 Hash, DalvikVMFormat Object and Analysis object
- addDEY(filename, data, dx=None)¶
Add an ODEX file to the session and run the analysis
- get_all_apks()¶
Yields a list of tuples of SHA256 hash of the APK and APK objects of all analyzed APKs in the Session.
- get_analysis(current_class)¶
Returns the
Analysis
object which contains the current_class.- Parameters:
current_class (androguard.core.bytecodes.dvm.ClassDefItem) – The class to search for
- Return type:
- get_classes()¶
Returns all Java Classes from the DEX objects as an array of DEX files.
- get_digest_by_class(current_class)¶
Return the SHA256 hash of the object containing the ClassDefItem
Returns the first digest this class was present. For example, if you analyzed an APK, this should return the digest of the APK and not of the DEX file.
- get_filename_by_class(current_class)¶
Returns the filename of the DEX file where the class is in.
Returns the first filename this class was present. For example, if you analyzed an APK, this should return the filename of the APK and not of the DEX file.
- Parameters:
current_class – ClassDefItem
- Returns:
None if class was not found or the filename
- get_format(current_class)¶
Returns the
DalvikVMFormat
of a givenClassDefItem
.- Parameters:
current_class – A ClassDefItem
- get_nb_strings()¶
Return the total number of strings in all Analysis objects
- get_objects_apk(filename=None, digest=None)¶
Returns APK, DalvikVMFormat and Analysis of a specified APK.
You must specify either filename or digest. It is possible to use both, but in this case only digest is used.
example:
s = Session() digest = s.add("some.apk") a, d, dx = s.get_objects_apk(digest=digest)
example:
s = Session() filename = "some.apk" digest = s.add(filename) a, d, dx = s.get_objects_apk(filename=filename)
- Parameters:
filename – the filename of the APK file, only used of digest is None
digest – the sha256 hash, as returned by
add()
for the APK
- Returns:
a tuple of (APK, [DalvikVMFormat], Analysis)
- get_objects_dex()¶
Yields all dex objects inclduing their Analysis objects
- Returns:
tuple of (sha256, DalvikVMFormat, Analysis)
- get_strings()¶
Yields all StringAnalysis for all unique Analysis objects
- isOpen()¶
Test if any file was analyzed in this session
- Returns:
True if any file was analyzed, False otherwise
- reset()¶
Reset the current session, delete all added files.
- show()¶
Print information to stdout about the current session. Gets all APKs, all DEX files and all Analysis objects.
androguard.util module¶
- androguard.util.get_certificate_name_string(name, short=False, delimiter=', ')¶
Format the Name type of a X509 Certificate in a human readable form.
- Parameters:
name (dict or
asn1crypto.x509.Name
) – Name object to return the DN fromshort (boolean) – Use short form (default: False)
delimiter (str) – Delimiter string or character between two parts (default: ‘, ‘)
- Return type:
str
- androguard.util.read(filename, binary=True)¶
Open and read a file
- Parameters:
filename – filename to open and read
binary – True if the file should be read as binary
- Returns:
bytes if binary is True, str otherwise