yashsingh1/xdaforums huggingface dataset:
[Windows Mobile] tobbbie:
You better start with a shipped ROM to get a clean start. You could later then pick pieces from other ROMs (depending on their protection).

It is sad to see that for the Windows Professional ROMs it has become a habit to make these "protected" - denying that exactly the absence of such protection and the packaging mechanisms has fostered the evolution of ROM cooking and finally such a tool as OS Builder.

Luckily for the Smartphone ROMs (Windows Standard) this has not been the case - due to missing tools that time and simple batch kitchen not supporting it. I guess that originally the "protection" came automatically as ROM space was limited and so by squeezing the bytes from the "useless" stuff has created it. If you are a real noob, then have a look in my post about "cooking for beginners", see my signature.
[Windows Mobile] ultrashot:
Damn, I agree.

In 99% of roms there is nothing to hide. WP7 is also hit by this problem - and that's even more funny.

OSB supports dumping of some funny imgfs protection methods, not all (we can support some more, of course, but that's not that important). All others are on author's conscience.
[Windows Mobile] dunkhy:
i would call this authorshipness trend a "donate syndrom" ... ;)

but what the point, when you officially stop your project, to keep it closed?

anyway, osbuilder looks great, i m gonna plundge inside (with my old kaiser, so that if i burn a phone, it wont be my everyday one ;) )
[Windows Mobile] Farmer Ted:
OS Builder is awesome; the number of tweaks you can experiment with are amazing. I just cook for myself, but I always cook unprotected roms so just in case I can dump my own rom is somehow my kitchen gets corrupted. I could save 3 or 4 MB of memory by deleting the dsm's and rgu's and the reloc sections, but I'd rather have the security of basically storing my entire kitchen in the rom images.
[Windows Mobile] tobbbie:
You can even have the packaging and OS Builder settings included in your ROM. The settings for this are not so obvious, something like "Include Settings in Dump" or so. Result is an own directory \Windows\OSB\ where the settings file and the kitchen.osb file are stored. So from that you can fully recover, except the not packaged ones - but for them you have at least the name in the settings file, to know what to seek for.
[Windows Mobile] Skyguar:
Well, after the voyages to other OS decided to come back to WM and to try OSbuilder. Seems it is very professional tool as I was working with OsKitchen :o. Succesfully converted my EXT packages to OEM, as a base took Ultrashot's kitchen and get stuck with a problem. How to add packages to the kitchen? Can't find the way... In Oskitchen it is simple - add in folder and press refresh. How to do that in OSBuilder? Sorry for a dump question :o. Any help is appreciated :o
[Windows Mobile] ultrashot:
Skyguar, I think that was written many times.

1) create a new folder

