MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / creation_options

Method creation_options

packages/server/src/android.rs:188–206  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

186 }
187
188 pub fn creation_options(&self) -> Result<Value, AppError> {
189 if !self.avdmanager_path().exists() || !self.sdkmanager_path().exists() {
190 return Ok(json!({
191 "deviceTypes": [],
192 "systemImages": [],
193 "unavailableReason": format!(
194 "Android SDK command line tools were not found under {}.",
195 sdk_root().display()
196 ),
197 }));
198 }
199
200 let device_output = self.run_avdmanager(["list", "device"])?;
201 let system_image_output = self.run_sdkmanager(["--list_installed"])?;
202 Ok(json!({
203 "deviceTypes": parse_avdmanager_devices(&device_output),
204 "systemImages": parse_installed_system_images(&system_image_output),
205 }))
206 }
207
208 pub fn create_emulator(&self, spec: AndroidEmulatorSpec) -> Result<Value, AppError> {
209 validate_avd_name(&spec.name)?;

Callers 1

simulator_create_optionsFunction · 0.80

Calls 4

avdmanager_pathMethod · 0.80
sdkmanager_pathMethod · 0.80
run_avdmanagerMethod · 0.80
run_sdkmanagerMethod · 0.80

Tested by

no test coverage detected