creator-tools 0.4.1

Mobile Game Framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::error::*;
use crate::tools::AndroidSdk;
use std::path::Path;

/// Installs given APK in emulator or connected device.
/// Runs `adb install -r ...` command.
pub fn install_apk(sdk: &AndroidSdk, apk_path: &Path) -> Result<()> {
    let mut adb = sdk.platform_tool(bin!("adb"))?;
    adb.arg("install").arg("-r").arg(apk_path);
    adb.output_err(true)?;
    Ok(())
}