Skip to main content

tools-android

Build npm version

@rnx-kit/tools-android is a collection of functions for deploying apps on Android.

Usage:

import * as tools from "@rnx-kit/tools-android";
CategoryFunctionDescription
apkgetPackageName(apk)Returns the package name and the first launchable activity of the specified APK.
apkinstall(device, apk, packageName)Installs the specified APK on specified emulator or physical device.
apkstart(options, packageName, activityName)Starts the specified activity on specified emulator or physical device.
devicegetDevices()Returns a list of attached physical Android devices.
devicegetEmulators()Returns a list of available Android virtual devices.
devicelaunchEmulator(emulatorName)Launches the emulator with the specified name.
deviceselectDevice(emulatorName, logger)Returns the emulator or physical device with the specified name.
gradleassemble(projectDir, buildParams)Invokes Gradle build.
gradlefindOutputFile(projectDir, buildConfiguration)Tries to find Gradle build output file.
sdkgetBuildToolsPath()Returns the path to Android SDK Build-Tools.