[TUT] Sous-Chef's Guide to XIP Porting in Ervius Visual Kitchen 9.7 - Windows Mobile

Version: 15/06/2009
Intro
Welcome; I wanted to offer a little "something" back to the XDA community in the hopes that will benefit others and to show my appreciation to the folks that make XDA the great community that it is. Hopefully, this guide will help you work your way up the ranks to Chef … let’s begin!
So here you are; in the heat of the kitchen, adding your favourite ROM ingredients ... pinch of this, sprinkle of that. Like all good chefs, you decide to take a taste of your preparation before serving to others – so you try it ... wait! you say, something is not right; you're positive you added the ingredients but it's not right. You carefully review all of the portions; seem right; so you decide to look at the ingredients and you realize … you need to change suppliers.
This guide is intended to help you learn how to port the Execute-In-Place (XIP) region from a new (donor) device for use in your kitchen; it will walk you through the process of extracting the contents of an Official ROM, obtaining the new (donor) device XIP, and porting the new (donor) device XIP into your kitchen.
Obtaining Execute-In-Place (XIP) Files
The Execute-In-Place (XIP) region is an area where an application can execute code directly from ROM rather than loading it from RAM. It is possible to use the xip.bin contents from a newer version of a ROM from a different device or a newer operating system. This is typically done by chefs who are looking for the most recent versions of system files from a specific device or version of an operating system.
The process requires that you obtain the newer xip.bin and the corresponding .\SYS folder from the desired device .NBH package. Although it is possible to obtain a pre-extracted xip.bin and corresponding .\SYS folder, it is always preferable to perform the extraction activities yourself when possible – this ensures that you have a complete .\SYS folder and the extracted xip.bin to work with.
Outro
The sections are intended to be followed in sequence as the last section should provide you with a final product that can be used in your kitchen – so you may want to read this guide once over before going through the motions … who am I kidding? You’re going to follow along aren’t you?
The guide does not cover the steps required to inject the changes from a new .\SYS folder to your existing kitchen .\SYS folder or the comparison (verification) of the boot.rgu and supporting .RGU files typically found in the new (donor) device.
Now for the disclaimer bit; I take no responsibility and will not be held liable for any problems you encounter with your device before and after following this guide … flashing a ROM is done at your own risk. If you spot mistakes or inaccuracies in the guide however, please let me know so that I may correct them. Now, read on if you still feel it necessary to change suppliers
Oh, one last thing ... special thanks to the following folks for sharing their knowledge with the rest of us ... thank you!
Ervius
Ameet
Aruppenthal
Bepe
Cmonex
Da_G
Olipro
If I missed someone, it's purely accidental – send me a note and I will add your name to the list.

