Friday, September 18, 2009

Part III: Understanding whats going on in the "SYS" folder!

In my previous post, I've shown how to organize the dump folder by segregating all files/folders/apps/modules under two main top level folders "OEM" & "SYS" folders. A quick recap tells us that OEM folders are device manufacturer specific files which are specific to your device. These are usually different drivers for your device hardware along with certain software customization (new apps, reg tweaks etc.) that your manufacture has thrown in.

The SYS folder contains the core operating system built by windows. It can be compared to the "Windows" folder on your desktop, for instance, on a broad level to help understand better :)

In this part, I shall cover details of what you'll find in the SYS folder, what can be tweaked, the folder structure etc. This is important to know especially if you are trying to -

  1. Port a new build of the operating system! (Every time a new build of Windows mobile is released, a cook replaces contents of the SYS folder with the updated files and prepares a new build! All the WM6.5 230xx builds are all new set of files and folders dumped into the SYS folder which are made in redmond and leaked ;))
  2. Customize, hack, modify contents here to tweak the OS
  3. Create a build to support a different language


SYS Folder: Explaining further!
Here's a screenshot of the folders that are present in the SYS folder (click on graphic to enlarge) -

The main things you should notice in this screenshot are the following -
  1. Different folders thrown in with the name of the app/module. For example - "BROWSING". This, obviously, contains files and content related to your internet browse MS provides as default : that is, IE (Internet Explorer). Similarly you have many other apps out there that you can see, which all make the OS that we use on our device!
  2. You can also see that the folder "BROWSING" has two more folders alongside called "Browsing_DPI_128" and "Browsing_Lang_0409". More on this in a bit!
  3. Sometimes you'll find a folder defining the resolution of the device instead or along with the DPI folder, such as "Phone_dpi_128_resh_320_resv_320".

Explaining this structure
The main folder contains the base application. Example: "BROWSING" folder that you see. The other two folders that are provided along are basically content/data that is picked up by the application (in the example "IE or iexplore.exe").

The "Browsing_Lang_0409" folder provides language customization. Here the code "0409" is for "English". So all your language customization folders for "English" will ALWAYS end with "0409"! So, if you want to change the OS' language to some other language, you'll need to knock off all the 0409 folders, and replace with corresponding "XXXX" code folders that are taken from the same build of Windows Mobile! For example, if you're using WM6.5 23049 OS build in your SYS folder, then all the Lang files should be taken by what was issued by Microsoft specific for 23049 build. Sometimes, you could use lang folders from a different/other build and port, but you might have issues/bugs within the OS at runtime.

The "Browsing_DPI_128" basically will contain graphic resources, dialog boxes designed and other related visual media/content which is designed for "128 DPI". The concept of "DPI" is explained further at the end. So, if you are trying to create a 128 DPI build of the OS, you need to drop all the folders which say "DPI_128" into the sys folder.

Sometimes, applications have different sets of graphics not just differentiated based on the target DPI, but target DPI AND Resolution. This purely depends on the way the application is written! So, to give you an example, see the "Phone" application! The Phone application has both a DPI folder with bunch of resources/graphics designed for 128 dpi AND some more graphics and resources for a "320x320" resolution device! You'll find two folders - Phone_dpi_128_resh_320_resv_320 & "Phone_DPI_128"!

Some apps/modules do not require/have any language or DPI customizations and might have these folders missing, which normal - just the way the application is designed. For instance, the application might have ONLY english support and is resolution aware and doesnt have separate folders/graphics for different resolutions.

A quick recap - taking the "Phone" application as an example here. The folders related to the phone app are -
  1. Phone - the base application!
  2. Phone_DPI_128 - 128 dpi specific graphics/content
  3. Phone_dpi_128_resh_320_resv_320 - some more graphics/content specific to 320x320 resolution devices, with 128 dpi graphics
  4. Phone_Lang_0409 - Language files for English

So the Phone module here, will run on "English language" at "128 dpi" designed for "320x320" resolution. Its usually the job of the cook to decide which dpi he would cook the rom, and take appropriate folders from the files provided by Microsoft.

IMPORTANT: YOU WILL FIND TWO FOLDERS NAMED ".ROM" & ".VM". These folders should always be taken from your original working ROM that you disassembled! DO NOT replace with any other .ROM or .VM folder!

Get your self well acquainted with the SYS folder! In terms of what apps you can find, the lang files etc. I'll try and cover the OEM folder in detail in my next post ;)

1 comment:

  1. Above you said that You can also see that the folder "BROWSING" has two more folders alongside called "Browsing_DPI_128" and "Browsing_Lang_0409". More on this in a bit!.But I could not locate much information about these can you please that information it will really help.Thanks for sharing such an informative blog

    ReplyDelete