anadroid.results_analysis package

Subpackages

Submodules

anadroid.results_analysis.AbstractAnalyzer module

class anadroid.results_analysis.AbstractAnalyzer.AbstractAnalyzer(profiler, analyzers_cfg_file='/Users/ruirua/repos/pyAnaDroid/anadroid/resources/config/analyzer_filters.json')[source]

Bases: ABC

Defines a basic interface to be implemented by programs aiming to analyze and produce results about the data collected during the profiling session and profiled apps. .. attribute:: profiler

profiler.

type:

Profiler

supported_filters

default set of filters to validate analyzed results.

Type:

set

validation_filters

additional set of filters provided via config file to validate analyzed results.

Type:

set

abstract analyze_test(app, test_id, **kwargs)[source]

Analyze test identified by test_id of a given app. :param app: app. :type app: App :param test_id: test uuid.

abstract analyze_tests(app=None, results_dir=None, **kwargs)[source]

Analyze a set of tests of a given app. :param app: app. :type app: App :param results_dir: directory where to store results.

abstract clean()[source]

clean previous results.

get_supported_filters()[source]

return set of supported filters.

abstract get_val_for_filter(filter_name, add_data=None)[source]

get correspondent value of a given filter :param filter_name: name of the filter.

Returns:

filter value.

Return type:

value

abstract setup(**kwargs)[source]
abstract show_results(app_list)[source]
supports_filter(filter_name)[source]

check if a given filter is supported. :param filter_name: name of the filter.

Returns:

True if supported, False otherwise.

Return type:

bool

abstract validate_filters()[source]

validate supported filters.

abstract validate_test(app, arg1, **kwargs)[source]

validate results of a certain test.

anadroid.results_analysis.ApkAPIAnalyzer module

class anadroid.results_analysis.ApkAPIAnalyzer.ApkAPIAnalyzer(profiler)[source]

Bases: AbstractAnalyzer

Defines a basic interface collect metrics of each method defined in an Android Project using Androguard.

analyze(apk_path, apk_name)[source]
analyze_test(app, test_id, **kwargs)[source]

Analyze test identified by test_id of a given app. :param app: app. :type app: App :param test_id: test uuid.

analyze_tests(app=None, results_dir=None, **kwargs)[source]

Analyze a set of tests of a given app. :param app: app. :type app: App :param results_dir: directory where to store results.

clean()[source]

clean previous results.

eval_app(app)[source]
get_val_for_filter(filter_name, add_data=None)[source]

get correspondent value of a given filter :param filter_name: name of the filter.

Returns:

filter value.

Return type:

value

setup(**kwargs)[source]
show_results(app_list)[source]
validate_filters()[source]

validate supported filters.

validate_test(app, arg1, **kwargs)[source]

validate results of a certain test.

anadroid.results_analysis.ApkAPIAnalyzer.eval(path, pack)[source]
anadroid.results_analysis.ApkAPIAnalyzer.inferPackage(classname)[source]
anadroid.results_analysis.ApkAPIAnalyzer.inferType(st)[source]
anadroid.results_analysis.ApkAPIAnalyzer.methodAPIStringToJSON(method_string)[source]
anadroid.results_analysis.ApkAPIAnalyzer.methodDescriptorToJSON(jsonObj, descriptor)[source]
anadroid.results_analysis.ApkAPIAnalyzer.parseArgs(descriptor)[source]
anadroid.results_analysis.ApkAPIAnalyzer.parseClassName(classname)[source]
anadroid.results_analysis.ApkAPIAnalyzer.parseDescriptors(descriptor)[source]
anadroid.results_analysis.ApkAPIAnalyzer.parseMethod(full)[source]
anadroid.results_analysis.ApkAPIAnalyzer.rreplace(mystr, reverse_removal, reverse_replacement)[source]
anadroid.results_analysis.ApkAPIAnalyzer.trolhaSep(mystr, separator)[source]

anadroid.results_analysis.ComposedAnalyzer module

class anadroid.results_analysis.ComposedAnalyzer.ComposedAnalyzer(profiler, inner_analyzers=())[source]

Bases: AbstractAnalyzer

Provides a way to abstract the usage of a set of AbstractAnalyzers through a single api call.

analyze_test(test_id, **kwargs)[source]

Analyze test identified by test_id of a given app. :param app: app. :type app: App :param test_id: test uuid.

analyze_tests(app=None, results_dir=None, **kwargs)[source]

Analyze a set of tests of a given app. :param app: app. :type app: App :param results_dir: directory where to store results.

clean()[source]

clean previous results.

get_val_for_filter(filter_name, add_data=None)[source]

get correspondent value of a given filter :param filter_name: name of the filter.

Returns:

filter value.

Return type:

value

