yashsingh1/xdaforums huggingface dataset:
[Windows Mobile] hilaireg:
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://xdaforums.com/showthread.php?t=521632
[Windows Mobile] hilaireg:
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://xdaforums.com/showthread.php?t=521632
[Windows Mobile] hilaireg:
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
[Windows Mobile] hilaireg:
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
[Windows Mobile] hilaireg:
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://xdaforums.com/showthread.php?t=521632
[Windows Mobile] hilaireg:
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.
[Windows Mobile] hilaireg:
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.
[Windows Mobile] hilaireg:
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.
[Windows Mobile] hilaireg:
13/02/2010: Tutorial Statistics

Views: 6,284

Guide Downloads: 261

Kitchen Downloads: N/A
[Windows Mobile] rling:
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?
[Windows Mobile] hilaireg:
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.

:)

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://xdaforums.com/showthread.php?t=366333

[UC] XDA_UC, Looking for Experienced Cooks to test New XDA UC.

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

:cool:
[Windows Mobile] d_train:
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
[Windows Mobile] B4PJS:
Use these tools, Readme in the file

http://xda.b4pjs.co.uk/Kitchen Convertor.zip
[Windows Mobile] d_train:
thanks for that
[Windows Mobile] smotrs:
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?
[Windows Mobile] hilaireg:
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,
[HTC Excalibur] Cyclonezephyrxz7:
Hey, i am setting my phone up for usage of GPS Mapping.

I am using VirtualGPS to get my Coordinates (with cell phone antennas), and I can export those coordinates through a COM port as if a GPS were sending the figures...

Now all I need is a "GPS Mapping" program (if those are the right terms) that will recieve these coordinates (i can define the COM Port to use) and it will have preloaded maps to give me a point of where I am...Anyone know any good ones?
[HTC Excalibur] Bupahs:
Route 66 is one of my favorites.. MapQuest Nav is my preferred GPS program
[HTC Excalibur] phatmanxxl:
Garmin Moble XT is awsome, you dont need data to use it, but it does require a BT GPS reciever. PM me for the link if your interested.
[Touch Diamond2, Pure ROM Development] l3v5y:
Old builds:

21051/21051
Everything is stock Topaz, apart from:
SYS/XIP updated to 21051
OEMDrivers has been SpinLock patched
gxdma has been updated
NetCF 3.7 as standard
Some things UPXed a little.

