Android - Script to Delete/Forget Wifi Profile?

Android - Script to Delete/Forget Wifi Profile?

Hello,

I am trying to come up with a way to delete our deployment Wireless network after the initial staging is complete.  Is anyone aware of a legacy or javascript that can delete/forget all or certain wireless profiles that are saved to the device?  I have search through the archives and online but can't seem to find a solution.

 

Thanks

7 Answers

Order By:   Standard | Newest | Votes
Shawn T | posted this 04 August 2021

Hi Justin,

What devices are you using?

With Zebra devices this can be done with the WiFi CSP from StageNow. Here is a sample of the xml.

<wap-provisioningdoc>
<characteristic version="9.1" type="Wi-Fi">
<parm name="UseRegulatory" value="0" />
<parm name="UseDiagnosticOptions" value="0" />
<parm name="UseAdvancedOptions" value="0" />
<parm name="NetworkAction" value="Remove" />
<characteristic type="network-profile">
<parm name="SSID" value="StagingSSID" />
</characteristic>
<parm name="UseHotspotOptions" value="0" />
</characteristic>
</wap-provisioningdoc>

This .xml file can be sent to the device with a mxconfig /sdcard/DisableStaging.xml post install/sync script depending on your deployment method. 

  • 0
  • 0
Matt Dermody | posted this 04 August 2021

You can also reapply a Network Profile with the same SSID and then unapply that profile and SOTI should remove the configuration. You could have the Staging Network Profile assigned to your Staging group and then unassigned to the Prod groups so that it gets removed. 

  • 1
  • 0
Chris R. | posted this 04 August 2021

We are using Datalogic Memor 20 devices.  I am deploying the settings with their Scan2Deploy tool but was looking for a way to remove wifi once the mobile APN was setup properly.

Matt, that is interesting.  The Wifi network is getting set as part of the QR code scanning for AE enrollment, I'll work on setting that up and testing to see if that will suffice.

  • 0
  • 0
Chris R. | posted this 04 August 2021

Matt, that did work fine.  I can see simply revoking the profile removed the network from the device.


Next question:  Is there a script to revoke a profile by name from Device?  Would be interesting to add a script to the end up my staging process that revoked the profile before manually moving device to different group.  I wasn't able to find any obvious scripts that address profiles.

  • 0
  • 0
Matt Dermody | posted this 04 August 2021

Awesome! Glad to hear that worked.

 

Why would you need to script that if the act of relocating the device itself will remove the Profile assuming you have the Profile assigned to the staging group and unassigned to the destination group.

  • 0
  • 0
Chris R. | posted this 04 August 2021

Sometimes our devices may stay in a staging group for some time before we finalize certain proprietary settings within our application, test, and then ship to our customers.  I'd like to have it drop the internal WiFi network as soon as all of the apps are installed, etc... as we then need to configure a customer wireless profile with static IP etc unique to each device. 

I may maintain 2 groups and create an alert that will move it to the final "staging" group where it would then drop that wireless profile.

  • 0
  • 0
Raymond Chan | posted this 05 August 2021

As far as I know, there is currently no script to revoke a MobiControl profile by name.  The only way to do so is via MobiControl RESTful API's.

 

  • 1
  • 0

Give us your feedback
Give us your feedback
Feedback