Modify Lockdown from the script

Hi,

Is it possible to either change Lockdown template or modify Lockdown items using script (legacy or JS)?

My idea is to have Out-of-Contact policy that will remove Lockdown shortcut to the production app (+ maybe show some info on the lockdown that device is out of contact but that's not necessary)

It's Android Enterprise Fully Managed device

2 years ago
Android Scripting
ANSWERS
RS
Rafael Schäfer
2 years ago

More or less:

1. Remove access to the app: In the out of contact script use the uninstall script to remove tha app but you will loose all (maybe needed) settings on the app, so when it's online again you would need to set it up again.
So: nothing recommended.

2. Message: You can use the showmessagebox script in the out of contacts rule to show such a message.

Maybe you should do only "2." including timed and include there a resetpassword script which locks the entire device with a password only known by admins or so.

RC
Raymond Chan Diamond Contributor
2 years ago

It is possible to change lockdown template and modify lockdown items using legacy scripts.  There is no need to uninstall any programs or lose any apps data.  I have been personally providing such tailor-made solutions for my governmental customers in their Classic Android+ & Android Enterprise devices for many years.  The customizations varies with device models, agent versions, kiosk designs and dynamic changes required.   Thus, achieving that SECURELY requires special expertise and knowhows, and should be done only by real experts, and tested thoroughly and properly before actual deployment.   

M
MiKe
2 years ago

I'm not expert like you but I'm not begginer either. Could you give me some hints or that would be paid consultation?

ATM I had backup option to launch mxconfig script to disable application as I need to do it on Zebra devices. (Android 11, Mobicontrol 15.5)

G
GPMOD@SOTI
2 years ago

Hi Mike, 

Thank you Matt and Raymond for your response. 

For best practice, I would suggest using the Wipe device Script or Lock device mentioned in the Out of Contact policy. 

So, whenever your device is out of contact it will wipe or lock the device accordingly.

Out of Contact Policy can be set by using the below steps: 

Go to profile > add new Profile > Add profile configuration > Select Out of Contact Policy > Select script

Please let me know if you need further assistance with this issue. 

Please find attached screenshots for more details. 

Kind regards,

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

M
MiKe
2 years ago

Hi,

Although it does not answer my question how to modify Lockdown using script it does provide alternate (but not ideal) solution by changing the passcode. The downside is that the user would not know why is he locked out and could try his own passcode untill he reaches Wipe action set using Auth payload.

If I could modify (or switch to different lockdown) template I could just remove App from Lockdown and show some sort of permanent notification/message until device became compliant again

G
GPMOD@SOTI
2 years ago

Hi Mike, 

Can you please confirm the device manufacturer and model please and can you please confirm device are enrolled as Android Enterprise Work- Managed device?  

Please let me know. 

Thank you. 

Kind regards,

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



M
MiKe
2 years ago

Hi,

Question was meant to be universal but the devices in mind are Zebra TC77 and I hereby confirm initial information that are enrolled as AE Work managed 

G
GPMOD@SOTI
2 years ago

Hi Mike, 

I apologize for the delayed response.

Here are the steps you can use to modify the lockdown template when the device is Out of Contact. 

1.Enable TC77 onto server as AE
2.Install Zebra AE plugin for 8.x and above
3.Copy attached xml file into folder: /sdcard/download/xmltest
4.Set Out of Contact with below script
5.Send script from MC webconsole to device: mxconfig /sdcard/download/xmltest/test.xml
6.Will notice the opened Chrome on that TC77 device disappears and icon of Chrome app is also gone

please find .xml file example for Chrome application below.  
<wap-provisioningdoc>
  <characteristic version="8.0" type="AppMgr">
    <parm name="Action" value="DisableApplication" />
    <parm name="Package" value="com.android.chrome" />
  </characteristic>
</wap-provisioningdoc>

Thank you. 

Kind regards,

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