Updates to Brew MP SDK and Tools

Friday 3/25/11 12:04pm
Posted By Brian A. Perrotta
  • Up0
  • Down0

The focus of this blog post is to provide key updated information as to new changes in the Brew MP™ SDK and its toolsets. Over the past couple of months we have been hard at work adding some cool new features and capabilities as well as documentation to help you work more efficiently with the Brew MP SDK. Below you'll find highlights of these new features and well as in depth discussions as to and how they can better help you – whatever version of Brew® you're using to develop your apps.

Brew MP Utility Applets
We've incorporated a number of new utility applications as part of the Brew MP SDK that can be installed either to a simulation target or a physical device. These utilities enable a broad range of tools that can help you with everything from tracking down memory leaks to fine tuning application performance issues. Installation of these utilities is a simple click of the Sample Code link from our SDK Manager. Here are some of the new utilities that you will find:

This application evaluates the stability of a device and the applications installed on the device. It can be used to detect failures like crashes or memory leaks related to an application or device which wouldn't be found under normal circumstances. There are three event modes in MonkeyTest, random mode, record mode, and replay mode.

Random mode generates random events (keystroke, touch, gesture) and injects them into the system. Failures such as crashes or memory leaks can often be discovered using random mode. Record mode allows the user to define the sequence of events they would like to test the device or application and capture them into a log file. Replay mode is used to playback and rerun the application from the captured log file events.

We've also added some new features into MonkeyTest including:

  • For getting out of a trapped UI state, update the following parameters in the MonkeyTest.car file:

    MONKEY_CONFIG_UNCHANGE_DURATION <-- defines the interval at which it is checked to see if UI is trapped
    MONKEY_CONFUG_NUM_RETRIES <-- number of times an attempt is made to escape

  • Logging of execution time is stored in the monkeytesttime.txt file found in fs:/shared/tools_logs folder
  • To exclude an applet, you will need to use the monkeytest.ini file and add something like this:


This application can be run on either a simulation or physical device target.  For more information, please refer to the Monkey Test Primer.

StressCPU is a stress testing utility application. StressCPU will hog the available CPU cycles from a minimum to a maximum amount according to the setting on the control. Simply drag the indicator to the desired level of hogging. StressCPU will continue to run if you launch other applications on top of it. The following parameters are supported in the StressCPU.ini file:

Percentage=50; <-- the initial percentage you want to fill the EFS

StressFile is an EFS stress testing utility application. StressFile will hog the available EFS space from a minimum to a maximum amount according to the settings that are provided in the StressFile.ini file. This utility will display a thermometer indicating how full the file system is indicated in red. The StressFile.ini file requested user settings will be displayed in yellow. After cleaning up any temp files from previous runs, StressFile will start filling the file system with temp files until the requested percentage full is reached. The following parameters are supported in the StressFile.ini file:

Percentage=50; <-- the percentage you want to fill the filespace
Cleanup=1; <-- 1 if you want to cleanup on susequent runs, 0 if no cleanup
SIMDiskSpace=20000000; <--in bytes a maximal disk space to fill on the SIM

StressHeap is a stress testing utility application. StressHeap will hog the available heap space and fragment it using a minimum and maximum block size or a heap dump log file (depending on the settings you provide in the StressHeap.ini file). The default version will use the log file bclog1.log to hog the heap space. If you wish to create your own heap analysis log file to use with StressHeap, you must use the Heap Analyzer Tool (see below). StressHeap will continue to run if you launch other applications on top of it. The output from this utility will display a graphical representation of the nodes being allocated. Allocated nodes display in red and free nodes display in blue. The percentage completed is displayed with a green progress bar in the middle of the screen.

Heap Analyzer
Our one-click solution that allows developers to take snapshots of the heap on both simulation and physical targets. It analyzes the snapshot and gives insight on heap memory usage by application, used/free node statistics by node size and fragmentation with the help of a visualizer. The Heap Analyzer now has the added capability to compare heap dumps. In addition, we've added the capability to filter the heap nodes in a given heap dump by various criteria. A summary report of the number of nodes and total memories allocated that match the set filter are displayed.

