pub struct AdbShellPm { /* private fields */ }

Implementations

Prints all packages, optionally only those whose package name contains the text in filter.

Options:

  • -f: See their associated file.
  • -d: Filter to only show disabled packages.
  • -e: Filter to only show enabled packages.
  • -s: Filter to only show system packages.
  • -3: Filter to only show third party packages.
  • -i: See the installer for the packages.
  • -u: Also include uninstalled packages.
  • --user user_id: The user space to query.

Prints all known permission groups.

Prints all known permissions, optionally only those in group.

Options:

  • -g: Organize by group.
  • -f: Print all information.
  • -s: Short summary.
  • -d: Only list dangerous permissions.
  • -u: List only the permissions users will see.

List all test packages.

Options:

  • -f: List the APK file for the test package.
  • target_package: List test packages for only this app.

Prints all features of the system.

Prints all the libraries supported by the current device.

Prints all users on the system.

Print the path to the APK of the given package.

Installs a package (specified by path) to the system.

Options:

  • -r: Reinstall an existing app, keeping its data.
  • -t: Allow test APKs to be installed. Gradle generates a test APK when you have only run or debugged your app or have used the Android Studio Build > Build APK command. If the APK is built using a developer preview SDK (if the targetSdkVersion is a letter instead of a number), you must include the -t option with the install command if you are installing a test APK.
  • -i installer_package_name: Specify the installer package name.
  • --install-location location: Sets the install location using one of the following values:
    • 0: Use the default install location
    • 1: Install on internal device storage
    • 2: Install on external media
  • -f: Install package on the internal system memory.
  • -d: Allow version code downgrade.
  • -g: Grant all permissions listed in the app manifest.
  • --fastdeploy: Quickly update an installed package by only updating the parts of the APK that changed.
  • --incremental: Installs enough of the APK to launch the app while streaming the remaining data in the background. To use this feature, you must sign the APK, create an [APK Signature Scheme v4 file], and place this file in the same directory as the APK. This feature is only supported on certain devices. This option forces adb to use the feature or fail if it is not supported (with verbose information on why it failed). Append the --wait option to wait until the APK is fully installed before granting access to the APK.

Removes a package from the system.

Options:

  • -k: Keep the data and cache directories around after package removal.

Deletes all data associated with a package.

Enable the given package or component (written as “package/class”).

Disable the given package or component (written as “package/class”).

Options:

--user user_id: The user to disable.

Grant a permission to an app. On devices running Android 6.0 (API level 23) and higher, the permission can be any permission declared in the app manifest. On devices running Android 5.1 (API level 22) and lower, must be an optional permission defined by the app.

Revoke a permission from an app. On devices running Android 6.0 (API level 23) and higher, the permission can be any permission declared in the app manifest. On devices running Android 5.1 (API level 22) and lower, must be an optional permission defined by the app.

Changes the default install location. Location values:

  • 0: Auto: Let system decide the best location.
  • 1: Internal: install on internal device storage.
  • 2: External: on external media.
Note

This is only intended for debugging; using this can cause apps to break and other undesireable behavior.

Returns the current install location. Return values:

  • 0: Auto: Let system decide the best location.
  • 1: Internal: install on internal device storage.
  • 2: External: on external media.

Specifies whether the given permission should be enforced.

Trim cache files to reach the given free space.

Create a new user with the given user_name, printing the new user identifier of the user.

Remove the user with the given user_id, deleting all data associated with that user

Prints the maximum number of users supported by the device.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.