> Tool Name: airdroid_business_device_app_data_cache_batch_clear
> Risk Level: High-Risk
> Execution Mode: Asynchronous (returns OperationLogId)
> Category: Device Management
Quick Start
Summary: Clear the data and cache of one Android app on one to 50 specified Android devices.
You need: DeviceIds, PkgId, and, by default, manual confirmation with a non-empty reason in the confirmation form.
Success criteria: StatusCode == 200, ErrorMessage is empty, and OperationLogId is non-empty. This means the batch command was accepted, not that every device has completed it.
Next step: Query Search Batch Operation Activity Logs with the returned OperationLogId until the per-device activity records are terminal.
Minimal request example:
{
"DeviceIds": [
"fa6edcff65ab444e8b5e0eb08df4175d"
],
"PkgId": "com.example.app",
"RequireConfirmation": true
}
Minimal response example:
{
"OperationLogId": "1770854462319857000",
"Hint": "",
"Retryable": false,
"OriginalStatusCode": 200,
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes
Recipe 1: Standard confirmed clear
When to use: A human operator must approve the destructive action.
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"],
"PkgId": "com.example.app",
"RequireConfirmation": true
}
The operator supplies the non-empty audit Reason in the confirmation form; it is not a Start-node input.
Recipe 2: Pre-approved batch clear
When to use: Explicit approval has already been collected outside this tool.
{
"DeviceIds": [
"fa6edcff65ab444e8b5e0eb08df4175d",
"a286bea023eb4bfc8ef04770ee7dbb5e"
],
"PkgId": "com.example.app",
"RequireConfirmation": false
}
Recipe 3: Track the submitted batch
When to use: The clear request has returned OperationLogId.
{
"OperationLogId": 1770854462319857000,
"PageIndex": 1,
"PageSize": 50
}
This request is for Search Batch Operation Activity Logs, not this action.
1. Overview
1.1 Description
Clears the data and cache of the same application package on multiple Android devices. The command is submitted as a batch operation and completes asynchronously on the devices.
1.2 When to Use
- Reset an application before troubleshooting or reprovisioning.
- Clear data for the same app on a controlled set of Android devices.
- Follow a batch command with Search Batch Operation Activity Logs for per-device progress.
1.3 Execution Mode and Response
This action is asynchronous. OperationLogId identifies the accepted batch submission. Use Search Batch Operation Activity Logs, not a generic Pid, to determine each device's final outcome.
1.4 Prerequisites
| Condition | Description |
|---|---|
| Android targets | Exclude Windows devices. |
| Device IDs | Obtain one to 50 unique Android device IDs from List Devices. |
| Package ID | Obtain the Android app package ID from List Device Apps or Get a Device App by Name. |
| Confirmation | The default confirmation flow requires a non-empty reason. |
1.5 Prerequisite Tools
| Tool | Purpose |
|---|---|
| List Devices | Obtain and select device IDs. |
| List Device Apps | Obtain an installed app's package ID. |
| Get a Device App by Name | Obtain a package ID by application name. |
1.6 Similar Tools
Use this action only to clear one app package across the specified devices. It does not accept more than one PkgId per request.
2. Inputs
2.1 Parameter List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| DeviceIds | string-array | Yes | - | One to 50 unique Android device IDs. |
| PkgId | string | Yes | - | Android application package ID. |
| RequireConfirmation | bool | No | true | Whether to use the manual confirmation flow. |
2.2 Parameter Details
`DeviceIds`
- Supply one to 50 non-empty, unique device-ID strings.
- Obtain them from List Devices.
- Remove Windows devices; this operation is unsupported for them.
`PkgId`
- Supply one non-empty Android package ID, such as com.example.app.
- Obtain it from List Device Apps or Get a Device App by Name.
- Do not use com.sand.airdroidbiz, the AirDroid Biz Daemon package.
`RequireConfirmation`
- true is the default and opens a confirmation flow before the command is sent.
- false bypasses that flow only when approval has already been obtained outside the tool.
2.3 Parameter Combination Logic
- The same PkgId is cleared on every DeviceIds target.
- A non-empty audit Reason is required by the runtime. With confirmation enabled, the confirmation form supplies it.
- Rejection or a 24-hour confirmation timeout returns StatusCode -2 or -3 before an upstream request is made.
3. Outputs
3.1 Response Examples
Accepted batch:
{
"OperationLogId": "1770854462319857000",
"Hint": "",
"Retryable": false,
"OriginalStatusCode": 200,
"StatusCode": 200,
"ErrorMessage": ""
}
Confirmation timeout:
{
"OperationLogId": "",
"Hint": "Ask the user whether they still want to proceed. If yes, re-invoke this tool to create a new confirmation request.",
"Retryable": false,
"OriginalStatusCode": -3,
"StatusCode": -3,
"ErrorMessage": "The confirmation timed out before the tool could run."
}
3.2 Field Descriptions
| Field | Type | Description |
|---|---|---|
| OperationLogId | string | Batch-operation identifier. Query it with Search Batch Operation Activity Logs. |
| Hint | string | Next-action guidance on failures; empty on success. |
| Retryable | bool | Whether identical retry may succeed. |
| OriginalStatusCode | number | Upstream HTTP status; 0 means no upstream response, -2 execution rejected, and -3 confirmation timed out. |
| StatusCode | number | 200 parsed response; -1 local validation; -2 rejected; -3 confirmation timeout; 500 system, network, timeout, or parse failure. |
| ErrorMessage | string | Primary success signal: empty means success; non-empty means failure. |
3.3 Operation Identifier
OperationLogId identifies the batch submission. It is not a per-device Pid and does not prove that individual devices have completed the clear.
4. Examples
4.1 Clear one application on two devices
{
"DeviceIds": [
"fa6edcff65ab444e8b5e0eb08df4175d",
"a286bea023eb4bfc8ef04770ee7dbb5e"
],
"PkgId": "com.example.app",
"RequireConfirmation": true
}
4.2 Invalid daemon package
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"],
"PkgId": "com.sand.airdroidbiz",
"RequireConfirmation": false
}
This is rejected locally with StatusCode -1.
4.3 Inspect batch activity
After acceptance, pass OperationLogId to Search Batch Operation Activity Logs and inspect each activity record's Progress and FailReason.
5. Error Handling
5.1 StatusCode Semantics
| StatusCode | Meaning | Action |
|---|---|---|
| -1 | Invalid input, including empty reason, invalid device IDs, or daemon package. | Correct the input; do not retry unchanged. |
| -2 | Confirmation was rejected before execution. | Obtain approval before submitting again. |
| -3 | Confirmation timed out before execution. | Request confirmation again if still needed. |
| 200 | Submission response processed. | Success requires an empty ErrorMessage and a non-empty OperationLogId. |
| 500 | Upstream, network, timeout, or tool failure. | Use Retryable and verify activity logs before retrying a write. |
5.2 Common Errors
| Error condition | Resolution |
|---|---|
| More than 50 devices or duplicate IDs | Split the batch and remove duplicate IDs. |
| Windows target | Remove Windows devices from the target list. |
| Missing or daemon PkgId | Use an app package ID from a device-app lookup and do not use com.sand.airdroidbiz. |
| Missing OperationLogId after acceptance | Check activity logs manually before deciding whether to resubmit. |
5.3 Retry Decision
For an uncertain write outcome, inspect Search Batch Operation Activity Logs before retrying. The runtime marks rate limits as retryable; do not retry validation, rejection, or timeout results unchanged.
6. Best Practices
6.1 Confirm the scope
Review the selected device IDs and package ID before the confirmation step because data and cache are cleared on every target.
6.2 Use the confirmation guard
Keep RequireConfirmation at its default true unless your process has already recorded explicit approval.
6.3 Idempotency
This action is not idempotent. Repeating it clears the application data and cache again. Verify batch activity before retrying after a timeout or network failure.
6.4 Track completion
Use Search Batch Operation Activity Logs with OperationLogId until each device's activity is resolved.
7. Related Tools
| Tool | Role |
|---|---|
| List Devices | Obtain Android DeviceIds. |
| List Device Apps | Obtain PkgId. |
| Get a Device App by Name | Obtain PkgId by name. |
| Search Batch Operation Activity Logs | Track this batch using OperationLogId. |
8. Tool Chains
8.1 Target, clear, and track
List Devices -> List Device Apps -> Batch Clear App Data and Cache -> Search Batch Operation Activity Logs
- Select Android device IDs and obtain the app package ID.
- Submit the batch clear with confirmation as appropriate.
- Query the returned OperationLogId for each device's progress.
Leave a Reply.