setup(**kwargs)[source]
show_results(app_list)[source]
validate_filters()[source]

validate supported filters.

validate_test(app, arg1, **kwargs)[source]

validate results of a certain test.

anadroid.results_analysis.HunterAnalyzer module

anadroid.results_analysis.LogAnalyzer module

class anadroid.results_analysis.LogAnalyzer.LogAnalyzer(profiler)[source]

Bases: AbstractAnalyzer

Implements AbstractAnalyzer interface to allow analyze Android logs produced during profiling sessions using logcatparser. Calculate statistics about the produced logs to analyze and characterize test executions.

analyze_test(app, log_file, output_filename=None, **kwargs)[source]

Analyze test identified by test_id of a given app. :param app: app. :type app: App :param test_id: test uuid.

analyze_tests(app=None, results_dir=None, **kwargs)[source]

Analyze a set of tests of a given app. :param app: app. :type app: App :param results_dir: directory where to store results.

clean()[source]

clean previous results.

fetch_log_files(dir_path, test_id='')[source]
get_val_for_filter(filter_name, add_data=None)[source]

get correspondent value of a given filter :param filter_name: name of the filter.

Returns:

filter value.

Return type:

value

setup(**kwargs)[source]
show_results(app_list)[source]
validate_filters()[source]

validate supported filters.

validate_test(app, test_id, **kwargs)[source]

validate results of a certain test.

anadroid.results_analysis.ManafaAnalyzer module

class anadroid.results_analysis.ManafaAnalyzer.ManafaAnalyzer(profiler)[source]

Bases: AbstractAnalyzer

Implements AbstractAnalyzer interface to allow analyze profiled results with EManafa profiler. Calculate statistics about the produced results to analyze, validate and characterize executions.

analyze_test(app, test_id, **kwargs)[source]

Analyze test identified by test_id of a given app. :param app: app. :type app: App :param test_id: test uuid.

analyze_tests(app=None, results_dir=None, **kwargs)[source]

Analyze a set of tests of a given app. :param app: app. :type app: App :param results_dir: directory where to store results.

clean()[source]

clean previous results.

get_val_for_filter(filter_name, add_data=None)[source]

get correspondent value of a given filter :param filter_name: name of the filter.

Returns:

filter value.

Return type:

value

setup(**kwargs)[source]
show_results(app_list)[source]
validate_filters()[source]

validate supported filters.

validate_test(app, test_id, **kwargs)[source]

validate results of a certain test.

anadroid.results_analysis.OldAnaDroidAnalyzer module

class anadroid.results_analysis.OldAnaDroidAnalyzer.OldAnaDroidAnalyzer(profiler, jarpath=None, remote_url=None)[source]

Bases: AbstractAnalyzer

Implements AbstractAnalyzer interface to allow analyze profiled results with Trepn profiler. Calculate statistics about the produced results to analyze, validate and characterize executions.

analyze(app, **kwargs)[source]
analyze_test(app, test_id, **kwargs)[source]

Analyze test identified by test_id of a given app. :param app: app. :type app: App :param test_id: test uuid.

analyze_tests(app=None, results_dir=None, **kwargs)[source]

Analyze a set of tests of a given app. :param app: app. :type app: App :param results_dir: directory where to store results.

clean()[source]

clean previous results.

get_val_for_filter(filter_name, add_data=None)[source]

get correspondent value of a given filter :param filter_name: name of the filter.

Returns:

filter value.

Return type:

value

inner_analyze(app, output_log_file='AnaDroidAnalyzer.out', **kwargs)[source]
setup(**kwargs)[source]
show_results(app_list)[source]
validate_filters()[source]

validate supported filters.

validate_test(app, arg1, **kwargs)[source]

validate results of a certain test.

anadroid.results_analysis.SCCAnalyzer module

class anadroid.results_analysis.SCCAnalyzer.SCCAnalyzer(profiler)[source]

Bases: AbstractAnalyzer

Implements AbstractAnalyzer interface to allow to calculate app code results using scc tool.

analyze(app, output_log_file='scc.json', **kwargs)[source]
analyze_test(app, test_id, **kwargs)[source]

Analyze test identified by test_id of a given app. :param app: app. :type app: App :param test_id: test uuid.

analyze_tests(app=None, results_dir=None, **kwargs)[source]

Analyze a set of tests of a given app. :param app: app. :type app: App :param results_dir: directory where to store results.

clean()[source]

clean previous results.

get_val_for_filter(filter_name, add_data=None)[source]

get correspondent value of a given filter :param filter_name: name of the filter.

Returns:

filter value.

Return type:

value

setup(**kwargs)[source]
show_results(app_list)[source]
validate_filters()[source]

validate supported filters.

validate_test(app, arg1, **kwargs)[source]

validate results of a certain test.

Module contents