Monday, September 14, 2009

Part II: Organizing your dump folder!


The BIN file of your ROM (assuming only PDA section - not covering Phone/EBOOT) has the following partitions/info sandwiched into it -
**************************************
Part-0 type: BOOT SECTION image
Part-1 type: XIP RAM Image
Part-2 type: IMGFS file system
Part-3 type: legit DOS partition
**************************************

All these partitions are contained in "i780.nb0.payload" file that you had generated in the dump process (as explained in my previous post). So, to start modifying the ROM, you need to be able to extract separate portions of this, modify and put them back together with various different tools. In the previous post, I've explained how to use "prepare_imgfs" & "ImgfsToDump" to take the "Part-2 section" (the IMGFS file system part) and dump its
contents. The dump folder now contains all the files and folders "disorganized" inside of it. Now, its time to clean this up and put them into "SYS" & "OEM" folders. Remember, here, we aren't yet messing around with the XIP section! I shall cover the XIP section, porting, tweaking and modifying in a later post ;)

The Next Step!
Now, its time to segregate the files, modules and folders into OEM and SYS folders. To do this, you'd need "Ervius' PkgToolsBuildOs tool". I use version 5.3 (which is the latest at the moment). The file name is PkgToolsBuildOS-5.3.exe. Start this tool and click on "Open". Point it to your "dump" folder that you generated as explained in the previous post. Here's a picture of what it should look like -

Once you've clicked "OK" PkgTools should show some details. Click on "Build Packages" button on top, leaving all other settings as it is. This should take a while, and once its done, your "dump" folder is now cleaned up with all modules/files going into a nice folder structure. You have two main folders now in your "dump" folder - OEM & SYS folders.

The OEM Folder
In this folder, you'll find all customization, drivers, extra applications that your device manufacturer has added. Some folders are important for the device to function correctly (for instance the Drivers folder) and care should be taken while modifying contents in the OEM folder. I shall cover details on customization of the contents in your OEM/SYS folders in a separate post. I'd recommend that you start browsing around these folders to get a handle on how things are organized!

The SYS Folder
This folder contains the Operating System that Microsoft has provided. Ideally this will be common on all devices, and all of this comes from Microsoft. However, some cooks might have dropped in some of their customizations into this folder as well, which you might end up finding! The SYS folder contains all your applications (Phone, MS Office, CORE OS, etc. etc.), the language specific folders, DPI specific folders (Depending on the resolution of the device). These shall be covered in detail in a future post!

Do this for a few custom ROMs out there, and get your feet wet on how each ROM has its dumped contents!

Thats it for now, if you have trouble finding any of the tools or understanding, write under comments!

No comments:

Post a Comment