adrienB-dkt
adrienB-dkt

Reputation: 11

Android Management API - IssueCommand - Problem with delay to LOCK and REBOOT devices

I have a problem with the method enterprises.devices.issueCommand (LOCK and REBOOT) of Android Management API. I had set the duration to 60 seconds and REBOOT didn’t work always. By setting it to 600 seconds as the default duration, reboot is OK, however, sometimes it is ok instantly, but sometimes it is ok after several minutes (9'30" maximum according to my tests). LOCK command works faster but not always instantly.

I’m talking about the delay after which the device reboots or locks itself effectively, not about the delay of the API response time (<1s on my tests).

During my tests, I called the API directly with Postman.

OS VERSION: ANDROID 10 & 8.1.0

BUILD-ID: 5.000.012.0001+v & 4.46.70

STEPS TO REPRODUCE:

  1. Start Postman
  2. Select File -> Import -> Raw text
  3. Paste :
curl --location --request POST 'https://androidmanagement.googleapis.com/v1/enterprises/<entreprise>/devices/<device_id>:issueCommand' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer <token>’ \
--data-raw '{
    "type": "REBOOT" ,
    "duration": "600s"
}
'
  1. Continue -> Import

  2. Authorization -> Type : Bearer Token -> add your own token

  3. Send request

REPRODUCE RATE:10-20%

OBSERVED RESULTS: with duration set to 600s, sometimes the reboot is OK instantly, but sometimes it is OK after several minutes (9'30" maximum according to our tests)

EXPECTED RESULTS: Reboot always instantly and/or to be sure our devices always reboot

Upvotes: 1

Views: 205

Answers (0)

Related Questions