[B]Downloads:[/B]
[url=http://rocknrollcoffeehouse.com/l3v5y/l3v5y_TOPAZ_14_06_09_01.7z]download[/url] Hosting is thanks to shadowline. :)
[url=http://xdadev.f1ip.net/index.php?dir=Topaz/Roms/l3v5y/]Mirror[/url] thanks to f1ip
[Touch Diamond2, Pure ROM Development] l3v5y:
And this one too.
[Touch Diamond2, Pure ROM Development] l3v5y:
Released now...
[Touch Diamond2, Pure ROM Development] jlp_svk:
can someone reupload to RS.COM ir something??? the download in the first post is terrible slow.... :(
[Touch Diamond2, Pure ROM Development] Thewizzz:
Hi there,

Read in another post that there's a fixed .Net 3.7

Thanks to Shadowline. Hope I can post the link here: DotNet 3.7 Fixed
[Touch Diamond2, Pure ROM Development] l3v5y:
I have already tried that. As a cab it's fine, when cooked in things start to break.
[Touch Diamond2, Pure ROM Development] Thewizzz:
Will it use dotnet 3.7 as soon as you install it after rom upgrade and then reboot? Or do you have to change settings for it to use 3.7?
[Touch Diamond2, Pure ROM Development] obsydian:
Download links

Are so slow :eek:
[Touch Diamond2, Pure ROM Development] l3v5y:
It should work as a cab. You almost certainly will need to reboot, but other than that, things should be fine.
[Touch Diamond2, Pure ROM Development] l3v5y:
I'll upload a mirror to rapidshare now.
[Touch Diamond2, Pure ROM Development] l3v5y:
New build:

http://rs723.rapidshare.com/files/245247384/l3v5y_TOPAZ_6.1_16060902.nbh.7z

Changes:

CFC Compressed Manila

CommManager replaced with older build to fix WiFi
[Touch Diamond2, Pure ROM Development] mma123:
Hi l3v5y:

Thanks for the ROM. Do you mind posting the kitchen for this ROM?

TIA.
[G1 Android Development] shafty023:
WOW OK SO I FINALLY GOT LED's WORKING IN HERO!!!

This means they can be manipulated via Terminal but not the Android OS. That will be the next step.

*IMPORTANT 4:50pm CST*

-Correction, you should be copying/symlinking sensors.msm7k.so to sensors.trout.so and not sensors.hero.so to sensors.trout.so. Please see updated instructions below.

If you already copied sensors.hero.so to sensors.trout.so then do the following to fix it. Following the previous instructions could affect auto rotate

rm /system/lib/hw/sensors.trout.so
ln -s /system/lib/hw/sensors.msm7k /system/lib/hw/sensors.trout.so

*Update 4:44pm CST*

-Changed copy commands to symlink so we save space on /system. Thanks for the tip chunga

*Update 6:01pm CST*

-If you're getting an issue where auto-rotate is no longer working it's most likely you fudged on the symlinking sensors.msm7k.so over to sensors.trout.so.

*Update 9:37pm CST*

-Forgot to add that you need to have /system remounted as read/write. I have added the command below

*Update 8:00pm CST*

The following command does not persist across reboots, therefore it will need to be placed in /init.rc or in /system/init.rc if you have a modded rom that allows for it. Just so everyone is clear, you can NOT edit /init.rc directly. To do that you'll need to unpack boot.img, edit init.rc, then repack boot.img and fastboot flash it to your device. My advice is to download a modded ROM that gets released with this fix.

echo "1" > /sys/devices/platform/i2c-adapter/i2c-0/0-0062/blink

It was a pretty trick fix to figure out. Here is a revised post with the complete terminal commands. ROM devs you could place these chmod commands in /init.rc to get it working. Please give credit where credit is due if you use my fixes.

[B]TERMINAL COMMANDS[/B]
mount -o rw,remount /dev/block/mtdblock3 /system
ln -s /system/lib/hw/lights.msm7k.so /system/lib/hw/lights.trout.so
ln -s /system/lib/hw/copybit.msm7k.so /system/lib/hw/copybit.trout.so
ln -s /system/lib/hw/sensors.msm7k.so /system/lib/hw/sensors.trout.so
echo "1" > /sys/devices/platform/i2c-adapter/i2c-0/0-0062/blink
chmod 666 /sys/devices/platform/i2c-adapter/i2c-0/0-0062/leds/blue/brightness
chmod 666 /sys/devices/platform/i2c-adapter/i2c-0/0-0062/leds/red/brightness
chmod 666 /sys/devices/platform/i2c-adapter/i2c-0/0-0062/leds/green/brightness

What's left to fix?

1) Currently the system is only giving the LED's a brightness of 1 so the light that comes on is dim. We need to find where it's getting this default value and up it to 100.

Want to manually change the colors?

You can edit the "brightness" value under leds/[blue/red/green] . The acceptable values are from 0 - 100. If you mix them up you can make any color you want :)

Exampe to change colors manually:

echo "50" > /sys/devices/platform/i2c-adapter/i2c-0/0-0062/leds/blue/brightness
echo "50" > /sys/devices/platform/i2c-adapter/i2c-0/0-0062/leds/red/brightness

This would make a purplish color.
[G1 Android Development] wizern23:
okay so does it change colors when its charging after its cut on.
[G1 Android Development] jaygajay:
I believe the hero has dual LEDs. It says something about it in logcat...Let me see if i can find it.
[G1 Android Development] shafty023:
Yes it does in fact have dual LED's. So the trick now that LED's work is to get it working just like it was in cupcake. I'll keep working at it you can be sure of that :)
[G1 Android Development] shafty023:
I haven't seen it change colors as my phone is fully charged so the green LED comes on. Since we don't have bluetooth I can't check for the blue LED working. Anyone have chompsms installed? I know you can pick which LED color you want. Anyone wanna test that it's all working?
[G1 Android Development] phungshum:
Terminal codes?

Hello! Thanks for the great fix!! But is there anyway you can post the entire terminal emu code? Kinda new on the copying and replacing of files. Thanks so much !
[G1 Android Development] Dladu:
Try missed call, you can easily sample the different colors
[G1 Android Development] shafty023:
I updated the main post so others can easily find it
[G1 Android Development] Zarboz:
this is actually editing the init.rc script... what do i open that in to edit it? and after edit can i just remount my system as writable and change the file names in my sys/lib/hw folder to the explained file names?
[G1 Android Development] shafty023:
You can type those commands from the terminal. If ROM devs want to make it so installing their ROM automatically does this, they would do it in init.rc.

You and I can do this from the terminal. It should hold those changes across a reboot. Hmmmm, lemme reboot and make sure otherwise it would require unpacking/repacking the boot.img and making the changes to init.rc in there. You can not edit init.rc directly. You have to extract boot.img (you can get this from the ROM you installed). Do a search for unpacking/repacking boot.img
[G1 Android Development] joe v:
great news :) :)
[G1 Android Development] jaygajay:
Good job shafty.
[G1 Android Development] mrfrenchfry:
tried it, works, restarted my phone by itself after the echo though. Little confuse about the chmod stuff so not gonna try that yet. Oh did it in adb too, thanks.

