App Management
Launch App
pb launch <package>
Launch an application by its package name.
| Parameter | Type | Required | Description |
|---|---|---|---|
package_name | string | Yes | Android package name |
Example:
pb launch com.android.chromeStart Activity
pb start <package>
Start an Android Activity. Supports flags similar to adb am start.
| Parameter | Type | Required | Description |
|---|---|---|---|
package_name | string | No | Package name (positional) |
-n | string | No | Component name (package/activity). The / separates package and class |
-a | string | No | Intent action |
-d | string | No | Intent data URI |
-t | string | No | MIME type |
Examples:
# 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
package_name | string | Yes | Package name to stop |
Example:
pb force-stop com.android.chromeList Packages
pb packages
List all installed packages on the device.
Example:
pb packagescom.android.chrome
com.android.settings
mark.via{
"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:
pb top-activitycom.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity{
"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.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_or_url | string | Yes | Local file path, URL, or device path |
Routing Strategy
pb install automatically determines the best installation method based on the input:
| Input Type | Behavior |
|---|---|
http:// / https:// URL | Device downloads and installs directly |
file:// / content:// URI | Passed 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:
# 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.apkUninstall App
pb uninstall <package>
Uninstall an application from the device.
| Parameter | Type | Required | Description |
|---|---|---|---|
package_name | string | Yes | Package name to uninstall |
Example:
pb uninstall com.example.app