[Windows Mobile] hilaireg:
Updating the .PAYLOAD file

The Update Loader (ULDR) Partition

The boot loader can accommodate multiple execute-in-place (XIP) regions where individual modules can be updated after the initial operating system image file has been written to the device – the ULDR is an example of this use. The Update Loader (ULDR) provides Flash-Over-The-Air (FOTA) capabilities permitting your carrier to issue changes such as Hotfixes over the cellular network – generally, most carriers avoid this practice.

As this is generally undesirable in a cooked ROM, since we are making modifications that a carrier Hotfix might roll back, we will reduce the partition. This will cause the device to report insufficient ULDR space to the carrier FOTA request … and the freed up space becomes available for our uses. Lastly, we will remove some debugging system libraries from the XIP_OUT.BIN file – effectively providing approximately 3 MB of space.

Adjusting the ULDR and Updating the .PAYLOAD file

We will use the ROM Tools feature of the XIPPorterEx tool to adjust the ULDR, remove the debugging system library files. We will commit our changes which will replace the current XIP.BIN contents with our new XIP_OUT.BIN contents resulting in the final OS.NB.PAYLOAD file – which we will use when cooking our new ROM.

The new OS.NB.PAYLOAD file will be placed in the following folder – effectively replacing any existing OS.NB.PAYLOAD file.

.\XIPPorterEx\MyTools\os_nb.payload\

As we have already unlocked the Paging Pool and disabled Certificate checking, we will not use the Execute Cert Patcher, Execute PP Patcher, Change PP To MB features. As we will be using the same version of the system files, we do not need to port the MSXIPKernel or remove cachefilt.dll, mencfilt.dll, and encfilt.dll.

Tools Required

The following tools are required to perform the OS.NB.PAYLOAD file update activities.

XIPPorterEx

G’Reloc

ImgfsFromDump

ViewImgfs

XIPPort

Procedure

The following procedure will create a new OS.NB.PAYLOAD file which will be used when cooking our ROM.

Copy the XIPPorterEx folder (and contents) from the C:\XDA\MY_KITCHEN\Tools\ folder to the C:\XDA\MY_KITCHEN\Temp\XIPPorterEx\ folder.

Copy the .ROM folder (and contents) from the C:\XDA\MY_KITCHEN\SYS\ folder to the C:\XDA\MY_KITCHEN\Temp\XIPPorterEx\MyTools\sys\ folder.

Copy the .VM folder (and contents) from the C:\XDA\MY_KITCHEN\SYS\ folder to the C:\XDA\MY_KITCHEN\Temp\XIPPorterEx\MyTools\sys\ folder.

Copy the OS.NB.PAYLOAD file from the C:\XDA\MY_KITCHEN\Temp\ReducePayload\ folder to the C:\XDA\MY_KITCHEN\XIPPorterEx\MyTools\os_nb.payload\ folder.

Copy the XIP.BIN file from the C:\XDA\MY_KITCHEN\Temp\XIPPort\ folder to the C:\XDA\MY_KITCHEN\Temp\XIPPorterEx\MyTools\xip.bin_old\ folder.

Copy the XIP.BIN file from the C:\XDA\MY_KITCHEN\Temp\XIPPort\ folder to the C:\XDA\MY_KITCHEN\Temp\XIPPorterEx\MyTools\xip.bin_new\ folder.

Copy the XIP_OUT.BIN file from the C:\XDA\MY_KITCHEN\Temp\XIPPort\ folder to the C:\XDA\MY_KITCHEN\Temp\XIPPorterEx\MyTools\xip_new_ported\ folder.

Navigate to the C:\XDA\MY_KITCHEN\Temp\XIPPorterEx\ folder.

Launch XIPPORTEREX.EXE.

Clear the following check boxes:

Execute Cert Patcher

Execute PP Patcher

Port Only MSXipkernel

Delete CACHEFILT.DLL

Delete MENCFILT.DLL

Delete ENCFILT.DLL

Change PP To MB

Create OEM Package From Unused Xip Modules/Files

Don't Copy Xip Dsm

DEBUG Save Temp .BIN Files

Click the ROM Tools button.

Clear the following check boxes:

Conservative Mode

Write NEW Xip Size Into MBR

Select the DEBUG Delete Temp .BIN Files check box.

Click the Give From Your XIP_OUT.BIN button.

Click the Write button.

At the OS.NB.PAYLOAD Was Successfully Reduced... message, click OK.

Click the Done button.

Copy the OS.NB.PAYLOAD from C:\XDA\MY_KITCHEN\XIPPorterEx\MyTools\os.nb.payload_Reduced\ folder to the C:\XDA\MY_KITCHEN\XIPPorterEx\MyTools\os_nb.payload\ folder – overwriting the older version of the file.

Click the Find Start XIP Offset button.

Click the Write It button.

At the NEW OS.NB.PAYLOAD Was Updated Successfully... message, click OK.

Exit XIPPORTEREX.EXE.

Copy the OS.NB.PAYLOAD file from the C:\XDA\MY_KITCHEN\Temp\XIPPorterEx\MyTools\os_nb.payload\ folder to the C:\XDA\MY_KITCHEN\ROM\ folder.

Delete the OS.NB file from the C:\XDA\MY_KITCHEN\ROM\ folder.

Tip

You can change the ROM Date/Version in the Ervius PkGToolsBuildOs Kitchen 6.X-5.3 tool.

References

[TUT] Manual Full XIP Porting (& MANY MORE TUTORIALS)

http://xdaforums.com/showthread.php?t=438676

Reduce ULDR Partition Size

http://xdaforums.com/showpost.php?p=2916649&postcount=7

[TUT] ULDR Removal for Elf/Elfins

http://xdaforums.com/showthread.php?t=446506

[Walkthrough] How to Port a ROM [XIP and SYS]

http://xdaforums.com/showthread.php?t=389772

[14 NOV] M-Amine 2.0 Kitchens + Tutorials

http://xdaforums.com/showthread.php?t=437898

[Full Guide Thread] TNT.Kitchen for Wizard, Auto XIP Porting and Modules Relocating

http://xdaforums.com/showthread.php?t=388666