buck install
This command builds and installs an .apk
or .app
bundle on a emulator/simulator or device, and optionally launches it.
Common Parameters
All the parameters for buck build
also apply to buck install
.
--run
(-r)
Launch the.apk
with the default activity (Android) or the.app
bundle (iOS) after installation.--emulator
(-e)
Use this option to use emulators/simulators only.--device
(-d)
Use this option to use real devices only. This option works only with Android devices. It does not work with iOS devices.--serial
(--udid)
Use device or emulator/simulator with specific serial or UDID number.
Android
Builds and installs the APK for an android_binary
or target.
Takes an android_binary
, an apk_genrule
or an android_instrumentation_apk
, builds it, and installs it by running adb install <path_to_the_APK>
.
Parameters
--activity <fully qualified class name>
(-a)
Launch the.apk
with the specified activity after installation.-all
(-x)
Install APK on all connected devices and/or emulators (multi-install mode).--adb-threads
(-T)
Number of threads to use for adb operations. Defaults to number of connected devices.
iOS
Builds and installs an .app for an apple_bundle
target.
Takes an apple_bundle
, builds it, and installs it by copying it to a simulator or device as appropriate.
For device support, you need to first build the fbsimctl
utility from FBSimulatorControl and set [apple].device_helper_path
to its location.
Parameters
--simulator-name
(-n)
Use simulator with specific name (defaults toiPhone 8
)