modules.machinery.avd.Avd

Package modules :: Package machinery :: Module avd :: Class Avd |
[hide private]
[frames] | no frames]

# Class Avd

source code

                               object --+
                                        |
    lib.cuckoo.common.abstracts.Machinery --+
                                            |
                                           Avd

Virtualization layer for Android Emulator.

Instance Methods | [hide private]
_initialize_check(self) Runs all checks when a machine manager is initialized. | source code
start(self, label, task) Start a virtual machine. | source code
stop(self, label) Stops a virtual machine. | source code
_list(self) Lists virtual machines installed. | source code
_status(self, label) Gets current status of a vm. | source code
duplicate_reference_machine(self, label) Creates a new emulator based on a reference one. | source code
delete_old_emulator(self, label) Deletes any trace of an emulator that would have the same name as the one of the current emulator. | source code
replace_content_in_file(self, fileName, contentToReplace, replacementContent) Replaces the specified motif by a specified value in the specified file. | source code
start_emulator(self, label, task) Starts the emulator. | source code
stop_emulator(self, label) Stop the emulator. | source code
wait_for_device_ready(self, label) Analyzes the emulator and returns when it's ready. | source code
port_forward(self, label) | source code
start_agent(self, label) | source code
check_adb_recognize_emulator(self, label) Checks that ADB recognizes the emulator. | source code
restart_adb_server(self) Restarts ADB server. | source code
get_task_id(self, label) | source code
Inherited from `lib.cuckoo.common.abstracts.Machinery`: `__init__`, `acquire`, `availables`, `dump_memory`, `initialize`, `machines`, `pcap_path`, `release`, `running`, `set_options`, `set_status`, `shutdown` Inherited from `lib.cuckoo.common.abstracts.Machinery` (private): `_get_resultserver_port`, `_initialize`, `_wait_status` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
Inherited from `lib.cuckoo.common.abstracts.Machinery`: `LABEL`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### _initialize_check(self) | source code
Runs all checks when a machine manager is initialized. Raises: `CuckooMachineError` - if the android emulator is not found. Overrides: lib.cuckoo.common.abstracts.Machinery._initialize_check

### start(self, label, task) | source code
Start a virtual machine. Parameters: `label` - virtual machine name. `task` - task object. Raises: `CuckooMachineError` - if unable to start. Overrides: lib.cuckoo.common.abstracts.Machinery.start

### stop(self, label) | source code
Stops a virtual machine. Parameters: `label` - virtual machine name. Raises: `CuckooMachineError` - if unable to stop. Overrides: lib.cuckoo.common.abstracts.Machinery.stop

### _list(self) | source code
Lists virtual machines installed. Returns: virtual machine names list. Raises: `NotImplementedError` - this method is abstract. Overrides: lib.cuckoo.common.abstracts.Machinery._list

### _status(self, label) | source code
Gets current status of a vm. Parameters: `label` - virtual machine name. Returns: status string.

### check_adb_recognize_emulator(self, label) | source code
Checks that ADB recognizes the emulator. Returns True if device is recognized by ADB, False otherwise.

### restart_adb_server(self) | source code
Restarts ADB server. This function is not used because we have to verify we don't have multiple devices.