Struct android_tools::emulator::EmulatorTools
source · [−]pub struct EmulatorTools { /* private fields */ }
Implementations
sourceimpl 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
sourceimpl Clone for EmulatorTools
impl Clone for EmulatorTools
sourcefn clone(&self) -> EmulatorTools
fn clone(&self) -> EmulatorTools
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for EmulatorTools
impl Default for EmulatorTools
sourcefn default() -> EmulatorTools
fn default() -> EmulatorTools
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for EmulatorTools
impl Send for EmulatorTools
impl Sync for EmulatorTools
impl Unpin for EmulatorTools
impl UnwindSafe for EmulatorTools
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more