Scripts on Android Enterprise

Scripts on Android Enterprise

I am having difficulty sending some scripts to my Android Enterprise device - Samsung A50, Android 9.

Our platform is version 15.0.1.1181 and the agent version is 14.1.6.1018.

 
 

The scenario is:
 

Firstly I noticed that after sending the script unlock, the logs need to update to state “Custom log (New authentication password applied)” before sending the kill_application and/or start script.

 

After I did this I noticed that my test device successfully completed the scripts correctly each time – however, I then started sending them to other devices and was finding they hadn’t worked. This then has led me to find another issue:

 

I believe what is happening is – if the device is pressed or touched by the user once the script is sent – then the following scripts:

 

kill_application com.commontime.infinity.jobmenuprod

start com.commontime.infinity.jobmenuprod

 

will work correctly. However, if the user does not touch the device at all once the script is sent (I have found 30-60 seconds or more) then the final script is not correctly ran. The device appears to run the start script once the user opens or touches the device, but if this does not happen then the script is not ran at all – almost as though the device forgets that that start script needs to be ran.

 

I have also tried sending it at three separate scripts – firstly sending the script unlock, and waiting for the logs to update to state “Custom log (New authentication password applied)”, next sending the kill_application script and waiting for this to appear in the logs, and then finally sending the third script – start. Again, if I press or enter the device manually as soon as the final script is sent, then the application does load once the screen is opened – yet, if I wait and enter or select the device after 30-60 seconds or more the application does not start – again as though the device has forgotten it needs to complete the third and final script.

 

To confirm in all instance – the unlock and kill_application scripts are correctly working each time – it is just the start application that is causing an issue.

 

Please could you provide any advice on how I can ensure the scripts each run - without user interference?

 

Thank you

5 Answers

Order By:   Standard | Newest | Votes
Raymond Chan | posted this 22 June 2020

If 3- or 5-second delay doesn't work,  you can try with a longer delay (say 25-30 seconds).  If it works,  reduce the delay gradually in more test(s)  until the mechanism start to fail.

 

  • 0
  • 0
Natalie Shield | posted this 22 June 2020

Thank you for your suggestion of a time delay, I will try that now.

 

Thanks

  • 0
  • 0
Natalie Shield | posted this 22 June 2020

Hello,

 

The device remains online throughout all of this process. The devices are set to lock after 10 minutes of inactivity and doze mode is disabled on our devices.

 

Thanks

  • 0
  • 0
Raymond Chan | posted this 19 June 2020

It seems that you try to kill an application and then restart it.  Based on what you described, I would suggest you to add time delay between the kill and restart operation  using "sleep  #" script command.  I would try with 3 -or 5-second delay if I were you.

 

Good luck.

  • 0
  • 0
JVMOD@SOTI | posted this 18 June 2020

Hello Natalie,

 

Thank you for your post,

does your device go offline when you try to perform this task? can you please verify what is the sleep time of the device and also do you have dose mode enabled on the device or feature control profile which has doze mode enabled?

 

Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback