sendto shortcuts

How to use SendTo ZTools1 Shortcuts with Zebra Devices

Ian Hatton -
5 MIN READ
414
0

Using SendTo Tools1 Shortcuts with Zebra Devices

Ian Hatton

Zebra EMEA March 2023, Updated June 23

Overview

This blog describes a collection of shortcut files located in PC SendTo folder in order to allow quick ‘right click’ access to commonly used utilities/techniques. Note that they are provided ‘as is’ i.e. no support & use at your own risk. The functionality supported includes multiple APK installation, certificate + package name extraction from APK file. Shortcuts should be compatible with PC’s running Win 8.x onwards and they require both ADB and Java to be included in the PC system path .

               Installation

  1. Download zip file from: https://drive.google.com/file/d/15BOLPmZoNPrKIpXeMtMgsiSQIVYGE14c/view?…
  2. Extract all files to the SendTo folder on your PC (access by Win+R, type shell:sendto and press enter) preserving the sub-folders
  1. Ensure ADB is added to the system path (may require PC reboot after modifying the PATH in order to make it effective). The shortcuts mainly use ADB to communicate with the device so the device has to have ADB enabled before using these tools
  1. Ensure Java is on system path
  2. If using Windows 11 , the SendTo option is not present on the initial right click menu ( it requires expansion to show the option) . This can be fixed by configuring Windows to show the full right click menu each time using a registry key modification detailed here: https://www.intowindows.com/how-to-enable-the-old-context-menu-in-windows-11/
  3. Filenames and folder names should not contain spaces otherwise they will not be processed correctly by some shortcuts (the same restriction also applies to filenames+paths embedded in Mx XML)

 

Instructions for use

Process raw XML on the target device (_myxml)

               This shortcut will allow any Mx XML file to be deployed to a device connected via ADB in order to quickly process the XML via StageNow

  • Edit XML file to include Mx steps and perform syntax check via loading the XML into a web browser
  • Right click on the XML fileand select- Sendto ‘_myxml’ ( this copies the XML to /sdcard/myxml.xml)
  • Install the snexport_tester v2.0 utility from here: Testing XML Exported from StageNow before EMM Deployment | Developer Portal (zebra.com)
  • Run the utility and select either the XML or JavaScript barcode format depending upon the OS ( Android 13 currently supports only JS barcodes)

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

Quickly install one or more selected APK file(s) on a device connected via ADB (_apk_install)

                

  • Select and right click the required APK file(s) and select- Sendto ‘_apk_install’  
  • APK files will be installed in turn – the ADB install command includes the -g command line switch to pre-grant standard permissions such as camera access.

Easily obtain an application signature and package name for use with Mx AccessMgr to grant special permissions such as ‘Display Over Other Apps’  (_grant_permissions)

This shortcut will generate AccessMgr XML to grant a system permission via right click on the APK file (of the application requiring the system permission) and select Sendto _grant_permissions . This will automatically do the following:

  1. Generate an accessmgr_grant.xml template in the same folder as the APK file
  2. Extract the apk packagename and include it in correct location in the XML
  3. Extract the app certificate as BASE64 and include it in the correct location in the XML
  4. Push the accessmgr_grant.xml file via ADB to /sdcard/myxml.xml so that it is ready for processing on the device via a StageNow batch profile

  • Select the APK file for which permission is required , right click and select _grant_permissions. This will generate the required XML and push it to the device.

  • Read the appropriate XML Tester 2.0 barcode to process the XML on the device

  • Install the associated APK file and check that the permissions screen is not appearing (which confirms that the permission has been pre-granted)

  • Default permission granted is android.permission.SYSTEM_ALERT_WINDOW which is the permission required for ‘display over other apps’ . You can edit the generated XML to optionally change this  permission to the required permission which must be a valid string taken from the AccessMgr documentation here: https://techdocs.zebra.com/stagenow/5-8/csp/access/

  • After edit the modified XML should be manually pushed to the /sdcard/mymxl.xml file for processing

  • This shortcut extracts the certificate for an APK as BASE64 which is the format required when embedding directly in a XML file. If you need to import the certificate into a StageNow profile, you should use the _getsig shortcut which will write the raw (DER) signature to a file with the same name as the APK and the extension .CRT. This file will be suitable for import into StageNow via an AccessMgr step.

Extract an application package name , target API and requested permissions (_apk_info)

 In situations where the APK packagename is required or you need to check the API level which the application targets , you can use the apkinfo shortcut to extract this information:

  • Right click on the APK file and select Sendto _apk_info
  • A file named package.txt will be created in the same folder as the APK
  • This file contains information about the APK including the packagname at the top of the file

Show basic information for the device connected via USB (_device_info)

This shortcut will display some useful information concerning the currently connected device and also write the same information to the file deviceinfo.txt

  • Right click on any file (file is not used) and select Sendto _device_info

  • A file named deviceinfo.txt will be created in the same folder as the APK

  • Sample file contents (with comments added against each line)

MC93 (model)

01-21-18.00-OG-U00-STD (OS + LG build)

190505225D0110 (serial number)

SE4850 ( scan engine if present)

 

 

profile

Ian Hatton

Please Register or Login to post a reply

0 Replies