2) generate GUID and create *.rgu/*.dsm with its text representation (something like 3b0bfbab-c0d9-45e7-9dc8-ebc9fee52042.rgu and 3b0bfbab-c0d9-45e7-9dc8-ebc9fee52042.dsm)

3) add everything you want there.

4) <press F5 in kitchen>

5) go to "not sorted packages" list, find your package, right click, choose dsm editor. OSB will create a valid dsm for it

6) done.

P.S. don't forget to adjust packages.cif/sof (though, they get fulfilled during building too)
[Windows Mobile] tobbbie:
The "Not sorted packges list" is the one in the middle of the OSB window. Left you have your packages, right you have the output window - and in the middle you can optionally have the raw structure of the folders -> packages you have not put to the left side (with drag-and-drop). Use the button "Show/Hide other packages" in the toolbar.

It is crucial for OSB to find the <guid>.dsm file in the added folder, otherwise you will not see the package. It can be an empty file, but it must be there.

Have a look at the OSB Userguide - linked somewhere from the first post.

---------- Post added at 04:43 PM ---------- Previous post was at 04:39 PM ----------

Is there a way to get a fresh GUID within OSB? Have not seen that yet.
[Windows Mobile] Skyguar:
Thanks for the detailed explanation guys, the item 5 was not clear for me :D

Regards,
[Windows Mobile] djtonka:
I'm trying dump IMGFS.bin from lumia firmware and Osbuilder let me open and the file but when trying ectraxt swows an massage "MBR signature not found" any idea?
[Windows Mobile] ultrashot:
Are you using the latest version? Also why do you dump IMGFS.bin and not the biggest file (don't remember its name) renamed to *.nb?
[Windows Mobile] djtonka:
Yes, latest version. I cant see any *.nb files . I used

nb7Split.exe

to extract files from

boot.img
[Windows Mobile] Nixeus:
Hello my friends,

I just would like to know if you will release a new version with the new features for wm6.5 ?

Thanks a lot ;)
[Windows Mobile] AndrewSh:
Hey Nixeus!

Do you have any new ideas to improve the OS features? Did you already get maximum from WM? Me - not yet - still cooking WM :)

If yes - don't hesitate to publish :)
[Windows Mobile] tobbbie:
I would be happy with a bug-fix release of OSB, I miss no functionality.

Still relying on my Candy-bar Tornado oldtimer which does all I need.
[Windows Mobile] Nixeus:
Hello AndrewSh,

I ask this because a few weeks ago, i read that the OSBuilder team have found new wm6.5 optimizations like Quantum optimization,etc...
[Windows Mobile] Digistras:
Rebuilding a CUSTOM ROM's IMGFS and XIP using OsBuilder

Hi all,

1st of all, I really hope any kind souls out there is able to help me as I have been on this thing for weeks and have made very little progress on what I'm trying to achieve. Thanks in advance.

The ROM

I currently have a Custom ROM cooked by fatherjack360 for my HTC Mega. This ROM is a WM6.5.5 clean ROM which is what I really want as I would like to cook my own ROM and it would be best if I start from this clean ROM. The link reference to the ROM can be found from here:

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

The Problem

I downloaded the Custom ROM and ready to cook it but when I open the ROM using OsKitchen, I got the following error as show in the picture below:

Since it failed while extracting IMGFS and XIP partitions, I then started on a journey to find out what went wrong and find a fix for it. I even consulted the "grandmaster" named Google and found quite a few possible solutions which includes using NBHExtract.exe

http://xdaforums.com/showthread.php?t=289830&page=11

and ROM for dummies

http://wiki.allshadow.com/index.php/ROMs_For_Dummies:_Part_Two

I tried the ROM for dummies and encountered issues as seen in the screenshot below:

I then searched further and found this thread of OsBuilder. I downloaded OsBuilder and tried to extract the Custom ROM but still got errors. Screenshot as show:

The error message clearly states: The process cannot access the file D:\23541 op\Flasher\2.bin because it is used by another process.

I've checked and double checked that the file 2.bin is defenitely not in use at that time by any other process. Seriously, what is going on here?

My objective is very simple. I just want to:

1. Either build the IMGFS and/or XIP files from within the Custom ROM (which is highly unlikely)

OR

2. Re-build a totally new IMGFS and/or XIP

and then repack it with other parts of the Custom ROM to a new package and load it in OsKitchen to cook the new ROM that I want.

I been working on it for the past 2 weeks but I still can't achieve my objective. I would really appreciate if anyone out there could guide me (if possible step-by-step) on how can I re-pack the Custom ROM together with the IMGFS and/or XIP files please.

Please do help me as this is really getting frustrating. Many thanks in advance.

Cheers!!!

P.S: The manufacturer (HTC) do not have a official WM6.5.5 ROM for HTC Mega. This WM6.5.5 Clean Custom ROM is specially built by fatherjack360 for HTC Mega.
[Windows Mobile] tobbbie:
OS Builder can dump a ROM file (also .nbh) all by itself - did you try that? Just select upper right "Dump tool" - it should all be pretty obvious.

If it does not work the first time, try some more times. No clues why, but sometimes the dump does not work the first time.
[Windows Mobile] Digistras:
Hi,

I did dump the Custom ROM in OS Builder but encountered errors.

I will show the steps that I took below...

Extract Custom ROM using OS Builder:

Start OS Builder in Dump Tool Mode:

Selected ROM file to dump:

While OS Builder is dumping the ROM, it encountered errors:

I've dumped the CUstom ROM using OS Builder over and over again but still got the same error over and over again.

So what am I doing wrong here? Can anyone explain to me what is going on please? This is really confusing...
[Windows Mobile] Farmer Ted:
Is the rom you're trying to dump protected, or un-protected? If it's had .dsm's, .rgu's, and .reloc sections of modules removed, you won't be able to dump it with OS Builder. You may want to pm the person who cooked the rom, and ask if you can kindly have a copy of the kitchen, or have one posted.
[Windows Mobile] Digistras:
How can I know weather is protected or not? Anyway to find out?
[Windows Mobile] tobbbie:
When dumping the ROM, it seems that the partitions are correctly identified and output to disk. No matter which way you do that step - how big is that XIP (2.bin for OS Builder here) file on your disk?

Speculations:

you may have an Antivirus SW that blocks access to *.bin files: check if you can hex-read the output 2.bin file

The author of the ROM may have manipulated the partition table for the ROM. Not sure if this has adverse effects on the funciton of the ROM (I guess no), but it would prevent dumping the ROM easily. It has usually the ULDR, the XIP and the IMGFS (eventually EXT). When dumping the os.nb, which are the sizes of these?

For sure you do not come to the real dump part of the actions yet. The XIP dump creates the ROM directory, while the IMGFS dump creates the OEM and SYS (and XCONT for what cannot be put there).

If any of the usual protection schemes are in the ROM (Farmer Ted has mentioned a few) you will not be able to re-cook anyway. There are some ways around the missing packages (recently I saw a tool here to re-create the packages, but never tried it out) but you cannot work around the missing .reloc sections if it applies to ALL modules.

Get to the author - really the best solution. Give him the credits he deserves if you publish a ROM based on his - naturally. My ROMs have a credit list that goes back to actions of 2007 - however I cook for real old stuff :-)

Edit: Could you upload the .nbh somewhere (mediafire is a good place) - I could try to get it dumped and see what the problem is.
[Windows Mobile] Farmer Ted:
Look in the windows folder, and see if it has all the .dsm's and .rgu's. If there are only a couple of each, then they've been stripped out during the build, and you won't be able to recreate all of the packages in a dump.
[Windows Mobile] Digistras:
Thanks for your reply tobbbie

The 2.bin file is 3.75MB in size. Illustration as shown:

I used Xvi32 to to open 2.bin and was able to do so as shown below:

Not sure what you mean by ULDR. Maybe you can explain it? When dumping os.nb, the dump did not complete as it encountered errors about the 2.bin file being in use which is the same error that I posted in my earlier post. I only managed to see 2.bin and XIP.bin after the error came out and both are 3.75MB in size.

Uploaded to MediaFire. Link as below:

http://www.mediafire.com/?u23aalme711hbvu
[Windows Mobile] tobbbie:
Sizes look reasonable, it seems OSB is doing something on 2.bin to create xip.bin or vice-versa before dumping the content. Is there a difference between these two?

The ULDR is not required for any cooking actions and can be ignored or even minimized or deleted in a final build. It was planned as part of a FW Update process over the air - or later automatic push installations. Afaik this was never used, though.

I can look after the .nbh only later today.

Mind that before OSB there were dedicated tools for all the steps of action:

- decrypt the .nbh

- dissect the resulting .nb in its parts (ULDR, XIP, IMGFS, others)

- dump the XIP

- dump the IMGFS

- build the packages from the dumps

So if OSB does not get further at step 2 - why not try others? It will be much more difficult though to set up the right kitchen structure then and as a newcomer you will most probably fail in that attempt.

If you could stay within the OSB workflow you have a chance - otherwise, good luck!

To get some basic idea about cooking, look in my signature and follow the link to the Beginners guide :-)
[Windows Mobile] Digistras:
I'm not sure if there is any difference between 2.bin and XIP.bin but both file size are the same though.

Thanks for taking the time to help me look at the .nbh. Hopefully it can tell you something.

I did try OsKitchen before coming to OS Builder. I believe OsKitchen is going through the same process.

I've taken a look at the Beginners Guide and kind of understand the architecture but will still need to read up more. Thanks for the guide.
[Windows Mobile] tobbbie:
I had the same problems in dumping the .nbh with OSB. It seems that not all exceptions are caught the right way and the resulting error message is misleading. I have decomposed the .nbh with DaG's nbimagetool and then dumped the imgfs with OSB. The resulting content is (as expected) free of any packages so you cannot re-cook this.

Added: you can see this yourself with the ROM loaded as the windows directory had no *.dsm and *.rgu files.

I have not further done anything to the XIP. ULDR is already only a dummy one (124k).

Please contact the author of the ROM if he is willing to share the kitchen with you.
[Windows Mobile] Digistras:
Hey tobbbie

Thanks for helping me to confirm that the IMGFS is not able to be dumped.

I used ImgfsFromNb.exe to dump IMGFS and the generated output is 0 bytes.

How are the *.dsm and *.rgu files created?

Also, I saw this on your beginners guide:

"OEM parts stay usually unchanged through all cooking and porting activities, so that also means that a WM5 device will keep all the OEM parts even if the OS version is WM6.5. OEM parts are in both, the XIP (nk.exe and some OEM modules) and the IMGFS. You will especially not gain any advantage of the enhanced memory allocation scheme if your device does not have a native 6.5 kernel (nk.exe)."

Does it mean that I can just use the IMGFS and XIP of official ROM (WM 6.5) and use it on this cooked ROM (WM 6.5.5)?

I also saw this: http://xdaforums.com/showthread.php?t=320504&page=49

but I'm missing the buildos+packagetools2.0b1.exe (link dead) as it contains 319'880 buildos+package_tools-2.0b1.exe. Not sure if that method works though.

Do you happen to have it?
[Windows Mobile] tobbbie:
The are not created, they are there from the start. A package is defined by a set of files and related production configuration files - the dsm and rgu. The DSM (Device Side Manifest) are used to set properties of the files/modules when the IMGFS is constructed and the RGU (Registry Update) are used to update the registry with relevant settings. Each package has a unique GUID identifying it.

The DSM and RGU are not needed on the device but they are mandatory if you want to go back and re-cook. No way to recover this with a sane outlook to success. Hence stripping these in the cooking process "protects" the ROM.

This is the basic idea. You have the OEM parts of your device and replace the XIP and SYS with that of a "donor". It is however not simple copy as several hooks need to link together in the right way. OS Builder has dedicated supporting tools and procedures for XIP and SYS porting.

No, sorry.

Sad for you is that you cannot use the ROM in question as your base. If you want to start cooking, get your shipped ROM, dump it and try to re-cook it. If you get that mastered, then you can think of XIP and SYS porting.
[Windows Mobile] Digistras:
I've dump the .nbh using DaG's nbimagetool and then using the same tool to dump os.nb which then IMGFS can be seen and is 127MB in size.

Below are the steps that I have done:

1. Dumped .nbh using DaG's nbimagetool.

2. Used DaG's nbimagetool again to dump os.nb and imgfs.bin and xip.bin was extracted. File sizes are as shown:

3. Dump imgfs.bin using ImgfsToDump.exe (with cecompr_nt.dll). I followed the instructions and tools from http://wiki.allshadow.com/index.php/ROMs_For_Dummies:_Part_Two#Converting_to_ROM_dump

As you can see that after dumping the imgfs.bin, a dump folder and memory map is created.

So from here, is there anyway that I can package the dump folder to create a .nbh with the proper imgfs.bin and xip.bin so that OsKitchen is able to load? Not sure if I'm on to something here though.
[Windows Mobile] tobbbie:
Why do you want to continue here? The IMGFS (and the XIP most probably as well) does not have package information left. You cannot alter anything of the content in the way any kitchen works.

Stop with this protected ROM and pick up your actions with a shipped ROM where the packages are still intact or with a kitchen of that ROM where the packages are still there.

There is no magic or other tooling that will bring you back the packages. There is also no other kitchen that can do anything with this ROM.
[Windows Mobile] Digistras:
I'm not sure if I understand this correctly. By "Package Information", do u mean the *.dsm and *.rgu files?
[Windows Mobile] tobbbie:
Exactly - if they are not there then you cannot cook - so easy. Cooking is basically just a selected set of packages + some tweaks + some own packages if you are able to do that (not hard actually).

Get ahead of dumping a shipped ROM, then you see how that works.
[Windows Mobile] Digistras:
I have a shipped ROM that is on WM6.5 for HTC Mega that is with all the HTC packages and a cooked ROM that is on WM6.5.5 also for the HTC Mega but is a clean base ROM.

So from the shipped ROM of WM6.5, is there anyway I can upgrade it to WM6.5.5 from there?

If not, anyway I can build a WM6.5.5 with HTC Packages of the extracted WM6.5 shipped ROM?
[Windows Mobile] tobbbie:
You can re-combine packages from these sources - provided that the packages are there. Suggested sequence:

dump the shipped ROM

re-cook it without changing anything (this will be hard enough for a start). Only this way you can make sure that not something from the later SYS/XIP porting prevents your device from booting.

Kick out some OEM packages to get used to the cooking

dump the 6.5.5 ROM and make sure that it delivers also the package information

Port the XIP only and see if the build from 2/3.) still boots (6.5.5 XIP should be rather identical to 6.5)

Port the SYS

This looks easy but it will take you some weeks and a lot of reading around. I cannot continue to spoon-feed you with all such basic things of cooking - make some own experience now... and good luck doing so!
[Windows Mobile] Digistras:
This would require the *.dsm and *.rgu files right? So I can't use the ROM that I posted for you earlier?

There is a possibility that it might fail due to the difference in version? (WM6.5 vs WM6.5.5)
[Windows Mobile] AndrewSh:
I doubt that you will get bootable rom using 6.5.5 xip with 6.5 SYS and vice versa.

These two branches have different GWES, so coredll and other things might not fit.

I don't see any benefit using someone's custom rom as a source. The sequence of the activity is following:

1. Dump stock rom for your device

2. Download SYS & XIP archive from the builds thread.

3. Put XIP to DONOR folder of your kitchen (subfolder should be named as the build number - XXXXX)

4. Replace stock SYS from SYS folder to SYS/SYS_YYYYY (where YYYYY is a number of your stock build)

5. Put downloaded SYS to SYS/SYS_XXXXX folder

6. Adjust settings of OsBuilder - to port XIP etc.

7. Cook

It's a general tip. Without details.
[Windows Mobile] tobbbie:
Are you using a multi-build setup in your cooking? I tried to but it did not port the XIP correctly (despite all paths are setup correct) - it failed getting the OEM-XIP from the original ROM\XIP folder - is there a trick?

I used the Russian Multibuild manual (Google translated) and I am quite sure I did all as outlined there.

As I have my Tornado and Hurricane Kitchen all on WM6, WM61 and WM65, it would save some space (and effort) if I have the OEM parts identical - at least for the latter two where I have them truly identical.

Some parts are different in the OEM regarding the treatment of settings and the .xml panels on smartphone between WM6 and WM61 and up - is there an option to link such differences also the the branches of the Multibuild environment?

One caveat with XIP porting from donor is that the DSM compression settings are not used from the DONOR but the original - had reported this but nothing public has changed.
[Windows Mobile] Digistras:
Hi AndrewSh,

Thanks for the steps. I don't see any mentioning about the custom ROM that I have for WM6.5.5 in the steps. So are those steps only for WM 6.5 or using WM6.5 XIP and SYS porting over to WM6.5.5?
[Windows Mobile] AndrewSh:
Yes I use it multibuild. And also I used it multibuild for my old Asus P525 which is native WM6.0 device...

Normally I don't remember any tricks.... It always worked for me well.... And the biggest **** - I did not read the Russian manual (don't tell Barin - he will kill me) - I only often translated changelogs when Barin was busy...

So for my old Asus - I pointed to rebuild new XIP using OEMXIP from template and MSXIP from DONOR. For Leo - from packages in DONOR folder and packages in ROM/XIP folder.... Actually - w/o issues....

No, these steps are universal.

You take the latest STOCK rom for your device, dump it and use as OEM and XIP source.

Than you grab the any MS build archive (containing SYS and XIP packages) and create your kitchen.

No customs! Because normally customs are stripped and protected - you won't be able to correctly dump them.
[Windows Mobile] Digistras:
I have a custom ROM that is on WM6.5.5 for my HTC Mega and I'm able to dump the IMGFS.bin. Can I use the extracted contents and build my own custom ROM?

I also have the XIP.bin for the custom ROM.
[Windows Mobile] Digistras:
Any idea about the above?
[Windows Mobile] Digistras:
Anyone got any idea?
[Windows Mobile] AndrewSh:
Should I write the things for the third time?

YOU CAN NOT USE CUSTOM AS A SOURCE. YOU HAVE TO USE STOCK ROM AS A SOURCE OF XIP AND OEM AND SYS FROM MS.

Customs usually have stripped dsm files and merged packages in structure. Also it's possible that the reloc sections of modules had been deleted.....
[Windows Mobile] Digistras:
Alright noted.

So if I use a stock ROM that is on WM6.5 as a source:

1. Can I build a WM6.5.5 using the stock ROM as a base?

2. If I have a custom ROM that is on WM6.5.5, can I use the stock ROM (WM6.5) XIP, OEM and SYS and port it over to WM6.5.5?
[Windows Mobile] Digistras:
Any advice pls?
[Windows Mobile] tobbbie:
You will not get any more advice if you are not actually start DOING anything. Stop asking about "what if" and just try yourself. Learning is about doing - if you skip that you will never get a ROM.

You have been told several times what works and what does not, so read the recent posts and start acting. There are also many other sources in the forums here, so read, please and act, then re-read and re-do then repeat and again and try something else, learning by doing is the key.

Cooking is about understanding how the system works and then use the tools to use that system yourself. If you do not understand how it works you will not succeed just by asking "which button to push".
[Windows Mobile] HD2Owner:
thanks tobbbie.. you are absolutely right..... :D

noone becomes a chef over night...
[Windows Mobile] tobbbie:
Wake up - new version available in the first posts - see topic title.