Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Applications on a Device

joelbyler edited this page · 3 revisions

Installing an Application

It is possible to install an application apk file using the adb gem.

sn = ADB.devices[0]
ADB.wait_for_device({:serial => sn}, 60)
ADB.install 'ApiDemos.apk', {:serial => sn}, 60

This operation will typically be setup using the wait_for_device command to ensure that the android device is online before attempting to install any applications

To pass options to the install operation, you can pass those as the second argument

ADB.install 'ApiDemos.apk', '-r'

This example will re-install the apk if it already exists

Uninstalling an Application

Applications may also be removed from an android device

ADB.uninstall 'com.example.android.apis', {:serial => ADB.devices[0]}

The first argument to the uninstall command is the package name used in your android application's manifest file.

Something went wrong with that request. Please try again.