pub struct EmulatorTools { /* private fields */ }
Implementations§
Source§impl EmulatorTools
impl EmulatorTools
pub fn new() -> Self
Sourcepub fn writable_system(&mut self, writable_system: bool) -> &mut Self
pub fn writable_system(&mut self, writable_system: bool) -> &mut Self
Make system & vendor image writable after adb remount
Sourcepub fn delay_adb(&mut self, delay_adb: bool) -> &mut Self
pub fn delay_adb(&mut self, delay_adb: bool) -> &mut Self
Delay adb communication till boot completes
Sourcepub fn encryption_key(&mut self, encryption_key: &Path) -> &mut Self
pub fn encryption_key(&mut self, encryption_key: &Path) -> &mut Self
Read initial encryption key image from
Sourcepub fn logcat_output(&mut self, logcat_output: &Path) -> &mut Self
pub fn logcat_output(&mut self, logcat_output: &Path) -> &mut Self
Output file of logcat(default none)
Sourcepub fn partition_size(&mut self, partition_size: u32) -> &mut Self
pub fn partition_size(&mut self, partition_size: u32) -> &mut Self
System/data partition size in MBs
Sourcepub fn cache(&mut self, cache: &Path) -> &mut Self
pub fn cache(&mut self, cache: &Path) -> &mut Self
Cache partition image (default is temporary file)
Sourcepub fn cache_size(&mut self, cache_size: u32) -> &mut Self
pub fn cache_size(&mut self, cache_size: u32) -> &mut Self
Cache partition size in MBs
Sourcepub fn quit_after_boot(&mut self, quit_after_boot: u32) -> &mut Self
pub fn quit_after_boot(&mut self, quit_after_boot: u32) -> &mut Self
Qeuit emulator after guest boots completely, or after timeout in seconds
Sourcepub fn qemu_top_dir(&mut self, qemu_top_dir: &Path) -> &mut Self
pub fn qemu_top_dir(&mut self, qemu_top_dir: &Path) -> &mut Self
Use the emulator in the specified dir (relative or absolute path)v
Sourcepub fn monitor_adb(&mut self, monitor_adb: bool) -> &mut Self
pub fn monitor_adb(&mut self, monitor_adb: bool) -> &mut Self
Monitor the adb messages between guest and host, default not
Sourcepub fn snapstorage(&mut self, snapstorage: &Path) -> &mut Self
pub fn snapstorage(&mut self, snapstorage: &Path) -> &mut Self
File that contains all state snapshots (default
Sourcepub fn no_snapstorage(&mut self, no_snapstorage: bool) -> &mut Self
pub fn no_snapstorage(&mut self, no_snapstorage: bool) -> &mut Self
Do not mount a snapshot storage file (this disables all snapshot functionality)
Sourcepub fn snapshot(&mut self, snapshot: String) -> &mut Self
pub fn snapshot(&mut self, snapshot: String) -> &mut Self
Name of snapshot within storage file for auto-start and auto-save (default ‘default-boot’)
Sourcepub fn no_snapshot(&mut self, no_snapshot: bool) -> &mut Self
pub fn no_snapshot(&mut self, no_snapshot: bool) -> &mut Self
Perform a full boot and do not auto-save, but qemu vmload and vmsave operate on snapstorage
Sourcepub fn no_snapshot_save(&mut self, no_snapshot_save: bool) -> &mut Self
pub fn no_snapshot_save(&mut self, no_snapshot_save: bool) -> &mut Self
Do not auto-save to snapshot on exit: abandon changed state
Sourcepub fn no_snapshot_load(&mut self, no_snapshot_load: bool) -> &mut Self
pub fn no_snapshot_load(&mut self, no_snapshot_load: bool) -> &mut Self
Do not auto-start from snapshot: perform a full boot
Sourcepub fn snapshot_list(&mut self, snapshot_list: bool) -> &mut Self
pub fn snapshot_list(&mut self, snapshot_list: bool) -> &mut Self
Show a list of available snapshots
Sourcepub fn no_snapshot_update_time(
&mut self,
no_snapshot_update_time: bool,
) -> &mut Self
pub fn no_snapshot_update_time( &mut self, no_snapshot_update_time: bool, ) -> &mut Self
Do not try to correct snapshot time on restore
Sourcepub fn wipe_data(&mut self, wipe_data: bool) -> &mut Self
pub fn wipe_data(&mut self, wipe_data: bool) -> &mut Self
Reset the user data image (copy it from initdata)
Sourcepub fn no_skin(&mut self, no_skin: bool) -> &mut Self
pub fn no_skin(&mut self, no_skin: bool) -> &mut Self
Deprecated: create an AVD with no skin instead
Sourcepub fn id(&mut self, id: String) -> &mut Self
pub fn id(&mut self, id: String) -> &mut Self
Assign an id to this virtual device (separate from the avd name)
Sourcepub fn ranchu(&mut self, ranchu: bool) -> &mut Self
pub fn ranchu(&mut self, ranchu: bool) -> &mut Self
Use new emulator backend instead of the classic one
Sourcepub fn netspeed(&mut self, netspeed: Netspeed) -> &mut Self
pub fn netspeed(&mut self, netspeed: Netspeed) -> &mut Self
Maximum network download/upload speeds
Sourcepub fn code_profile(&mut self, code_profile: String) -> &mut Self
pub fn code_profile(&mut self, code_profile: String) -> &mut Self
Enable code profiling
Sourcepub fn show_kernel(&mut self, show_kernel: bool) -> &mut Self
pub fn show_kernel(&mut self, show_kernel: bool) -> &mut Self
Display kernel messages
Sourcepub fn dalvik_vm_checkjni(&mut self, dalvik_vm_checkjni: bool) -> &mut Self
pub fn dalvik_vm_checkjni(&mut self, dalvik_vm_checkjni: bool) -> &mut Self
Enable dalvik.vm.checkjni
Sourcepub fn radio(&mut self, radio: String) -> &mut Self
pub fn radio(&mut self, radio: String) -> &mut Self
Redirect radio modem interface to character device
Sourcepub fn ports(&mut self, ports: Vec<String>) -> &mut Self
pub fn ports(&mut self, ports: Vec<String>) -> &mut Self
TCP ports used for the console and adb bridge
Sourcepub fn onion_alph(&mut self, onion_alph: String) -> &mut Self
pub fn onion_alph(&mut self, onion_alph: String) -> &mut Self
Specify onion-skin translucency
Sourcepub fn onion_rotation(&mut self, onion_rotation: String) -> &mut Self
pub fn onion_rotation(&mut self, onion_rotation: String) -> &mut Self
specify onion-skin rotation
Sourcepub fn dpi_device(&mut self, dpi_device: String) -> &mut Self
pub fn dpi_device(&mut self, dpi_device: String) -> &mut Self
Specify device’s resolution in dpi (default DEFAULT_DEVICE_DPI)
Sourcepub fn wifi_client_port(&mut self, wifi_client_port: String) -> &mut Self
pub fn wifi_client_port(&mut self, wifi_client_port: String) -> &mut Self
Connect to other emulator for WiFi forwarding
Sourcepub fn wifi_server_port(&mut self, wifi_server_port: String) -> &mut Self
pub fn wifi_server_port(&mut self, wifi_server_port: String) -> &mut Self
Listen to other emulator for WiFi forwarding
Sourcepub fn http_proxy(&mut self, http_proxy: String) -> &mut Self
pub fn http_proxy(&mut self, http_proxy: String) -> &mut Self
Make TCP connections through a HTTP/HTTPS proxy
Sourcepub fn timezone(&mut self, timezone: String) -> &mut Self
pub fn timezone(&mut self, timezone: String) -> &mut Self
Use this timezone instead of the host’s default
Sourcepub fn change_language(&mut self, change_language: String) -> &mut Self
pub fn change_language(&mut self, change_language: String) -> &mut Self
Use this language instead of the current one. Restarts the framework
Sourcepub fn change_country(&mut self, change_country: String) -> &mut Self
pub fn change_country(&mut self, change_country: String) -> &mut Self
Use this country instead of the current one. Restarts the framework
Sourcepub fn change_locale(&mut self, change_locale: String) -> &mut Self
pub fn change_locale(&mut self, change_locale: String) -> &mut Self
Use this locale instead of the current one. Restarts the framework
Sourcepub fn dns_server(&mut self, dns_server: String) -> &mut Self
pub fn dns_server(&mut self, dns_server: String) -> &mut Self
Use this DNS server(s) in the emulated system
Sourcepub fn net_tap_script_up(&mut self, net_tap_script_up: String) -> &mut Self
pub fn net_tap_script_up(&mut self, net_tap_script_up: String) -> &mut Self
Script to run when the TAP interface goes up
Sourcepub fn net_tap_script_down(&mut self, net_tap_script_down: String) -> &mut Self
pub fn net_tap_script_down(&mut self, net_tap_script_down: String) -> &mut Self
Script to run when the TAP interface goes down
Sourcepub fn no_boot_anim(&mut self, no_boot_anim: bool) -> &mut Self
pub fn no_boot_anim(&mut self, no_boot_anim: bool) -> &mut Self
Disable animation for faster boot
Sourcepub fn qt_hide_window(&mut self, qt_hide_window: bool) -> &mut Self
pub fn qt_hide_window(&mut self, qt_hide_window: bool) -> &mut Self
Start QT window but hide window display
Sourcepub fn no_passive_gps(&mut self, no_passive_gps: bool) -> &mut Self
pub fn no_passive_gps(&mut self, no_passive_gps: bool) -> &mut Self
Disable passive gps updates
Sourcepub fn gnss_file_path(&mut self, gnss_file_path: &Path) -> &mut Self
pub fn gnss_file_path(&mut self, gnss_file_path: &Path) -> &mut Self
Use the specified filepath to read gnss data
Sourcepub fn gnss_grpc_port(&mut self, gnss_grpc_port: String) -> &mut Self
pub fn gnss_grpc_port(&mut self, gnss_grpc_port: String) -> &mut Self
Use the specified port number to start grpc service to receive gnss data
Sourcepub fn virtio_console(&mut self, virtio_console: bool) -> &mut Self
pub fn virtio_console(&mut self, virtio_console: bool) -> &mut Self
Using virtio console as console
Sourcepub fn read_only(&mut self, read_only: bool) -> &mut Self
pub fn read_only(&mut self, read_only: bool) -> &mut Self
Allow running multiple instances of emulators on the same AVD, but cannot save snapshot
Sourcepub fn is_restart(&mut self, is_restart: String) -> &mut Self
pub fn is_restart(&mut self, is_restart: String) -> &mut Self
Specifies that this emulator was a restart, and to wait out
Sourcepub fn report_console(&mut self, report_console: String) -> &mut Self
pub fn report_console(&mut self, report_console: String) -> &mut Self
Report console port to remote socket
Sourcepub fn shell_serial(&mut self, shell_serial: String) -> &mut Self
pub fn shell_serial(&mut self, shell_serial: String) -> &mut Self
Specific character device for root shell
Sourcepub fn studio_params(&mut self, studio_params: &Path) -> &mut Self
pub fn studio_params(&mut self, studio_params: &Path) -> &mut Self
Used by Android Studio to provide parameters
Join the shared network, using IP address 10.1.2.
Sourcepub fn use_host_vulkan(&mut self, use_host_vulkan: bool) -> &mut Self
pub fn use_host_vulkan(&mut self, use_host_vulkan: bool) -> &mut Self
Use host for vulkan emulation regardless of ‘gpu’ mode
Sourcepub fn camera_back(&mut self, camera_back: CameraMode) -> &mut Self
pub fn camera_back(&mut self, camera_back: CameraMode) -> &mut Self
Set emulation mode for a camera facing back
Sourcepub fn camera_front(&mut self, camera_front: CameraMode) -> &mut Self
pub fn camera_front(&mut self, camera_front: CameraMode) -> &mut Self
Set emulation mode for a camera facing front
Sourcepub fn webcam_list(&mut self, webcam_list: bool) -> &mut Self
pub fn webcam_list(&mut self, webcam_list: bool) -> &mut Self
Lists web cameras available for emulation
Sourcepub fn virtualscene_poster(&mut self, virtualscene_poster: String) -> &mut Self
pub fn virtualscene_poster(&mut self, virtualscene_poster: String) -> &mut Self
Load a png or jpeg image as a poster in the virtual scene
Sourcepub fn screen(&mut self, screen: ScreenMode) -> &mut Self
pub fn screen(&mut self, screen: ScreenMode) -> &mut Self
Set emulated screen mode
Sourcepub fn force_32bit(&mut self, force_32bit: bool) -> &mut Self
pub fn force_32bit(&mut self, force_32bit: bool) -> &mut Self
Always use 32-bit emulator
Sourcepub fn selinux(&mut self, selinux: SELinux) -> &mut Self
pub fn selinux(&mut self, selinux: SELinux) -> &mut Self
Set SELinux to either disabled or permissive mode
Sourcepub fn unix_pipe(&mut self, unix_pipe: &Path) -> &mut Self
pub fn unix_pipe(&mut self, unix_pipe: &Path) -> &mut Self
Add
Sourcepub fn fixed_scale(&mut self, fixed_scale: bool) -> &mut Self
pub fn fixed_scale(&mut self, fixed_scale: bool) -> &mut Self
Use fixed 1:1 scale for the initial emulator window
Sourcepub fn wait_for_debugger(&mut self, wait_for_debugger: bool) -> &mut Self
pub fn wait_for_debugger(&mut self, wait_for_debugger: bool) -> &mut Self
Pause on launch and wait for a debugger process to attach before resuming
Sourcepub fn skip_adb_auth(&mut self, skip_adb_auth: bool) -> &mut Self
pub fn skip_adb_auth(&mut self, skip_adb_auth: bool) -> &mut Self
Skip adb authentication dialogue
Sourcepub fn metrics_to_console(&mut self, metrics_to_console: bool) -> &mut Self
pub fn metrics_to_console(&mut self, metrics_to_console: bool) -> &mut Self
Enable usage metrics and print the messages to stdout
Sourcepub fn metrics_collection(&mut self, metrics_collection: bool) -> &mut Self
pub fn metrics_collection(&mut self, metrics_collection: bool) -> &mut Self
Enable usage metrics and send them to google play
Sourcepub fn metrics_to_file(&mut self, metrics_to_file: &Path) -> &mut Self
pub fn metrics_to_file(&mut self, metrics_to_file: &Path) -> &mut Self
Enable usage metrics and write the messages into specified file
Sourcepub fn detect_image_hang(&mut self, detect_image_hang: bool) -> &mut Self
pub fn detect_image_hang(&mut self, detect_image_hang: bool) -> &mut Self
Enable the detection of system image hangs
Sourcepub fn feature(&mut self, feature: String) -> &mut Self
pub fn feature(&mut self, feature: String) -> &mut Self
Force-enable or disable (-name) the features
Sourcepub fn icc_profile(&mut self, icc_profile: &Path) -> &mut Self
pub fn icc_profile(&mut self, icc_profile: &Path) -> &mut Self
Use icc profile from specified file
Sourcepub fn sim_access_rules_file(
&mut self,
sim_access_rules_file: &Path,
) -> &mut Self
pub fn sim_access_rules_file( &mut self, sim_access_rules_file: &Path, ) -> &mut Self
Use SIM access rules from specified file
Sourcepub fn phone_number(&mut self, phone_number: String) -> &mut Self
pub fn phone_number(&mut self, phone_number: String) -> &mut Self
Sets the phone number of the emulated device
Sourcepub fn acpi_config(&mut self, acpi_config: &Path) -> &mut Self
pub fn acpi_config(&mut self, acpi_config: &Path) -> &mut Self
Specify acpi device proprerties (hierarchical key=value pair)
Sourcepub fn fuchsia(&mut self, fuchsia: bool) -> &mut Self
pub fn fuchsia(&mut self, fuchsia: bool) -> &mut Self
Run Fuchsia image. Bypasses android-specific setup; args after are treated as standard QEMU args
Sourcepub fn window_size(&mut self, window_size: String) -> &mut Self
pub fn window_size(&mut self, window_size: String) -> &mut Self
Set window size for when bypassing android-specific setup
Sourcepub fn allow_host_audio(&mut self, allow_host_audio: bool) -> &mut Self
pub fn allow_host_audio(&mut self, allow_host_audio: bool) -> &mut Self
Allows sending of audio from audio input devices. Otherwise, zeroes out audio
Sourcepub fn restart_when_stalled(&mut self, restart_when_stalled: bool) -> &mut Self
pub fn restart_when_stalled(&mut self, restart_when_stalled: bool) -> &mut Self
Allows restarting guest when it is stalled
Sourcepub fn perf_stat(&mut self, perf_stat: &Path) -> &mut Self
pub fn perf_stat(&mut self, perf_stat: &Path) -> &mut Self
Run periodic perf stat reporter in the background and write output to specified file
Share current video state in shared memory region
Sourcepub fn grpc_tls_key(&mut self, grpc_tls_key: &Path) -> &mut Self
pub fn grpc_tls_key(&mut self, grpc_tls_key: &Path) -> &mut Self
File with the private key used to enable gRPC TLS
Sourcepub fn grpc_tls_cer(&mut self, grpc_tls_cer: &Path) -> &mut Self
pub fn grpc_tls_cer(&mut self, grpc_tls_cer: &Path) -> &mut Self
File with the public X509 certificate used to enable gRPC TLS
Sourcepub fn grpc_tls_ca(&mut self, grpc_tls_ca: &Path) -> &mut Self
pub fn grpc_tls_ca(&mut self, grpc_tls_ca: &Path) -> &mut Self
File with the Certificate Authorities used to validate client certificates
Sourcepub fn grpc_use_token(&mut self, grpc_use_token: bool) -> &mut Self
pub fn grpc_use_token(&mut self, grpc_use_token: bool) -> &mut Self
Use the emulator console token for gRPC authentication
Sourcepub fn idle_grpc_timeout(&mut self, idle_grpc_timeout: u32) -> &mut Self
pub fn idle_grpc_timeout(&mut self, idle_grpc_timeout: u32) -> &mut Self
Terminate the emulator if there is no gRPC activity within
Sourcepub fn multidisplay(&mut self, multidisplay: String) -> &mut Self
pub fn multidisplay(&mut self, multidisplay: String) -> &mut Self
Config multiple displays
Sourcepub fn google_maps_key(&mut self, google_maps_key: String) -> &mut Self
pub fn google_maps_key(&mut self, google_maps_key: String) -> &mut Self
API key to use with the Google Maps GUI
Sourcepub fn no_location_ui(&mut self, no_location_ui: bool) -> &mut Self
pub fn no_location_ui(&mut self, no_location_ui: bool) -> &mut Self
Disable the location UI in the extended window
Sourcepub fn use_keycode_forwarding(
&mut self,
use_keycode_forwarding: bool,
) -> &mut Self
pub fn use_keycode_forwarding( &mut self, use_keycode_forwarding: bool, ) -> &mut Self
Use keycode forwarding instead of host charmap translation
Sourcepub fn record_session(&mut self, record_session: &Path) -> &mut Self
pub fn record_session(&mut self, record_session: &Path) -> &mut Self
Screen record the emulator session
Sourcepub fn legacy_fake_camera(&mut self, legacy_fake_camera: bool) -> &mut Self
pub fn legacy_fake_camera(&mut self, legacy_fake_camera: bool) -> &mut Self
Use legacy camera HAL for the emulated fake camera
Sourcepub fn no_camera_hq_edge(&mut self, no_camera_hq_edge: bool) -> &mut Self
pub fn no_camera_hq_edge(&mut self, no_camera_hq_edge: bool) -> &mut Self
Disable high qualify edge processing for emulated camera
Sourcepub fn no_direct_adb(&mut self, no_direct_adb: bool) -> &mut Self
pub fn no_direct_adb(&mut self, no_direct_adb: bool) -> &mut Self
Use external adb executable for internal communication
Sourcepub fn check_snapshot_loadable(
&mut self,
check_snapshot_loadable: String,
) -> &mut Self
pub fn check_snapshot_loadable( &mut self, check_snapshot_loadable: String, ) -> &mut Self
Check if a snasphot is loadable
Sourcepub fn no_hidpi_scaling(&mut self, no_hidpi_scaling: bool) -> &mut Self
pub fn no_hidpi_scaling(&mut self, no_hidpi_scaling: bool) -> &mut Self
Disable HiDPI scaling of guest display on macOS devices
Sourcepub fn no_mouse_reposition(&mut self, no_mouse_reposition: bool) -> &mut Self
pub fn no_mouse_reposition(&mut self, no_mouse_reposition: bool) -> &mut Self
Do not reposition the mouse to emulator window center if mouse pointer gets out of the window
Sourcepub fn guest_angle(&mut self, guest_angle: bool) -> &mut Self
pub fn guest_angle(&mut self, guest_angle: bool) -> &mut Self
Enable guest ANGLE as system driver
pub fn debug_no(&mut self, debug_no: DebugTags) -> &mut Self
Sourcepub fn help_disk_images(&mut self, help_disk_images: bool) -> &mut Self
pub fn help_disk_images(&mut self, help_disk_images: bool) -> &mut Self
About disk images
Debug tags for -debug
Sourcepub fn help_char_devices(&mut self, help_char_devices: bool) -> &mut Self
pub fn help_char_devices(&mut self, help_char_devices: bool) -> &mut Self
Character
Sourcepub fn help_environment(&mut self, help_environment: bool) -> &mut Self
pub fn help_environment(&mut self, help_environment: bool) -> &mut Self
Environment variables
Sourcepub fn help_virtual_device(&mut self, help_virtual_device: bool) -> &mut Self
pub fn help_virtual_device(&mut self, help_virtual_device: bool) -> &mut Self
Virtual device management
Sourcepub fn help_sdk_images(&mut self, help_sdk_images: bool) -> &mut Self
pub fn help_sdk_images(&mut self, help_sdk_images: bool) -> &mut Self
About disk images when using the SDK
Sourcepub fn help_build_images(&mut self, help_build_images: bool) -> &mut Self
pub fn help_build_images(&mut self, help_build_images: bool) -> &mut Self
About disk images when building Android
Trait Implementations§
Source§impl Clone for EmulatorTools
impl Clone for EmulatorTools
Source§fn clone(&self) -> EmulatorTools
fn clone(&self) -> EmulatorTools
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for EmulatorTools
impl Default for EmulatorTools
Source§fn default() -> EmulatorTools
fn default() -> EmulatorTools
Auto Trait Implementations§
impl Freeze for EmulatorTools
impl RefUnwindSafe for EmulatorTools
impl Send for EmulatorTools
impl Sync for EmulatorTools
impl Unpin for EmulatorTools
impl UnwindSafe for EmulatorTools
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more