0

We are trying to develop a solution for to manage Android devices by using the Android Management API. We need to do actions like Reboot device, Clear App cache and data, Obtain system logs, Factory reset device etc., along with obtaining telemetry data like CPU usage, Memory usage, Storage status, Network Info, Location Info etc. I have gone through the Android Management API documentation and some of the above mentioned functions are supported by it and was able to test these. However some required functions like Factory reset, obtaining system logs are not supported. Is there a way to do these with AM API?

I have also seen the Android Management API Extensibility SDK documentation and could not understand what's the use of it, except that it can be used to execute a command to clear app data as stated here. So my question is - Is it possible to execute any commands to Factory reset, obtain system logs or to do some other function or only clearing app data can be done? I am asking this because I have seen a Android Management API Extensibility sample app by google. After going through the source code and running the app, I was able to infer that only clear app data function is supported by the app.

Any input to the above two queries can be really helpful as I am stuck on this for few days. The documentation is also not very clear as they do not contain the info about integrating Android Management API Extensibility SDK or its functionalities. TIA

basil_369
  • 23
  • 5

1 Answers1

0

You can use the enterprises.devices.delete method to initiate a reset/wipe command. Additionally, if you set WipeDataFlag, you can control the data-wiping behavior when a device is deleted. By default, all user data and factory reset protection data is wiped. With regards to obtaining system logs, there is no way to get the device logs using AMAPI remotely. However, users and Admins can use adb to pull a bug report from the device. When you capture a bug report, the following logs are captured:

  • dumpsys: This log contains information about the system, such as the hardware, software, and settings.
  • dumpstate: This log contains information about the device's current state, such as the screen layout and the running apps.
  • logcat: This log contains all of the messages that have been logged by the system, such as errors, warnings, and notifications.

This documentation guides users on capturing Android bug reports.

Additionally, Android Management API Extensibility SDK provides several functions that allow developers to extend the capabilities of the Android Management API. The core functions of the Android Management API Extensibility SDK are:

  • Commands: The SDK allows you to execute commands on Android devices, such as clearing app data, rebooting the device, and more.
  • Queries: The SDK allows you to query information from Android devices, such as the device's battery level, the current screen orientation, and more.
  • Notifications: The SDK allows you to receive notifications from Android devices, such as when a new app is installed, when a user logs in, and more.

The SDK also provides a number of convenience functions, such as methods for getting the device's ID and for managing the device's storage.

Louise
  • 91
  • 2