Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 


The following blog post shows how Android application files can be downloaded faster using Session Manager. An 25MB APK file will be transfered in 10-12 seconds instead of 5:00-5:30 minutes using HTTP and Package Server instead of XNET and direct Afaria Server download. This is useful, if you want to use the Zebra MDM Toolkit and want to install applications silently. How to manage Zebra (Motorola) Devices with Afaria



  • The APK file, that needs to be installed
  • The possibility to read the IIS log files, where the Package Server is installed
  • The possibility to create an Android enterprise application policy, using the APK file
  • The possibility to modify a folder on a hard drive the Afaria Server has access to (local or network drive)
  • The application policy must be linked to all devices where it will be distributed to


  • Store the APK file at the location where the Session Manager would have access
  • Create an Android enterprise application policy using the .apk file
  • Link the App policy to all groups that should be able to download the applcation. You can check success, if you will see the application in the Mobile Secure Client (after refreshing it) in the Enterprise Application section
  • Download the App to one of the devices
  • Check the IIS log
    • Standard: C:\inetpub\logs\LogFiles\W3SVC1
    • If not: Open the IIS Manager, navigate to the Web Server, Navigate to Server Logs and Copy the path
    • Open the latest log file. It can take a few minutes, the log is not written live
  • Search for an entry that contains the APK Filename
  • 2016-08-15 13:00:00 GET /ps/ps.svc/Package/Content/{A-GUID-in-brackets}/A-GUID/1/ApplicationName.apk - 443 - Afaria+Android+Client 200 0 0 11275
  • You require the Application Name and the second GUID, that is not written in {}
  • Create a Session Manager Channel

  • To transfer the file, the execute program script must be used
    • For a better usability, the script uses the variables <%PackageID>, <%APKFileName> and <%Destination> that have to be initialized before using the skript
      • Package ID: A-GUID
      • APKFIleName ApplicationName.apk
      • Destination: the location where the file should be sent to
    • "Wait until completed" is used for pausing the session script until the download is completed

Installing or upgrading an application on Zebra MDM Toolkit enabled devices

  • Implement the Afaria MDM Toolkit Connector as described in How to manage Zebra (Motorola) Devices with Afaria
  • Create a Session Manager Script that sends the file and installs the application
    • Define a folder structure on your hard drive that is used for sending APK to devices
    • Store all APK files for backup in this folder
    • Create a ini file where you can store metainformation of the APK file to control the installation
    • Use the ReadVariableFile Event to read from the ini-file
    • Use the SetVariableEvent to set the set the variables
    • Send the file to the device
    • Trigger the installation or upgrade via MDM Toolkit script