anadroid package
Subpackages
- anadroid.application package
- Submodules
- anadroid.application.AbstractApplication module
- anadroid.application.AndroidProject module
AndroidProject
AndroidProject.projname
AndroidProject.projir
AndroidProject.results_dir
AndroidProject.root_build_file
AndroidProject.main_manif_file
AndroidProject.tests_manif_file
AndroidProject.add_apk()
AndroidProject.create_inner_folder()
AndroidProject.get_apks()
AndroidProject.get_build_files()
AndroidProject.get_gradle_plugin()
AndroidProject.get_gradle_settings()
AndroidProject.get_main_manif_file()
AndroidProject.get_proj_json()
AndroidProject.get_root_build_file()
AndroidProject.get_test_apks()
AndroidProject.has_gradle_wrapper()
AndroidProject.save_proj_json()
AndroidProject.set_version()
BUILD_FLAVOR
BUILD_TYPE
Project
is_android_project()
mk_ma_dir()
- anadroid.application.Application module
- anadroid.application.Dependency module
- anadroid.application.ProjectModule module
- Module contents
- anadroid.build package
- Submodules
- anadroid.build.AbstractBuilder module
- anadroid.build.GracleBuildErrorSolver module
KNOWN_ERROR
KNOWN_ERROR.BUILD_SDK_ERROR
KNOWN_ERROR.BUILD_TOOLS_CPU_ERROR
KNOWN_ERROR.GOOGLE_REPO_ERROR
KNOWN_ERROR.LIBS_ERROR
KNOWN_ERROR.MAYBE_MISSING_GOOGLE_REPO
KNOWN_ERROR.MIN_SDK_ERROR
KNOWN_ERROR.NDK_BAD_CONFIG
KNOWN_ERROR.NDK_TOOLCHAIN_ERROR
KNOWN_ERROR.NO_BUILD_TOOLS
KNOWN_ERROR.NO_GRADLEW_EXEC
KNOWN_ERROR.NO_TARGET_PLATFORM
KNOWN_ERROR.NO_WRAPPER
KNOWN_ERROR.USER_HAS_TO_ACCEPT_INSTALL
KNOWN_ERROR.WRAPPER_ERROR
KNOWN_ERROR.WRAPPER_MISMATCH_ERROR
KNOWN_ERROR.WRAPPER_PROP_ERROR
add_google_repo()
add_google_repo_build_script()
get_adequate_gradle_version()
get_gradle_plugin_version()
is_known_error()
replace_build_tools_version()
replace_gradle_plugin_version()
solve_known_error()
update_gradle_wrapper_version()
upgrade_version_from_version_list()
- anadroid.build.GradleBuilder module
GradleBuilder
GradleBuilder.change_history
GradleBuilder.gradle_plg_version
GradleBuilder.build_tools_version
GradleBuilder.adapt_target_sdk_upgrade()
GradleBuilder.build()
GradleBuilder.build_apk()
GradleBuilder.build_local_properties_file()
GradleBuilder.build_proj_and_apk()
GradleBuilder.build_tests_apk()
GradleBuilder.build_with_gradlew()
GradleBuilder.create_app_from_installed_apk()
GradleBuilder.install_apks()
GradleBuilder.needs_external_lib_dependency()
GradleBuilder.needs_min_sdk_upgrade()
GradleBuilder.needs_rebuild()
GradleBuilder.regist_error_build()
GradleBuilder.regist_successful_build()
GradleBuilder.sign_apks()
GradleBuilder.uninstall_all_apks()
GradleBuilder.was_attempted_to_build_before()
GradleBuilder.was_last_build_successful()
gen_dependency_string()
is_library_gradle()
set_transitive_names()
- anadroid.build.SdkManagerWrapper module
- anadroid.build.versionUpgrader module
- Module contents
- anadroid.device package
- Submodules
- anadroid.device.AbstractDevice module
ADB_CONN
AbstractDevice
AbstractDevice.serial_nr
AbstractDevice.conn_type
AbstractDevice.execute_command()
AbstractDevice.execute_root_command()
AbstractDevice.get_device_android_version()
AbstractDevice.install_apks()
AbstractDevice.is_screen_dreaming()
AbstractDevice.is_screen_unlocked()
AbstractDevice.list_installed_packages()
AbstractDevice.lock_screen()
AbstractDevice.press_lock_button()
AbstractDevice.reboot()
AbstractDevice.touch_screen()
AbstractDevice.uninstall_pkg()
AbstractDevice.unlock_screen()
- anadroid.device.Device module
Device
Device.clear_logcat()
Device.contains_file()
Device.dump_logcat_to_file()
Device.execute_command()
Device.execute_root_command()
Device.get_device_android_version()
Device.get_device_brand()
Device.get_device_cores()
Device.get_device_info()
Device.get_device_max_cpu_freq()
Device.get_device_model()
Device.get_device_props()
Device.get_device_ram()
Device.get_device_sdk_version()
Device.get_device_specs()
Device.get_kernel_version()
Device.get_min_sdk_version()
Device.get_new_installed_pkgs()
Device.get_package_matching()
Device.get_prop()
Device.has_package_installed()
Device.install_apk()
Device.install_apks()
Device.is_rooted()
Device.is_screen_dreaming()
Device.is_screen_unlocked()
Device.list_installed_packages()
Device.load_device_state()
Device.lock_screen()
Device.save_device_info()
Device.save_device_specs()
Device.save_device_state()
Device.set_device_state()
Device.set_log_size()
Device.uninstall_pkg()
Device.unlock_screen()
DeviceNotFoundError
background_installer()
click_to_install()
get_first_connected_device()
has_to_click_to_install()
set_device_conn()
- anadroid.device.DeviceState module
DEVICE_STATE_ENFORCE
DeviceState
DeviceState.device
DeviceState.screen_locked
DeviceState.screen_brightness
DeviceState.screen_always_on
DeviceState.screen_auto_rotate
DeviceState.screen_orientation
DeviceState.bluetooth
DeviceState.wifi
DeviceState.gps
DeviceState.nfc_state
DeviceState.mobile_data_state
DeviceState.speakers_state
DeviceState.flashlight
DeviceState.change_speaker_state()
DeviceState.enforce_state()
DeviceState.get_bluetooth_state()
DeviceState.get_device_state()
DeviceState.get_gps_state()
DeviceState.get_hotspot_state()
DeviceState.get_mobile_data_state()
DeviceState.get_nfc_state()
DeviceState.get_nr_processes_running()
DeviceState.get_screen_always_on()
DeviceState.get_screen_auto_rotate()
DeviceState.get_screen_brightness()
DeviceState.get_screen_lock_state()
DeviceState.get_screen_orientation()
DeviceState.get_speakers_state()
DeviceState.get_state()
DeviceState.get_states_from_permission()
DeviceState.get_used_cpu_averages()
DeviceState.get_used_ram_kernel()
DeviceState.get_used_ram_pss()
DeviceState.get_wifi_state()
DeviceState.set_bluetooth_state()
DeviceState.set_gps_state()
DeviceState.set_hotspot_state()
DeviceState.set_mobile_data_state()
DeviceState.set_nfc_state()
DeviceState.set_screen_always_on_while_plugged()
DeviceState.set_screen_auto_rotate()
DeviceState.set_screen_brightness()
DeviceState.set_screen_lock_state()
DeviceState.set_screen_orientation()
DeviceState.set_wifi_state()
get_known_state_keys()
- anadroid.device.MockedDevice module
- Module contents
- anadroid.instrument package
- Submodules
- anadroid.instrument.AbstractInstrumenter module
AbstractInstrumenter
AbstractInstrumenter.mirror_dirname
AbstractInstrumenter.get_build_classpaths()
AbstractInstrumenter.get_build_dependencies()
AbstractInstrumenter.get_build_plugins()
AbstractInstrumenter.get_instrumentation_log()
AbstractInstrumenter.get_log_filename()
AbstractInstrumenter.init()
AbstractInstrumenter.instrument()
AbstractInstrumenter.needs_build_classpaths()
AbstractInstrumenter.needs_build_dependency()
AbstractInstrumenter.needs_build_plugin()
AbstractInstrumenter.needs_reinstrumentation()
AbstractInstrumenter.write_instrumentation_log_file()
- anadroid.instrument.JInstInstrumenter module
JInstInstrumenter
JInstInstrumenter.build_dependencies
JInstInstrumenter.classpath_dependencies
JInstInstrumenter.build_plugins
JInstInstrumenter.get_build_classpaths()
JInstInstrumenter.get_build_dependencies()
JInstInstrumenter.get_build_plugins()
JInstInstrumenter.get_log_filename()
JInstInstrumenter.init()
JInstInstrumenter.instrument()
JInstInstrumenter.needs_build_classpaths()
JInstInstrumenter.needs_build_dependency()
JInstInstrumenter.needs_build_plugin()
- anadroid.instrument.NoneInstrumenter module
NoneInstrumenter
NoneInstrumenter.get_build_classpaths()
NoneInstrumenter.get_build_dependencies()
NoneInstrumenter.get_build_plugins()
NoneInstrumenter.get_dirname()
NoneInstrumenter.get_log_filename()
NoneInstrumenter.init()
NoneInstrumenter.instrument()
NoneInstrumenter.needs_build_classpaths()
NoneInstrumenter.needs_build_dependency()
NoneInstrumenter.needs_build_plugin()
NoneInstrumenter.needs_reinstrumentation()
- anadroid.instrument.Types module
- Module contents
- anadroid.profiler package
- Subpackages
- Submodules
- anadroid.profiler.AbstractProfiler module
AbstractProfiler
AbstractProfiler.device
AbstractProfiler.pkg_name
AbstractProfiler.device_dir
AbstractProfiler.dependency
AbstractProfiler.plugin
AbstractProfiler.export_results()
AbstractProfiler.get_dependencies_location()
AbstractProfiler.init()
AbstractProfiler.needs_external_dependencies()
AbstractProfiler.start_profiling()
AbstractProfiler.stop_profiling()
AbstractProfiler.update_state()
- anadroid.profiler.GreenScalerProfiler module
GREENSCALER_TASK
GreenScalerProfiler
GreenScalerProfiler.inner_app
GreenScalerProfiler.exec_greenscaler()
GreenScalerProfiler.export_results()
GreenScalerProfiler.get_dependencies_location()
GreenScalerProfiler.init()
GreenScalerProfiler.install_profiler()
GreenScalerProfiler.needs_external_dependencies()
GreenScalerProfiler.pull_results()
GreenScalerProfiler.start_profiling()
GreenScalerProfiler.stop_profiling()
GreenScalerProfiler.update_state()
exec_command()
- anadroid.profiler.ManafaProfiler module
ManafaProfiler
ManafaProfiler.export_results()
ManafaProfiler.get_dependencies_location()
ManafaProfiler.init()
ManafaProfiler.install_profiler()
ManafaProfiler.needs_external_dependencies()
ManafaProfiler.pull_results()
ManafaProfiler.start_profiling()
ManafaProfiler.stop_profiling()
ManafaProfiler.update_state()
- anadroid.profiler.NoneProfiler module
- anadroid.profiler.TrepnProfiler module
TrepnProfiler
TrepnProfiler.export_results()
TrepnProfiler.get_dependencies_location()
TrepnProfiler.get_last_run_duration()
TrepnProfiler.init()
TrepnProfiler.install_profiler()
TrepnProfiler.load_preferences_file()
TrepnProfiler.log_run_duration()
TrepnProfiler.needs_external_dependencies()
TrepnProfiler.pull_results()
TrepnProfiler.setup_device_dir()
TrepnProfiler.setup_trepn_device_dir()
TrepnProfiler.start_profiling()
TrepnProfiler.stop_profiling()
TrepnProfiler.update_state()
- Module contents
- anadroid.resources package
- anadroid.results_analysis package
- Subpackages
- Submodules
- anadroid.results_analysis.AbstractAnalyzer module
AbstractAnalyzer
AbstractAnalyzer.supported_filters
AbstractAnalyzer.validation_filters
AbstractAnalyzer.analyze_test()
AbstractAnalyzer.analyze_tests()
AbstractAnalyzer.clean()
AbstractAnalyzer.get_supported_filters()
AbstractAnalyzer.get_val_for_filter()
AbstractAnalyzer.setup()
AbstractAnalyzer.show_results()
AbstractAnalyzer.supports_filter()
AbstractAnalyzer.validate_filters()
AbstractAnalyzer.validate_test()
- anadroid.results_analysis.ApkAPIAnalyzer module
- anadroid.results_analysis.ComposedAnalyzer module
- anadroid.results_analysis.HunterAnalyzer module
- anadroid.results_analysis.LogAnalyzer module
- anadroid.results_analysis.ManafaAnalyzer module
- anadroid.results_analysis.OldAnaDroidAnalyzer module
OldAnaDroidAnalyzer
OldAnaDroidAnalyzer.analyze()
OldAnaDroidAnalyzer.analyze_test()
OldAnaDroidAnalyzer.analyze_tests()
OldAnaDroidAnalyzer.clean()
OldAnaDroidAnalyzer.get_val_for_filter()
OldAnaDroidAnalyzer.inner_analyze()
OldAnaDroidAnalyzer.setup()
OldAnaDroidAnalyzer.show_results()
OldAnaDroidAnalyzer.validate_filters()
OldAnaDroidAnalyzer.validate_test()
- anadroid.results_analysis.SCCAnalyzer module
- Module contents
- anadroid.test package
- anadroid.testing_framework package
- Subpackages
- anadroid.testing_framework.work package
- Submodules
- anadroid.testing_framework.work.AbstractWorkLoad module
- anadroid.testing_framework.work.AppCrawlerWorkUnit module
- anadroid.testing_framework.work.DroidBotWorkUnit module
- anadroid.testing_framework.work.MonkeyRunnerWorkUnit module
- anadroid.testing_framework.work.MonkeyWorkUnit module
- anadroid.testing_framework.work.RERANWorkUnit module
- anadroid.testing_framework.work.WorkLoad module
- anadroid.testing_framework.work.WorkUnit module
- Module contents
- anadroid.testing_framework.work package
- Submodules
- anadroid.testing_framework.AbstractTestingFramework module
AbstractTestingFramework
AbstractTestingFramework.id
AbstractTestingFramework.analyzer
AbstractTestingFramework.config
AbstractTestingFramework.execute_test()
AbstractTestingFramework.get_config()
AbstractTestingFramework.get_default_test_dir()
AbstractTestingFramework.init()
AbstractTestingFramework.init_default_workload()
AbstractTestingFramework.install()
AbstractTestingFramework.is_recordable()
AbstractTestingFramework.record_test()
AbstractTestingFramework.test_app()
AbstractTestingFramework.uninstall()
- anadroid.testing_framework.AppCrawlerFramework module
- anadroid.testing_framework.DroidBotFramework module
- anadroid.testing_framework.JUnitBasedFramework module
- anadroid.testing_framework.MonkeyFramework module
- anadroid.testing_framework.MonkeyRunnerFramework module
MonkeyRunnerFramework
MonkeyRunnerFramework.resources_dir
MonkeyRunnerFramework.exec_one_test()
MonkeyRunnerFramework.execute_test()
MonkeyRunnerFramework.init()
MonkeyRunnerFramework.init_default_workload()
MonkeyRunnerFramework.install()
MonkeyRunnerFramework.load_tests_of_app()
MonkeyRunnerFramework.test_app()
MonkeyRunnerFramework.uninstall()
- anadroid.testing_framework.RERANFramework module
RERANFramework
RERANFramework.resources_dir
RERANFramework.exec_one_test()
RERANFramework.execute_test()
RERANFramework.init()
RERANFramework.init_default_workload()
RERANFramework.install()
RERANFramework.is_recordable()
RERANFramework.load_tests_of_app()
RERANFramework.push_test()
RERANFramework.record_test()
RERANFramework.test_app()
RERANFramework.uninstall()
- Module contents
- Subpackages
- anadroid.utils package
- Submodules
- anadroid.utils.Utils module
COMMAND_RESULT
LogSeverity
execute_shell_command()
extract_pkg_name_from_apk()
extract_version_from_apk()
get_analyzers_filter_file()
get_apksigner_bin()
get_color()
get_date_str()
get_general_config_dir()
get_keystore_path()
get_keystore_pwd()
get_log_dir()
get_pack_dir()
get_reference_dir()
get_resources_dir()
get_results_dir()
log()
log_to_file()
loge()
logf()
logi()
logs()
logw()
mega_find()
sign_apk()
- Module contents
- anadroid.view package
Submodules
anadroid.Anadroid module
- class anadroid.Anadroid.AnaDroid(arg1, results_dir='anadroid_results', profiler=PROFILER.MANAFA, testing_framework=TESTING_FRAMEWORK.MONKEY, device=None, instrumenter=INSTRUMENTER.JINST, analyzer=ANALYZER.OLD_ANADROID_ANALYZER, instrumentation_type=INSTRUMENTATION_TYPE.ANNOTATION, build_system=BUILD_SYSTEM.GRADLE, build_type=BUILD_TYPE.DEBUG, tests_dir=None, rebuild_apps=False, reinstrument=False, recover_from_last_run=False, test_cmd=None, load_projects=True)[source]
Bases:
object
Provides a configurable pipeline to benchmark and analyze Android Projects and Applications. This class provides a set of verifications and workflow that allows to automatically perform tasks involved in mobile software analysis. Any class can extend this class to customize its workflow and perform customized benchmarks. .. attribute:: device
device to be used.
- type:
Device
- app_projects_ut
Android Projects to process.
- Type:
list
- tests_dir
directory containing app tests (only used with RERAN).
- Type:
str
- rebuild_apps
optionally rebuild apps from Android Projects already built.
- Type:
bool
- reinstrument
optionally reinstrument Android Projects previously instrumented.
- Type:
bool
- apps
list of apps to exercise.
- Type:
list
- apks
list of apks to exercise.
- Type:
list
- results_dir
directory where results will be stored.
- Type:
str
- instrumentation_type
instrumentation type.
- Type:
- profiler
profiler to be used.
- Type:
- analyzer
analyzer to parse and generate results from framework executions.
- Type:
- testing_framework
testing framework to be used.
- Type:
- instrumenter
instrumentation tool to be used.
- Type:
- builder
building system to build apps.
- Type:
- resources_dir
directory with framework resources.
- Type:
str
- build_type
type of build to produce in the Android Projects.
- Type:
- default_workflow()[source]
performs the basic workflow involved in processing apps straight from the source code. For each app, project or apk provided to pynadroid, performs the required steps to transform such inputs in software ready to be used and tested on the connected device, using the selected testing framework.
anadroid.Config module
anadroid.Types module
- class anadroid.Types.ANALYZER(value)[source]
Bases:
Enum
Enumerates the supported analyzers
- MANAFA_ANALYZER = 'Manafa Analyzer'
- OLD_ANADROID_ANALYZER = 'Old Anadroid Analyzer'
- class anadroid.Types.BUILD_SYSTEM(value)[source]
Bases:
Enum
Enumerates the build systems that can be used to build Android apps.
- ANT = 'Ant'
- GRADLE = 'Gradle'
- MAVEN = 'Maven'
- UNKNOWN = 'Unknown'
- class anadroid.Types.INSTRUMENTER(value)[source]
Bases:
Enum
Enumerates sota instrumentation tools.
- HUNTER = 'Hunter'
- JINST = 'JInst'
- NONE = 'None'
- class anadroid.Types.PROFILER(value)[source]
Bases:
Enum
Enumerates sota energy profilers.
- GREENSCALER = 'GreenScaler'
- MANAFA = 'E-manafa'
- MONSOON = 'Monsoon'
- NONE = 'None'
- PETRA = 'Petra'
- TREPN = 'Trepn'
- class anadroid.Types.TESTING_APPROACH(value)[source]
Bases:
Enum
Enumerates the 3 testing approaches.
- BLACKBOX = 'BlackBox'
- GREYBOX = 'GreyBox'
- WHITEBOX = 'WhiteBox'
- class anadroid.Types.TESTING_FRAMEWORK(value)[source]
Bases:
Enum
Enumerates supported testing frameworks
- APP_CRAWLER = 'Crawler'
- CUSTOM = 'Custom'
- DROIDBOT = 'Droidbot'
- ESPRESSO = 'Espresso'
- JUNIT = 'JUnit'
- MONKEY = 'Monkey'
- MONKEY_RUNNER = 'Monkeyrunner'
- OTHER = 'Other'
- RERAN = 'RERAN'
- ROBOTIUM = 'Robotium'