Deploying your applications to Windows Mobile devices

Deploying to mobile devices

Smart device applications are deployed to devices via CAB files, which are created from deployment projects in Visual Studio. Cab files are the windows equivalent of setup and msi files for devices. These can be delivered to the device through a number of means including ActiveSync, simple file transfer and device memory cards. This topic will provide an overview and information relevant to deploying smart device mobile applications. For more in depth information on device deployment you should read the MSDN topic Deploying .NET Compact Framework 2.0 Applications with .cab and .msi Files.

Deploying ArcGIS Mobile runtime

Deploying the ArcGIS Mobile Runtime has been simplified by the development of a CAB file. The CAB file contains all the necessary files that are required to run ArcGIS Mobile based applications. A CAB file is similar to a ZIP file in that it contains a compressed version of files, but more than a ZIP file, since it includes for installation information. To deploy the Mobile Runtime using the CAB file, simply copy the CAB file into your device and then select it from the file explorer to launch the installation. Once the installation is completed, you are ready to deploy your own ArcGIS Mobile based application.

Q. How do I get the ArcGIS Mobile Runtime CAB file?

The ArcGIS Mobile Runtime CAB file is installed on your development computer when you install ArcGIS Mobile.

Q. Where is ArcGIS Mobile Runtime CAB file?

You can find the ArcGIS Mobile Runtime CAB file under your \Program Files\ArcGIS\Mobile10.0\Install. The name of the CAB file is AGMRuntime.cab.

Q. What does the CAB file contain?

The CAB file contains managed assembly ESRI.ArcGIS.Mobile.dll and ESRI.ArcGIS.Mobile.Client.dll, four native DLLs (ESRIMobileCore.dll, PE.dll, ESRIMobileGPS.dll and ESRIMobileSdc.dll), and information on how to install them.

Q. Where do the installed files go on the mobile device?

The AGMRuntime.cab installs files to \Windows and \Program Files.

Windows Mobile 5 application security considerations

All Windows Mobile 5 based devices, including Pocket PC and smartphones, implement security policies that determine whether an application is allowed to run and, if allowed, with what level of trust. Smart device applications built with the Mobile SDK for deployment on Windows Mobile 5 devices require full trust, as they create and interact with a file-based cache, and must include an appropriate security certificate.

If you do not sign your application with a full trust or privileged certificate your application will either not run, on smartphones for example, or may pop up a dialog on some Pocket PCs asking the user to trust the application. Neither case is desirable for your users.

It is your responsibility to obtain a full trust privileged certificate and sign your smart device project. If you are releasing an application to the public, you should consider participation in the Microsoft Mobile2Market program to certify your application. For more information on security, signing your projects and certification please read the MSDN topic Windows Mobile 5.0 Application Security.

Creating and deploying smart device cab files

Creating CAB files for smart device projects is straightforward. You should follow the steps for Creating Device CAB Files with Visual Studio as documented in the link in the opening paragraph. In addition to the project output, you will need to add the native smart device mobile SDK libraries ESRIMobileCore.dll, PE.dll, ESRIMobileGPS.dll and ESRIMobileSdc.dll to the deployment project. The native libraries are located under your install location.

Once the cab file is generated, you simply have to transfer it to the device and run it to install the application. You can transfer the cab file a number of ways including file copy when the device is docked, through ActiveSync by creating an associated MSI file as documented in Creating a Desktop Computer Microsoft Installer Package at the same link as above or by providing the cab on a memory card.

Included with the ArcGIS Mobile SDK is a sample for deploying your own ArcGIS Mobile based application on the Pocket PC platform. The Windows CE sample will build a MSI installer that includes a CAB file containing a sample application and the ArcGIS Mobile runtime required to run ArcGIS Mobile based application on Pocket PC platform. The instructions on how to build and use the sample are included in the SDK.

Signed cab files

The ArcGIS Mobile CAB file is signed so that devices can be assured of it coming from a trusted source. If you are going to sign your CAB file that contains other CAB files (for example ArcGIS Mobile Runtime), all the CAB files will be signed using the same signature as Microsoft only allows one signature on a file. The signing process uses the same code-signing certificate to sign the CAB and all files within the CAB. For more information about signing CAB files, please refer to Verisign Mobile-to-Market (M2M) signing procedure for adding M2M certificate to your CAB files.

Device Security Configuration Manager

Device Security Configuration Manager is a tool that allows you to examine and provision security configurations for your mobile device. The standard security configuration for your devices comes in one of the followings: Locked, One-Tier Mobile2Market Locked, One-Tier Prompt, Two-Tier Mobile2Market Locked, Two-Tier Prompt, and Security Off. Setting different security configuration will have different effects when you are installing ArcGIS Mobile Runtime CAB and your own application.

Locked - If your device is set to locked, you will not be able to install ArcGIS Mobile Runtime CAB or any other installers. Only the applications signed by the OEM will have permission to run.

One-Tier Mobile2Market Locked - ArcGIS Mobile Runtime CAB is signed with M2M certificate, thus you will be able to run the install without any problem. As for your own application, if the CAB is not signed, you will not be able to launch the install.

One-Tier Prompt - You will be able to run ArcGIS Mobile Runtime CAB installer without any problem. As for your own application, if it is not signed, you will see unknown publisher prompt that you will be able to acknowledge for installing your application.

Two-Tier Mobile2Market Locked - You will be able to install ArcGIS Mobile Runtime without any problem. As for your applications if they are not signed, you will not be able to install them. Currently Two-Tier supports are only available in Windows Mobile 5 Smartphone Edition and Windows Mobile 6 Classic Edition.

Two-Tier Prompt - You will be able to install ArcGIS Mobile Runtime. As for your own application, if it is not signed, you will see unknown publisher prompt that you will be able to acknowledge for installing your application. Note that In Two-Tier, if the application is signed with a certificate in Privilege Certificate Store, it will run "Privileged". If the application is signed with a certificate in Normal Certificate Store, it will run "Normal". Currently Two-Tier supports are only available in Windows Mobile 5 Smartphone Edition and Windows Mobile 6 Classic Edition.

Security Off - Your devices will be able to run any installations when the security is set to off. This includes ArcGIS Mobile Runtime, your own CAB installer (signed or unsigned) or any other third party installers (signed or unsigned). However, setting Security Off on your device has risks when you are not aware of potential threats that could result from malware from unknown source.

For more information about Device Security Configuration Manager and different device security configuration settings, please refer to Microsoft Security Configuration Manager for Windows Mobile topics.

The following contains a list of online resources for deployment and device security. The lists are provided here for your convenience when you are working on deploying your mobile applications

MSDN overview of deployment

Understanding Security for Windows Mobile-based devices

Downloading the Device Security Manager


9/20/2011