[Wing, P4350 ROM development] ace10134:
How to Port a ROM (to get a newer build for Windows Mobile) (Different Resolution)

If you want to get the latest and greatest Windows Mobile version, then follow these steps! They should work for WM6.5, WM6.1, etc. Should work for other phones, too. This guide covers how to port a ROM that has adifferent resoution than your phone.

Starting Points:

Here are the most probable setups that you have...

If you have an official .NBH ROM (custom ROM might work) that is a newer version, then go to Option I

If you have the kitchen of your ROM that you want ported, then you can locate the SYS and XIP folders inside it, and go to Option II

If you only have the SYS and XIP folders, then go to Option II.

Option I

You are on Option I because you now have a .NBH ROM file. Now, you need to download NBH Tool v 1.1, and extract it to your Desktop (or elsewhere).

Run the nbhtool.exe that you just extracted. You will see dutty's nbh tool window pop up. Make sure that you are on the NBH to NB tab at the top. Then click Decompile NBH file.

You should see a file explorer now. Navigate to the location of your NBH ROM file (that you said you already had), and double click it to open it.

Now a new file explorer window pops up. Navigate to a location of your choice, where you would like to place the extracted NBH. I would create a folder on your desktop called EXTRACTED, and then select that as the location to dump the extracted files. Once you selected your folder, click OK.

Let it work.

Once it finishes, it will say, "Done! Wrote ...." Click OK.

You can now close out of dutty's nbh tool.

Navigate to the folder that you picked in step 5. I told you to extract it to your Desktop in a folder called EXTRACTED. In that folder, you will hopefully find a file called, "Windows.nb", among others. Delete any other files in that folder, except the Windows.nb file.

Now, you need to download Bepe's TOOLSET, HERE. Extract that to somewhere, like your Desktop.

Open the TOOLSET folder from your Desktop (or elsewhere). You should find three files/folders there: dump xip, imgfs tools, and packagebuilder.exe.

Open the imgfs tools folder. Then open up the folder from step 8 (I told you to call it EXTRACTED, and place it on Desktop). Set the two folders up side-by-side.

In your imgfs tools folder, you should have these files/folders: bin, Dump_200.bat, and Dump_800.bat. We will be using the Dump_800.bat file. Now switch to that EXTRACTED folder, and drag and drop the "Windows.nb" file from the EXTRACTED folder onto the Dump_800.bat file. Yes, you place it right on the file.

A command prompt (black window) will pop up. Let it work. Yes, it seems like it's not doing anything at the beginning. Just let it work! Wow, it does take a while for it to complete. But let it go! Finally! The commands stop moving, and at the bottom, it says, "Press any key to continue . . ." Press Enter.

The command prompt closes. Now, notice that in your EXTRACTED folder, there is a second file, called "Windows.nb.payload".

Return to the TOOLSET folder, go to the root of it, and then open the dump xip folder. There are two files/folders in this folder: bin and dumpxip.bat. We will be using dumpxip.bat.

From your EXTRACTED folder, drag and drop the "Windows.nb.payload" file onto the dumpxip.bat file, just like last time.

Another command prompt opens. This one goes faster. Once finished, it says, "Press any key to continue . . .". Press Enter.

Back in your EXTRACTED folder, you should find two new folders: IMGFS and XIP. Open your XIP folder.

You should have a folder that looks like an XIP folder. But first, we have to do the following steps.

Have your TOOLSET folder next to your new XIP folder from the last step. Make sure that you are in the root of your TOOLSET folder, and in the root of your XIP folder (EXTRACTED\XIP). Scroll down to the bottom of the XIP folder. Notice the .DSM files. They are the important ones. You will drag each .DSM file onto the packagebuilder.exe file from the TOOLSET folder. Drag them one-by-one, and wait till it appears that it's finished until doing the next. Once finished, your XIP folder should consist of folders only.

Your folders in the XIP will be: LangDB, MSXIPKernel, MSXIPKernelLTK, OEMXIPKernel, and WinCENLS_WWE.

Go to your kitchen's XIP folder (for user's of Holly's Kitchen, that would be found in C:\HollysKitchen\Working_Folder\ROM\XIP). Repeat the same proccess on the .DSM files, from two steps above, but with your kitchen's old XIP folder. You will then end up with the same folders in both your kitchen's old XIP, and your EXTRACTED\XIP. In your kitchen's old XIP, remove all of the folders, except the OEMXIPKernel folder. Then, go to your new EXTRACTED\XIP folder, and select all of the folders, except the OEMXIPKernel folder. Copy and paste those into your kitchen's old XIP folder.

Now, you have to remove all of the folders, so that you just have files in your kitchen's XIP folder. Go into your LangDB folder (in your kitchen's XIP), select all the files/folders, and cut them (Ctrl-X). Then go back to your kitchen's XIP root folder, and paste the files there (Ctrl-V). Do the same procedure with the MSXIPKernel, MSXIPKernelLTK, OEMXIPKernel, and WinCENLS_WWE folders. You are now done with your XIP!

Go back to your EXTRACTED folder, and then open the IMGFS folder. You should hopefully have a folder called SYS there, if it ported properly.

Now, that SYS folder is in a different resolution than your current phone is. You have two options: If you are porting a build that is fairly similar to your last ROM's build, then you can use your SYS's old resolution folders. The other option is, if you are porting a very different build (like from 6.1 to 6.5), then you need native resolution folders. You have to search and find them yourself. Once you have them, follow below.

Go into your kitchen's SYS folder (or your downloaded resolution folder, if you chose option 2 from the previous step). Resolution folders have the following tags on the names "..._DPI_96" or "..._DPI_96_RESH_240_RESV_320".

If you are choosing option 1 (keeping your old resolution folders), then, in your old SYS folder, delete EVERY folder, EXCEPT the resolution folders (previous step) and the .VM folder. If you chose option 2, then delete the entire contents of your kitchen's old SYS folder, except the .VM folder, and then paste your resolution folders that you downloaded into your kitchen's SYS folder.

Now, no matter which option you chose, you should have a SYS folder in your kitchen that only contains a .VM folder and resolution folders.

Return to that old EXTRACTED folder from a while ago. Open the IMGFS folder within it. Find the SYS folders there, and then select all of the folders except the resolution folders and the .VM folder. Copy the selected folders, and then paste them into your old kitchen's SYS folder.

You've just ported your SYS folder! Hopefully, all goes well. Cook and flash your ROM like normal.