EDIT: seemed to break my 'g-sensor', so no auto-rotate.
[G1 Android Development] justanothercrowd:
this is going into 1.65 Thanks shafty023 for the work!
[G1 Android Development] Zarboz:
running jacman hero and his lights.msm7k.so is already renamed do i need to worry about this and after the chmod lines after the /brightness/ can i enter a modifier to change the ammount of light given out?
[G1 Android Development] rnzk8:
just to clarify the terminal commands,

using JACMAN 1.64, files are already renamed.
[G1 Android Development] shafty023:
Ya that's because he got it from justanothercrowd who got it from me. I was sending him most of my fixes directly since I'm using his ROM. Only seemed fair.

So you can ignore the line pertaining to lights.msm7k.

Yes you can feel free to change the value in brightness to whatever you want. I actually think the max is somewhere around 256. You can mix brightness values and that will allow you to change the colors manually. But unfortunately when you plug an a/c adapter it turns on the green led at a brightness value of only 1
[G1 Android Development] Zarboz:
so for example at the endo f my chmod 666 .... /brightness/100 ?? or would it be /brightness100
[G1 Android Development] rnzk8:
cool! thanks for the fix!
[G1 Android Development] jriley60:
did nothing for me? wonder what i did wrong
[G1 Android Development] Fictionles:
The status only appeared to change when you plug/unplug a power cable into the G1.

I'll take that over a script running every 3 - 5 seconds doing the same thing.
[G1 Android Development] twistedumbrella:
This is what I was working on with a background on "SMSReceiver.Notify" or whatever type thing. Hmmm, let me take a look at some code, throw together an app, and see if we have a final result.

All we need is a battery widget's code to do "on battery status change" the thing is getting the led code into java. The sms recevier is the same thing, just piggyback incoming messages. I know the code in android, just not java, lol.
[G1 Android Development] javacody:
Hmm. So I wonder how the original G1 knows to change the LED color for different charge levels?
[G1 Android Development] javacody:
Do you guys want to set up a git repo somewhere to share code on this? I'm itching for an excuse to set up Eclipse again at home.
[G1 Android Development] Fictionles:
Here it is...

Unzip...Install...Reboot...LED Charging goodness awaits

No noticeable effects or drain on my phone...yet. :D
[G1 Android Development] Fictionles:
I'm wrong. It updates as the battery charge grows while its being charged. You can see it in a logcat. Good thing too, or else I wouldn't be able to set different lights depending on what the charge is.
[G1 Android Development] javacody:
Installed and working. Commented out the previous script as a service in my /system/init.rc and restarted.

Any chance of seeing the source? I'm very curious.
[G1 Android Development] Fictionles:
Here's the code if anyone is interested.

Shafty and Aquilo did the main work. The other 90% of the code I found in various examples here and there.

Just had to compile it and piece it together.
[G1 Android Development] javacody:
Cool, you zipped up the entire project. Thanks!

I had a quick look at the source. This is your first Java app? Not too shabby.
[G1 Android Development] Fictionles:
It is...lol

And I don't think I coded anything that extensively in 10 years either.
[G1 Android Development] Fictionles:
Found some bugs...polished the existing code.

Will release tomorrow.
[G1 Android Development] prince.siraj:
is this fully working LEDs for Hero? or just charging LED?
[G1 Android Development] javacody:
Just the charging and just red or green so far.

Fic, how about going Red, Orange, Green with the Java version? Should work nicely, I would think?
[G1 Android Development] Fictionles:
The green LED is still under control by the kernel (or thereabouts). Its getting turned off a split second sooner than the app is handling it, so when unplugging it goes from orange to red to off. It lights up Orange when plugging in, but from what I can tell something else is still issuing 'off' commands to it.

I did come across a bug in the code that's posted where it wasn't turning on the green led after 90%, but I have that fixed and it'll get posted tomorrow.
[G1 Android Development] kingklick:
not exactly sure what you need to fix fictionless, but I installed your apk and it works great! :cool: