Tool Name: airdroid_business_enable_lost_mode
Risk Level: 🟠 Medium Risk
Execution Mode: ⏳ Asynchronous
Category: Remote Commands
Quick Start (Copy & Use)
One-liner: Enable lost mode on a device — locks the screen and displays a custom message
What you need: DeviceId (device ID), Pwd (4-digit unlock PIN), CustomMessage (optional, lock screen message)
Success criteria: StatusCode = 200 and ErrorMessage is an empty string; returns Pid for tracking
What to do next: Use Get an Activity Log with the Pid to poll execution status
Minimal request example:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Pwd": "1234"
}
Full request example:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"CustomMessage": "This device is lost. Please contact admin.",
"Pwd": "1234"
}
Minimal response example:
{
"Pid": "1770854462319857000",
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes (Common Recipes)
Recipe 1: Emergency lock for a lost device
Scenario: Device is lost; immediately lock and display contact information
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"CustomMessage": "This device is lost. Please contact admin@company.com or call +1-xxx-xxxx",
"Pwd": "1234"
}
Recipe 2: Use default message
Scenario: Quick lock using the default lost mode message
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Pwd": "5678"
}
Default message: "The device is in lost mode"
Recipe 3: Track lost mode status with Pid
Scenario: After enabling lost mode, confirm whether it was successful
- Call Enable Lost Mode to get the Pid
- Use the Get an Activity Log tool to query status:
{
"Pid": "1770854462319857000"
}
Polling logic:
- Progress = "Executing" → continue polling (interval 5-10 seconds)
- Progress = "Success" → lost mode enabled successfully
- Progress = "Failure" → check the FailReason field
1. Overview
1.1 Description
Enable lost mode on a device managed by AirDroid Business. The device will be immediately locked, the screen will display a custom message (e.g. contact information), and a 4-digit PIN is required to unlock.
1.2 When to Use
- Device lost: Device is lost or stolen; immediate protection required
- Asset recovery: Display contact information to help recover the device
- Security protection: Prevent unauthorized access to device data
- Temporary lockdown: Temporarily disable the device and display a notification message
1.3 Execution Mode & Response
This operation is asynchronous — after the command is sent, the device typically responds within seconds.
- Return value: Pid (activity log ID)
- Tracking method: Use the Get an Activity Log tool with the Pid to query execution status
- Prerequisite: The device must be online to receive the command
- Typical duration: Usually completes within 3-10 seconds
1.4 Prerequisites
| Condition | Description | How to Check |
|---|---|---|
| Device online | The device must be online to receive the command | Use Get All Devices with {"online":"Online"} filter |
| Permissions | Account must have permission to execute security operations | - |
1.5 Prerequisite Tools
| Tool | Purpose | Necessity |
|---|---|---|
| Get All Devices | Obtain DeviceId and confirm device is online | 🔴 Required |
| Get a Device by Name | Query DeviceId by exact device name | If only the device name is known |
1.6 Comparison with Similar Tools
| Tool | Use Case | Difference |
|---|---|---|
| Enable Lost Mode | Device lost, need to display information | Lock + custom message + 4-digit PIN |
| Lock a Device | Simple lock | Only locks the screen with optional 6-digit password |
| Disable Lost Mode | Exit lost mode | Removes lost mode state |
2. Inputs
2.1 Parameter List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| DeviceId | string | ✅ Yes | - | Device unique identifier |
| Pwd | string | ✅ Yes | - | 4-digit numeric unlock PIN |
| CustomMessage | string | ❌ No | "The device is in lost mode" | Custom message displayed on the lock screen |
2.2 Parameter Details
`DeviceId`
Device unique identifier.
- Type: string
- Format: Non-empty string
- Source:
- Obtained via the Get All Devices tool; use the device_id field from the response
- Obtained via the Get a Device by Name tool for exact name lookup
- How to fill in a GI node:
- Constant: Enter the device ID string directly, e.g. fa6edcff65ab444e8b5e0eb08df4175d
- Upstream reference: Map from the Get All Devices node's Devices[0].device_id field
- Example:
"fa6edcff65ab444e8b5e0eb08df4175d"
`Pwd`
4-digit numeric unlock PIN.
- Type: string
- Format: Must be exactly 4 digits (regex: ^\d{4}$)
- Purpose: Used to unlock lost mode on the device
- How to fill in a GI node:
- Constant: e.g. "1234"
- Example:
"1234"
⚠️ Important: Keep this PIN safe — it is required to unlock the device.
`CustomMessage`
Custom message displayed on the lock screen.
- Type: string
- Format: Max 150 characters
- Default: "The device is in lost mode"
- Purpose: Information displayed on the lock screen, typically including contact details
- How to fill in a GI node:
- Constant: e.g. "This device is lost. Please contact admin@company.com"
- Upstream reference: Obtain from user input or a configuration system
- Example:
"This device is lost. Please contact admin@company.com"
Tip: Include valid contact details (phone/email) in the message to facilitate device recovery.
2.3 Parameter Combination Logic
- DeviceId and Pwd are required
- CustomMessage is optional; defaults to the standard message if not provided
- PIN must be exactly 4 digits
3. Outputs
3.1 Response Examples
Success response:
{
"Pid": "1770854462319857000",
"StatusCode": 200,
"ErrorMessage": ""
}
Parameter error response:
{
"Pid": "",
"StatusCode": 200,
"ErrorMessage": "Invalid pwd."
}
Network error response:
{
"Pid": "",
"StatusCode": 500,
"ErrorMessage": "Request timeout after 60 seconds."
}
3.2 Field Descriptions
| Field Path | Type | Description |
|---|---|---|
| Pid | string | Activity log unique identifier (Process ID). Returned on success; used to track execution status |
| StatusCode | number | Status code. See 5.1 AB Three-Layer Error Codes |
| ErrorMessage | string | Error message. Empty string on success |
3.3 Pid Tracking
Use the returned Pid with the Get an Activity Log tool to track execution status:
| Progress Value | Meaning | Agent Action |
|---|---|---|
| Executing | Command queued or executing on device | Continue polling (interval 5-10 seconds) |
| Success | Execution succeeded | Task complete |
| Failure | Execution failed | Check the FailReason field |
| Overridden | Superseded by a newer command | No action needed |
4. Examples
4.1 Basic Example: Enable lost mode
Request:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Pwd": "1234"
}
Response:
{
"Pid": "789012",
"StatusCode": 200,
"ErrorMessage": ""
}
4.2 Advanced Example: With custom message
Request:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"CustomMessage": "This device belongs to ABC Company. If found, please contact IT at +1-xxx-xxxx or email it@abc.com. Reward offered.",
"Pwd": "5678"
}
Response:
{
"Pid": "789013",
"StatusCode": 200,
"ErrorMessage": ""
}
4.3 Error Example: Invalid PIN format
Request:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Pwd": "123"
}
Response:
{
"Pid": "",
"StatusCode": 200,
"ErrorMessage": "Invalid pwd."
}
Note: The PIN must be exactly 4 digits.
5. Error Handling
5.1 AB Three-Layer Error Codes
Core principle: AB uses a three-layer error code strategy. The agent should decide how to handle based on StatusCode.
| StatusCode | Meaning | Scenario | Agent Action |
|---|---|---|---|
| -1 | Parameter validation error | Local validation failed (missing required params, format error) | ❌ Do not retry; fix parameters and re-call |
| 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 |
|---|---|---|---|
| 200 | Invalid device_id. | Device ID empty or invalid | Use Get All Devices to obtain a valid device ID |
| 200 | Invalid pwd. | PIN format incorrect | Provide exactly 4 digits |
| 200 | Invalid custom_message. | Message format incorrect | Check message content |
| 200 | access_token is invalid. | Auth token invalid | Check credential configuration |
| 500 | Request timeout after 60 seconds. | Request timeout | Retry later |
5.3 Agent Self-Healing Decision Table
| StatusCode | Auto-Retry | Retry Strategy | Manual Intervention |
|---|---|---|---|
| -1 | ❌ | - | Fix parameters and re-call |
| 200 (ErrorMessage non-empty) | ❌ | - | Fix based on error message |
| 500 | ⚠️ | Max 2 retries, 5-second interval | Escalate if persistent |
6. Best Practices
6.1 Performance Tips
- Confirm device is online: Check device status before the operation
- Act quickly: Enable lost mode as soon as possible when a device is lost
6.2 Security Considerations
⚠️ Medium Risk Warning: This operation immediately locks the device screen. The device holder will need to enter the PIN to unlock.
Side effects:
- Device screen is locked immediately
- Custom message is displayed on the lock screen
- A 4-digit PIN is required to unlock
Pre-execution checklist:
- ☐ Confirm the device is online
- ☐ Confirm the correct target device
- ☐ Record the unlock PIN
- ☐ Prepare valid contact information for the message
6.3 Idempotency
Idempotency: Conditionally idempotent.
- Re-calling on a device already in lost mode will update the message and PIN
- With identical parameters, multiple calls produce the same result
6.4 Async Operation Tracking
Use the returned Pid with Get an Activity Log to track execution status:
| Progress Value | Meaning | Agent Action |
|---|---|---|
| Executing | Command queued or executing | Continue polling |
| Success | Execution succeeded | Task complete |
| Failure | Execution failed | Check the FailReason field |
| Overridden | Superseded by a newer command | No action needed |
Polling recommendations:
- Interval: 5-10 seconds
- Max polling attempts: 6 (approx. 30-60 seconds)
- On timeout: Prompt the user to manually check device status
7. Related Tools
7.1 Prerequisite Tools
| Tool | Purpose |
|---|---|
| Get All Devices | Obtain DeviceId and confirm device is online |
| Get a Device by Name | Query DeviceId by exact device name |
7.2 Follow-up Tools
| Tool | Purpose |
|---|---|
| Get an Activity Log | Track lost mode execution status (using Pid) |
| Disable Lost Mode | Disable lost mode after the device is recovered |
7.3 Similar Tools Comparison
| Tool | Use Case | Difference |
|---|---|---|
| Enable Lost Mode | Device lost | Lock + custom message + 4-digit PIN |
| Lock a Device | Simple lock | Only locks with optional 6-digit password |
| Disable Lost Mode | Exit lost mode | Removes lost mode state |
8. Tool Chains
8.1 Lost Device Emergency Response
Scenario: Device is lost; immediate protection and contact info display needed
Tool chain:
Get a Device by Name → Enable Lost Mode → Get an Activity Log
Steps:
- Call Get a Device by Name to query the lost device's device_id
- Call Enable Lost Mode to enable lost mode with a PIN and contact information
- Use Get an Activity Log with the Pid to confirm the operation succeeded
8.2 Device Recovery Flow
Scenario: After recovering the device, disable lost mode
Tool chain:
Enable Lost Mode → (device recovered) → Disable Lost Mode
Steps:
- Enable lost mode with Enable Lost Mode when the device is lost
- After recovery, call Disable Lost Mode to exit lost mode
- Alternatively, enter the 4-digit PIN directly on the device to unlock
8.3 Graduated Protection Pattern
Scenario: Gradually escalate protection measures based on the situation
Tool chain:
Lock a Device → (still not recovered) → Enable Lost Mode → (confirmed lost) → [consider wiping]
Steps:
- First call Lock a Device for a simple screen lock
- If the device is still not recovered, escalate to Enable Lost Mode to display contact information
- If the device is confirmed unrecoverable, consider remote data wipe
Leave a Reply.