Archive for the ‘Microsoft’ Category

Runtime Intelligence for Windows Phone 7 Apps extended until further notice.

Monday, May 9th, 2011 by Gabriel Torok

Thanks to the overwhelmingly positive response; we are delighted to announce that the WP7 development community will continue to have free use of PreEmptive Solutions Runtime Intelligence for Windows Phone until further notice.
 
What does “until further notice” mean? We heard loud and clear that a lot of you actually held back and chose not to take advantage of the initial offer because you were nervous about the service being suddenly taken away and so, in addition to extending the free offer, we are committing that we will not make any changes to this offer without a minimum of a 60 day notice (and we have no plans at this time to make any changes).

Here are some of the main goals for application analytics:
•  Measure adoption & activity
•  Improve user experience
•  Measure and improve quality
•  Simplify and improve support
•  Enable user profiling

What specifically are WP developers using analytics for? Here are just a few examples…
• Improving the feature split between trial and paid versions of marketplace applications.
• Responding more rapidly to user preferences, settings, and search strings to provide better defaults and prioritize/expose features that improve user experience.
• Capturing exceptions to improve user support and application quality.
• Tracking ad placement effectiveness within an application (are ads more effective at the 3rd level of a game or at the start?)

Do you have other use case scenarios? One you wish we could support? Let us know – we intend to continue to expand and improve this service for a long time to come.
And of course, if you haven’t already registered yourself, go to http://www.preemptive.com/know-more/windows-phone-7 and jump start your development today.

Introducing Runtime Intelligence Portal 2.0

Tuesday, May 3rd, 2011 by Brandon Siegel

