Retrieving stored log files from a device via API: Remote File Manager is upload/download only — direct device file pull not supported
Android
The Esper API's Remote File Manager feature supports uploading files to Esper and downloading files already stored there, but it does not support pulling files directly from a device's local storage. This article explains the limitation and provides alternative approaches to retrieve log files from your managed Android devices.
Understanding the limitation
The Remote File Manager API endpoints available to you are:
- Upload to Remote File Manager — transfers a file from an external source into Esper's Remote File Manager storage.
- Generate Download URL — creates a time-limited download link for a file already present in Remote File Manager.
Neither endpoint triggers your device's agent to collect and push a file from local device storage to Esper's backend. This is a product capability gap, not a configuration issue, and applies across all Android device models and Esper agent versions.
Alternative 1: Pull logs via ADB (manual or offline)
If your device is accessible through ADB (USB or network-based), you can retrieve logs directly:
- Enable ADB on the device by navigating to Devices & Groups → [Device Name] → Settings → Developer Options and confirming ADB is enabled.
- From your computer, run:
adb logcat -d > device_log.txt - For Esper Agent-specific logs, run:
adb shell am broadcast -a com.example.app.GET_DPC_LOGS - Retrieve the generated log file from the device storage path specified in the command output.
Note: ADB may not be available if the device is fully kiosk-locked or if ADB is disabled in your applied Blueprint.
Alternative 2: Push logs from your application
If you control the application that generates the log files, configure it to push logs to a remote endpoint on a schedule or trigger. You can use Esper's managed configuration or app policies to support app-level configurations that facilitate this workflow.
Alternative 3: Use Remote File Manager manually
You can manually upload log files to Esper's Remote File Manager through the Esper Console, though this does not provide programmatic device-to-cloud file retrieval via API.
Request this as a feature
If automated, API-triggered device-to-cloud file push is critical for your workflow, you can submit a feature request through your Esper account representative. note that this capability is not currently on the roadmap.
Still need help?
If none of these alternatives fit your use case, or if you need assistance determining the best approach for your workflow, contact Esper Support.
Please sign in to leave a comment.
Comments
0 comments