Is there a script (legacy or java) to relocate devices?

HI All

We are looking to stage/enroll a few thousand devices and we don't want to load all the applications etc at the staging site. Instead, rather have a button on the lockscreen that triggers a move by the user, to the live/infield folder where it will adopt the policies it needs and download the applications etc.

Has anyone done this before? Is it possible?

Your assistance will be much appreciated.

a year ago
Android Scripting
ANSWERS

We do it like that:

- We show a configurator (which is a lockdown template, so HTML and javascript) where the user enters relevant data when device is in the staging folder. Only needed things like the lockdownprofile are installed here (and maybe, if needed, an oem config app).
- The configurator writes into an ini file and triggers a checkin which is grabbed by Soti as custom data.
   - we also have a quite often checkin set for this folder (3 minutes) if the checkin by some reason doesn't happen but devices are relocated soon.
- Relocation rules based on that custom data are set up and relocate the devices then to the correct folder where it gets it's final configuration and the lockdown profile removed (or replaced).

RC
Raymond Chan Diamond Contributor
a year ago

Relocation of device to desired device group in MobiControl can be initiated by various built-in rules/policies (e.g. device relocation policies, alert policies, etc.) or by RESTful API calls.  There is no simple  legacy/javascript command to directly initiate any device relocation.

While it is possible to build app or script to make RESTful API call to MobiControl server to carry out device relocation, including such software running on a device being controlled can have security issues if not properly implemented.  Thus, it is much safer and easier to support your use case using alert rule/policy and custom data as described by Rafael.  Both legacy MobiControl and javascript can be used, though the latter provides more modern programming language features for simpler implementation.

P
PMMOD@SOTI
a year ago

Hi Wayne Holoway,

Thank you for your post on SOTI Pulse

As per your request, the feature you've asked for isn't available in SOTI at the moment. To address this, we'll need to rely on SIGNAL and alerts rules as a workaround to relocate the devices.

If you still need to relocate the device using a script, we can create a Feature Request with our DEV team to address this requirement for future enhancements

Please let us know so we can proceed further accordingly.

ZC
Zafer Cigdem
a year ago

I agree with Rafael, I've used this way as well. Depending on the use case, this works well.

On the other hand, as Raymond said it may be better to use API to relocate the device(s) and get the action only when the conditions are met. 

The relocation API is introduced on the new version (2024.1), you can see the details on release notes here: SOTI MobiControl Release Notes | SOTI Docs

it's called deviceRelocationPolicies for Post/Put API calls. I hope this helps.

Zafer