The Heap Analyzer's UI is organized into four panels:

  • Configuration Panel
    • This panel lets the user select the Target that is currently connected (USB and Simulator) as well as letting the user do a Heap Walk on the selected Target. The Heap Walk button checks if the target is equipped with all the dependent modules and executables. If not, it automatically installs the modules on the target. A progress bar is displayed to keep the user informed of the time remaining for the Heap Walk to be completed.
  • Disgnostics Panel
    • Used Nodes Tab: This table aggregates all the used nodes based on node size and displays the total number of nodes in each node size, the total size used.  It displays percentile information (total size of each node size as a percentage of the maximum total size of any node size). It also displays a percentile usage bar graph for a quick glance of the total size used.
    • Free Nodes Tab: Same format as the Used Nodes Tab.
    • All Nodes Tab: This table provides a complete view of each Heap node – address, size, Owner, Task Name, Context Id, Tag, and Timestamp. Interpretation of these fields are as follows:

      Owner      -1: Free node, 0: HeapInternalNodes, 1:
                  2: fs:/mod/context, the actual context

      TaskName   -1: TaskName not available, the actual Task
                     (ex: UI, MAIN TASK etc)

      ContextId  -1: Heap1Wrapper unavailable, 0x0:
                     context id not available,
                     actual Context id (ex: 0x1001000)

      Tag        Debug String

      Timestamp  -1: Timestamp not available,
                     Actual time stamp
                     (ex: 1114460418828)

    • Visualizer Tab: Displays a graphical view of the heap usage with color codings representing free and used nodes.
    • Context-Id Usage Tab: Same format as the Used and Free Nodes Tab.  The aggregation is based on the Context-Id.  The total number of nodes and the total size for each Context-Id is displayed.  The percentage field provides total size used by each context id as a percentage of the total heap size.
  • General Statistics Panel
    • Provides general statistics such as free size available, size allocated by system, size allocated by heap internal, total allocated size and total size of the heap.  This panel serves as a reference when interpreting data in different tabs in the Diagnostic Panel.  It also contains a list of the top 10 free node sizes.
  • Log Window Panel
    • Provides status information during heap walks, warnings and error messages to keep the user informed of the Heap Analyzer UI's activities.

