How to detect Windows Mobile 6.1 (Detecting AKUs)

Screenshot showing the AKU of a Windows Mobile 6.1 device being reportedWindows Mobile 6 and 6.1 both share the same version of the Windows CE kernel (5.2) meaning that previous techniques to determine the version of Windows Mobile on a device need to be modified to differentiate between these two most recent versions. It is not enough to compare the major and minor version numbers of the kernel. One possible technique is to programatically determine the current AKU in use by the Windows Mobile device as outlined by this blog posting.

What is an AKU?

An Adoption Kit Update (AKU) is an update to the Windows Mobile operating system which is akin to a service pack for a desktop version of Microsoft Windows. An AKU is usually a vehicle to ship an extra feature or fix required by a specific Windows Mobile device under development.

Typically the features enabled by an AKU require specific hardware (such as a new type of keyboard) meaning it does not make sense to make AKUs available to older devices. Occasionally an AKU enables significant features which are of a software nature. For example AKU 2.0 for Windows Mobile 5.0 introduced the Messaging and Security Feature Pack (MSFP) which enabled closer integration with Exchange Server 2003.

Determining the AKU

Since an AKU typically needs specific hardware and generally doesn’t alter the end user behaviour of a device it isn’t typical to need to detect a device’s AKU. However when you must detect the AKU of a device you can look within the HKLM\SYSTEM\Versions registry key for a string value called not surprisingly Aku.

An example of how you may access this registry value is shown below:

using Microsoft.Win32;
 
private string GetAKUVersion()
{
  RegistryKey key = null;
  string aku;
 
  try
  {
    key = Registry.LocalMachine.OpenSubKey(@"SYSTEM\Versions");
    aku = (string)key.GetValue("Aku");
    // Most of the time the AKU string is prefixed with a .
    // so remove it.
    if (aku.StartsWith("."))
      aku = aku.Substring(1);
  }
  finally
  {
    if (key != null)
      key.Close();
  }
 
  return aku;
}

The Channel9 Windows Mobile Developer Wiki contains a list of AKUs that enables you to match up AKUs with OS build numbers which is another way to determine which AKU is present.

Sample Application

[Download akudetection.zip - 10 KB]

A small example application is available for download that demonstrates making use of the GetAKUVersion function outlined above to display the Windows CE Kernel and Adoption Kit Update version numbers for the device the application is currently running on.

If you run this application on a Windows Mobile 6.1 device you will notice that the AKU version is reported as 1.0 (or higher) compared to older Windows Mobile 6 devices which have an AKU version below 1.0 (such as 0.4.2). Both versions of Windows Mobile report the use of various builds of the Windows CE 5.2 kernel.

3 Responses to “How to detect Windows Mobile 6.1 (Detecting AKUs)”

  1. Bill Shadish says:

    Just noting that the link for akudetection.zip
    on http://www.christec.co.nz/blog/archives/337
    appears to now be bad.

    Thanks
    ~Bill

  2. Hi Bill,

    Thanks for the feedback, it’s greatly appreciated.

    I recently moved my blog between servers and it seems some of the content had a few errors after the move.

    I’ve fixed the link, and you should now be able to download the code sample. This weekend I’ll check this issue isn’t present in other posts on this blog (as I plan to complete the migration).

    Thanks,
    Christopher Fairbairn

  3. Fahad Pakistan says:

    Do you agree with me if I use build ID to differentiate WM6.0 and WM6.1 OS devices.

    check this link:
    http://en.wikipedia.org/wiki/Windows_Mobile#Windows_Mobile_6.1

    This is what it says on the link above:
    “Aside from the visual and feature distinctions, the underlying CE versions can be used to differentiate WM6.0 from WM 6.1. The version of Windows CE in WM 6.0 is 5.2.*, with the final number being a 4 digit build ID (e.g. 5.2.1622 on HTC Wing). In WM 6.1, the CE version is 5.2.* with a 5 digit build number (e.g. 5.2.19216 on Palm Treo 800w).”

Leave a Reply