[TUT] Sous-Chef's Guide to XIP Porting in Ervius Visual Kitchen 9.7 ... continued
Preparing Your Facility
Before you can begin to port an Execute-In-Place (XIP) region, you need to equip your facility with some Kitchen utensils. Your Kitchen is going to require a good Unicode & UTF-8 text editor; I personally use ConTEXT & Notepad. Another handy utensil to have is a hexadecimal file/binary editor; I use XVI32. You will also need an archive extraction utensil; I use IZArc, WinRAR, and WinZIP. You’ll also need a good Hexadecimal calculator; I use Windows Calculator (Scientific Mode).
It's also a good idea to ensure that your Kitchen remains "pest" free; common pest control services include AVG, McAfee, and Symantec anti-Virus. You may need to temporarily disable your Anti-Virus Rootkit scanner while performing binary editing and porting activities.
The procedures were tested against a GSM Raphael device. I can’t confirm that these procedures will work on CDMA device ROM’s. Additionally, some device XIP’s may not be compatible with the Raphael device.
For the purpose of this guide, I will assume that you have added the C:\XDA\ folder, sub-folder, and files to your anti-virus exclusion list. You will additionally require the Generic Visual Kitchen from the Sous-Chef's Guide to Da_G's Ervius Visual Kitchen 9.7 tutorial (http://forum.xda-developers.com/showthread.php?t=521632) – extracted to the following folder.
C:\XDA\DONOR_NBH_VISUALKITCHEN
The guide is divided into the following sections:
Extracting the RUU_SIGNED.NBH Contents .............. 3
Reducing the .PAYLOAD File .......................... 4
Obtaining the Donor XIP.BIN Contents ................ 5
Extracting the Donor MSXIPKernel .................... 6
Confirming the Completion of the Porting Activity ... 7
Unlocking and Sizing the Paging Pool ................ 8
Disabling Certificate Checking ...................... 9
Reducing the Update Loader (ULDR) Partition ......... 10
I will attempt to provide an overview, the list of tools required, and the process to follow in each section. As you become more comfortable (and familiar) with the activities, you will find that you can consolidate (or skip) certain outlined steps. Incidentally, you'll probably want to keep these web links open in case you need to lookup some of the terms or concepts in the guide.
Acronyms
http://wiki.xda-developers.com/index.php?pagename=Acronyms
Glossary
http://wiki.xda-developers.com/index.php?pagename=Glossary
Development Resources for Windows Mobile
http://forum.xda-developers.com/showthread.php?t=445396

Extracting the RUU_SIGNED.NBH Contents
An .NBH is a signed group of modules or packages; they are typically comprised of .NB files. An .NBH can contain any combination of .NB files. An .NB file is a block of code that can be a Radio ROM, Operating System packages (XIP and IMGFS), Startup Splash Screen (or SPL).
The file we will be working with is the OS.NB file; it contains the ULDR, XIP, and IMGFS (OEM, SYS). To extract the contents of an .NBH file, we initiate the Ervius NBH/NB/PAYLOAD Dumper tool from within the Generic Visual Kitchen.
Upon completion, the following files will have been extracted: OS.nb, OS.nb.payload. Additionally, the Ervius NBH/NB/PAYLOAD Dumper tool creates a DUMP folder that contains all the files required.
Tools Required:
The following Ervius Visual Kitchen tool will be used for the RUU_SIGNED.NBH extraction activities.
Dump NBH/NB/PAYLOAD
Procedure
The following procedure initiates the ROM extraction activity via the Ervius NBH/NB/PAYLOAD Dumper tool built into the Generic Visual Kitchen. The extraction process can take a significant amount of time to complete.
Copy the RUU_SIGNED.NBH file to the C:\XDA\DONOR_NBH_VisualKitchen\BaseROM\ folder.
Navigate to the C:\XDA\DONOR_NBH_VisualKitchen\ folder.
Launch ErviusKitchen.exe.
At the multiple warning messages, click OK.
Warnings that may appear include:
Folder Not Found
Could Not Find A Part Of The Path
You Need To Specify … First
Click the Dump NBH/NB/PAYLOAD button.
Navigate to the C:\XDA\DONOR_NBH_VisualKitchen\BaseROM\ folder.
Select the RUU_signed.nbh file and then click Open.
At the All Done... Nbh/nb/payload Dumped and ''Kitchen'' created Successfull!!! message, close the Ervius Visual Kitchen application.
Navigate to the C:\XDA\DONOR_NBH_VisualKitchen\DUMP\ folder.
Move the sub-folders (and content) to the C:\XDA\DONOR_NBH_VisualKitchen\ folder.
At the Confirm Folder Replace message, click Yes To All.
At the Confirm File Move message, click Yes To All.
Tip
The C:\XDA\DONOR_NBH_VisualKitchen\BaseROM\Dump\ folder should be empty at this point – and can be removed.
References
Sous-Chef's Guide to Da_G's Ervius Visual Kitchen 9.7
http://forum.xda-developers.com/showthread.php?t=521632

Reducing the .PAYLOAD File
At this point, the Ervius NBH/NB/PAYLOAD Dumper tool has removed the contents of the IMGFS (OEM, SYS) from the .PAYLOAD file in preparation for changes to the ULDR and XIP. Removing the IMGFS (OEM, SYS) contents from the .PAYLOAD file reduces the size of the .PAYLOAD file making it easier to work with.
The Ervius NBH/NB/PAYLOAD Dumper tool has placed a copy of the reduced .PAYLOAD file in the C:\XDA\DONOR_NBH_VisualKitchen\ROM\<donordevice>\ folder.
References
Sous-Chef's Guide to Da_G's Ervius Visual Kitchen 9.7
http://forum.xda-developers.com/showthread.php?t=521632

Obtaining the Donor XIP.BIN File
Once again, the Ervius NBH/NB/PAYLOAD Dumper tool has extracted the xip.bin file from the new (donor) device os.nb.payload file. All that is left for us to do is copy the extracted xip.bin file to the current (base) kitchen in preparation for extracting the MSXIPKernel files.
Procedure
The following procedure will copy the xip.bin from the C:\XDA\DONOR_NBH_VisualKitchen\ kitchen to our current (base) kitchen.
Remove the contents in the following folders in your current (base) kitchen (ex: C:\XDA\My_Visual_Kitchen) – do not remove the folder:
.\TOOLS\xip.bin_new\*.*
.\TOOLS\xip.bin_old\*.*
.\TOOLS\XIP_new_ported\*.*
Copy the xip.bin file from the C:\XDA\DONOR_NBH_VisualKitchen\ROM\<donordevice>\ folder to the .\TOOLS\xip.bin_new\ folder of the current (base) kitchen.
References
http://msdn.microsoft.com/en-us/library/aa909237.aspx

Extracting the Donor MSXIPKernel
The Execute-In-Place (XIP) region is comprised of two significant regions – the MSXIPKernel and the OEMXIPKernel. The OEMXIPKernel typically contains system drivers that are specific to your device. On very rare occasions, these drivers can be changed for newer ones.
The MSXIPKernel however, usually contains drivers that are specific to the version of Windows Mobile that you are using – in our case, Windows Mobile 6.1. There are many different methods for porting the MSXIPKernel drivers; each method may yield different build numbers. For example, some chefs use the 723*.DSM for the build number, others use the COREDLL.DLL module to obtain the latest build numbers.
For the purpose of this guide however, we will leave the OEMXIPKernel drivers as-is and use a simpler method for porting the MSXIPKernel drivers from a new (donor) device XIP for use in your kitchen – and not concern ourselves with the build number.
Once the MSXIPKernel is extracted from the new (donor) device xip.bin, the OEMXIPKernel will be extracted from the current (base) kitchen. Both contents will be merged into a new xip.bin file.
Tools Required
The following tools are required for the new (donor) device MSXIPKernel extraction activities.
XIPPorterEx & ROM Tools
Procedure
The following procedure will extract the contents of the MSXIPKernel from the xip.bin of the new (donor) device, the OEMXIPKernel from the current (base) kitchen, and merge them into a new xip_out.bin file.
Navigate to your current (base) kitchen (ex: C:\XDA\My_Visual_Kitchen) folder.
Launch ERVIUSKITCHEN.EXE.
From the Device list, select your device – such as Raphael.
Click the XIPPorterEx & ROM Tools button.
Clear the following check boxes:
Execute Cert Patcher
Execute PP Patcher
Change PP To MB
Click the PORT IT! button.
At the Cert Patcher: Successfully Nocert Patched! message, click OK.
At the ALL DONE! \XIP Ported And Patched Folder And ROMHDR.BIN Copyed Into \ROM\Raphael\ Folder message, click OK.
Close the XIPPorterEx & ROM Tools Tool.
References
Kernel Overview
http://msdn.microsoft.com/en-us/library/aa909237.aspx

Confirming the Completion of the Porting Activity
The OEMXIPKernel folder contents will be identical to the current (base) kitchen device – for example, Raphael. The MSXIPKernel folder contents will be those of the new (donor) device. To confirm that the new (donor) device XIP was successfully ported, verify the .\ROM\ folder location in your current (base) kitchen – you should see a new set of folders that correspond to the new (donor) device.
For example;
.\ROM\Raphael\<donordevicebuildnum>\OEMXIPKernel
.\ROM\Shared\<donordevicebuildnum>\MSXIPKernel
References
Sous-Chef's Guide to Da_G's Ervius Visual Kitchen 9.7
http://forum.xda-developers.com/showthread.php?t=521632

Unlocking and Sizing the Paging Pool
The Paging Pool serves as a limit on the amount of memory that can be consumed by pageable data. It includes an algorithm for choosing the order in which to remove pageable data from memory. Pool behaviour is typically determined by the OEM – Microsoft sets a default value for the paging pool, but the OEM can change that value. Applications do not have the ability to set the behaviour for their own executables or memory-mapped files.
To change the Paging Pool size, add the –PP ## command line option to the implantxip command found in the kitchen_build_rom.bat.
Tip
Spaces are usually required between command line options; the command line option should only appear once.
Newer versions of Ervius Visual Kitchen provide an Option button to set the Paging Pool size.

Disabling Certificate Checking
During the startup process of your device, the operating system verifies that each system file against an internal certificate store to ensure that each file is signed with a trusted certificate; if the system file is not signed, the file is ignored.
To allow execution of non-signed system files, we need to disable the internal certificate store verification. Once disabled, the operating system will trust all code installed regardless of its signature. This provides more control over the code that gets installed on the device – you no longer need to load and manually sign additional certificates such as those from the sdkcerts.cab into the device root certificate store.
To disable the certificate store verification, add the -NoCERT command line option to the implantxip command found in the kitchen_build_rom.bat.
Tip
Spaces are usually required between command line options; the command line option should only appear once.
Newer versions of Ervius Visual Kitchen provide an Option button to disable the Certificate Store verification.

Reducing 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.
To reduce the Update Loader (ULDR) Partition, add the –ULDR command line option to the implantxip command found in the kitchen_build_rom.bat.
Tip
Spaces are usually required between command line options; the command line option should only appear once.
Newer versions of Ervius Visual Kitchen provide an Option button to enable or disable ULDR reduction.

13/02/2010: Tutorial Statistics
Views: 6,284
Guide Downloads: 261
Kitchen Downloads: N/A

Very clear and succinct.
Any plans to create a guide for adding and removing new/updated packages from other ROMs or cabs using the Visual Kitchen?

rling said:
Any plans to create a guide for adding and removing new/updated packages from other ROMs ...
Click to expand...
Click to collapse
Porting packages from another ROM requires a fair amount of work; specially if the package has graphic/resources that must be resized. I'm willing to write it up if a senior (experienced) chef is willing to share their know-how.
rling said:
... or cabs using the Visual Kitchen?
Click to expand...
Click to collapse
I don't personally use any application in .CAB form, only debugging tools. Here are a few threads that cover .CAB processing and how it can be implemented by chefs in their kitchens.
ROM Chefs: SDAutoRun gives customziation to everybody!
http://forum.xda-developers.com/showthread.php?t=366333
[UC] XDA_UC, Looking for Experienced Cooks to test New XDA UC.
http://forum.xda-developers.com/showthread.php?t=525810

How do you convert packages from an existing kitchen over to the new format?
I see in the package sample that there is an app.dat, app.reg and the files folder - is there a utility to do the conversion?
Thanks
DT

d_train said:
How do you convert packages from an existing kitchen over to the new format?
I see in the package sample that there is an app.dat, app.reg and the files folder - is there a utility to do the conversion?
Thanks
DT
Click to expand...
Click to collapse
Use these tools, Readme in the file
http://xda.b4pjs.co.uk/Kitchen Convertor.zip

thanks for that

19/08/2009: Tutorial Update
Had a few requests for this now.
Added .ZIP which contains each thread post of the tutorial for folks who want to create a similar tutorial format in other device forums. All I ask is that folks not blindly copy the contents of each post file - please proof-read your final product to ensure that it applies to the device in question.
Cheers,

How about a tutorial for extracting the OEMXIPKernel from your current device, that way we know we have a working one for our particular model?

Few questions:
Do you mean dumping the OEMXIPKernel directly from the device?
Did you discover an issue with the OEMXIPKernel that is extracted from an official HTC device ROM upgrade (.NBH) file via the Ervius Visual Kitchen?
If you are referring to something entirely different, give me a few example/scenarios as I'm not certain I get what you are asking.
Cheers,

Related

NEW_visual multilang/multidevice/multibuild kitchen for last bepe rom-tools!!V.12.6.3

Hello everyone, put my old kitchen, a little 'restored.
IMPORTANT: To build a good rom, you 1st have to dump an original rom for your preferred device, to have all files needed to build it after (header.xml, splash.xml ecc...)
List of Features:
Check rom version for exchange for new payloads (tested on hd2 rom 3.14 and it worked!), some minor adjustments, the editor, RGU, app.ref etc ..., now always starts as an administrator.
to test it, dump an original rom and then have fun customizing!
New style, new tricks at runtime, new tools for dumping and building !!!!! (Libnb.dll!)
Fixed bugs on inclusion radio.nb and splash.nb !!!!!
Import into .\ext, old-style packages, OEMpack, EXTPack (and also from Cab files
in the context menu is also remodule package (from files to module!) and re-file package (from modules to files!); other bugs solved!
Rapi connection problem solved with device in activesync and remove ring tones, images by default!:
Feature on delete files (ringtones, images (wallpapers) and other images (avatars) from a folder in oem \ langdevice \ .....)
Features to all feedback packages, from kitchen and easily editable text file (packages_usefull_infos.txt) in the root of the kitchen.
Can also import "rebuild dumped roms", from DFT dumped, OSkitchen kitchens and RAW Dumped roms!
Support to run the cabs charged by hands at 1st boot after flash!
Save & restore all tweaks in all the tabs when save/load a rom!
Added info exchange Rom language and Rom on the first use of header.xml libnb.dll nbh file to create!
Added new feature to force the run provxmls in Rom
Now when a dump .NBH, the new build is imported, in your EVK in use!
.\TOOLS folder
Inside the folder .\tools, you will find a new folder: registry_tweaks. The .\registry_tweaks folder includes some sample files. Replace and/or add .REG and .PROVXML files, name the files properly and the .REG files will be added as registry entries, the .PROVXML will be renamed as ****. ZZZZ_ provxml, as files are added. provxml, precisely in the rom and run when you first start to customize the rom as you like
The kitche includes two context menus for adding new .REG or .PROVXML files, edit them or delete if unused one!
Also includes new versions of DSM_editor and implantxip (no fake virus info about, someone in previous version, not me, inserted automatic "admin execution" with a kind of utility, into my implantxip.exe!, and maybe that "trick", was detect as fake virus, now, with my original updated version of implantxip.exe, my kaspersky doesn't find anything!!!!!)
Note
DSM_editor and implantxip (no fake virus info about, someone in previous version, not me, inserted automatic "admin execution" with a kind of utility, into my implnatxip.exe!, and maybe that "trick", was detect as fake virus, now, with my original updated version of implantxip.exe, my kaspersky doesn't find anything!!!!!)
System Requirements.
.NET FRAMEWORK 4.0 to execute new version of visualkitchen and new tools inside (dsm_editor and implantxip!)
Version History
12.2.9: compatible with x64 system machines, was libnb.dll,not was dll, was my exe, only I had to force x86 execution, also on x64 machines, that version was only for x86 machine, now at runtime, it is recreated, if is x64, compatible version is putted into .\tools folder, else a x86 compatible version will be copyed into .\tools folder!!!
12.3.7: package creator added as optiona choice when wanna import a cab into packages!
12.3.7: Added option to turn tricks "reg" to be placed in rom that will be in a good provxml 'forced to be the last to be executed, overriding any settings from other taxes proxml !!!!!
12.3.7: when forced execution provxml, reg cab, the sequence is .PROVXML in Rom, .PROVXML uploaded by you, proxml derived from the reg trick and finally the cabs
12.3.7: added possibility to add and execute a .tsk file into ROM!!!
12.3.9: bug solved on provxml creation when found "delete regkey" or "delete regvalues"
12.4.3: bug solved on save and load roms, new icon for exe!
12.4.3: "reloaded" update pagepool options on new implantxip.exe
12.4.4: solved problems with implantxip value as default
12.4.5: inserted possibility to load, edit and delete mortscript scripts into rom to run (config.txt will be populated with selected scripts) at 1st boot!
12.4.8: when you choice a bmp to became a splash screen, the kitchen automatically check if the format and size is good, if not, automatically modifyes the image, makeing before a backup of it, and adjusts it according to the file "splash.xml"
(I suggest to redump an original rom for your device, becouse there are a lot of libnb.dll, and I've changed in times, so maybe splash.xml, could be different in format!)
12.5.0: updated package_creator, see and edit into \tools folder user_folders.txt to add your own modded folders into start menu for lnk files extracted by cab files; now, all manila-language files will be stored automatically into relative 04XX subfolders, so only real lang-manila files needed will be stored into rom, and before build, cfc_gui.exe will be executed to compress and patch manila, if you want, only have to click on "tools<>patch manila", on cfc_gui.....
see U!
12.5.2: new built of implantxip, and some little little improvements on erviuskitchen.exe!
12.5.3: Added Visual advices for packages that have to be recmode or reversemode!
12.5.6: re-file or re-module packages that you insert into comments like "remodule, or re-file! (only id relative poackage is enabled while build rom!)
solved little bug on packages colouring (same color on "false/true" packages (enabled/disabled!))
12.5.8: solved some trubbles with LZX Compression!
12.6.0: more compatibility with new xipporterex to change rom version on nk.exe into 3.14 TMOUS ROMS! and now recontruct better alla lang files/folders for manila!!!!
12.6.2: Full compatibility with all Language codecs to recontruct well all lang files/folders for manila, and also all MUIS files will be stored in relative language SubFolders!!!
12.6.3: only exe, now remove also all *.cpr files with resolution different thankn used by your device, and store all of them into :\moved\cpr_moved\namepackage\resolution\...
Download Link
http://www.4shared.com/file/0Nv3ETFr/VisualKitchen_12_5_8.html
Updated only exe! (12.6.3_rev2)
http://www.4shared.com/file/9yFFf6YA/erviuskitchen_12_6_3_only_exe_.html
Quick Thread Link
Discussion on Latest kitchen start here: http://forum.xda-developers.com/showpost.php?p=9500214&postcount=2484
Reserved for future expansion
OLD visual multilang/multidevice/multibuild kitchen for last bepe rom-tools!! V1.8.2
Hi, this is a visual multilang kitchen based on last bepe's tools to build a rom.
Last Version: 1.8.1 aka 10.8.1 (1.8.1)
Date: 28.07.2009
Download Links: 1.8.1, 1.8.2
new_visualkitchen_v_1_8_1_only_exe_+_Tools_folder.rar 7MB
erviuskitchen_1_8_2_fixed.rar 523 KB
Latest version of Ervius Visual Kitchen tools. New visualkitchen with all dsm/rgu recreations/updater to have complete old_style roms ready to use .pkg updater!!!!! The KITCHEN has been updated to include logging; (see build_log.txt into root of kitchen after built a rom!!!)
Note: Also attached to this post as <filename>.RAR.ZIP. After download, remove (.ZIP) before UnRAR'ing.
Changes In This Release:
XIPPORTEREX:
Added compatibility with new 2.09 kn.exe to r/w correctly date/version on ROM!
Added capability to find version/release_date on new wm 6.5 nk.exe!!!
DUMP Process:
Now if dump a stocked rom, in EXT packages it leave relative dsm/rgu, create a global packages.ini (with all dsms infos inside!) and for each EXT Package, create "package.ini" file, with all infos about relative dsm,
All shadows, depepndencies, certificate needed in .\tools folder, it populate "dependencies" and "certificates" folder with all dsms and certs files found during dump process, used to insert/edit all dsms into rom with dsm_editor
OTHER button:
Provides for selection of ULDR reduction, PagePool sizing, disable Certificate
Verification, etc. Settings are stored in: ERVIUSKITCHEN.INI.
Editor:
Addresses issues when using "editor".
Compilation:
Solved bug on 6.5 reak aku roms
Addresses issues when searching structures and duplicate files during compilation.
Added possibility to change max number of modules in an hybrid ROM (nk.exe from 6.1 kernel and XIP From 6.5 kernel) the value is saved on that rom configuration, so every rom loaded has his max-modules value setted
Extraction:
Addresses issues when extracting contents of some device .NBH/.NB files.
Compatibility:
Addresses unsupported Language code (ex: 040C).
Added compatibility with old style rom (IMGFS & XIP).
All modules can be reallocked.
DSM processing; all dsm and rgu are updated/created -only with old_style roms creation! (required for cab.pkg updater support.)
In old style ROM mode; all is executed automatically, XIP porting is automated:***
- Correct realtive device's .VM must be copied to .\OEM\<devicename>\.VM
- Correct XIP.BIN must be copied to .\ROM\SHARED\<buildnum>\
Post-Download Instructions:
Extract the contents of kitchen archive to the root of your hard drive (ex: C:\XDA) to avoid path length errors.
Backup existing kitchen files. Files/Folders to backup are:
- Files in root of kitchen (ex: C:\XDA\My_Visual_Kitchen)
- .\TOOLS folder
Remove (delete) ERVIUSPACKAGES from TOOLS folder (ex: C:\XDA\My_Visual_Kitchen\TOOLS\ERVIUSPACKAGES).
Copy the contents of the extracted archive to the kitchen (ex: C:\XDA\My_Visual_Kitchen\) folder.
----------------------------------------------------------------------------------------------------------------------------------
Implantxip.exe (Pagepool Patcher/changer!)
Download Link: implantxip.rar 166 KB
implanxip can works with:
all kind of payload file, and more:
if a payload has ULDR removed (ULDR part not present!), it can work on it and reallign well some bytes into MBR
you can also remove completelly the uldr section (you could save some more space into payload in this way! (be attenction: in some payloads this operation causes non-booting roms!!! make a backkup of original
payload before use: "-uldr tryremove parameter!!!)
for help about: in prompt command write: implantxip /h )
Note: Also attached to this post as <filename>.ZIP.
----------------------------------------------------------------------------------------------------------------------------------
EXT Packages Rebuilder
To build EXT_Packages from old style ones; use the tool at your own risk!!! Fixed lost modules into new package created, now all modules are into .\files subfolder after ext package is built.
Download Links:
EXT_PAckages_rebuilder+Structurer_all_lang_enabled_v3.zip 8 KB
EXT_PAckages_rebuilder_modules_fixed.rar 9KB
Note: Also attached to this post as <filename>.ZIP.
Excellent work as always ervius.
Grazie mille.
^.^
That might come in handy for some ppl.
For my part, I'm used to command line as my primary WS is linux based. As a matter of fact, i prefer it.
@Ervius: Do you have any experience in coding for unix/linux?
At some point, pof coded a htc-flasher kitchen, but it was mostly wrappers for the windows programs.
Most of the tools we use for ROM building have their source code available, so...
Anyways, I'm off.
A.
GREAT!!
I'm testing it in my kitchen just today. I'm looks fantastic. Thanks!!.
If now you can integrate your XIP porting tool then.....
Regards,
elparra72 said:
I'm testing it in my kitchen just today. I'm looks fantastic. Thanks!!.
If now you can integrate your XIP porting tool then.....
Regards,
Click to expand...
Click to collapse
this is a alpha version, and stucks on platformrebuilder.exe execution, , but when I have some time more maybe insert all inside, xipporterex and other tools of mine!
can you post it on rapidshare please, megaupload is a menace. thanks.
In any case this is a great work!!.
I've been checking folders structure and adapte it to Spanish (or another language) is really easy. I'm preparing a new ROM, but as soon as I post it in a Spanish site, I'm going to 'play' with this application and l'll inform you about troubles. Thanks !!
On the other hand (I know this is not the best post to speak about), Your active sync killer is not working fine in 2.xx ROMs. Are you preparing a new one? Do you have a solution?. Thank a lot in advance.
Kind regards!!!
El Parra72
elparra72 said:
In any case this is a great work!!.
I've been checking folders structure and adapte it to Spanish (or another language) is really easy. I'm preparing a new ROM, but as soon as I post it in a Spanish site, I'm going to 'play' with this application and l'll inform you about troubles. Thanks !!
On the other hand (I know this is not the best post to speak about), Your active sync killer is not working fine in 2.xx ROMs. Are you preparing a new one? Do you have a solution?. Thank a lot in advance.
Kind regards!!!
El Parra72
Click to expand...
Click to collapse
you can adapt, but add other languages, near 0409\ and 0410 folders you can add 04xx\ or o8xx\ all you want, the kitchen at start recognizes how many into, and show all into combobox, you only have to choice in witch language want build the rom
for activesync killer, what you refer to, mine or the original by eliasweb???
bye!
I've detected this trouble in both. I've test them in several ROMS based on 'oficial' v.2.xx. I'm going to look for your post and follow this trouble there. Thanks.
..................
this looks better and better. I dearly hope that it will come with some kind of manual.. anything... just to know what to press and which button does what...
Thanks!
mjaxa said:
this looks better and better. I dearly hope that it will come with some kind of manual.. anything... just to know what to press and which button does what...
Thanks!
Click to expand...
Click to collapse
visual kitchen version beta1 released at 1st post, and see all ROM\ structures.....
Hi ervius, thanks for your tool.
I was trying beta1.
I have a couple of questions:
i've tried to import a package (generated with package creator) , I browse to the folder containing it, but after the right-click-> import package, it doesn't appear in the list of the applications.
I see it has been copied to the EXT folder but nothing more.
Also importing a package resets all the choices I made on what packages to include/exclude
If you need more details just ask
Thanks
A.
very nice, I will test this this week, and see if i notice anything. once again thank you
andreapappy said:
Hi ervius, thanks for your tool.
I was trying beta1.
I have a couple of questions:
i've tried to import a package (generated with package creator) , I browse to the folder containing it, but after the right-click-> import package, it doesn't appear in the list of the applications.
I see it has been copied to the EXT folder but nothing more.
Also importing a package resets all the choices I made on what packages to include/exclude
If you need more details just ask
Thanks
A.
Click to expand...
Click to collapse
well, well, so, some bugs are detected...
continue ti test it
Hi
I dump a rom (use:1s streps of Surface Kitchen v1.01), now i have "sys", "oem", and "rom" folders. Were i put this folders in your kitchen?
first steps!!!
ruipgouveia said:
Hi
I dump a rom (use:1s streps of Surface Kitchen v1.01), now i have "sys", "oem", and "rom" folders. Were i put this folders in your kitchen?
first steps!!!
Click to expand...
Click to collapse
Check the screenshots. You'll see the directory structure there.
ruipgouveia said:
Hi
I dump a rom (use:1s streps of Surface Kitchen v1.01), now i have "sys", "oem", and "rom" folders. Were i put this folders in your kitchen?
first steps!!!
Click to expand...
Click to collapse
use bepe's packagebuilder.exe on a dumped rom, after use my EXT_PAckages_rebuilder+Structures_rebuilder (attached here!) on dumped rom, finally you'll have all rom structures ready to be koocked by my visual kitchen!!!
bye!!!
P.S.: at first post "beta 2" is ready (some bugs solved!)

[TUT] Sous-Chef's Guide to Da_G's Simple ROM Kitchen 5.3

Version: 26/04/2009
Intro
Welcome; I wanted to offer a little "something" back to the XDA community in the hopes that it will benefit others and to show my appreciation to the folks that make XDA the great community that it is. Hopefully, this guide will help you work your way up the ranks to Chef … let’s begin!
There are many chefs that provide quality ROM's for you to use. However, if you've gotten excited about the idea of cooking your own ROM's, you've probably felt overwhelmed by the volume of Forum Threads and Wiki pages at your disposal to learn how to do this.
The sections are intended to be followed in sequence as the last section should provide you with a final product that can be flashed to your device – so you may want to read this guide once over before going through the motions … who am I kidding? You’re going to follow along aren’t you?
In case you're wondering ... I chose Sous-Chef because Commis or Chef De Partie just didn't have the same appeal
Applying Original/Cooked ROM's
You probably won't be able to apply an Original or Cooked ROM to your device as your Cellular Carrier has most certainly locked your device. You'll need to unlock your device before venturing into the world of ROM installation. These activities are beyond the scope of this guide; you can however, go to this Wiki page to learn more.
HTC Raphael
http://wiki.xda-developers.com/index.php?pagename=HTC_Raphael
Original VS Cooked ROM's
HTC periodically releases Official Generic ROM's that you can apply to your device. You can find a list of Original Shipped WM6.1 ROM's at this Wiki page.
Original Shipped WM6.1 ROMS
http://wiki.xda-developers.com/index.php?pagename=HTC_Raphael_WM6.1_ROMs
There are essentially two types of Cooked ROM's; those that another Chef makes available for you to use, and those that you cook yourself. You can find a list of Available Cooked WM6.1 ROM's at this Wiki page.
Available Cooked WM6.1 ROMS
http://wiki.xda-developers.com/index.php?pagename=HTC_Raphael_Cooked_WM6.1_ROMs
Outro
Lastly, this guide only covers the ROM cooking process; changing your device Startup Splash Screen and Radio or flashing a HardSPL are beyond the scope of this guide; you can however, go to these Wiki and/or Forum pages to learn more.
Radio
http://wiki.xda-developers.com/index.php?pagename=Raphael_ExtractedRadioRoms
http://forum.xda-developers.com/showthread.php?t=439566
Startup Splash Screen
http://forum.xda-developers.com/showthread.php?t=431161
Hard SPL
http://wiki.xda-developers.com/index.php?pagename=Raphael_HardSPL
This guide is intended to help you learn how to cook your own ROM's; it will walk you through the process of extracting the contents of an Official ROM, adjusting the Page Pool, changing the Data Cache Size, and Patching the ROM to remove Certificate verification. The guide does not cover the steps required to add/remove ROM packages or port an XIP from a different ROM version or device ... not yet anyway
Now for the disclaimer bit; I take no responsibility and will not be held liable for any problems you encounter with your device before and after following this guide … flashing a ROM is done at your own risk. If you spot mistakes or inaccuracies in the guide however, please let me know so that I may correct them. Now, read on if you still feel that this is your choice career path
Oh, one last thing ... to the following folks for sharing their knowledge with the rest of us ... thank you!
Da_G
Ameet
Bepe
Cmonex
Ervius
JCEspi2005
JugglerLKR
mskip
Olipro
Aruppenthal
NRGZ28
Noonski
If I missed someone, it's purely accidental – send me a note and I will add your name to the list.
[TUT] Sous-Chef's Guide to Da_G's Simple Kitchen 5.3 ... continued
Location, Location, Location
There are many fine Kitchens out there to use; Visual Kitchens (Ervius), Automated Kitchens (Bepe), and Semi-Automated Kitchens (Raphael, Da_G). This guide uses Da_G's Simple Kitchen to assist you in learning the basics of operating a Kitchen; which ultimately, allows you to produce your own ROM.
References
Da_G....: http://forum.xda-developers.com/showthread.php?t=471288
Raphael.: http://forum.xda-developers.com/showthread.php?p=2453788
Bepe....: http://forum.xda-developers.com/showthread.php?t=467488
Ervius..: http://forum.xda-developers.com/showthread.php?t=469420
Preparing Your Facility
Before you can begin to cook your own ROM, you need to equip your facility with some Kitchen utensils. Your Kitchen is going to require a good Unicode & UTF-8 text editor; I personally use ConTEXT & Notepad. Another handy utensil to have is a comparison utility for date/file/binary comparisons; I use WinDiff & BeyondCompare. Some other utensils that you're going to require are: Microsoft ActiveSync, .NET Framework 2.x/3.x. You will also need an archive extraction utensil; I use IZArc, WinRAR, and WinZIP. You’ll also need a good Hexadecimal calculator; I use Windows Calculator (Scientific Mode).
It's also a good idea to ensure that your Kitchen remains "pest" free; common pest control services include AVG, McAfee, and Symantec anti-Virus. You'll need to add the CustomRUU Updater tool to your list of anti-virus exclusions as it will be detected as a "Generic Dropper (Trojan)".
References
CustomRUU for Raphael
http://forum.xda-developers.com/showthread.php?t=410761
To assist you in your apprenticeship, I have included a link to the Generic Simple Kitchen that I used to prepare this guide - the kitchen also includes a .DOC and .PDF format of this guide. The procedures were tested against a GSM Raphael device. I can’t confirm that these procedures will work on CDMA device ROM’s. Additionally, other device ROM’s may not be compatible with this kitchen format. Make sure to review the _README.TXT before you begin.
Generic Simple Kitchen, 17 MB
You’re going to need a RUU_SIGNED.NBH file; I used the following HTC Official Generic ROM – you’ll need to extract the contents of the .EXE and .RAR/.ZIP using an archive utensil.
[ROM] [WWE] Raphael HTC 5.05.405.1 Radio Signed (52.58.25.3 0,1.11.25.01)
http://rapidshare.com/files/1939660...igned_Raphael_52.58.25.30_1.11.25.01_Ship.rar
http://www.megaupload.com/?d=0F50UM5K
For the purpose of this guide, I will assume that you have added the C:\XDA\ folder, sub-folder, and files to your anti-virus exclusion list – at the very least CustomRUU Updater.EXE – and that the contents of the Generic Simple Kitchen were extracted to the following folder.
C:\XDA\MY_KITCHEN
The guide is divided into the following sections:
Extracting the RUU_SIGNED.NBH Contents ... 3
Consolidating .RGU Files to BOOT.RGU ..... 4
Increasing the Data Cache ................ 5
Reducing the .PAYLOAD File ............... 6
Extracting the XIP.BIN Contents .......... 7
Unlocking the Paging Pool ................ 8
Disabling Certificate Checking ........... 9
Updating the XIP.BIN Contents ............ 10
Updating the .PAYLOAD file ............... 11
Changing the Unsigned CAB Policies ....... 12
Changing the Unsigned Themes Policies .... 13
Changing the Remote API (RAPI) Policies .. 14
Compiling the New RUU_SIGNED.NBH File .... 15
Flashing the RUU_SIGNED.NBH File ......... 16
Advanced Topic: XIP Porting .............. 17
Sous-Chef's TIPs ......................... 18
I will attempt to provide an overview, the list of tools required, and the process to follow in each section. As you become more comfortable (and familiar) with the activities, you will find that you can consolidate (or skip) certain outlined steps. Incidentally, you'll probably want to keep these web links open in case you need to lookup some of the terms or concepts in the guide.
Acronyms
http://wiki.xda-developers.com/index.php?pagename=Acronyms
Glossary
http://wiki.xda-developers.com/index.php?pagename=Glossary
Development Resources for Windows Mobile
http://forum.xda-developers.com/showthread.php?t=445396
Extracting the RUU_SIGNED.NBH Contents
Extracting the Contents
An .NBH is a signed group of modules or packages; they are typically comprised of .NB files. An .NBH can contain any combination of .NB files. An .NB file is a block of code that can be a Radio ROM, Operating System packages (XIP and IMGFS), Startup Splash Screen (or SPL).
The file we will be working with is the OS.NB file; it contains the ULDR, XIP, and IMGFS (OEM, SYS). To extract the contents of an .NBH file, we issue the following command.
NBHextract.exe RUU_signed.nbh
Upon completion, the following files will have been extracted: Unknown.nb, 01_SPL.nb, 02_MainSplash.bmp, 02_MainSplash.nb, and 03_OS.NB. For the purposes of this guide, the 03_OS.NB file is the file we will be working with; it will be renamed to OS.NB.
Splitting the OS.NB File
In any ROM, the OS.NB is padded with extra data that is split into packets for the flashing process. This ensures that incorrectly transmitted packets can be re-transmitted to a device without having to resend from the beginning. Packets are usually groups of bytes and vary between devices - a packet will typically contain of data followed by padding.
For the Raphael, the data packets are 800 bytes in size and padded with 8 bytes. For the purposes of this guide, this padded portion is not required and therefore, we strip it from the OS.NB using with the NBSPLIT tool by issuing the following command.
nbsplit -kaiser os.nb
The -kaiser option instructs the NBSPLIT tool to process 0x800 (2048 decimal) hexadecimal bytes of data and that 8 bytes of padding will follow each 800 bytes. Upon completion, the following will have been extracted: os.nb.payload, os.nb.extra. For the purposes of this guide, the os.nb.extra is not required.
At this point, we need to extract the contents of the ULDR, XIP, IMGFS (OEM, SYS) from the .PAYLOAD file as we will be changing the ULDR and XIP. Most of the .PAYLOAD file content is the IMGFS; this is the portion that makes up content of the OEM and SYS folders. Most chefs add/remove OEM packages in these folders during their cooking process - you'll eventually do the same.
Tools Required
The following tools are required for the RUU_SIGNED.NBH extraction activities.
NBHextract
NBSplit
ImgfsFromNb
ImgfsToDump
RomMaster
DumpROM
PKGTool
Procedure
The following procedure initiates the ROM Extraction (NBH, IMGFS, and XIP) activity via a script that is included in the Generic Simple Kitchen. The extraction process can take a significant amount of time to complete.
Copy the RUU_SIGNED.NBH file to the C:\XDA\My_Kitchen\BaseROM\ folder.
Navigate to the C:\XDA\My_Kitchen\Tools\ folder.
Launch RaphaelKitchen.cmd.
Select E, press ENTER.
Select A, press ENTER.
At the Done! message, allow the process to resume – do not close command prompt!
At the Now Start Cooking Your ROM! Press Any Key To Continue message, press ENTER.
Select X, press ENTER.
References
NBHextract: Extract Contents From NBH Files
http://forum.xda-developers.com/showthread.php?t=289830
[TUT] ROM For Everyone (Video Tutorial To Cook The ROM)
http://forum.xda-developers.com/showthread.php?t=413782
[REF] Cooking Class Class of 2008/09 [ONLINE]
http://forum.xda-developers.com/showthread.php?t=335631
Consolidating .RGU Files to BOOT.RGU
The boot hive contains system settings that are applied only during boot. The boot hive is read out of ROM and used to start drivers and file systems needed to reach the system hive file. Once the system hive is mounted, the boot hive is discarded. Changes made to the registry during the boot process are copied into the system hive once it is available. The boot hive in ROM remains unchanged.
The boot.hv registry hive, which contains the contents of all .RGU files in the XIP, provides the initial basic registry hive that is referenced during the loading of the kernel and any necessary drivers to mount the root file system. Once the file system is mounted the default.hv and user.hv registry hives are mounted and used. Most chefs add/remove/change entries from the BOOT.RGU file during their cooking process – you'll eventually do the same.
For the purposes of this guide, we will consolidate the contents of all .RGU files found in the Dump_XIP folder into the BOOT.RGU file. Consolidating the contents of the .RGU files found in the Dump_XIP folder to the BOOT.RGU file ensures that all necessary registry entries will be added during the ROM compilation activities.
Tools Required
The following tools are required to edit .RGU files.
Unicode Text Editor
Procedure
The following procedure will consolidate all of the .RGU files found in the Dump_XIP folder into the BOOT.RGU file.
Navigate to C:\XDA\MY_KITCHEN\Temp\Dump_XIP\ folder.
Launch a text editor and open the BOOT.RGU file.
Launch a text editor and open the next .RGU file that appears in the C:\XDA\MY_KITCHEN\Temp\Dump_XIP\ folder.
Select and copy all of the file contents.
Switch to the BOOT.RGU file and paste the content to end of this file.
Repeat steps 3 to 5 until the content of each .RGU file has been appended to the BOOT.RGU file.
Save the expanded copy of the BOOT.RGU file in the C:\XDA\MY_KITCHEN\ROM\XIP\ folder.
Tip
Make a backup copy of the BOOT.RGU file before editing; delete the backup file when done.
Observe the line formatting and spacing in the BOOT.RGU file and make certain to have an empty line as the last line of the file.
Comment lines, which usually begin with a semi-colon [;], can be omitted.
Registry removal lines usually begin with a minus [-] after the open square bracket.
References
Windows Mobile
http://msdn.microsoft.com/en-us/library/ms885472.aspx
Increasing the Data Cache
File caching improves performance and also improves power management; when an application accesses physical storage, the storage device uses much more power. The less often physical storage is accessed, the longer storage devices spend in a low-power state.
By increasing the DataCacheSize registry value, you effectively improve the performance of applications that are file system intensive such as database and mapping applications – which results in lower physical storage access requirements. Drastically increasing the DataCacheSize however, may have adverse effects and slow the device down as a result of longer auto-compaction processing.
For the purposes of this guide, we are going to increase the current DataCacheSize value from 4MB to 8MB.
Tools Required
The following tools are required to adjust the DataCacheSize value.
Unicode Text Editor
Hexadecimal Calculator
Procedure
The following procedure will change the current DataCacheSize value of 4MB to 8MB.
Navigate to the C:\XDA\MY_KITCHEN\ROM\XIP\ folder.
Launch a text editor and open the BOOT.RGU file.
Search for the following registry key entry:
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FLASHDRV\FATFS]
Locate the following registry value underneath the key:
"DataCacheSize"=dword:00000800 ;2048 sectors(2048*2048=4MB)
Change the registry value to the following:
"DataCacheSize"=dword:00001000 ;4096 sectors(4096*2048=8MB)
Save the BOOT.RGU file.
Exit the text editor.
Tip
Make a backup copy of the BOOT.RGU file before editing; delete the backup file when done.
Reducing the .PAYLOAD File
At this point, we need to remove the contents of the IMGFS (OEM, SYS) from the .PAYLOAD file in preparation for our changes to the ULDR and XIP. Removing the IMGFS (OEM, SYS) contents from the .PAYLOAD file will reduce the size of the .PAYLOAD file making it easier to work with.
To reduce the .PAYLOAD file, we essentially need to cook a new version of the .PAYLOAD file with an empty IMGFS partition – one which only contains the .VM and .ROM folder contents. For the purposes of this guide, we will use the Ervius Payload Reducer script to perform this process.
Tools Required
The following tools are required for the .PAYLOAD file reduction activities.
ImgfsFromNb
ImgfsFromDump
ImgfsToNb
Procedure
The following procedure initiates the .PAYLOAD file reduction activity via a script that is included in the Generic Simple Kitchen. The reduced os.nb.payload file will be required when we update the XIP.BIN file.
Copy the ReducePayload folder (and contents) from the C:\XDA\MY_KITCHEN\Tools\ folder to the C:\XDA\MY_KITCHEN\Temp\ folder.
Copy the OS.NB.PAYLOAD file from the C:\XDA\MY_KITCHEN\Temp\ folder to the C:\XDA\MY_KITCHEN\Temp\ReducePayload\ folder.
Navigate to the C:\XDA\MY_KITCHEN\Temp\ReducePayload\ folder.
Launch reduce_payload.bat.
At the OS.NB.PAYLOAD Successfully Reduced. Press Any Key To Continue ... message, press ENTER.
References
[TUT] Manual Full XIP Porting (& MANY MORE TUTORIALS)
http://forum.xda-developers.com/showthread.php?t=438676
Extracting the XIP.BIN Contents
The Execute-in-place (XIP) region is an area where an application can execute code directly from ROM rather than loading it from RAM. Before we can proceed to make changes such as unlocking the Page Pool and disabling Certificate checking, we need to extract the contents of the XIP.BIN file.
It is possible to use the XIP.BIN contents from a newer version of a ROM from a different device or a newer operating system. This is typically done by chefs who are looking for the most recent versions of system files from a specific device or version of an operating system – you'll eventually do the same.
For the purposes of this guide, we will be using the same version of the system files.
Tools Required
The following tools are required for the XIP.BIN file extraction activities.
XIPPort
Procedure
The following procedure will extract the contents of the XIP.BIN file. The extracted contents of XIP.BIN file will be required when we unlock the page pool and disable certificate checking.
1. Copy the XIPPort folder (and contents) from the C:\XDA\MY_KITCHEN\Tools\ folder to the C:\XDA\MY_KITCHEN\Temp\ folder.
2. Copy the XIP.BIN file from the C:\XDA\MY_KITCHEN\Temp\ folder to the C:\XDA\MY_KITCHEN\Temp\XIPPort\ folder.
3. Navigate to the C:\XDA\MY_KITCHEN\Temp\XIPPort\ folder.
4. Launch XIPPORT.EXE.
5. Click the Dump XIP.BIN button.
6. Exit XIPPORT.EXE.
References
[TUT] Manual Full XIP Porting (& MANY MORE TUTORIALS)
http://forum.xda-developers.com/showthread.php?t=438676
XIP Porting Guide
http://forum.xda-developers.com/showthread.php?t=379598
Unlocking the Paging Pool
The Paging Pool serves as a limit on the amount of memory that can be consumed by pageable data. It includes an algorithm for choosing the order in which to remove pageable data from memory. Pool behaviour is typically determined by the OEM – Microsoft sets a default value for the paging pool, but the OEM can change that value. Applications do not have the ability to set the behaviour for their own executables or memory-mapped files.
For the purposes of this guide, we are going to apply a change to the kernel binary file which will permit us to change the Paging Pool size (initially set to 6MB) to other sizes using the PagePool Changer tool.
Tools Required
The following tools are required for the Paging Pool unlock activities.
Hexadecimal Editor
Procedure
The following procedure will change the kernel binary file to permit adjustments to the Paging Pool size via the PagePool Changer tool.
Navigate to the C:\XDA\MY_KITCHEN\Tools\xvi32\ folder.
Launch XVI32.EXE.
Select File, Open.
Navigate to C:\XDA\MY_KITCHEN\Temp\XIPPort\OUT\MODULES\nk.exe\ folder.
Select the S000 binary file.
Select Search, Find.
In the Hex String box, type:
03 15 A0 03 02 15 A0 13
Click OK.
Change the following 4 bytes after the 03 15 A0 03 02 15 A0 13 string;
FROM: 00 10 82 E5
TO: 00 00 A0 E1
Select File, Save.
Select File, Exit.
Tip
Make a backup copy of the S000 file before editing; delete the backup file when done.
Disabling Certificate Checking
During the startup process of your device, the operating system verifies that each system file against an internal certificate store to ensure that each file is signed with a trusted certificate; if the system file is not signed, the file is ignored.
To allow execution of non-signed system files, we need to disable the internal certificate store verification. Once disabled, the operating system will trust all code installed regardless of its signature. This provides more control over the code that gets installed on the device – you no longer need to load and manually sign additional certificates such as those from the sdkcerts.cab into the device root certificate store.
For the purposes of this guide, we are going to apply a change to the kernel binary file which will disable the internal certificate store verification.
Tools Required
The following tools are required to disable the internal certificate store verification.
AutoPatcher01
Procedure
The following procedure will disable the internal certificate store verification.
Navigate to the C:\XDA\MY_KITCHEN\cmonex_AutoPatcher\ folder.
Launch AUTOPATCHER01.EXE.
Click the Cert Patch button.
Select All File (*.*) from the Files Of Type list.
Navigate to C:\XDA\MY_KITCHEN\TempXIPPort\OUT\MODULES\nk.exe\ folder.
Select the S000 binary file.
At the Successfully Patched... message, click OK.
Exit AUTOPATCHER01.EXE.
Tip
Make a backup copy of the S000 file before editing; delete the backup file when done.
References
[RES] RILPHONE.DLL And "How To" With A Radio
http://forum.xda-developers.com/showthread.php?t=481026
Kernel Overview
http://msdn.microsoft.com/en-us/library/aa909237.aspx
Updating the XIP.BIN Contents
The Execute-in-place (XIP) region is an area where an application can execute code directly from ROM rather than loading it from RAM. Now that we have unlocked the Page Pool and disabled Certificate checking, we need to assemble the extracted XIP.BIN contents back into a XIP.BIN file that includes our changes.
It is possible to use the XIP.BIN contents from a newer version of a ROM from a different device or a newer operating system. This is typically done by chefs who are looking for the most recent versions of system files from a specific device or version of an operating system – you'll eventually do the same.
For the purposes of this guide, we will be using the same version of the system files.
Tools Required
The following tools are required for the XIP_OUT.BIN file creation activities.
XIPPort
Procedure
The following procedure will compile the contents of the XIP.BIN file. To eliminate some confusion, the new .BIN file will be called XIP_OUT.BIN – the XIPPort tool creates the new .BIN file and renames it to XIP_OUT.BIN.
Navigate to the C:\XDA\MY_KITCHEN\Temp\XIPPort\ folder.
Launch XIPPORT.EXE.
Click the Build XIP_OUT.BIN button.
Exit XIPPORT.EXE.
References
[TUT] Manual Full XIP Porting (& MANY MORE TUTORIALS)
http://forum.xda-developers.com/showthread.php?t=438676
XIP Porting Guide
http://forum.xda-developers.com/showthread.php?t=379598
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://forum.xda-developers.com/showthread.php?t=438676
Reduce ULDR Partition Size
http://forum.xda-developers.com/showpost.php?p=2916649&postcount=7
[TUT] ULDR Removal for Elf/Elfins
http://forum.xda-developers.com/showthread.php?t=446506
[Walkthrough] How to Port a ROM [XIP and SYS]
http://forum.xda-developers.com/showthread.php?t=389772
[14 NOV] M-Amine 2.0 Kitchens + Tutorials
http://forum.xda-developers.com/showthread.php?t=437898
[Full Guide Thread] TNT.Kitchen for Wizard, Auto XIP Porting and Modules Relocating
http://forum.xda-developers.com/showthread.php?t=388666
Changing the Unsigned CAB Policies
Security policies are used for configuring security settings that are then enforced with the help of security roles and certificates. They provide the flexibility to control the level of security on the device. The policies are defined globally and enforced locally in their respective components. The security policy is set during boot by executing a .provxml configuration file. This provisioning file is in ROM and contains the default setting specified by the OEM. The provisioning document is an Extensible Markup Language (XML) file that is assigns security settings to the device.
Typically, the mxipupdate_oemoperators_100.provxml file contains the default security policies that will be applied to the device. To allow execution of unsigned .CAB files, we need to change the default security policy settings that pertain to .CAB files.
For the purposes of this guide, we will add or change the following unsigned policy setting ID’s:
ID 4101: Unsigned CABS Policy = 8
ID 4102: Unsigned Applications Policy = 1
ID 4122: Unsigned Prompt Policy = 1
* IMPORTANT *
Policy settings may appear in other files. You may wish to perform a search through .TXT, .RGU, and other .PROVXML files using the keywords such as: security, policies, policy.
Tools Required
The following tools are required to edit .PROVXML files.
UTF-8 Text Editor
Procedure
The following procedure will add/change the unsigned policy settings to permit the installation of unsigned .CAB files.
Navigate to the C:\XDA\MY_KITCHEN\OEM\OperatorPkg\ folder.
Verify that the mxipupdate_oemoperators_100.provxml is not set as Read Only.
Launch your UTF-8 Text Editor.
Use the Search feature to find the following section:
<!--337.01_SecurityPolicy-->
Ensure that the following lines are present in the section:
<!--337.01_SecurityPolicy-->
<characteristic type="SecurityPolicy">
...
<parm name="4101" value="8" />
<parm name="4102" value="1" />
<parm name="4122" value="1" />
...​</characteristic>
Save the changes to the mxipupdate_oemoperators_100.provxml; ensure that the file is saved in UTF-8 format.
Exit your UTF-8 Text Editor.
Verify that the mxipupdate_oemoperators_100.provxml is set to Read Only.
Tip
Make a backup copy of the mxipupdate_oemoperators_100.provxml file before editing; delete the backup file when done.
Observe the line formatting and spacing in the mxipupdate_oemoperators_100.provxml file.
When saving the file, select the Save As menu option and put quotes ["] around the file name so as to avoid additional file extensions.
References
Security Policy Settings for Windows 6.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/bb416355.aspx
Security Policy Settings for Windows 5.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms889564.aspx
What Do The SmartPhone Policy ID's Mean
http://www.xs4all.nl/~itsme/projects/xda/smartphone-policies.html
Changing the Unsigned Themes Policies
Security policies are used for configuring security settings that are then enforced with the help of security roles and certificates. They provide the flexibility to control the level of security on the device. The policies are defined globally and enforced locally in their respective components. The security policy is set during boot by executing a .provxml configuration file. This provisioning file is in ROM and contains the default setting specified by the OEM. The provisioning document is an Extensible Markup Language (XML) file that is assigns security settings to the device.
Typically, the mxipupdate_oemoperators_100.provxml file contains the default security policies that will be applied to the device. If a signed theme file does not have a matching root certificate in the Software Publisher Certificate (SPC) store, the file is unsigned and is therefore not executed. To allow execution of unsigned Theme files, we need to change the default security policy settings that pertain to Theme files.
For the purposes of this guide, we will add or change the following unsigned policy setting ID’s:
ID 4103: Unsigned CABS Policy = 16
* IMPORTANT *
Policy settings may appear in other files. You may wish to perform a search through .TXT, .RGU, and other .PROVXML files using the keywords such as: security, policies, policy.
Tools Required
The following tools are required to edit .PROVXML files.
UTF-8 Text Editor
Procedure
The following procedure will add/change the unsigned policy settings to permit the installation of unsigned .CAB files.
Navigate to the C:\XDA\MY_KITCHEN\OEM\OperatorPkg\ folder.
Verify that the mxipupdate_oemoperators_100.provxml is not set as Read Only.
Launch your UTF-8 Text Editor.
Use the Search feature to find the following section:
<!--337.01_SecurityPolicy-->
Ensure that the following lines are present in the section:
<!--337.01_SecurityPolicy-->
<characteristic type="SecurityPolicy">
...
<parm name="4103" value="16" />
...​</characteristic>
Save the changes to the mxipupdate_oemoperators_100.provxml; ensure that the file is saved in UTF-8 format.
Exit your UTF-8 Text Editor.
Verify that the mxipupdate_oemoperators_100.provxml is set to Read Only.
Tip
Make a backup copy of the mxipupdate_oemoperators_100.provxml file before editing; delete the backup file when done.
Observe the line formatting and spacing in the mxipupdate_oemoperators_100.provxml file.
When saving the file, select the Save As menu option and put quotes ["] around the file name so as to avoid additional file extensions.
References
Security Policy Settings for Windows 6.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/bb416355.aspx
Security Policy Settings for Windows 5.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms889564.aspx
What Do The SmartPhone Policy ID's Mean
http://www.xs4all.nl/~itsme/projects/xda/smartphone-policies.html
Customizing the User Interface of Windows Mobile Powered Devices
http://msdn.microsoft.com/en-us/library/bb416487.aspx
Changing the Remote API (RAPI) Policies
Security policies are used for configuring security settings that are then enforced with the help of security roles and certificates. They provide the flexibility to control the level of security on the device. The policies are defined globally and enforced locally in their respective components. The security policy is set during boot by executing a .provxml configuration file. This provisioning file is in ROM and contains the default setting specified by the OEM. The provisioning document is an Extensible Markup Language (XML) file that is assigns security settings to the device.
The Remote API (RAPI) enables applications that run on a desktop to perform actions on a remote Windows Embedded CE-based device. This includes the ability to manipulate the file system on the remote device, including the creation and deletion of files and directories. Additionally, the Remote API (RAPI) functions can be used to create and modify databases, either in the device's object store or in mounted database volumes. The Remote API (RAPI) applications can also query and modify registry keys as well as launch applications and invoke methods on the remote device.
Typically, the mxipupdate_oemoperators_100.provxml file contains the default security policies that will be applied to the device. To allow unrestricted access by remote applications to implement ActiveSync operations on Windows Mobile powered devices, we need to change the default security policy settings that pertain to the Remote API (RAPI).
For the purposes of this guide, we will add or change the following unsigned policy setting ID’s:
ID 4097: Unsigned Prompt Policy = 1
* IMPORTANT *
Policy settings may appear in other files. You may wish to perform a search through .TXT, .RGU, and other .PROVXML files using the keywords such as: security, policies, policy.
Tools Required
The following tools are required to edit .PROVXML files.
UTF-8 Text Editor
Procedure
The following procedure will add/change the unsigned policy settings to permit the installation of unsigned .CAB files.
Navigate to the C:\XDA\MY_KITCHEN\OEM\OperatorPkg\ folder.
Verify that the mxipupdate_oemoperators_100.provxml is not set as Read Only.
Launch your UTF-8 Text Editor.
Use the Search feature to find the following section:
<!--337.01_SecurityPolicy-->
Ensure that the following lines are present in the section:
<!--337.01_SecurityPolicy-->
<characteristic type="SecurityPolicy">
...
<parm name="4097" value="1" />
...​</characteristic>
Save the changes to the mxipupdate_oemoperators_100.provxml; ensure that the file is saved in UTF-8 format.
Exit your UTF-8 Text Editor.
Verify that the mxipupdate_oemoperators_100.provxml is set to Read Only.
Tip
Make a backup copy of the mxipupdate_oemoperators_100.provxml file before editing; delete the backup file when done.
Observe the line formatting and spacing in the mxipupdate_oemoperators_100.provxml file.
When saving the file, select the Save As menu option and put quotes ["] around the file name so as to avoid additional file extensions.
References
Security Policy Settings for Windows 6.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/bb416355.aspx
Security Policy Settings for Windows 5.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms889564.aspx
What Do The SmartPhone Policy ID's Mean
http://www.xs4all.nl/~itsme/projects/xda/smartphone-policies.html
Remote API (RAPI)
http://msdn.microsoft.com/en-us/library/aa920177.aspx
Compiling the New RUU_SIGNED.NBH File
Brief Review
At this point, we have consolidated the contents of various .RGU files found in the Dump_XIP folder to the BOOT.RGU file to ensure that all necessary registry entries will be added during the ROM compilation activities. We have increased the Data Cache size, unlocked the Paging Pool, disabled Certificate checking, reduced the ULDR, changed the Unsigned .CAB policy, changed the Theme policy, changed the Remote API (RAPI) policy, and reduced the .PAYLOAD file.
This guide did not go into details about adding, changing, or removing ROM packages to/from the OEM and SYS folders. Additionally, the guide did not cover the steps required to port an XIP from a different ROM version or device – you'll eventually want to learn how to do these types of activities.
Compiling the ROM
We now need to assemble all of these changes into a new RUU_SIGNED.NBH file – this process if often referred to as ROM compilation. We are going to use the Ervius PkgToolsBuildOS-5.3 tool to perform this process – there are newer versions of the Ervius PkgToolsBuildOS available.
Tools Required
The following tools are required for the RUU_SIGNED.NBH file creation activities.
PkgToolsBuildOS-5.3
ImgfsFromDump
NBMerge
Procedure
The following procedure initiates the ROM creation activity via a script that is included in the Generic Simple Kitchen. The creation process can take a significant amount of time to complete and requires user interaction at various stages.
Navigate to the C:\XDA\MY_KITCHEN\ folder.
Launch RaphaelKitchen.cmd.
Select C, press ENTER.
The Ervius PkgToolsBuildOs application will be launched.
Click the BuildOS tab.
Click the Load ROM button.
Select the All Packages In One check box.
In the Name box, type in the title: All Packages In One ROM
Select the Create_ROM_***.bat check box.
In the ROM Date Updater boxes, enter the desired date. Alternatively, click the Today button.
Click the Update Date button.
At the ROM Date On Flash Updated Successfully... message, click OK.
Click the Go button; allow the process to complete.
Wait for the Done message to appear in the Top Status bar.
Exit the Ervius PkgToolsBuildOs application to allow the process to continue.
The HTC ROM TOOL Process Log will appear.
Click the OK button on the Process Log window or allow it to auto exit.
At the Press Any Key To Continue... message, press ENTER.
Select X, press ENTER.
Copy the RaphaelCustomRUU.exe file from the C:\XDA\MY_KITCHEN\Tools\ folder to the C:\XDA\MY_KITCHEN\RUU\ folder.
Move the RUU_SIGNED.NBH file from the C:\XDA\MY_KITCHEN\ folder to the C:\XDA\MY_KITCHEN\RUU\ folder.
Tip
If the compilation is successful, the last three (3) lines in the Report window of the Ervius PkgToolsBuildOs application will display: Checking os-new.nb for bad NAND block marker. Checked 0x### sectors successfully! Done.
References
Ervius: Visual Multilang Kitchen For Last Bepe ROM-Tools
http://forum.xda-developers.com/showthread.php?t=469420
Flashing the RUU_SIGNED.NBH File
If you are reading this, you must have successfully compiled your RUU_SIGNED.NBH file and are now ready to flash it to your device … congratulations! Now for the disclaimer bit; I take no responsibility and will not be held liable for any problems you encounter with your device before and after following this guide … flashing a ROM is done at your own risk.
Also keep in mind that you'll need to unlock your device before venturing into the world of ROM flashing. If you haven’t unlocked your device and applied the Hard SPL, you need to complete these tasks before you can proceed.
The ROM Flashing process is relatively straight forward. You need to ensure that you can connect to your device via the ActiveSync application. Once you have connected to the device, launch the RaphaelCustomRUU tool to flash your cooked ROM to your device – I suggest temporarily disabling your anti-virus software to avoid unforeseen problems.
Tools Required
The following tools are required to flash the RUU_SIGNED.NBH file to your device.
RaphaelCustomRUU
Procedure
The following procedure initiates the ROM Flashing activity. The flashing process can take a significant amount of time to complete and requires user interaction at various stages.
Navigate to the C:\XDA\MY_KITCHEN\RUU\ folder.
Launch RaphaelCustomRUU.exe.
At the Welcome To The ROM Update Utility window, select the I Understand The Caution Indicated check box.
Click the Next button.
At the Follow The Instructions Below window, select the I Completed The Steps Indicated Above check box.
Click the Next button.
At the Current Information About Your PDA Phone window, click the Update button.
At the Verify That You Want To Update The ROM Version window, click the Next button.
At the You Are Now Ready To Update Your ROM Image window, click the Next button - allow the flashing process to complete.
Click the Finish button.
Tip
The current version of the PDA Phone ROM Update Utility 3.27.4.3 we are using has been modified to not format the device when only flashing a Radio, Startup Screen, or Operating System.
Your anti-virus will warn you that the RaphaelCustomRUU.exe contains the "Generic Dropper (Trojan)" – this is a false-positive indication; the .EXE is safe to use.
You can usually recover from a failed flash by copying a known "working" .NBH file to a MicroSD Card and starting your device in the Tricolour bootloader.
References
CustomRUU for Raphael
http://forum.xda-developers.com/showthread.php?t=410761
[Resources] Flashing your First GSM Raphael Rom (For Noobs)
http://forum.xda-developers.com/showthread.php?t=448008
Advanced Topic: XIP Porting
This guide is intended to help you learn how to port the Execute-In-Place (XIP) region from a new (donor) device for use in your kitchen; it will walk you through the process of extracting the contents of an Official ROM, obtaining the new (donor) device XIP, and porting the new (donor) device XIP into your kitchen.
[TUT] Sous-Chef's Guide to Aruppenthal’s XIP Porting Kitchen
http://forum.xda-developers.com/showthread.php?t=526804
Sous-Chef's TIPs
Tips and techniques passed down from the senior chefs in the business.
Love .PROVXML's? Hate Not Knowing If It Worked?
http://forum.xda-developers.com/showthread.php?t=519548
[WinXP Script] Extend Search Companion
http://forum.xda-developers.com/showthread.php?t=490216
[Guide] How to create .LNK files and use parameters
http://forum.xda-developers.com/showthread.php?t=490447
13/02/2010: Tutorial Statistics
Views: 8,744
Guide Downloads: 96
Kitchen Downloads: 118
Thank you very much for putting this together this will help newbs like me cook my own ROM instead of rely on others. Very great contribution.

[TUT] Sous-Chef's Guide to Da_G's Ervius Visual Kitchen 9.7

Version: 31/05/2009
Intro
Welcome; I wanted to offer a little "something" back to the XDA community in the hopes that it will benefit others and to show my appreciation to the folks that make XDA the great community that it is. Hopefully, this guide will help you work your way up the ranks to Chef … let’s begin!
There are many chefs that provide quality ROM's for you to use. However, if you've gotten excited about the idea of cooking your own ROM's, you've probably felt overwhelmed by the volume of Forum Threads and Wiki pages at your disposal to learn how to do this.
The sections are intended to be followed in sequence as the last section should provide you with a final product that can be flashed to your device – so you may want to read this guide once over before going through the motions … who am I kidding? You’re going to follow along aren’t you?
In case you're wondering ... I chose Sous-Chef because Commis or Chef De Partie just didn't have the same appeal
Applying Original/Cooked ROM's
You probably won't be able to apply an Original or Cooked ROM to your device as your Cellular Carrier has most certainly locked your device. You'll need to unlock your device before venturing into the world of ROM installation. These activities are beyond the scope of this guide; you can however, go to this Wiki page to learn more.
HTC Raphael
http://wiki.xda-developers.com/index.php?pagename=HTC_Raphael
Original VS Cooked ROM's
HTC periodically releases Official Generic ROM's that you can apply to your device. You can find a list of Original Shipped WM6.1 ROM's at this Wiki page.
Original Shipped WM6.1 ROMS
http://wiki.xda-developers.com/index.php?pagename=HTC_Raphael_WM6.1_ROMs
There are essentially two types of Cooked ROM's; those that another Chef makes available for you to use, and those that you cook yourself. You can find a list of Available Cooked WM6.1 ROM's at this Wiki page.
Available Cooked WM6.1 ROMS
http://wiki.xda-developers.com/index.php?pagename=HTC_Raphael_Cooked_WM6.1_ROMs
Outro
Lastly, this guide only covers the ROM cooking process; changing your device Startup Splash Screen and Radio or flashing a HardSPL are beyond the scope of this guide; you can however, go to these Wiki and/or Forum pages to learn more.
Radio
http://wiki.xda-developers.com/index.php?pagename=Raphael_ExtractedRadioRoms
http://forum.xda-developers.com/showthread.php?t=439566
Startup Splash Screen
http://forum.xda-developers.com/showthread.php?t=431161
Hard SPL
http://wiki.xda-developers.com/index.php?pagename=Raphael_HardSPL
This guide is intended to help you learn how to cook your own ROM's; it will walk you through the process of extracting the contents of an Official ROM, adjusting the Page Pool, changing the Data Cache Size, and Patching the ROM to remove Certificate verification. The guide does not cover the steps required to add/remove ROM packages or port an XIP from a different ROM version or device ... not yet anyway
Now for the disclaimer bit; I take no responsibility and will not be held liable for any problems you encounter with your device before and after following this guide … flashing a ROM is done at your own risk. If you spot mistakes or inaccuracies in the guide however, please let me know so that I may correct them. Now, read on if you still feel that this is your choice career path
Oh, one last thing ... to the following folks for sharing their knowledge with the rest of us ... thank you!
Da_G
Ameet
Bepe
Cmonex
Ervius
JCEspi2005
JugglerLKR
mskip
Olipro
Aruppenthal
NRGZ28
Noonski
If I missed someone, it's purely accidental – send me a note and I will add your name to the list.
[TUT] Sous-Chef's Guide to Da_G's Ervius Visual Kitchen 9.7 ... continued
Location, Location, Location
There are many fine Kitchens out there to use; Semi-Automated Kitchens (Raphael, Da_G), Automated Kitchens (Bepe), and Visual Kitchens (Ervius). This guide uses the Ervius Visual Kitchen to assist you in learning the basics of operating a Kitchen; which ultimately, allows you to produce your own ROM.
References
Ervius..: http://forum.xda-developers.com/showthread.php?t=469420
Da_G....: http://forum.xda-developers.com/showthread.php?t=471288
Raphael.: http://forum.xda-developers.com/showthread.php?p=2453788
Bepe....: http://forum.xda-developers.com/showthread.php?t=467488
Inspecting the Facility
It’s important to get acquainted with any new facility; last thing you want to find out is that you don’t know where to plug your utensils or appliances. Here’s a brief tour of the facilities to get you on your way.
EXT Folder
The External packages (EXT) folder is divided into Device Specific folders and a Shared folder. The Shared folder is typically used for files (packages) that can be installed on any device. Device Specific folders are typically used for files (packages) that should only be applied to a specific type of the device – for example, the Raphael device.
Each Device Specific folder is further divided into Operating System Build Version Specific folders and a Common folder. The Common folder is typically used for files (packages) that can be installed on any Operating System build version. Operating System Build Version Specific folders are typically used for files (packages) that should only be applied to a specific build (version) of Operating System – for example, build version 20764.
Operating System Build Version Specific folders, the Common folder, and the Shared folder can be further divided into sub-folders making file (package) management simpler – for example, .\Raphael\20764\Raphael_External_Packages.
Tip
The EXT Build drop-down box in the Visual Kitchen permits selection of different Operating System Build Version Specific folders.
OEM Folder
The OEM folder can contain multiple Device Specific folders. Device Specific folders are typically used for files (packages) that should only be applied to a specific type of the device – for example, the Raphael device.
Each Device Specific folder is further divided into Locale Specific folders and a Common folder. The Common folder is typically used for files (packages) that can be installed in any locale – not specific to a language. Locale Specific folders are typically used for files (packages) that should only be applied to a specific locale – for example, 0409 (English).
Tip
The Language drop-down box in the Visual Kitchen permits selection of different Locale Specific folders.
ROM Folder
The ROM folder is divided into Device Specific folders and a Shared folder. The Shared folder is typically used for kernel system files that are compatible amongst devices. Device Specific folders are typically used for kernel system files that should only be applied to a specific type of the device – for example, the Raphael device.
The Shared folder is further divided into Operating System Build Version Specific folders. Operating System Build Version Specific folders are typically used for kernel system files that should only be applied to a specific build (version) of Operating System – for example, build version 20764.
Each Device Specific folder is further divided into Operating System Build Version Specific folders. Operating System Build Version Specific folders are typically used for kernel system files that should only be applied to a specific build (version) of Operating System – for example, build version 20764.
Tip
The XIP Build drop-down box in the Visual Kitchen permits selection of different Operating System Build Version Specific folders.
Advanced OEMXipKernel and MSXipKernel operations can be performed using the XIPPORTEREX & ROM tool.
SYS Folder
The system (SYS) folder is divided into Operating System Build Version Specific folders. The Build Version Specific folders will often contain files (packages) specific to the device DPI (Dot Per Inch) and Horizontal/Vertical display size.
Each Operating System Build Version Specific folder is further divided into a ROM DPI, ROM Resolution, and Shared folder – providing a significant amount of flexibility during ROM compilation.
The ROM DPI, ROM Resolution, and Shared folders are further divided into Locale Specific folders and a Common folder. The Common folder is typically used for system files (packages) that can be installed in any locale – not specific to a language. Locale Specific folders are typically used for system files (packages) that should only be applied to a specific locale – for example, 0409 (English).
Tip
The ROM DPI and ROM Resolution drop-down boxes in the Visual Kitchen permits selection of different Operating System Build Version Specific resolution and bit depth.
[TUT] Sous-Chef's Guide to Da_G's Ervius Visual Kitchen 9.7 ... continued
Preparing Your Facility
Before you can begin to cook your own ROM, you need to equip your facility with some Kitchen utensils. Your Kitchen is going to require a good Unicode & UTF-8 text editor; I personally use ConTEXT & Notepad. Another handy utensil to have is a comparison utility for date/file/binary comparisons; I use WinDiff & BeyondCompare. Some other utensils that you're going to require are: Microsoft ActiveSync, .NET Framework 2.x/3.x. You will also need an archive extraction utensil; I use IZArc, WinRAR, and WinZIP. You’ll also need a good Hexadecimal calculator; I use Windows Calculator (Scientific Mode).
It's also a good idea to ensure that your Kitchen remains "pest" free; common pest control services include AVG, McAfee, and Symantec anti-Virus. You'll need to add the RaphaelWrapper (OSNBTOOL.EXE) tool to your list of anti-virus exclusions as it may be detected as a "Generic Dropper (Trojan)".
References
CustomRUU for Raphael
http://forum.xda-developers.com/showthread.php?t=410761
To assist you in your apprenticeship, I have included a link to the Generic Visual Kitchen that I used to prepare this guide - the kitchen also includes a .DOC and .PDF format of this guide. The procedures were tested against a GSM Raphael device. I can’t confirm that these procedures will work on CDMA device ROM’s. Additionally, other device ROM’s may not be compatible with this kitchen format. Make sure to review the _README.TXT before you begin.
Generic Visual Kitchen, 17 MB
You’re going to need a RUU_SIGNED.NBH file; I used the following HTC Official Generic ROM – you’ll need to extract the contents of the .EXE and .RAR/.ZIP using an archive utensil.
[ROM] [WWE] Raphael HTC 5.05.405.1 Radio Signed (52.58.25.3 0,1.11.25.01)
http://rapidshare.com/files/1939660...igned_Raphael_52.58.25.30_1.11.25.01_Ship.rar
http://www.megaupload.com/?d=0F50UM5K
For the purpose of this guide, I will assume that you have added the C:\XDA\ folder, sub-folder, and files to your anti-virus exclusion list – at the very least RaphaelWrapper.exe – and that the contents of the Generic Visual Kitchen were extracted to the following folder.
C:\XDA\MY_VISUAL_KITCHEN
The guide is divided into the following sections:
Extracting the RUU_SIGNED.NBH Contents ....... 4
Reducing the .PAYLOAD File ................... 5
Extracting the XIP.BIN Contents .............. 6
Increasing the Data Cache .................... 7
Unlocking the Paging Pool .................... 8
Disabling Certificate Checking ............... 9
Reducing the Update Loader (ULDR) Partition .. 10
Changing the Unsigned CAB Policies ........... 11
Changing the Unsigned Themes Policies ........ 12
Changing the Remote API (RAPI) Policies ...... 13
Compiling the New RUU_SIGNED.NBH File ........ 14
Flashing the RUU_SIGNED.NBH File ............. 15
Advanced Topic: XIP Porting .................. 16
Sous-Chef's TIPs ............................. 17
I will attempt to provide an overview, the list of tools required, and the process to follow in each section. As you become more comfortable (and familiar) with the activities, you will find that you can consolidate (or skip) certain outlined steps. Incidentally, you'll probably want to keep these web links open in case you need to lookup some of the terms or concepts in the guide.
Acronyms
http://wiki.xda-developers.com/index.php?pagename=Acronyms
Glossary
http://wiki.xda-developers.com/index.php?pagename=Glossary
Development Resources for Windows Mobile
http://forum.xda-developers.com/showthread.php?t=445396
Extracting the RUU_SIGNED.NBH Contents
An .NBH is a signed group of modules or packages; they are typically comprised of .NB files. An .NBH can contain any combination of .NB files. An .NB file is a block of code that can be a Radio ROM, Operating System packages (XIP and IMGFS), Startup Splash Screen (or SPL).
The file we will be working with is the OS.NB file; it contains the ULDR, XIP, and IMGFS (OEM, SYS). To extract the contents of an .NBH file, we initiate the Ervius NBH/NB/PAYLOAD Dumper tool from within the Generic Visual Kitchen.
Upon completion, the following files will have been extracted: OS.nb, OS.nb.payload. Additionally, the Ervius NBH/NB/PAYLOAD Dumper tool creates a DUMP folder that contains all the files required.
Tools Required:
The following Ervius Visual Kitchen tool will be used for the RUU_SIGNED.NBH extraction activities.
Dump NBH/NB/PAYLOAD
Procedure
The following procedure initiates the ROM extraction activity via the Ervius NBH/NB/PAYLOAD Dumper tool built into the Generic Visual Kitchen. The extraction process can take a significant amount of time to complete.
Copy the RUU_SIGNED.NBH file to the C:\XDA\My_Visual_Kitchen\BaseROM\ folder.
Navigate to the C:\XDA\My_Visual_Kitchen\ folder.
Launch ErviusKitchen.exe.
At the multiple warning messages, click OK.
Warnings that may appear include:
Folder Not Found
Could Not Find A Part Of The Path
You Need To Specify … First
Click the Dump NBH/NB/PAYLOAD button.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\BaseROM\ folder.
Select the RUU_signed.nbh file and then click Open.
At the All Done... Nbh/nb/payload Dumped and ''Kitchen'' created Successfull!!! message, close the Ervius Visual Kitchen application.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\DUMP\ folder.
Move the sub-folders (and content) to the C:\XDA\MY_VISUAL_KITCHEN\ folder.
At the Confirm Folder Replace message, click Yes To All.
At the Confirm File Move message, click Yes To All.
Tip
The C:\XDA\MY_VISUAL_KITCHEN\BaseROM\Dump\ folder should be empty at this point – and can be removed.
Reducing the .PAYLOAD File
At this point, the Ervius NBH/NB/PAYLOAD Dumper tool has removed the contents of the IMGFS (OEM, SYS) from the .PAYLOAD file in preparation for changes to the ULDR and XIP. Removing the IMGFS (OEM, SYS) contents from the .PAYLOAD file reduces the size of the .PAYLOAD file making it easier to work with.
The Ervius NBH/NB/PAYLOAD Dumper tool has placed a copy of the reduced .PAYLOAD file in the C:\XDA\My_Visual_Kitchen\ROM\Raphael\ folder.
Tip
Advanced .PAYLOAD file operations can be performed using the XIPPORTEREX & ROM tool.
References
[TUT] Manual Full XIP Porting (& MANY MORE TUTORIALS)
http://forum.xda-developers.com/showthread.php?t=438676
Extracting the XIP.BIN Contents
The Execute-in-place (XIP) region is an area where an application can execute code directly from ROM rather than loading it from RAM. It is possible to use the XIP.BIN contents from a newer version of a ROM from a different device or a newer operating system. This is typically done by chefs who are looking for the most recent versions of system files from a specific device or version of an operating system – you'll eventually do the same.
At this point, the Ervius NBH/NB/PAYLOAD Dumper tool has extracted the contents of the XIP.BIN and placed a copy of the file in the C:\XDA\My_Visual_Kitchen\ROM\Raphael\ folder.
For the purposes of this guide, we will be using the same version of the system files.
Tip
Advanced XIP.BIN file operations can be performed using the XIPPORTEREX & ROM tool.
You can change the ROM Date/Version using the XIPPORTEREX & ROM tool.
References
[TUT] Manual Full XIP Porting (& MANY MORE TUTORIALS)
http://forum.xda-developers.com/showthread.php?t=438676
XIP Porting Guide
http://forum.xda-developers.com/showthread.php?t=379598
Increasing the Data Cache
File caching improves performance and also improves power management; when an application accesses physical storage, the storage device uses much more power. The less often physical storage is accessed, the longer storage devices spend in a low-power state.
By increasing the DataCacheSize registry value, you effectively improve the performance of applications that are file system intensive such as database and mapping applications – which results in lower physical storage access requirements. Drastically increasing the DataCacheSize however, may have adverse effects and slow the device down as a result of longer auto-compaction processing.
For the purposes of this guide, we are going to increase the current DataCacheSize value from 4MB to 8MB.
Tools Required
The following tools are required to adjust the DataCacheSize value.
Unicode Text Editor
Hexadecimal Calculator
Procedure
The following procedure will change the current DataCacheSize value of 4MB to 8MB.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\ROM\Raphael\20764\OEMXipKernel\ folder.
Launch a text editor and open the BOOT.RGU file.
Search for the following registry key entry:
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FLASHDRV\FATFS]
Locate the following registry value underneath the key:
"DataCacheSize"=dword:00000800 ;2048 sectors(2048*2048=4MB)
Change the registry value to the following:
"DataCacheSize"=dword:00001000 ;4096 sectors(4096*2048=8MB)
Save the BOOT.RGU file.
Exit the text editor.
Tip
Make a backup copy of the BOOT.RGU file before editing; delete the backup file when done.
Unlocking the Paging Pool
The Paging Pool serves as a limit on the amount of memory that can be consumed by pageable data. It includes an algorithm for choosing the order in which to remove pageable data from memory. Pool behaviour is typically determined by the OEM – Microsoft sets a default value for the paging pool, but the OEM can change that value. Applications do not have the ability to set the behaviour for their own executables or memory-mapped files.
For the purposes of this guide, we are going to apply a change to the kitchen_build_rom.bat to set the Paging Pool size (initially set to 6MB) to a new size of 8MB.
Tools Required
The following tools are required for the Paging Pool unlock activities.
Unicode Text Editor
Procedure
The following procedure will change the kitchen_build_rom.bat to set the Paging Pool size during ROM compilation.
Launch a text editor.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\Tools\ folder and open the kitchen_build_rom.bat file.
In the Find (Search) box, type:
implantxip
Add the following implantxip command line option:
-PP 8
Select the Save option in your text editor.
Select the Exit option in your text editor.
Tip
Spaces are usually required between command line options; the command line option should only appear once.
You can add output logging to file by adding the following command instructions to the end of a command line:
| ..\tools\mtee /+ ..\%LOG_FILE%
Newer versions of Ervius Visual Kitchen provide built-in logging and an Option button to set the Paging Pool size.
Disabling Certificate Checking
During the startup process of your device, the operating system verifies that each system file against an internal certificate store to ensure that each file is signed with a trusted certificate; if the system file is not signed, the file is ignored.
To allow execution of non-signed system files, we need to disable the internal certificate store verification. Once disabled, the operating system will trust all code installed regardless of its signature. This provides more control over the code that gets installed on the device – you no longer need to load and manually sign additional certificates such as those from the sdkcerts.cab into the device root certificate store.
For the purposes of this guide, we are going to apply a change to the kernel binary file which will disable the internal certificate store verification.
Tools Required
The following tools are required to disable the internal certificate store verification.
Unicode Text Editor
Procedure
The following procedure will change the kitchen_build_rom.bat disable the internal certificate store verification.
Launch a text editor.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\Tools\ folder and open the kitchen_build_rom.bat file.
In the Find (Search) box, type:
implantxip
Add the following implantxip command line option:
-NoCert
Select the Save option in your text editor.
Select the Exit option in your text editor.
Tip
Spaces are usually required between command line options; the command line option should only appear once.
You can add output logging to file by adding the following command instructions to the end of a command line:
| ..\tools\mtee /+ ..\%LOG_FILE%
Newer versions of Ervius Visual Kitchen provide built-in logging and an Option button to disable the Certificate Store verification.
Reducing 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.
For the purposes of this guide, we are going to apply a change to the kitchen_build_rom.bat to reduce the ULDR – effectively providing approximately 3 MB of space.
Tools Required
The following tools are required to disable the internal certificate store verification.
Unicode Text Editor
Procedure
The following procedure will change the kitchen_build_rom.bat disable the internal certificate store verification.
Launch a text editor.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\Tools\ folder and open the kitchen_build_rom.bat file.
In the Find (Search) box, type:
implantxip
Add the following implantxip command line option:
-uldr
Select the Save option in your text editor.
Select the Exit option in your text editor.
Tip
Spaces are usually required between command line options; the command line option should only appear once.
You can add output logging to file by adding the following command instructions to the end of a command line:
| ..\tools\mtee /+ ..\%LOG_FILE%
Newer versions of Ervius Visual Kitchen provide built-in logging and an Option button to enable or disable ULDR reduction.
Changing the Unsigned CAB Policies
Security policies are used for configuring security settings that are then enforced with the help of security roles and certificates. They provide the flexibility to control the level of security on the device. The policies are defined globally and enforced locally in their respective components. The security policy is set during boot by executing a .provxml configuration file. This provisioning file is in ROM and contains the default setting specified by the OEM. The provisioning document is an Extensible Markup Language (XML) file that is assigns security settings to the device.
Typically, the mxipupdate_oemoperators_100.provxml file contains the default security policies that will be applied to the device. To allow execution of unsigned .CAB files, we need to change the default security policy settings that pertain to .CAB files.
For the purposes of this guide, we will add or change the following unsigned policy setting ID’s:
ID 4101: Unsigned CABS Policy = 8
ID 4102: Unsigned Applications Policy = 1
ID 4122: Unsigned Prompt Policy = 1
* IMPORTANT *
Policy settings may appear in other files. You may wish to perform a search through .TXT, .RGU, and other .PROVXML files using the keywords such as: security, policies, policy.
Tools Required
The following tools are required to edit .PROVXML files.
UTF-8 Text Editor
Procedure
The following procedure will add/change the unsigned policy settings to permit the installation of unsigned .CAB files.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\OEM\Raphael\0409\OperatorPkg\ folder.
Verify that the mxipupdate_oemoperators_100.provxml is not set as Read Only.
Launch your UTF-8 Text Editor.
Use the Search feature to find the following section:
<!--337.01_SecurityPolicy-->
Ensure that the following lines are present in the section:
<!--337.01_SecurityPolicy-->
<characteristic type="SecurityPolicy">
...
<parm name="4101" value="8" />
<parm name="4102" value="1" />
<parm name="4122" value="1" />
...​</characteristic>
Save the changes to the mxipupdate_oemoperators_100.provxml; ensure that the file is saved in UTF-8 format.
Exit your UTF-8 Text Editor.
Verify that the mxipupdate_oemoperators_100.provxml is set to Read Only.
Tip
Make a backup copy of the mxipupdate_oemoperators_100.provxml file before editing; delete the backup file when done.
Observe the line formatting and spacing in the mxipupdate_oemoperators_100.provxml file.
When saving the file, select the Save As menu option and put quotes ["] around the file name so as to avoid additional file extensions.
References
Security Policy Settings for Windows 6.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/bb416355.aspx
Security Policy Settings for Windows 5.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms889564.aspx
What Do The SmartPhone Policy ID's Mean
http://www.xs4all.nl/~itsme/projects/xda/smartphone-policies.html
Changing the Unsigned Themes Policies
Security policies are used for configuring security settings that are then enforced with the help of security roles and certificates. They provide the flexibility to control the level of security on the device. The policies are defined globally and enforced locally in their respective components. The security policy is set during boot by executing a .provxml configuration file. This provisioning file is in ROM and contains the default setting specified by the OEM. The provisioning document is an Extensible Markup Language (XML) file that is assigns security settings to the device.
Typically, the mxipupdate_oemoperators_100.provxml file contains the default security policies that will be applied to the device. If a signed theme file does not have a matching root certificate in the Software Publisher Certificate (SPC) store, the file is unsigned and is therefore not executed. To allow execution of unsigned Theme files, we need to change the default security policy settings that pertain to Theme files.
For the purposes of this guide, we will add or change the following unsigned policy setting ID’s:
ID 4103: Unsigned CABS Policy = 16
* IMPORTANT *
Policy settings may appear in other files. You may wish to perform a search through .TXT, .RGU, and other .PROVXML files using the keywords such as: security, policies, policy.
Tools Required
The following tools are required to edit .PROVXML files.
UTF-8 Text Editor
Procedure
The following procedure will add/change the unsigned policy settings to permit the installation of unsigned .CAB files.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\OEM\Raphael\0409\OperatorPkg\ folder.
Verify that the mxipupdate_oemoperators_100.provxml is not set as Read Only.
Launch your UTF-8 Text Editor.
Use the Search feature to find the following section:
<!--337.01_SecurityPolicy-->
Ensure that the following lines are present in the section:
<!--337.01_SecurityPolicy-->
<characteristic type="SecurityPolicy">
...
<parm name="4103" value="16" />
...​</characteristic>
Save the changes to the mxipupdate_oemoperators_100.provxml; ensure that the file is saved in UTF-8 format.
Exit your UTF-8 Text Editor.
Verify that the mxipupdate_oemoperators_100.provxml is set to Read Only.
Tip
Make a backup copy of the mxipupdate_oemoperators_100.provxml file before editing; delete the backup file when done.
Observe the line formatting and spacing in the mxipupdate_oemoperators_100.provxml file.
When saving the file, select the Save As menu option and put quotes ["] around the file name so as to avoid additional file extensions.
References
Security Policy Settings for Windows 6.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/bb416355.aspx
Security Policy Settings for Windows 5.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms889564.aspx
What Do The SmartPhone Policy ID's Mean
http://www.xs4all.nl/~itsme/projects/xda/smartphone-policies.html
Customizing the User Interface of Windows Mobile Powered Devices
http://msdn.microsoft.com/en-us/library/bb416487.aspx
Changing the Remote API (RAPI) Policies
Security policies are used for configuring security settings that are then enforced with the help of security roles and certificates. They provide the flexibility to control the level of security on the device. The policies are defined globally and enforced locally in their respective components. The security policy is set during boot by executing a .provxml configuration file. This provisioning file is in ROM and contains the default setting specified by the OEM. The provisioning document is an Extensible Markup Language (XML) file that is assigns security settings to the device.
The Remote API (RAPI) enables applications that run on a desktop to perform actions on a remote Windows Embedded CE-based device. This includes the ability to manipulate the file system on the remote device, including the creation and deletion of files and directories. Additionally, the Remote API (RAPI) functions can be used to create and modify databases, either in the device's object store or in mounted database volumes. The Remote API (RAPI) applications can also query and modify registry keys as well as launch applications and invoke methods on the remote device.
Typically, the mxipupdate_oemoperators_100.provxml file contains the default security policies that will be applied to the device. To allow unrestricted access by remote applications to implement ActiveSync operations on Windows Mobile powered devices, we need to change the default security policy settings that pertain to the Remote API (RAPI).
For the purposes of this guide, we will add or change the following unsigned policy setting ID’s:
ID 4097: Unsigned Prompt Policy = 1
* IMPORTANT *
Policy settings may appear in other files. You may wish to perform a search through .TXT, .RGU, and other .PROVXML files using the keywords such as: security, policies, policy.
Tools Required
The following tools are required to edit .PROVXML files.
UTF-8 Text Editor
Procedure
The following procedure will add/change the unsigned policy settings to permit the installation of unsigned .CAB files.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\OEM\Raphael\0409\OperatorPkg\ folder.
Verify that the mxipupdate_oemoperators_100.provxml is not set as Read Only.
Launch your UTF-8 Text Editor.
Use the Search feature to find the following section:
<!--337.01_SecurityPolicy-->
Ensure that the following lines are present in the section:
<!--337.01_SecurityPolicy-->
<characteristic type="SecurityPolicy">
...
<parm name="4097" value="1" />
...​</characteristic>
Save the changes to the mxipupdate_oemoperators_100.provxml; ensure that the file is saved in UTF-8 format.
Exit your UTF-8 Text Editor.
Verify that the mxipupdate_oemoperators_100.provxml is set to Read Only.
Tip
Make a backup copy of the mxipupdate_oemoperators_100.provxml file before editing; delete the backup file when done.
Observe the line formatting and spacing in the mxipupdate_oemoperators_100.provxml file.
When saving the file, select the Save As menu option and put quotes ["] around the file name so as to avoid additional file extensions.
References
Security Policy Settings for Windows 6.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/bb416355.aspx
Security Policy Settings for Windows 5.x Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms889564.aspx
What Do The SmartPhone Policy ID's Mean
http://www.xs4all.nl/~itsme/projects/xda/smartphone-policies.html
Remote API (RAPI)
http://msdn.microsoft.com/en-us/library/aa920177.aspx
Compiling the New RUU_SIGNED.NBH File
Brief Review
At this point, we have increased the Data Cache size, ensured that the implantxip command unlocks the Paging Pool and sets an initial size 8MB, disables Certificate checking, and reduces the ULDR. We changed the Unsigned .CAB policy, changed the Theme policy, and changed the Remote API (RAPI) policy.
This guide did not go into details about adding, changing, or removing ROM packages to/from the OEM and SYS folders. Additionally, the guide did not cover the steps required to port an XIP from a different ROM version or device – you'll eventually want to learn how to do these types of activities.
Compiling the ROM
We now need to assemble all of these changes into a new RUU_SIGNED.NBH file – this process if often referred to as ROM compilation. We are going to initiate the Create ROM tool from within the Generic Visual Kitchen to perform this process – there are newer versions of the Ervius Visual Kitchen available.
Tools Required
The following Ervius Visual Kitchen feature will be used for the RUU_SIGNED.NBH file creation activities.
Create ROM
Procedure
The following procedure initiates the ROM creation activity via a script that is included in the Generic Visual Kitchen. The creation process can take a significant amount of time to complete and requires user interaction at various stages.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\ folder.
Launch erviuskitchen.exe.
Click on the Device drop-down box and select Raphael from the list.
In the ROM Ver box, change the value: 5.05.405.1
Click the Create ROM button, the command window will begin to display processing information after a few minutes.
Wait for the All Done message to appear in the Bottom Status window.
Exit the Ervius Visual Kitchen application.
Copy the RaphaelWrapper.exe file from the C:\XDA\MY_VISUAL_KITCHEN\Tools\ folder to the C:\XDA\MY_VISUAL_KITCHEN\RELEASE_Raphael\ folder.
Tip
Processing information may take a few minutes before it appears in the Command window; this is a result of logging activity being spooled to logging files for troubleshooting purposes.
If the compilation is successful, the last three (4) lines in the Status window of the Ervius Visual Kitchen will display: ROM Builded successfull!!! Reenabling all skipped packages. All packages Reenabled. All done!!!
References
Visual multilang/multidevice/multibuild kitchen for last bepe rom-tools!!!
http://forum.xda-developers.com/showthread.php?t=469420
Flashing the RUU_SIGNED.NBH File
If you are reading this, you must have successfully compiled your RUU_SIGNED.NBH file and are now ready to flash it to your device … congratulations! Now for the disclaimer bit; I take no responsibility and will not be held liable for any problems you encounter with your device before and after following this guide … flashing a ROM is done at your own risk.
Also keep in mind that you'll need to unlock your device before venturing into the world of ROM flashing. If you haven’t unlocked your device and applied the Hard SPL, you need to complete these tasks before you can proceed.
The ROM Flashing process is relatively straight forward. You need to ensure that you can connect to your device via the ActiveSync application. Once you have connected to the device, launch the RaphaelWrapper tool to flash your cooked ROM to your device – I suggest temporarily disabling your anti-virus software to avoid unforeseen problems.
Tools Required
The following tools are required to flash the RUU_SIGNED.NBH file to your device.
RaphaelWrapper
Procedure
The following procedure initiates the ROM Flashing activity. The flashing process can take a significant amount of time to complete and requires user interaction at various stages.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\Tools\ folder.
Copy the RaphaelWrapper.exe application to the C:\XDA\MY_VISUAL_KITCHEN\RELEASE_Raphael\ folder.
Navigate to the C:\XDA\MY_VISUAL_KITCHEN\RELEASE_Raphael\ folder.
Launch RaphaelWrapper.exe.
At the Welcome To The ROM Update Utility window, select the I Understand The Caution Indicated check box.
Click the Next button.
At the Follow The Instructions Below window, select the I Completed The Steps Indicated Above check box.
Click the Next button.
At the Current Information About Your PDA Phone window, click the Update button.
At the Verify That You Want To Update The ROM Version window, click the Next button.
At the You Are Now Ready To Update Your ROM Image window, click the Next button - allow the flashing process to complete.
Click the Finish button.
Tip
The current version of the PDA Phone ROM Update Utility 3.27.4.3 we are using has been modified to not format the device when only flashing a Radio, Startup Screen, or Operating System.
Your anti-virus may warn you that the RaphaelWrapper.exe contains the "Generic Dropper (Trojan)" – this is a false-positive indication; the .EXE is safe to use.
You can usually recover from a failed flash by copying a known "working" .NBH file to a MicroSD Card and starting your device in the Tricolour bootloader.
References
CustomRUU for Raphael
http://forum.xda-developers.com/showthread.php?t=410761
[Resources] Flashing your First GSM Raphael Rom (For Noobs)
http://forum.xda-developers.com/showthread.php?t=448008
Advanced Topic: XIP Porting
This guide is intended to help you learn how to port the Execute-In-Place (XIP) region from a new (donor) device for use in your kitchen; it will walk you through the process of extracting the contents of an Official ROM, obtaining the new (donor) device XIP, and porting the new (donor) device XIP into your kitchen.
[TUT] Sous-Chef's Guide to XIP Porting in Ervius Visual Kitchen
http://forum.xda-developers.com/showthread.php?t=526610
Sous-Chef's TIPs
Tips and techniques passed down from the senior chefs in the business.
Love .PROVXML's? Hate Not Knowing If It Worked?
http://forum.xda-developers.com/showthread.php?t=519548
[WinXP Script] Extend Search Companion
http://forum.xda-developers.com/showthread.php?t=490216
[Guide] How to create .LNK files and use parameters
http://forum.xda-developers.com/showthread.php?t=490447
13/02/2010: Tutorial Statistics
Views: 38,176
Guide Downloads: 1,353
Kitchen Downloads : 770
OEM vs EXT
So ive been out of the loop for a couple months, and the main place i am stuck is converting my old oem packages into the packages used in the new style kitchen. maybe a post with this info would be good too!
And good job, im sure this will help a lot of new cooks!
fallingup said:
So ive been out of the loop for a couple months, and the main place i am stuck is converting my old oem packages into the packages used in the new style kitchen. maybe a post with this info would be good too!
And good job, im sure this will help a lot of new cooks!
Click to expand...
Click to collapse
This post should get you going for now ...
http://forum.xda-developers.com/showpost.php?p=3959154&postcount=903

[WM Kitchen] OsKitchen Zero v1.33.5: The Easiest & Most Complete Kitchen (20/10/2010)

[WM Kitchen] OsKitchen Zero v1.33.5: The Easiest & Most Complete Kitchen (20/10/2010)
Index of this thread
(This Page) General Informations, Download links, Screenshots
Using OsKitchen Zero (Tutorial)
Moving from Ervius Visual Kitchen to osKitchen
Frequently Asked Questions
Useful Resources (Links where to find the latest Windows Mobile Builds and EXT packages)
Description
What does this kitchen do that others don't? You should ask yourself what the other kitchens do that this one doesn't because it literally does everything: importing the ROM directly from the EXE updater, detecting all the informations to rebuild the ROMs from the ROM file itself (no more messy BAT/CMD to edit to get things working), sorting the packages with the best EXT packages conversion engine available (no more EXT packages with weird names or out of place), building ROMs for different languages in the same pass picking all the correct windows mobile packages (EA/NonEA/AH/CS/Transcriber/Uniscribe/Fonts) to use, directly installing packages on the devices without having to flash each time (package installer), automatically recmodding of packages (without touching any of the original files) to allow cooking windows mobile 6.5 ROMs using older kernels, automatic manila CFC compression to save space and improve speed (and supporting latest manila builds where CFCGui has issues) and much, much more while keeping all the user interface well organized and being extremely easy to use. Start the kitchen, import a stock ROM and go! Give it a try and find out yourself how it lives up the hype or if still unconvinced scroll down to see how much simple yet complete the kitchen is by looking at the screenshots.
Features
The kitchen has the most streamlined and self-explanatory UI you can find, it can natively import and rebuild ROMs for all the devices in the supported list without having to mess with any batch/cmd files, it shows detailed informations about every Windows Mobile package and warn about conflicts and unmet dependencies, it can build multilanguage ROMs in the same pass by automatically choosing all the right localization packages required for each language, it can import windows mobile builds of any kind, convert OEM packages/CABS/HTC Hotfixes directly to EXT packages, can automatically recmod/UPX and natively compress/patch manila manila files with CFC, it automatically detects older kernels and suggests all the right packages to recmod to get the ROM working, it checks the ROM integrity while building to avoid many common user mistakes, has a lot of tweaks directly selectable with just a click from the kitchen interface, it has the most advanced search system available and much more.
Supported devices
HTC: Artemis, Athena, Blackstone, Diamond, Elf, Gene, HD Mini, Herald, Hermes, Iolite, Jade, Kaiser, Leo, Mega, Nike, Opal, Polaris, Pharos, Quartz, Raphael, Rhodium, Sedna, Titan, Topaz, Trinity, Vogue, Whitestone (CDMA variants of all phones are supported as well)
Palm: Treo Pro
Sony-Ericsson: Xperia X1 (HTC Kovsky)
Samsung: i900/i910 (Omnia) (delete the giisr.dll in the OEMXIPKernel folder or the ROM won't boot)
Asus: P565 (XDA Zest) (even thought not officially on the list the kitchen can import the NB0 ROM extracted from the ABI file with p835abisplit2)
Other devices, with caveats: as long as you have tools to convert between NB and your phone format the kitchen should work fine unless platformrebuilder doesn't support your device (I.E. it crashes). If platformrebuilder DOES NOT support your device you can still put a dummy NK.exe from another device to stop platformrebuilder from crashing (be sure the NK version (6.1/6.5) is the same) and insert your own crafted XIP.bin (there's a setting in Advanced Tweaks to use a custom xip file).
Download link
(First time using osKitchen? Read the brief tutorial in the 2nd post)
v1.33.5 All in one package:
http://forum.xda-developers.com/attachment.php?attachmentid=423263&stc=1&d=1287585346
DISCLAIMER: This software is provided "as is" and I don't take any responsibility for any damage caused to phones or anything else. I added all sorts of integrity checks I could think of to prevent the generation of invalid ROM files and so far none of the thousands of users who downloaded the kitchen reported invalid ROM files but just like when flashing any cooked ROM don't forget that there is always the risk that the phone may end up bricked (due to defective usb controllers, defective cables, defective phone memory, wrong radio file, software interfering with the flashing tools, power outages, etc).
System requirements
Microsoft .NET 2.0 (.NET 3.0 and 3.5 are 2.0 based so those work as well), already preinstalled on most computers, the kitchen won't start without it so it's easy to find out if it's missing
The following three system requirements also are preinstalled on most computers; the kitchen will warn you if they are needed so don't worry installing them unless required:
Microsoft Visual Studio 2008 runtime, required by xidump during the importing process
Visual Studio 2003 (7.1) Runtime Libraries, required by platformrebuilder to solve the "cereg400.dll cannot be loaded" error message, required by XIDump to solve the "Failed to init decompression!" error message and required by IMGFSFromDump to solve the "Unable to load compression DLL!" error message. Copy those libraries in the Resources\Tools folder and if that still doesn't work in the system32 subfolder of your windows folder (the right subfolder for 64bit systems is syswow64)
XmlLite Update Package required to solve the "Unable to load LibNB.dll" errors (only for Windows XP SP2)
Changelog from v1.33.4 to v1.33.5
Fixed os.nb file deletion issue for devices with no sectorinfo
Changelog from v1.33.3 to v1.33.4
Fixed delete shadow order entries not being saved
Implemented internal manifest management to reduce disk overhead during package scanning
Implemented detection of registry values that are found without a preceding registry key specifier
Improved file copy and file deleting speed
Changelog from v1.33 to v1.33.3
Fixed issue with packages with duplicate files causing errors in the package installer
Fixed issues on CAB files with "\." InstallPath attribute
Un-tied Calibration Data and Skip Welcome screen settings
Fixed IMGFS cache not being applied correctly
Fixed issues when installing packages registry files containing multi_sz strings with the package installer
Fixed new packages sorting issue
Changelog from v1.32 to v1.33
Fixed issue when using a drive root directory as temp folder
Fixed a localization manager issue that was causing longer startup times
Fixed some issues in CAB file folder mapping
Fixed the kitchen truncating i780/i900 BIN files
Added error messages when the DPI or MUI settings are missing on the phone
The kitchen now allows importing ROMs even when the language folder is missing (multilanguage Samsung ROMs)
Added a warning when the initflashfiles/app.dat files are not Unicode
The kitchen now reads app.dat as ASCII when Unicode characters are not detected
Fixed issue in which the initflashfiles.dat file was left locked for a few seconds during the import process prompting a retry/cancel file operation
Added detection and parsing of DPI_ EXT subpackages
Changelog from v1.31 to v1.32
Implemented total integrity check that checks all the structure of packages, modules and every single line of initflashfiles/registry files for issues. All the issues within the package will be shown next to the package name in the packages list.
Added support for variables in initflashfiles.dat, app.dat to make localization easier (because the variables will be replaced with the correct localized folder when the ROM is built). The list of supported variables can be found in the FAQ of the official osKitchen thread.
Added “RAM Drive Mode” setting to have additional cleanups performed during the build process to reduce the space usage of the temporary folder
Fixed crash when trying to open a search result file that has a defective associated application
Implemented total integrity system: every package, DSM, module and initflashfiles file will be validated for integrity and all the problems detected will be shown with an error/warning icon on the left of the package
When importing a ROM the initflashfile values are saved with the converted hexadecimal values like the generated app.dat files
When importing a ROM the progress bar will now warn of temporary folder cleanup even when the import has failed
Removed the unnecessary PackagePath attribute from the project files
Fixed the kitchen crashing when the resources folder was missing or the command line parameters were wrong
Renamed universal package converter to universal package importer
Fixed LCID validation not checking the LCID length correctly
Fixed the pagepool size patching message reporting unlimited instead of the real size
In-line comments are now maintained when the initflashfiles is split during the ROM import
When importing a ROM the initflashfiles lines that are not valid will now be commented out
Removed the %LCID% variable as alternative to %ROM_LCID% in the ROM filename
The ROM filename variables replacement is now case-insensitive and the value of the variables has any non-filename friendly characters removed
Remove Uniscribe/Transcriber mutual exclusion warning
Improved error handling during the NBH generation process
Fixed error message during build when packages contain more than one RGU file
Fixed some registry entries being unrecognized when tabs were used for spacing
Fixed the recmod messagebox appearing twice when the device is selected and no is chosen as answer
Fixed the windows mobile build importer not deleting the imageinfo.txt files in modules
Implemented a rudimentary “Install Package on device” function that allows installing a package on the device to avoid having to flash the phone for every changed file. Currently only sends the main package (no LCID/res subpackages), doesn’t apply registry entries and applies initflashfiles entries with no variables replacement.
Fixed the kitchen crashing when the packages contained corrupted DSM files
Fixed WinCENLS_Lang_RTL_0401 detected as having the wrong syntax
Fixed error messages saying that the packages had a wrong syntax on _CS packages
Fixed Danish appearing as “da-dk” and “Portuguese” listed as “Portugese”
Fixed the locale listview showing the LCID in the country code column
Now the locale combobox shows the locale name and country instead of just the LCID
Implemented automatic Unicode detection in initflashfiles.dat files
Fixed the file copy operations continuing even after the non-resumable error message
Fixed package validation not working in the universal package importer/windows mobile build importer
Added an “Expand all” context menu entry for search results
Added warning when wince.nls ends up in both XIP and IMGFS partitions
The packages issues are now listed by subpackage
The “Install Package on Device” function now also includes the subpackages, the settings to compile the packages are extracted from the phone itself and all registry values except multistring/binary are added
Removed missing DSM warnings
Implemented binary entries support in the “Install Package on Device” function and fixed temporary folder issues
Fixed duplicate DSM creation in package properties and reduced the wait before the packageproperties form is shown
Fixed error message when loading old kitchen project files
Added support for REG_NONE registry keys
The kitchen GUI is now shown before the project files or imported ROM informations are automatically loaded
Fixed the new DSMs file for SYS/OEM packages being saved with a Guid different from the registry key one
Added support for REG_MULTI_SZ on “Install package on device”
Fixed the kitchen leaving old combo box values when loading projects referencing non-existing devices, profiles or windows mobile builds
Search now removes unnecessary wildcard characters from the search string when wildcard mode is enabled to improve search speed
Renamed “Empty project” to “New project”
Fixed crashes in “Install package to device” with some SYS/OEM packages
Implemented integrity check support for boot_ms.rgu and boot.rgu files
Removed TGTool from the kitchen archive
Disabled F5 refresh during ROM generation
Implemented path variables support in the “Install package on device” function (note: the WM build on the phone must be present in the kitchen and have the build number as folder name for the localization to work)
Fixed issue with "Install package on device" function and short filenames and multiple initflashfiles files
Halved the time required for project loading and packages list refreshing
Implemented IMGFS support for unicode characters
Implemented CE variables support in “Install package to device” function
Added HTC Oboe to the devices list
The sort column order is now reapplied after loading a project instead of defaulting to sorting by name
Fixes some issues with empty DSM files
Fixed crash when using unicode package names
Added check to prevent boot.rgu and boot_ms.rgu from being present in non-XIPKernel packages
Fixed the locales combo box not being refreshed after a new ROM has been imported
Fixed issue in which the kitchen would save a DSM file with random name instead of overwriting the correct DSM file if the source DSM file was corrupted
Implemented case insensitive manila.exe/mode9 CFC patch
Completed translation entries list for ROM importer
Added tools error handling in UPX/Recmod/PNG Compression/xidump/nbimagetool/TGTool/o2Util/ImgfsFromDump/OsNbTool/Platformrebuilder
Fixed erroneous error handling in imgfsfromdump that was causing file copy error messages if the tool failed
Fixed reduced OS file generation ignoring imgfsfromdump error messages
Fixed TSW/MST management not checking that the output file was correctly created
Fixed the kitchen ignoring missing custom user tools error messages and continuing the build process
Initflashfiles parsing now parses files as UTF8 when the UTF16 BOM header is not detected
The registry file validation now checks if the REGEDIT4 header is present
Fixed the locales selection combobox not detecting new language changes during refresh
Fixed “Install to device” function copying square resolution packages for some resolutions
Fixed LCID EXT packages lacking the RGU file not being moved into the correct main package folder
Fixed registry validation generating errors about dwords where values have initial spacing/tabulation
Added translation entries for the module validation messages
The kitchen now reads partitions informations from the OS.NB file and calls osnbtool with the proper partition numbers (to support older ROMs without ULDR)
The kitchen can now extract BIN files from more updaters (Samsung i780 and others)
Added translation entries for OS.NB generation error management
Added translation entries for the registry validation error messages
Improved error messages (added categories) on the error tooltips
Added translation entries for the package validation error messages
Added translation entries for the initflashfiles validation error messages
Added translation entries for the manifest validation error messages
Added initflashfiles variables for Application Data (%CE19%) and Program Files\Games (%CE8%)
The initflashfiles entries of imported CAB files are now mapped to the correct initflashfiles variables
How to use
Once unpacked the kitchen is ready for use, as soon as you start it you will be asked to import data from a stock ROM.
Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Tree Structure
The new kitchen structure is very simple however it requires a ROM to be imported for device configuration files to be generated. Always import a ROM for your device and start working on it.
Output - Where generated roms are saved
Projects - Where the project files are saved
Resources - Tools and other internal kitchen files, shouldn't be touched!
Sources - Contains all the files of your Windows Mobile builds and Devices
Devices
#DEVICE NAME# (You can use the name "Common" to share packages between multiple devices)
EXT Packages - All the EXT packages must go here
OEM Packages - All the OEM packages must go here
Profiles
#Device Profile Name# - Contains the "Device Informations.XML" file and all the various packages required for building the ROM
NBH Structure - Contains files required by the kitchen to rebuild the NBH correctly
OEMXIPKernel - The OEMXIPKernel with all the device drivers and native kernel must go here
NB Structure - Contains files required by the kitchen to rebuild the Os.NB correctly
ROM Parts - .ROM, .VM, imgfs-template.bin, romhdr.bin and other files needed for relocation and XIP/IMGS generation must go here
Windows Mobile Builds
#Windows Mobile Build Number#
All - The language-neutral DPI and Resolution files must go here
Common - All the language-neutral Main Packages must go here
#LCID FOLDER# - All the localized packages must go in the appropriate LCID folder
Additional files
Visual Studio 2003 (7.1) Runtime Libraries, needed to solve the cereg400.dll cannot be loaded issue: http://www.mediafire.com/?mjmmgtwmion
ImplantXIP and ImgfsToNB tools, needed for the alternative building method: http://forum.xda-developers.com/attachment.php?attachmentid=374999&stc=1&d=1281153923
Using OsKitchen Zero
What you need to know first
The first thing you need to know is that Windows Mobile is not like a desktop operating system: you can't take a ROM from another phone and flash it on a different phone model because Windows Mobile relies on an extremely specific kernel and drivers that are compiled by the manufacturer for each device model. The Windows Mobile ROM contains only the Windows folder - yes, that's right, the ROM is just the plain Windows folder with NO subfolders - while every other folder (Windows\Start Menu, Program Files, My Documents and also Start Menu links etc.) is generated when the ROM boots the first time.
Every official Windows Mobile ROM is composed of packages. Microsoft and device makers create those packages to split windows mobile and the additional software into separated components. The real "Windows Mobile" code, interchangeable between phones, is stored in packages commonly called SYS packages, while everything the manufacturer added (the drivers and the additional applications for customization) are called the OEM packages. The EXT packages are "fake" packages that the kitchen uses to overcome the limitations of standard packages (for example EXT packages are often used to build multilanguage packages without having to create a single additional package for each language).
The Windows Mobile package structure is very simple. SYS and OEM packages are identical in structure and can only contain:
A DSM file (a file that contains some package informations, for example what other packages it require or what files it contains, most kitchens usually ignore this)
A RGU file (a registry file containing the registry entries associated with the packages)
Other files or modules that compose the package: the modules are folders that usually have file-like names (meaning they have an extension) and are a different way to store executable and DLL files on the ROM.
Note: A SYS/OEM package cannot have any subdirectory with the exception of modules directories.
EXT packages - that as already said are "fake" packages that are converted to the Windows Mobile package format by the kitchen - have a different layout: everything goes into a "files" folder except the registry files (app.reg), dsm files, initflashfiles entry files (.dat) and there can be subfolders with a LCID (language-ID) code as name (a LCID is a string composed of four HEXadecimal numbers identifying a language, e.g. 0409 for US English, 040C for Spanish, etc.) to store language-specific files in the same structure (.dsm and .reg in another "files" subfolder, like for the main folder).
EXT packages are the main way custom packages or packages from other devices are distributed on websites and forums. Recent HTC ROMs contains additional informations that allow kitchens to automatically convert OEM packages to the more user-friendly EXT packages: this allows to quickly remove applications just by disabling the package; other ROMs instead have everything stored in a single package (usually OEMMisc) and require more work to remove original applications.
The only important thing you still need to know is how the rest of the filesystem structure (Program Files, My Documents, Start Menu, etc.) is created during the first boot. All the system folders are generated and populated during the first boot because, as wrote before, the ROM contains only the Windows folder. Windows Mobile has two facilities for the first-boot (hard-reset) initialization: INITFLASHFILES.DAT, a text file that is usually in the OEM_Lang folder and that only allows creating folders and copying files (Documents folders, default pictures, and most start menu entries are usually added this way) and .PROVXML files that are some XML files that can do other advanced operations (like setting registry keys, certificates, phone settings).
Usually anything you can perform with PROVXML files, that unfortunately are difficult to edit and require a large knowledge of the format, can also be easily performed using initflashfiles and registry files. You can use the app.dat and app.reg files inside EXT packages (or initflashfiles.txt and RGU files in OEM packages) to add entries to both the initflashfiles file and to the registry: the kitchen will use them properly during the building process adding the app.dat entries to initflashfiles.txt and the reg entries to the final registry (the ROM boots with a precompiled registry HV file but you'll usually never have to mess with that when using a kitchen).
Manufacturers also use some advanced proprietary post-install tools to install custom cabs, apply themes and operator configurations (e.g. AutoRun, RunCC). Those rely on TXT configuration (*config.txt) files and can cause trouble (error messages about missing files during the first boot) when removing packages or files from packages that those config file point to if you don't update them.
When you want to upgrade a Windows Mobile Build the changes in the start menu are usually so many that it's REALLY recommended to start over with a new fresh initflashfiles.txt for that windows mobile build (you can find one for each language in the Da_G's rollup threads). Since in the official ROMs the start menu entries are all crammed into the initflashfiles.txt file (the app.dat exists only in the "fake" EXT packages) you will have to either take the time to create app.dat files for each package or to copy back all the initflashfiles entries for OEM/EXT applications back after you put the new initflashfiles for the windows mobile build you changed. The kitchen will try to move the config.txt and initflashfiles entries inside the correct packages while the ROM is imported to make SYS upgrades easier.
Now that you know the basics you can proceed to the first step...
Preparing the kitchen (Importing the Device ROM file)
1. Download osKitchen Zero and unpack the ZIP archive
2. Find a ROM update file for your device: the kitchen can import the EXE from all HTC and some Samsung updaters or alternatively the raw ROM file (the main used extensions: .NBH,.BIN and .NB are supported)
3. Open osKitchen Zero and the Import ROM Wizard will open
4. Select the device you want to work on from the drop-down list, you can actually write any device name because the list is just for reference to make sure people understand that the kitchen has been tested only with those devices
5. Select the ROM update file
6. Click NEXT
Building your first ROM to make sure everything works
At this point the main kitchen window will open. Since you imported a ROM all the "Project Settings" options will only have one choice, go on and select the only available choice for all the fields (device model, device profile, windows mobile build, language) and clicking Yes in case the kitchen asks you to automatically apply recommended changes should be enough to build a bootable and working ROM. The only setting that has more than one choice is the Compression setting that if you want to have the most available space to add your programs should be set to "LZX", if you want to use another compression first make sure that your phone will be able to flash a bigger ROM file.
Now you can go ahead and build your first ROM by clicking the "Start building button": the kitchen will work for a while, then tell you that the building process has been completed and ask you if you want to open the Output ROM folder; you can then answer yes, take the ROM file that has been generated and flash it, making sure it's the right format for your phone.
NOTE: don't try importing a ROM made for other phones different than the one you want to flash because the kitchen will rebuild the ROM for the device you imported and not any other. If you flash a ROM made for another device you risk bricking your device.
Once the ROM works (if it's a supported device it should work fine on the first try, if it doesn't please report the issue here so we can help fixing it) you can start working on the ROM. So that's it, you're ready to go. If you read the "What you need to know first" you will probably already have an idea of where to start for whatever change you want to do.
Moving from Ervius Visual Kitchen to osKitchen
Open osKitchen and import the latest ROM for your device
Replace the OEM packages
Locate the folder oskitchen created in your device (it's in the Sources folder) and delete all the packages in the "OEM Packages" folder
Open the OEM folder in the Ervius Kitchen folder, locate the folder of your device and copy&paste all the OEM packages that are inside the Common and the LCID folder (0409 for english, etc.) into a folder with any name you want inside the osKitchen "OEM Packages" folder (where you deleted them). The .VM folder can be ignored.
Replace the EXT packages
Locate the folder oskitchen created in your device (it's in the Sources folder) and delete all the packages in the "EXT Packages" folder
Open the EXT folder in the Ervius Kitchen folder, locate the folder of your device and copy&paste all the folders that are inside the Common (usually empty) and the Windows Mobile Build subfolder (it's a 5-digit number) in the osKitchen "EXT Packages" folder (where you deleted them).
Replace the OEMXIPKernel
Locate the folder oskitchen created in your device (it's in the Sources folder), go in the Profiles subfolder and then in its "default" subfolder, you'll find a folder named OEMXIPKernel, delete it.
Open the ROM folder in the Ervius Kitchen folder, locate the folder of your device, open the Windows Mobile Build subfolder (it's a 5-digit number) and then copy the OEMXIPKernel folder in the osKitchen "Profile\default" subfolder (where you deleted it).
Import the Windows Mobile Build
Locate the oskitchen Sources folder, open the "Windows Mobile Builds" subfolde and delete any folder in there.
Create a new folder with the number of the windows mobile build present in ervius kitchen (5-digit number) and create three subfolders inside: Common, All and a LCID one for each language (0409 for english, etc)
Open the ROM folder in the Ervius Kitchen folder, locate the folder named "Shared", open its Windows Mobile Build subfolder (it's a 5-digit number) and copy the MSXIPKernel folder in the osKitchen Windows Mobile Build "Common" folder you created earlier.
Open the SYS folder in the Ervius Kitchen folder, locate the Windows Mobile Build subfolder (it's a 5-digit number) and proceed as following:
Everything in the "Common" subfolders of the folders that start with DPI_ goes in the "All" folder you created in the osKitchen Windows Mobile Build folder.
Everything in the LCID (0409 for english, etc) subfolders of the folders that start with DPI_ and of the SHARED folder goes in the LCID (0409 for english, etc) folder you created in the osKitchen Windows Mobile Build folder.
Everything in the "Common" subfolder of the "SHARED" folder goes in the "Common" folder you created in the osKitchen Windows Mobile Build folder.
Frequently Asked Questions
How do I share packages between devices?
Create a folder named "Common" inside the "Sources" folder and put your packages (grouped in folders like standard device packages) in the "EXT Packages" and "OEM Packages" folders
Why is the final ROM file bigger or the total and available storage space lower than when using another kitchen?
It shouldn't. The other kitchens probably come with LZX compression selected as default while instead you told osKitchen to use XPR or None compression. You can also save additional space by using the ImplantXIP building method that removes the ULDR and some other wasted space.
How do I speed up the ROM generation process?
The kitchen needs to copy a lot of data and this may be a problem on computers where the hard-drive performance is low (i.e. laptops); antiviruses, firewalls and other applications may also interfere with the process speed therefore it's suggested to keep them off while the building process to save time. The kitchen allows setting another drive as a temporary folder to speed up the ROM generation and you can use a RAM drive (if you have enough RAM) or another hard-drive to improve the process speed.
How do I translate the kitchen?
When you start the kitchen for the first time if a translation file isn't found it will be created in "Resources\Localization" with the name matching your locale code (en-US.lng for american english, fr-FR.lng for french, it-IT.lng for italian, etc.): open that file with a text editor and translate all the text that comes after the "|||" separator (the text on the left of the separator shouldn't be touched, it's used both for reference and to identify the lines by the kitchen). Remember to post on this thread the translated files if you want them included in the official releases.
How do I reduce the space used by "Temporary OS.nb"?
It's suggested not to because the file will be needed in the next kitchen versions with the internal libnb NB dumping engine that will analyze the file, generate a new OS Structure.xml and delete it for good. The kitchen creates its own reduced files and keeps them in the Cache folder: if you really want to reduce the space used by the kitchen you can take the reduced file and replace the Temporary OS.nb with it.
How do I upgrade from an older kitchen version?
Simply delete oskitchen.exe and the Resources folder from your previous kitchen folder and put the new ones included in the archive or just unpack the archive overwriting the files. If you were using a version previous to 1.26 you will have to reimport a ROM and replace the imported packages with old ones (SYS/OEM/EXT/OEMXIPKernel (with nk.exe added inside) and remember to look at how the packages are structured). If you upgrade from 1.30 or below to 1.31 you may have to move your OEM Packages in a group subfolder because now the OEM packages are grouped like the EXT packages.
What are the variables that are supported in app.dat/initflashfiles.dat? (works only with 1.32 and higher)
%SystemDrive% (/)
%MyDocuments% (/My Documents)
%MyDocuments-MyMusic% (/My Documents/My Music)
%MyDocuments-MyPictures% (/My Documents/My Pictures)
%MyDocuments-MyVideos% (/My Documents/My Videos)
%MyDocuments-Templates% (/My Documents/Templates)
%ProgramFiles% (/Program Files)
%Windows% (/Windows)
%Windows-Fonts% (/Windows/Fonts)
%Windows-StartUp% (/Windows/StartUp)
%Windows-StartMenu% (/Windows/Start Menu)
%Windows-StartMenu-Programs% (/Windows/Start Menu/Programs)
%Windows-StartMenu-Programs-Games% (/Windows/Start Menu/Programs/Games)
Useful Resources
Windows Mobile Builds
Da_G All-In-One Windows Mobile 6.5.x Builds (Strongly recommended, contains all languages and all resolutions needed for almost any device)
Latest SYSs and OEMs XDA thread (where all the latest SYS builds are posted)
Common EXT Packages
(if you have suggestions or know where to find newer versions please post them)
Latest Touch Pro 2 EXT Packages (English-only, WVGA only)
Coming soon...
Help wanted!
1. Kitchen translation
Translators for the kitchens are needed! The kitchen is now completely localizable and will generate a translation template in the Resources\Localization folder when it's started up the first time: that file can be easily edited to translate all the text of the kitchen (also include an about entry for credits) and the kitchen will validate it and keep it updated every time it's launched organizing the entries that are missing or not found. If somebody has some spare time to help me translate the kitchen in other languages please attach a translated lng file to a post so I can include it in the kitchen archive.
2. Informations about the WM6.5.X packages required for each language
In order to improve the automatic localized packages selection I need to know which of the following packages:
Code:
BronzeEA BronzeNonEA BronzeAH | CommonEA CommonNonEA | SYSTEM_DEFAULT_FONTS COMPLEXSCRIPT_FONTS | gb18030 | Riched20 Riched20_CS | SipAR | Transcriber UNISCRIBE | Webview Webview_CS
are needed for each of the following languages:
Code:
0402 BRG Bulgarian (Bulgary)
0404 CHT Chinese Traditional
0405 CSY Czech (Ceská republika)
0408 ELL Greek (Ellas)
0411 JPN Japanese
0412 KOR Korean
0415 PLK Polish (Polska)
0419 RUS Russian
041B SVK Slovak" (Slovensko)
041D SVD Swedish (Sverige)
041F TUR Turkish (Türkiye)
0424 SVN Slovenian (Slovenija)
0804 CHS Chinese Simplified
081A SPB Serbian (Latin)
If anybody knows the right packages needed for one (or hopefully more) of those languages please let me know.
nice thread but i think u should post new sys files..... iam not able to cook may be still my format is wrong so i wanted to take reference but its old further links are broken
jagan2 said:
nice thread but i think u should post new sys files..... iam not able to cook may be still my format is wrong so i wanted to take reference but its old further links are broken
Click to expand...
Click to collapse
I uploaded 28223 SYS/XIP files, if you want other builds tell me.
@AirXtreme The kitchen is great and I like it way better than Ervius' VK, but I do have some small questions though. Since the split from the original osKitchen things have been a little vague, this is what I understand of it.
OndraSter developed the kitchens core code and you developed the new gui. Both trees still exist and both trees are 'updated' to RC3, but the version number in the .exe still says RC2.7.
Second, what is the latest version? Would it be possible to include build date and changelog in the first post, so it's easy to follow the updates to the kitchen? I know it's a lot to ask, but it would help a lot.
For the rest, great kitchen!
airxtreme said:
I uploaded 28223 SYS/XIP files, if you want other builds tell me.
Click to expand...
Click to collapse
Upload 23529 and I'll give this kitchen a whirl
Cheers.
KilZone said:
@AirXtreme The kitchen is great and I like it way better than Ervius' VK, but I do have some small questions though. Since the split from the original osKitchen things have been a little vague, this is what I understand of it.
OndraSter developed the kitchens core code and you developed the new gui. Both trees still exist and both trees are 'updated' to RC3, but the version number in the .exe still says RC2.7.
Click to expand...
Click to collapse
It's because my sources are from 2.7 and didn't update the titlebar.
KilZone said:
Second, what is the latest version? Would it be possible to include build date and changelog in the first post, so it's easy to follow the updates to the kitchen? I know it's a lot to ask, but it would help a lot.
Click to expand...
Click to collapse
The last version is the one in the first post, when I'll release other updates I'll update the first post and add a changelog.
dickenz said:
Upload 23529 and I'll give this kitchen a whirl
Cheers.
Click to expand...
Click to collapse
It was already up but with the wrong name (28223), now names are fixed.
Awesome, thank you that clears it I guess. Just forgive my stupidity... Downloading the ... latest ... version now (and updating my current version).
airxtreme said:
The last version is the one in the first post, when I'll release other updates I'll update the first post and add a changelog.
Click to expand...
Click to collapse
@Airxtreme
The version in 1st post supports Iolite?
I didn't see it in supported devices list.
dancer_69 said:
@Airxtreme
The version in 1st post supports Iolite?
I didn't see it in supported devices list.
Click to expand...
Click to collapse
Yes, I think I added its device file.
I'll download now and test, thanks.
EDIT
I just checked and I allready have this version(Os kitchen 1.4 RC2.7)
and I have successfully build an nbh with this version, I just not flash it yet.
So, it's supported.
Okay,
I just download the New ATT Shipped ROM from HTC and I was going to give this kitchen a try.
I extracted the files from the shipped ROM.
When I started the kitchen, it asked me to point to the RUU file. I selected the RUU_signed.nbh that I had just extracted and I get the message "There was no os.nb present i this file! Can't continue"
What am I doing wrong?
rgb-rgb said:
Okay,
I just download the New ATT Shipped ROM from HTC and I was going to give this kitchen a try.
I extracted the files from the shipped ROM.
When I started the kitchen, it asked me to point to the RUU file. I selected the RUU_signed.nbh that I had just extracted and I get the message "There was no os.nb present i this file! Can't continue"
What am I doing wrong?
Click to expand...
Click to collapse
Give me the link to download the rom so I can try to see why no OS.nb is detected.
airxtreme said:
Give me the link to download the rom so I can try to see why no OS.nb is detected.
Click to expand...
Click to collapse
http://www.htc.com/us/support/tilt-2-att/downloads/
Third download on the list. Complete ROM
airxtreme said:
I uploaded 28223 SYS/XIP files, if you want other builds tell me.
Click to expand...
Click to collapse
Thankyou actually i wanted to test the sys xip provided by u coz whenever i try to sort sys and xip myself for oskitchen it crashes platformbuilder.exe so will try the one made for oskitchen.
But plz plz its too big file for me. I request you to upload build 23529 qvga lang 0409 only and specially on mediafire or any uploading site which supports parallel downloads. I will be waiting ....
jagan2 said:
Thankyou actually i wanted to test the sys xip provided by u coz whenever i try to sort sys and xip myself for oskitchen it crashes platformbuilder.exe so will try the one made for oskitchen.
But plz plz its too big file for me. I request you to upload build 23529 qvga lang 0409 only and specially on mediafire or any uploading site which supports parallel downloads. I will be waiting ....
Click to expand...
Click to collapse
http://www.mediafire.com/?zy0ejwmiwmy

Creating Kitchen from Dumped ROM

This started out as a pm between hilaireg and me. i'm reposting the conversation here in order to benefit the rest of Chef Central.
I have a NEON400 which has recently been SPLed...finally.
However, there are no ROMs out there for the device and one guy who tried failed miserably. Mostly due to the fact that he doesn't own a device and can't test it.
what I'm looking for is a tutorial or some way to turn the dumped OEM ROMs we have into usable clean ROMs or upgraded to 6.5. Obviously there is no way that you can help me without having a device but is there any generic tutorial out there so I can get started learning how to do this?
Thanks for your help if you can... I appreciate anything you can do for us lowly NEON400 users.
thanks!!!
FROM: hilaireg
I'm not sure as to how much help I can be; that said ...
1) NEON Specs
I had a look at the NEON specs on the WIKI to get an idea of what is possible with the device.
From the specs, the unit is 128MB of ROM which may necessitate RECMOD'ing of module in order to achieve a bootable ROM. SLOT0 is generally the issue with WinMO 6.1 as SLOT0 should remain free of modules for the final ROM compilation. Here's some supporting information on Virtual Memory that will better explain what I am referencing:
Virtual Memory as it applies to the Windows CE 5.2 Kernel
http://forum.xda-developers.com/showpost.php?p=4268137&postcount=2
2) ROM's
I haven't conducted a search to see if an update ROM has been released for the NEON (either through BELL or HTC); I'm going to describe two possible scenarios.
Scenario 1: No update ROM
The best approach here would be to determine how to dump the ROM from an existing device. Once a device is "dumped", the dumped content could serve as the starting point for building a custom ROM. Dumping a device ROM requires a few procedures ... I recommend a forum search with these keywords:
dump device rom
The threads that will appear will not be NEON specific, you'll have a bit of reading on your hands, but may provide some insights at what may be required.
Scenario 2: Update ROM available via BELL/HTC
If an update ROM has been made available for download, it should be possible to perform a dump via a kitchen such as Ervius Visual Kitchen (EVK). Here's a link to a tutorial I put together that walks aspiring chefs through the process of dumping an official updated HTC ROM using EVK for the Raphael - but is essentially the same for any device. Once a ROM is dumped using EVK, this would serve as your starting point for building a custom ROM.
[TUT] Sous-Chef's Guide to XIP Porting in Ervius Visual Kitchen 9.7
http://forum.xda-developers.com/showthread.php?t=526610
3) Custom ROM
Once you have a starting point ROM, you can use it to create a net new kitchen. A net new kitchen could be a matter of copy/pasting the dumped kitchen from #2 (above). Things to keep in mind:
ROM: OEMXIPKernel is device specific and usually doesn't change until a NEON update ROM is release by BELL/HTC
ROM: MSXIPKernel is MS specific, this usually gets updated when a new O/S release is issued (ex: 6.1.21054, 6.1.21056, 6.5.23541, 6.5.23549, etc.)
OEM: this is device specific package which often are device drivers, carrier (operator) configuration, device functions, etc. and usually doesn't change until a NEON update ROM is release by BELL/HTC
SYS: this is MS specific and usually gets updated when a new O/S release is issued (ex: 6.1.21054, 6.1.21056, 6.5.23541, 6.5.23549, etc.) the MSXIPKernel & SYS should always match.
I would suggest starting with 6.1 and once you have a working build, you could look to move to 6.5. What's is important to keep in mind is:
you may need to RECMOD modules
closely review the .RGU (.REG), INITFLASHFILES.*, and .PROVXML files for any carrier (operator) specific lock downs
you will need to Cert Patch the ROM, possibly reduce the ULDR, possibly adjust the PagingPool - all selectable features in the newest version of EVK
Lastly, don't hesitate to ask questions in Chef Central ... some senior chefs may have some pointers that could help.
Chef Central: Windows Mobile/Windows Phone
http://forum.xda-developers.com/forumdisplay.php?f=612
HTH
OMG, this is so much info. you are awesome.
Okay...to get some stuff out of the way:
1.) No update ROM was ever released from Telus or Bell (the phone was released by both)
2.) the OEM ROMs have already been dumped.
1. you may need to RECMOD modules
2. closely review the .RGU (.REG), INITFLASHFILES.*, and .PROVXML files for any carrier (operator) specific lock downs
3. you will need to Cert Patch the ROM, possibly reduce the ULDR, possibly adjust the PagingPool - all selectable features in the newest version of EVK
Click to expand...
Click to collapse
This went entirely over my head.
RECMODding? How do I do this? It looks like No2Chem released some sort of EXE for this.
What am I looking for in the carrier specific files?
I don't think I can use EVK because I don't have an upgrade ROM, or can I?
FROM: hilaireg
Okay...to get some stuff out of the way:
1.) No update ROM was ever released from Telus or Bell (the phone was released by both)
2.) the OEM ROMs have already been dumped.
Click to expand...
Click to collapse
Haven't downloaded the file; ideally the download should either be an *.NBH or *.NB file. If it is, you should be able to use it in EVK.
The question to ask yourself is, has someone gone through the trouble of ... dumping the entire ROM from the phone? Or, only dumping the OEM portion?
If it's fully extracted, is there a ROM, SYS, OEM, (PACKAGES\EXT) folder structure? If so, then you should be able to use it in EVK. If there is a PACKAGES folder, they likely used the PkgBuildOS (oldstyle) kitchen to dump the ROM; Ervius released a tool to convert an oldstyle PACKAGES folder to a newstyle EXT folder.
1. you may need to RECMOD module.
Click to expand...
Click to collapse
Recoded Modules usually appear like this:
<filenameasfolder.dll>
imageinfo.txt
imageinfo.bin
S0001
S0002
S0003
...​
Included in the TOOLS folder of the EVK is a RECMOD.EXE, when you drag the <filenameasfolder.dll> folder (and contents) onto the EXE, it creates the compiled .DLL - ex: filenameasfolder.dll.
2. closely review the .RGU (.REG), INITFLASHFILES.*, and .PROVXML files for any carrier (operator) specific lock downs.
This went entirely over my head.
RECMODding? How do I do this? It looks like No2Chem released some sort of EXE for this.
What am I looking for in the carrier specific files?
Click to expand...
Click to collapse
Since WinCE is really a mobile version of Windows - being simplistic here - there are some things that are similar.
Registry changes are typically kept in .RGU/.REG files.
INITFLASHFILES.* are usually used for file copy operations on the device.
CONFIG_*.txt are usually used to launch .CAB files, copy operations, etc.
.PROVXML are usually used to configure MS and Carrier (Operator) specific settings. They can also be used for copy operations, registry changes, etc.
3. you will need to Cert Patch the ROM, possibly reduce the ULDR, possibly adjust the PagingPool - all selectable features in the newest version of EVK
Click to expand...
Click to collapse
As you are cooking a custom ROM, you need to disable the security certificate checking or the custom ROM may not boot. The reason for this is that MS/Carrier (Operator) don't want people doing what we're doing ... it's similar to HardSPL, it tells the device that "it's ok to use this ROM".
I don't think I can use EVK because I don't have an upgrade ROM, or can I?
Click to expand...
Click to collapse
Shouldn't be an issue. As long as you can obtain the ROM (OEMXIPKernel & MSXIPKernel), OEM, and SYS, you should be able to build a working custom ROM.
Have a look at my kitchen thread:
http://forum.xda-developers.com/showthread.php?t=471288
Download the kitchen and have a look through it to get a sense of what the final product should look like. The change logs will give you a sense of what had to be removed/changed/added to produce a custom ROM.
And once again, don't hesitate to ask questions in Chef Central ... that's why it was created; to help aspiring chefs learn.
Cheers,
All right, I downloaded v1.8.1 of EVK and used it to load the dumped .NBH. This seemed to work flawlessly and I now have a folder called 'dump' that contains the following folders. (I manually entered the Device name NEON400 when EVK prompted for it):
EXT
MyTools
OEM
RELEASE_NEON400
ROM
SYS
Tools
I'm guessing I've successfully extracted the ROM image.
i would like, for ease and simplicity, to just make this into a clean 6.1 version. I don't REALLY want to tackle 6.5 quite yet.
Is there a simple way to clean out the garbage? How do I know what's what?
I really appreciate your help, you've gotten me this far. I hope you don't get too exasperated with my noobness.
88fingerslukee said:
All right, I downloaded v1.8.1 of EVK and used it to load the dumped .NBH. This seemed to work flawlessly and I now have a folder called 'dump' that contains the following folders. (I manually entered the Device name NEON400 when EVK prompted for it):
EXT
MyTools
OEM
RELEASE_NEON400
ROM
SYS
Tools
I'm guessing I've successfully extracted the ROM image.
Click to expand...
Click to collapse
Looks like it; now take contents from the 'dump' folder and move it to the top of your kitchen folder. For example:
Move NEON400_Kitchen\dump to NEON400_Kitchen\ - Yes To All.
This was one of the steps in my Raphael Tutorial:
[TUT] Sous-Chef's Guide to XIP Porting in Ervius Visual Kitchen 9.7
http://forum.xda-developers.com/showthread.php?t=526610
Afterwards, make a copy of the kitchen as this copy ("backup") will serve as your source/baseline which you can always refer back against ... how you got started. You should never make changes to this copy; what I typically do is .RAR the copy and store it in a safe place along with the source file (ex: the download RRU from HTC, etc.)
i would like, for ease and simplicity, to just make this into a clean 6.1 version. I don't REALLY want to tackle 6.5 quite yet.
Is there a simple way to clean out the garbage? How do I know what's what?
I really appreciate your help, you've gotten me this far. I hope you don't get too exasperated with my noobness.
Click to expand...
Click to collapse
There's no quick or easy way; now comes the steep part of the climb.
If you haven't obtained a file comparison tool yet, that should be your next stop. You really should get a good one that allows binary comparisons and such ... I use BeyondCompare; it's not free but it's worth it. Once you obtain the file comparison tool, you can use it to compare an existing folder against another - such as comparing two kitchens. As an exercise, you could compare your kitchen against my last Raphael kitchen to give you an idea as to areas typically require additions/removals/changes.
WinMO6.1.21056 Raphael Kitchen
http://forum.xda-developers.com/showthread.php?t=471288
Also download the .TXT files attached to the kitchen thread as I noted all of the edits I made to the OEM, SYS, and ROM folders in those files. Examine those areas of your kitchen. Pay special attention to operator packages, '.PROVXML', and 'CONFIG_' files in the OEM folder. This is where you will usually where you will find many Carrier/Operator specific changes or lockdowns. I usually move most of this content to a 'profile' package in the EXT folder; I never use the profile directly, I copy/paste the to a 'custom profile' and use the custom profile ... this way, I can eliminate underised "Carrier/Operator" features and only apply those features that are absolutely necessary. Additionally, extra components (themes, cabs, etc.) are often installed via a series 'CONFIG_' packages; these will likely require alteration.
A few last things to remember along this part of the climb ...
stop for breaks
drink lots of coffee
have fun
and don't forget to yodel
may i ask a small Q....regardingthe OEM....
if i want to put an app in my cooke ROM i know that i can covert the app from cab--to---ext..however i can do cab--to--OME and OEM --to-- EXT...what are the different and which is better ??? really need help to understnad this
An OEM package is essentially a kitchen package. The term OEM came about partly because the ROM extraction tools - essentially, the tools extract the content of an OEM .NBH/.NB file. An OEM package usually consists of files, files as modules, <guid>.dsm, <guid>.rgu, shortcuts, *.provxml, *.txt, and *.dat.
When chefs refer to OEM packages, they are generally speaking about the folders that appear in .\OEM, .\SYS, and the .\PACKAGES (or .\EXT) folder. Here is some background for Ervius Package Builder (PkgBuildOS) & Ervius Visual Kitchen (EVK).
PkgToolsBuildOS
In the older PkgBuildOS kitchen, the OEM package had a relatively flat structure. Most OEM packages were prefixed with 'PACKAGE_' - chefs would see these folders in .\OEM and .\SYS. It was also preferable to move such folders into a '.\PACKAGES' folder structure making it easier to choose which packages to include during the ROM compilation. Ideally, chefs would only keep essential (critical) packages in the .\OEM and .\SYS. The structure of the OEM package would look similar to the following:
Code:
[B][COLOR="Blue"]<PACKAGE_oem_packagename>[/COLOR][/B]
[INDENT]<guid1>.rgu [COLOR="Purple"][I](<guid1>.rgu + <guid2>.rgu)[/I][/COLOR]
<guid1>.dsm
[COLOR="Purple"]<guid2>.dsm [I](removed)[/I][/COLOR]
files
*.provxml
shortcuts
*.txt
*.dat
option.xml
[B][COLOR="Blue"]<modulefoldername>.[[COLOR="Green"]ext[/COLOR]][/COLOR][/B] ([COLOR="green"][B]ext [/B][/COLOR]= dll, cpl, ocx, etc.)
[INDENT]imageinfo.bin
imageinfo.txt
S0001
S0002
S0003
...
[/INDENT]
[/INDENT]
Visual Kitchen
When Ervius created the Visual Kitchen, he also created a tool to convert old PkgBuildOS OEM packages into the new kitchen format. During the conversion process, the tool would read the .DSM filename information and rename the folder accordingly - sometimes a folder would be prefixed with 'PACKAGE_' and in other cases not; it depended on the internal .DSM name. The new format of the package was such that it divided the language-specific files into a sub-folder within the EVK OEM package.
Additionally, the tool would copy the OEM packages to the .\EXT folder as once again, it is preferable to have OEM packages in the '.\EXT' folder structure as it makes it easier to choose which packages to include during the ROM compilation. Ideally, chefs would only keep essential (critical) packages in the .\OEM and .\SYS. The structure of the OEM package would look similar to the following:
Code:
[B][COLOR="blue"]<oem_packagename>[/COLOR][/B][INDENT]<guid>.rgu
<guid>.dsm
app.reg
app.dat
_skip
[B][COLOR="blue"]Files[/COLOR][/B][INDENT]*.provxml
shortcuts
*.txt
*.dat
[B][COLOR="Blue"]<modulefoldername>.[[COLOR="Green"]ext[/COLOR]][/COLOR][/B] ([B][COLOR="green"]ext [/COLOR][/B]= dll, cpl, ocx, etc.)[INDENT]imageinfo.bin
imageinfo.txt
S0001
S0002
S0003
...
[/INDENT]
[/INDENT]
[B][COLOR="red"]<LANG> [/COLOR] ([COLOR="red"][B]LANG[/B][/COLOR] = 0409, 040C, etc.)[/B][INDENT]<guid2>.rgu
<guid2>.dsm
app.reg
app.dat
_skip
[B][COLOR="blue"]Files[/COLOR][/B][INDENT]*.provxml
shortcuts
*.txt
*.dat
[B][COLOR="Blue"]<modulefoldername>.[[COLOR="Green"]ext[/COLOR]][/COLOR][/B] ([B][COLOR="green"]ext [/COLOR][/B]= dll, cpl, ocx, etc.)[INDENT]imageinfo.bin
imageinfo.txt
S0001
S0002
S0003
...
[/INDENT]
[/INDENT]
[/INDENT]
[/INDENT]
The tutorials I put together for the Visual Kitchen (EVK) and Package Builder (PkgToolsBuildOS) provide some additional details about the folder structure of the kitchen so I won't get into more details about it here.
HTH,
The guy who failed miserably to cook a wm 6.5 rom,ultimately cooked the first ever wm 6.5 rom for Neon 400
http://forum.xda-developers.com/showthread.php?t=650446
damn... nothing to say just.......
if this guy wants to learn how to cook for his device... just leave him to learn, BTW why you dont leave intact the rom links?

Categories

Resources