After many months of polishing, the next version of PreEmptive’s Runtime Intelligence portal was rolled out for Runtime Intelligence for Windows Phone 7 users late Sunday night. In the coming weeks, the new portal infrastructure will be released for our commercial Runtime Intelligence customers as well. The underlying infrastructure has been rebuilt from the ground up to provide better performance, reliability, and security. On the surface however, the functionality and look & feel of the portal remain mostly the same. Notable changes include:

  • Portal performance is improved. Additionally, load times should not be affected by factors such as the range of data being examined.
  • The metrics surfaced on each dashboard are more useful, consistent, and intuitive.
  • Some calculations were made more accurate (for example, average session duration is now calculated across only completed sessions).
  • Better and more compatible dashboard widgets.
  • SSL encryption is now mandatory for sensitive operations such as login, and optionally available across the entire site (just use https:// instead of http://).
  • Expanded browser compatibility.
  • Many visual and usability improvements to refine the user experience.

We’ve spent a lot of time refining the portal, and we think that we’ve come up with something that works well, looks good, and addresses many of the concerns that we’ve heard from the community. Of course, we know that this is a continuous process and there’s still plenty to do. To that end, we welcome your feedback. Love it? Hate it? Something not quite right? Comment on this blog entry, post a message on our forum, or tweet us @PreEmptive. Anything you write will go directly to those of us on the Runtime Intelligence portal development team, and if your suggestion is a good one you can look forward to seeing it implemented in a future portal update.

Dotfuscator Windows Phone Edition - Now Available!

Friday, January 7th, 2011 by David Poeschl

We recently released a brand new version of Dotfuscator, Dotfuscator Windows Phone Edition!  It is completely free to use and has all of the instrumentation and obfuscation features of the commercial version, but is specifically designed for developers of Windows Phone 7 applications!

The purpose of this post is to get you started with mobile application analytics and obfuscation using Dotfuscator, assuming no prior knowledge.  If you don’t have your own application to try it out on, we provide both Silverlight and XNA applications (including source code) to use for testing.  Let’s get started.

Getting Dotfuscator Windows Phone Edition

Getting Dotfuscator Windows Phone Edition is as easy as filling out one simple form.  We’ll wait here while you go fill it out…

Very shortly after form submission, you will receive an email containing a link to download Dotfuscator Windows Phone Edition, a serial number for registering the product, and various credentials required to properly instrument your application and use the Runtime Intelligence portal to view application analytics.

It is important that your Organization name be distinct.  If it is not distinct (for example, if you and a coworker both enter "Foo Company"), then the license email you receive will not contain RI credentials.

Sample Applications

Dotfuscator Windows Phone Edition comes with two sample applications - one Silverlight application and one XNA game.  They include the original source code, Dotfuscator configuration files for obfuscation and instrumentation, and a link to the Runtime Intelligence Portal where application usage statistics can be viewed (found in the readme.txt of each sample).

The configuration files include best practices for application analytics & obfuscation that you can view, adjust, and apply to your own applications.

To run the sample configuration files through Dotfuscator, first copy the entire samples directory to C:\temp or any location over which you have full control (otherwise you may encounter one of two errors - a file access build error, or an ilasm.exe build error when we try to create the output assembly).  Then simply open the Dotfuscator configuration file included in the sample and click the build button.

Instrumenting Your App

Instrumentation is enabled by default, but no analytics will be collected until you use the Instrumentation tab in Dotfuscator to set the required attributes.

At a minimum, you’ll need to add a BusinessAttribute (using a GUID provided by PreEmptive in the registration email), ApplicationAttribute (to distinguish between your applications), SetupAttribute & TeardownAttribute (to track application runs, and to set up the runtime environment through which more advanced messages can sent).

Due to how application lifecycles are handled on the phone, you may need to be careful where you put your SetupAttribute & TeardownAttribute.  To get up and running with an XNA game, we suggest putting the SetupAttribute on the Initialize() method, and the TeardownAttribute on a method tied to the game’s Exiting event.  To get up and running with Silverlight apps, we suggest putting a SetupAttribute on both Application_Launching() and Application_Activated(), and the TeardownAttribute on both Application_Closing() and Application_Deactivated().

That’s all you need to do to start tracking application runs! You can collect more information, such as feature runs, feature durations, performance information, and custom data in the form of extended key dictionaries (any IDictionary<string, string>).  Check out the sample applications for examples of feature tracking & using extended key dictionaries to track things like the final score of a game.

Viewing Your Analytics

To view your analytics data, go to the Windows Phone 7 Runtime Intelligence Portal and login using the credentials from your registration email.

It can take up to 24 hours for your data to process fully and appear in reports.  You can still tell whether you have successfully instrumented your application by using the Queued Data report on the Account Overview page.

If you see no data in reports or in the Queued Data report, there’s a list of common reasons in this thread.

Obfuscating Your App

Obfuscation is fully disabled by default for new projects.  You will need to turn on each desired transform individually from the Settings tab.  The most useful features for Windows Phone 7 are Renaming, Control Flow, and String Encryption.

When you turn on Renaming or Control Flow, Dotfuscator will apply those transforms to everything in the assembly that it can (while making intelligent automatic exclusions for you in the case of certain types of reflection or XAML references).  You may need to make Renaming exclusions to compensate for certain types of reflection using the Rename | Exclude tab.  A number of these cases specific to Windows Phone 7 development are addressed in this thread.

When you turn on String Encryption, you need to use the String Encryption | Include tab to specify which strings you want to be encrypted.  To select them all, either check the box on each assembly node in the treeview, or add just one custom rule on the right by clicking "Add Namespace" and changing the Name to ".*" (without the quotes).

(For the purposes of String Encryption, it helps to turn on Removal, and change Removal | Options | Removal Kind to "Remove only literals (const definitions).")

Having Trouble?

Here’s a quickstart video that demonstrates obfuscation, instrumentation and analytics for both XNA and Silverlight applications.

If you’ve instrumented your application but are not seeing your data on the Runtime Intelligence Portal, please read this thread first.

If you’ve obfuscated your application and now it won’t start, please read this thread first.

If you encounter any problems, please search or post on our specific Windows Phone 7 analytics forum or Windows Phone 7 obfuscation forum.

You can’t see me, I’m obfuscating (on Windows Phone)

Wednesday, November 17th, 2010 by Sebastian Holst

Recent communications from Microsoft have resulted in a wave of interest (to put it mildly) in obfuscation. Obfuscation is not new; nor are most of the questions, concerns, and critiques that have started flying around the WP7 dev community – but some are (because there are some unique aspects to the wp7 environment).

I have included some resources and comments here – but also, please stay tuned as PreEmptive will be pushing out a collection of resources on this subject specifically targeting Windows Phone.

Quick resources available now:

Online Support: PreEmptive Solutions has two dedicated support forums for Windows Phone 7 developers. Like any forum, you can peruse it, post questions, and get/give answers. PreEmptive support is actively monitoring and contributing:

ISSA Journal: Assessing and Managing Security Risks Unique to Java and .NET (pdf) . Tries to answer the questions “when and why should I worry?” and “then what can I do about it?” Specifically, this article “enumerates specific risks unique to managed code (.NET and Java), offers guidance on assessing organizational materiality of these risks, and lists broadly recognized risk mitigation technologies and practices.”

WP7 FAQ (short blog form)

Question: Why do I have to obfuscate my Windows Phone application? Has Microsoft dropped the ball?

Answer: You don’t have to – but if you want to prevent easy reverse engineering of your application, then you should. Managed code has always been easy to reverse engineer (see ISSA Article listed above), and WP7 is no better or worse. In fact, it may be helpful to compare Android’s policy and recommendations on obfuscation – see my blog here for a detailed comparison.

Question: I just obfuscated my application and it’s broken! Is this a bug? Why can’t it just work like encryption?

Answer: Obfuscation is fundamentally different than encryption in that meaning matters .

Encryption is only half of the equation – the other half is decryption . Encryption algorithms do not need to preserve the meaning of content because the content will be decrypted . Meaning is wiped out in the output (that is the intent of course) and a reconstituted at decryption time (that also means that encryption cannot be lossy).

Obfuscation is the entire equation – there is no “de-obfuscation” – in fact, that is its intent. Meaning must be preserved in the final output. When your program has tricky reflection, includes mixed-mode DLLs, incorporates 3rd party libraries, etc. – all of that must be accounted for. Some of this can be divined through static analysis – but some idioms/semantics cannot.

Question: I just want to keep Reflector from showing source code. Is that so hard?

Answer: That is actually easy. Turn-off renaming and turn-on “control flow.” The ISSA article defines these transforms, but the short answer is that renaming confuses humans and control flow confuses programs. Renaming is almost always the culprit when it comes to “breaking apps.”

Question: Where can I get the WP7-specific SKUs of Dotfuscator and Runtime Intelligence?

Answer: go to http://www.preemptive.com/windowsphone7.html On the right-hand side of the screen under “Get Started Now”, click on Contact Us Here and fill in the request form. Be Sure to write "WP7" in the comment section.

Question: Where can I go to learn about the latest resources to help me obfuscate my app?

Answer: Go to http://www.preemptive.com/windowsphone7.html - we will update this page regularly. Also, follow us on Twitter - @PreEmptive

I have also posted on some related topics on my personal blog

Track Application Usage Statistics for CodePlex Projects

Tuesday, May 11th, 2010 by Joe Kuemerle

Open source software thrives on feedback and participation. Without a good idea of what users want, projects easily become irrelevant. Knowing how many people are actively using your application, as well as which features they’re using (and which ones they’re not) provides significant feedback that helps to focus development, resulting in an improved application that meets the user’s needs.  With CodePlex’s integration of Runtime Intelligence features, project coordinators now have the ability to inject application analytics features into their releases.

Projects hosted on CodePlex can use either the free version of Dotfuscator (included in Visual Studio 2010) or the commercial edition to inject application analytics features into their binary distributions.  The application analytics automatically tracks how many times is run in the wild and the duration of those runs. This provides a measurement of application popularity beyond counting the number of downloads.  Basic system profile information, such as which operating systems and framework versions the application are run under, is gathered and reported on as well.  Additionally, feature usage within the application can be measured including the number of executions as well as their duration.  Total application runs per day statistics are available on the projects statistics page on CodePlex and detailed usage data is available from a link on the statistics page.

With the understanding that there can be privacy concerns, Runtime Intelligence instrumentation transmits no personally identifiable information.  It is also very easy to surface the built in Opt-In/Opt-Out functionality in the library and give individual application users the choice to participate in the program.

The individual usage data is aggregated and daily application usage is viewable on the projects statistics page as well as links to detailed reports of application and feature usage.

Instrumentation of applications compiled against .NET 2.0 and higher (including Silverlight 2, 3, and 4) is supported by Dotfuscator Community Edition.

Projects that use custom attributes to decorate their injection points are permitted to redistribute the PreEmptive.Attributes.dll library as part of their source code.  The library is only necessary for compilation of the application and references to it are stripped out during the instrumentation process, so it does not need to be included in binary distributions.  A signed downlevel version of the attributes library is available on the CodePlex Runtime Intelligence Integration project page (http://runtimeintelligence.codeplex.com/releases ) that can be used in any project targeting .NET 2.0 or higher.  This library is also allowed to be generally distributed with project source code.

Any project hosted on CodePlex can now take advantage of the deep knowledge into user activity that Runtime Intelligence Services provides by reviewing a sample walkthrough here and implementing this new feature into a future release.