Tool Name: airdroid_business_get_device_apps
Risk Level: 🟢 Low Risk
Execution Mode: âš¡ Synchronous
Category: Device Management
Quick Start (Copy & Use)
Summary: Retrieve the list of all installed applications on a specified device.
Prerequisites: DeviceId (device unique identifier).
Success Criteria: StatusCode == 200 and ErrorMessage is empty string.
What to Do Next: Iterate through the DeviceApps array to get app information; use Pagination for page navigation.
Minimal Request Example:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d"
}
Minimal Response Example:
{
"DeviceApps": [
{
"pkg_id": "com.facebook.katana",
"app_name": "Facebook",
"external_version": "543.0.0.55.73",
"internal_version": "467618094",
"app_size": "145.82",
"is_system_app": "User app",
"is_service_app": "Non-service App"
}
],
"Pagination": {
"total": 100,
"page_size": 50,
"current_page": 1,
"last_page": 2
},
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes (Common Recipes)
Recipe 1: Get First 20 Apps (Save Tokens)
When to use: Quick overview of device apps with reduced response data.
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Page": 1,
"PageSize": 20
}
Recipe 2: Paginate Through All Apps
When to use: Device has more apps than a single page can hold.
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Page": 2,
"PageSize": 50
}
Pagination logic: When Pagination.current_page < Pagination.last_page, use Page + 1 to get the next page.
Recipe 3: Get Full App List
When to use: You need all apps installed on the device.
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Page": 1,
"PageSize": 50
}
1. Overview
1.1 Description
Retrieve the list of all applications installed on a specified device, including app name, package name, version number, size, system/user app type, and other detailed information.
1.2 When to Use
- Audit which apps are installed on a device
- Check whether a specific application is installed
- Count device app quantities and storage usage
- Verify app deployment success
1.3 Execution Mode and Response
This operation is synchronous and returns results immediately.
Return data includes:
- DeviceApps: App list array
- Pagination: Pagination information object
1.4 Prerequisites
| Condition | Description | How to Check |
|---|---|---|
| Device exists | Device must be registered in AirDroid Business | Use Get All Devices to confirm |
| Permissions | Account must have permission to view device info | - |
1.5 Prerequisite Tools
| Dependency Tool | Purpose | Necessity |
|---|---|---|
| Get All Devices | Get DeviceId | If you only know the device name |
| Get a Device by Name | Get DeviceId by device name | If you only know the device name |
1.6 Differences from Similar Tools
| Tool Name | Use Case | Difference |
|---|---|---|
| Get All Device Apps | Get all apps on a device | Returns full app list with pagination |
| Get a Device App by Name | Query a specific app | Exact match by app name, returns a single app |
2. Inputs
2.1 Parameter List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| DeviceId | string | Yes | - | Device unique identifier |
| Page | number | No | 1 | Page number, starting from 1 |
| PageSize | number | No | 50 | Records per page, range 1-50 |
2.2 Parameter Details
`DeviceId`
Device unique identifier.
- Type: string
- Format: Non-empty string
- Source:
How to obtain:
- Via Get All Devices tool - use the device_id field from the response
- Via Get a Device by Name tool - exact name query
The device_id field from the output can be used directly as this parameter.
- Example:
"fa6edcff65ab444e8b5e0eb08df4175d"
`Page`
Page number for pagination.
- Type: number
- Format: Integer, minimum value 1
- Recommendation: Use with Pagination.last_page to determine if more pages are needed
- Example:
1
`PageSize`
Number of records per page.
- Type: number
- Format: Integer, range 1-50
- Recommendation: If you only need an overview, use a smaller value (e.g., 20) to reduce response data
- Example:
20
2.3 Parameter Combination Logic
- Page and PageSize are independent and can be used separately
- If no pagination parameters are passed, defaults to page 1 with 50 records per page
3. Outputs
3.1 Response Example
Success response:
{
"DeviceApps": [
{
"pkg_id": "com.facebook.katana",
"app_name": "Facebook",
"external_version": "543.0.0.55.73",
"internal_version": "467618094",
"app_size": "145.82",
"app_site": "145.82",
"is_system_app": "User app",
"is_service_app": "Non-service App",
"icon_url": "https://example.com/icon.png",
"install_time": "2010-01-01 08:00:30",
"last_update_time": 1766624462
}
],
"Pagination": {
"total": 100,
"page_size": 50,
"current_page": 1,
"last_page": 2
},
"StatusCode": 200,
"ErrorMessage": ""
}
Error response:
{
"DeviceApps": [],
"Pagination": {},
"StatusCode": -1,
"ErrorMessage": "Invalid device_id."
}
3.2 Field Descriptions
| Field Path | Type | Description |
|---|---|---|
| StatusCode | number | Status code. 200=success, -1=parameter error, 500=network exception |
| ErrorMessage | string | Error message. Empty string on success |
| DeviceApps | array | App list array |
| DeviceApps[].pkg_id | string | App package name (Package Name), e.g., com.facebook.katana |
| DeviceApps[].app_name | string | App display name |
| DeviceApps[].external_version | string | External version (display version), e.g., 543.0.0.55.73 |
| DeviceApps[].internal_version | string | Internal version (Version Code), e.g., 467618094 |
| DeviceApps[].app_size | string | App size (unit: MB) |
| DeviceApps[].is_system_app | string | Whether it is a system app: "User app" or "System app" |
| DeviceApps[].is_service_app | string | Whether it is a service app: "Service App" or "Non-service App" |
| DeviceApps[].icon_url | string | App icon URL |
| DeviceApps[].install_time | string | Installation time (datetime string) |
| DeviceApps[].last_update_time | number | Last update time (Unix timestamp) |
| DeviceApps[].website_url | string | Web App website URL (only for Web Apps) |
| Pagination | object | Pagination information object |
3.3 Status Code / Enum Value Mapping
| Field | Value | Meaning |
|---|---|---|
| is_system_app | "User app" | User-installed application |
| is_system_app | "System app" | Pre-installed system application |
| is_service_app | "Service App" | Service-type application |
| is_service_app | "Non-service App" | Non-service application |
3.4 Pagination Information
| Field | Description |
|---|---|
| Pagination.total | Total number of records |
| Pagination.page_size | Records per page |
| Pagination.current_page | Current page number (starting from 1) |
| Pagination.last_page | Last page number |
Pagination Strategy:
- When current_page < last_page, use Page + 1 to get the next page
- Default PageSize=50, maximum is 50
4. Examples
4.1 Basic Example: Get Device App List
Request Parameters:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Page": 1,
"PageSize": 20
}
Response:
{
"DeviceApps": [
{
"pkg_id": "com.facebook.katana",
"app_name": "Facebook",
"external_version": "543.0.0.55.73",
"internal_version": "467618094",
"app_size": "145.82",
"is_system_app": "User app",
"is_service_app": "Non-service App"
},
{
"pkg_id": "com.android.chrome",
"app_name": "Chrome",
"external_version": "120.0.6099.144",
"internal_version": "609914400",
"app_size": "256.00",
"is_system_app": "User app",
"is_service_app": "Non-service App"
}
],
"Pagination": {
"total": 85,
"page_size": 20,
"current_page": 1,
"last_page": 5
},
"StatusCode": 200,
"ErrorMessage": ""
}
4.2 Advanced Example: Get Second Page
Request Parameters:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Page": 2,
"PageSize": 20
}
4.3 Error Example: Invalid Device ID
Request Parameters:
{
"DeviceId": ""
}
Response:
{
"DeviceApps": [],
"Pagination": {},
"StatusCode": -1,
"ErrorMessage": "Invalid device_id."
}
5. Error Handling
5.1 AB Three-Layer Error Codes
| StatusCode | Meaning | Use Case | Agent Response |
|---|---|---|---|
| -1 | Parameter validation error | Local validation failure (missing required params, format errors, value out of range) | Do not retry, fix parameters and retry |
| 200 | Business success or business error | HTTP request succeeded, check ErrorMessage | Empty ErrorMessage = success; non-empty = business error |
| 500 | Network/request exception | Timeout, connection failure, DNS resolution failure | May retry (max 2 times, 5-second interval) |
5.2 Common Errors
| StatusCode | ErrorMessage Example | Cause | Fix |
|---|---|---|---|
| -1 | Invalid device_id. | Device ID is empty or malformed | Use Get All Devices to get a valid device ID |
| -1 | Invalid page number, Page indexing starts from 1. | Page number less than 1 | Set Page >= 1 |
| -1 | Invalid page_size, must be between 1 and 50. | PageSize out of range | Set PageSize to 1-50 |
| 200 | API returned error: Device not found | Device does not exist | Use Get All Devices to confirm device ID |
| 500 | Request timeout after 60 seconds. | Request timeout | Retry later |
5.3 Agent Self-Healing Decision Table
| StatusCode | Auto Retry | Retry Strategy | Manual Intervention Needed |
|---|---|---|---|
| -1 | No | - | Check parameters and retry |
| 200 (ErrorMessage non-empty) | No | - | Fix based on error message |
| 500 | Yes | Max 2 retries, 5-second interval | If persistent, manual |
6. Best Practices
6.1 Performance Optimization
- Control PageSize: If you only need an overview, use a smaller PageSize (e.g., 20) to reduce response data
- Paginate as needed: Check Pagination.total first; if there are few apps, one page may suffice
- Cache results: App lists don't change frequently; caching can reduce repeated calls
6.2 Security Considerations
🟢 Read operation: No special security requirements.
7. Related Tools
7.1 Prerequisite Tools
| Tool Name | Purpose |
|---|---|
| Get All Devices | Get DeviceId |
| Get a Device by Name | Get DeviceId by device name |
7.2 Follow-up Tools
| Tool Name | Purpose |
|---|---|
| Get a Device App by Name | Query specific app details by name |
7.3 Similar Tool Comparison
| Tool Name | Use Case | Difference |
|---|---|---|
| Get All Device Apps | Get all device apps | Returns full list with pagination |
| Get a Device App by Name | Query a specific app | Exact match by name for a single app |
8. Tool Chains
8.1 Query App List by Device Name
Scenario: You only know the device name and need to get its app list.
Tool Chain:
Get a Device by Name → Get All Device Apps
Steps:
- Call Get a Device by Name to get DeviceId
- Use the returned device_id to call Get All Device Apps
8.2 Traverse All Apps
Scenario: You need all apps on the device (may exceed single page limit).
Tool Chain:
Get All Device Apps (Page=1) → [Loop] Get All Device Apps (Page=N)
Steps:
- Call Get All Device Apps with Page=1
- Check Pagination.current_page < Pagination.last_page
- If more pages exist, increment Page and continue calling
- Merge all pages' DeviceApps arrays
Appendix Reference:
- Field Reference: https://www.goinsight.ai/tools/field-reference/
- Error Code Quick Reference: https://www.goinsight.ai/tools/error-codes/
Leave a Reply.