Audience
Tags

This blog details a method to convert a Google Drive link so that it can be used in a StageNow profile for downloading files to a Zebra device. The main advantage of this approach is that Google Drive offers 15GB of free storage which can be used to create internet-hosted staging profiles .GDrive also creates links which do not expire ( https://oit.williams.edu/announcements/you-can-put-a-time-limit-on-shar… ) unless you specify an expiry date unlike other file storage providers such as Microsoft OneDrive (which only offers 5GB free storage without a subscription)

  1. Zip the file(s) to be staged to the device before uploading to Gdrive

  1. In Gdrive, create a link to the file via GetLink  , select ‘Anyone with the link’ and copy link

Graphical user interface, text, application, chat or text message</p>
<p>Description automatically generated

  1. The format for exported link is similar to this (fileID is highlighted in yellow):

https://drive.google.com/file/d/1jbuDBd2t6S2PvbzE2igB4fG87yEfnEqR/view?usp=sharing

  1. Either: Use the online converter here ( http://airsetup.uk/airsetup.uk/airbeam/zebra/webapps/gdriveconvert/ ) to paste the original URL and auto-convert to the new format        Or    Manually edit the link format to change it to the following (green highlighted text is the same for each file , just append the fileID highlighted in yellow )

https://drive.google.com/uc?export=download&confirm=yTib&id=1jbuDBd2t6S2PvbzE2igB4fG87yEfnEqR

 

  1. If using a StageNow profile , the modified link can be used directly in the FileMgr Source File URI field to access the file :

Graphical user interface, application, website</p>
<p>Description automatically generated

  1. If using XML , the link has to be shortened in order to embed it in XML . Copy the link and paste in a URL shortener e.g. https://free-url-shortener.rb.gy/ to create a short URL e.g.

https://rb.gy/1h0kno

  1. Copy the short URL for use as the source file in the XML as shown in the examples below:

To unzip the contents of the ZIP file e.g. for APK files, data files etc ( note that zip file contents will be unzipped to the destination folder specified in ArchiveTargetPathAndFolderName )

      <characteristic type="FileMgr" version="10.1" >

        <parm name="FileAction" value="9"/>

    <characteristic type="file-details">

        <parm name="IfDuplicate" value="1" />

        <parm name="ArchiveTargetPathAndFolderName" value="/sdcard/Download"/>

        <parm name="ArchiveSourceURI" value="https://rb.gy/1h0kno"/>

    </characteristic>

    </characteristic>

When profile is processed the zip file will be downloaded and extracted with status message similar to the following :

Text, letter</p>
<p>Description automatically generated

  1. To transfer the ZIP file ‘as is’ e.g. for OS update files:

<characteristic version="0.6" type="FileMgr">

    <parm name="FileAction" value="1" />

    <characteristic type="file-details">

      <parm name="TargetAccessMethod" value="2" />

      <parm name="TargetPathAndFileName" value="/sdcard/Download/HE_DELTA_UPDATE_11-23-13.00-RG-U01-STD_TO_11-23-13.00-RG-U07-STD.zip" />

      <parm name="SourceAccessMethod" value="1" />

      <parm name="SourceURI" value="https://rb.gy/18bubr" />

    </characteristic>

  </characteristic>

Full OSUpgrade example XML:

<wap-provisioningdoc>

<characteristic version="0.6" type="FileMgr">

    <parm name="FileAction" value="1" />

    <characteristic type="file-details">

      <parm name="TargetAccessMethod" value="2" />

      <parm name="TargetPathAndFileName" value="/sdcard/Download/HE_DELTA_UPDATE_11-23-13.00-RG-U01-STD_TO_11-23-13.00-RG-U07-STD.zip" />

      <parm name="SourceAccessMethod" value="1" />

      <parm name="SourceURI" value="https://rb.gy/18bubr" />

    </characteristic>

  </characteristic>

 <!--POWER-->

  <characteristic version="4.2" type="PowerMgr">

    <parm name="ResetAction" value="8" />

    <characteristic type="file-details">

      <parm name="ZipFile" value="/sdcard/Download/HE_DELTA_UPDATE_11-23-13.00-RG-U01-STD_TO_11-23-13.00-RG-U07-STD.zip" />

    </characteristic>

  </characteristic>

</wap-provisioningdoc>

Note: If you are experiencing any problems with the formatting of this article, please refer to the PDF version which is attached.

Submitted by Ian.Hatton@zebra.com on August 18, 2022 Permalink

Yes - will work for OS upgrade and downgrade - the filename is not required in the URL as the Gdrive link refers to the specific file which has been shared.