Target Manager
Added Device Wizard including support for legacy devices using BTIL over DIAG and MODEM ports.

    Remote control screen capture
    This tool allows you to remotely capture screens from either a simulation target or a physical target.  The following steps are necessary to follow when using the tool: 

    • SICPClient is required to be loaded onto the Target to be able to capture screenshots.  To install:
      • For Simulator - from Target Manager right-click the Simulation Target (ensure its running), select Install Features, check SICPClient and click the Installed Checked Utilities button
      • For Device - from Target Manger right-click and select the Device Setting options, then select the Features tab, check SICPClient and click the Installed Checked Utilities button
    • Within Target Manager, right click on either the running simulation or physical targets and select Remote Control
    • Click on Tools and select Snapshot
    • You will be presented with dialog to select name of file being saved, format (.bmp, .jpg, .gif, .png) and location
    • Snapshot will be saved as specified

    Target Interrogation.
    This tool provides the ability to compare the target being interrogated to an installed platform. Please see the available documentation for more information. The following steps are necessary to follow when using the tool:

    • Interrogatoragent is required to be loaded onto the Target for Interrogator to be able to interrogate targets.  To install:
      • For Simulator - from Target Manager right-click the Simulation Target (ensure its running), select Install Features, check Interrogatoragent and click the Installed Checked Utilities button
      • For Device - from Target Manger right-click and select the Device Setting options, then select the Features tab, check Interrogatoragent and click the Installed Checked Utilities button
    • Within Target Manager, right click on either the running simulation or physical targets and select Interrogate
    • The Interrogator UI will be displayed and the target interrogation will start automatically
    • When complete, an Interrogator report is displayed with two tabs, Device and Platform
    • The Device tab lists information specific to the physical attributes of the connected device, listing information such as chip version, software version, as well as screen and memory attributes
    • The Platform tab lists information specific to the supported APIs broken down by family and subfamily across specific ClassIDs and whether they are supported on the interrogated device
    • You can re-interrogate a device by clicking the Force option.


    Resource Manager

    • Support has been added for X-Large icons.  This feature has been added to the Applet Icons section within the Applets view and underneath the General tab.  This feature allows creation of a fourth size of a single view icon that can be generated during .cif creation which is associated to a particular applet.  This was put into place to satisfy specific carrier device requirements.


    IDE's & Plugins
    Microsoft Visual Studio & Visual Studio Plugin

    • We've introduced an incremental installation option.  From Microsoft Visual Studio -> Project Menu -> Brew MP Properties -> Package -> Advanced.  If you enable this option, only changed files will be loaded to the target when performing Click2Run/Debug. This should be used for projects that include multiple/large modules as loading times will be reduced.
    • We've added a C Windowing Project Wizard making it easier for users to create new C Windowing applet projects.

    Eclipse IDE Plugin - Lua Contextual Editor

    • We've enhanced our Lua Contextual Editor to support error highlighting in CIF and CAR files as well as an outline view for CIF and CAR constructs.


    New Documentation
    DBC-SQL Technology Guide  - Learn to work with the Brew MP DBC - SQL technology and associated interfaces.  This document provides you with the basic framework which is needed to work when managing persistent data on a device.  Database Connectivity (or dbc) is a wrapper around the SQLite database engine which in turn provides ability to share data between applications via a set of interfaces and class that are defined and supported by dbc.

    Brew Level 1 Rev B API Reference  - Defines the Brew MP APIs that are included in BL1 and sets the absolute baseline for APIs that all devices in all device tiers should be able to support.  Functionality for each level is further broken down into the following: Classes, Primary Interfaces, and Features.

    Especially for OEMs (log in with OEM credentials required)

    Widgets Technology Guide  - Widget theming allows an application developer to readily change the look and feel of the user interface therefore giving the user a dynamic and appealing application experience.  This document describes widget theming architecture, writing a theme, and using themes in a widget-based applet.

    Validation Primer  - The process of validation helps to ensure that a particular device supports Brew MP application development.  This includes full support of Brew MP APIs as well as the Brew MP tools.  This document describes the process Qualcomm follows when a validation submission pack is received from a manufacturer.


    Updated Documentation

    Brew MP Application Development Primer

    • Included some additional troubleshooting information

    Qualcomm Interface Definition Language Reference

    • prior versions of qidl and qidlscript have been deprecated
    • qidlscript has been replaced with qidlc
      • qidlc doesn't support communication between different languages, instead, it generates code that implements a remote procedure call
    • base version is 1.0.2
    • JSON is a newly supported language

    Tools Reference

    • Added filtering info to Heap Analyzer Help
    • Remote Control documentation
    • Target Manager for new Add Device Wizard
    • Add QIDL C compiler Help
    • Visual Studio and Eclipse Plug Help updates (
    • Contextual Editor documentation in Eclipse Plugin Help
    • VS Plugin Help –
      • C windowed app framework
      • Widget app framework
      • Running your application – option to attach debugger at startup (OEM option)
      • Setting package project properties – option to select where to install module to (more of an OEM option)
      • Using Add Class Wizard

    Window Manager Technology Guide

    • added Getting Started section
    • enhanced structure to provide more easily created windowed apps

    Especially for OEMs (log in with OEM credentials required)

    Module Management Technology Guide

    • added info on two interfaces (IModActivate and IModInstaller2)
    • added section on using Module Management interface, which includes code snippets.


      Newly Added Training Modules

      Migrating Apps from Brew to Brew MP  - This video demonstrates how to use the Brew MP plugin's project import wizard to migrate an application from Brew to Brew MP.


      Next Steps
      Make sure you have the latest version of the Brew MP SDK to get these latest tools and utilities. Of course keep in mind some of these tools are designed to stress Brew MP devices and therefore can cause unexpected conditions (such as bricking your device). There are no representations or warranties made for this advice, so use these tools at your own risk. For additional information on prior SDK versions please refer to the Release Notes and Known Issues documentation.

      Also remember to visit and participate in the Brew MP forums where you'll find community discussions organized by technology family. If you have a question about Brew, check the forums to see if it's already been asked or post a new topic. Qualcomm engineers actively monitor and moderate the forum to ensure that questions are accurately answered and discussed.