Skip to content

App Management

Launch App

pb launch <package>

Launch an application by its package name.

ParameterTypeRequiredDescription
package_namestringYesAndroid package name

Example:

bash
pb launch com.android.chrome

Start Activity

pb start <package>

Start an Android Activity. Supports flags similar to adb am start.

ParameterTypeRequiredDescription
package_namestringNoPackage name (positional)
-nstringNoComponent name (package/activity). The / separates package and class
-astringNoIntent action
-dstringNoIntent data URI
-tstringNoMIME type

Examples:

bash
# Launch by package name
pb start com.android.chrome

# Launch a specific activity
pb start -n com.android.chrome/com.google.android.apps.chrome.Main

# Launch with action and data
pb start -a android.intent.action.VIEW -d "https://example.com"

Force Stop

pb force-stop <package>

Force stop an application.

ParameterTypeRequiredDescription
package_namestringYesPackage name to stop

Example:

bash
pb force-stop com.android.chrome

List Packages

pb packages

List all installed packages on the device.

Example:

bash
pb packages
text
com.android.chrome
com.android.settings
mark.via
json
{
  "code": 200,
  "data": {
    "packages": [
      "com.android.chrome",
      "com.android.settings",
      "mark.via"
    ]
  },
  "msg": "OK"
}

Top Activity

pb top-activity

Get the currently visible (foreground) Activity.

Example:

bash
pb top-activity
text
com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity
json
{
  "code": 200,
  "data": {
    "package_name": "com.android.chrome",
    "class_name": "org.chromium.chrome.browser.ChromeTabbedActivity"
  },
  "msg": "OK"
}

Install APK

pb install <file_or_url>

Install an APK or XAPK file onto the device. Supports local files, URLs, and device paths.

ParameterTypeRequiredDescription
file_or_urlstringYesLocal file path, URL, or device path

Routing Strategy

pb install automatically determines the best installation method based on the input:

Input TypeBehavior
http:// / https:// URLDevice downloads and installs directly
file:// / content:// URIPassed to device for direct install
Local file path (exists on your machine)File is chunked-uploaded to the device, installed, then the temp file is cleaned up
Other paths (e.g., /sdcard/Download/app.apk)Treated as a device path and passed through

TIP

Local file upload uses a chunked base64 transfer via shell, with a progress bar in interactive mode. Large files (~100 MB+) may take several minutes.

Examples:

bash
# Install from a local file
pb install ./my-app.apk

# Install from a URL (device downloads directly)
pb install https://example.com/app.apk

# Install from a device path
pb install /sdcard/Download/app.apk

Uninstall App

pb uninstall <package>

Uninstall an application from the device.

ParameterTypeRequiredDescription
package_namestringYesPackage name to uninstall

Example:

bash
pb uninstall com.example.app