Re: [Always Updating][KITCHEN]6.5 NK-23509/28004-TF2.1/2.5 & Titanium [UC/Sashimi]
Thanks guys. Here is what I have written about my kitchen, and PRB in generel
Quote:
RZ Kitchen tutorial
Overview:
OEM – collection of files that form a package to provide a particular function to the ROM
Contains 1 RGU and 1 DSM, initflashfiles.dat and option.xml (obsolete)
RGU – plaintext file that contain registry entries, used in OEM format packages.
DSM – non-plaintext file that contains dependency, version, name information for a particular package.
GUID – hexadecimal number that identifies an OEM. The RGU and DSM will have the GUID as the filename and .DSM or .RGU as the extension. The GUID number also determines in what order the packages will be applied in the cooking process.
Initflashfiles.dat – this file sets where in the ROM files and shortcuts will be placed. The files referenced here do not necessarily need to be in the same package, but I do encourage it to keep this organized.
Option.xml – obsolete by the new generation of kitchens. This file used to be needed to present the package for selection in buildos.
BuildOS does not know how to handle duplicate files. For example, if you have fileA.txt in packageA and fileA.txt in packageB, buildOS processes packageA without issue but when it tries to process packageB it sees another file named fileA.txt and throws an error and crashes. This is very annoying to try and track down where the other file exists and decide which one you want to keep.. bottom line is BuildOS is very old and you should be using some form of platformrebuilder. (Visual Kitchen or otherwise)
EXT – more user-friendly next-generation type of package used by platformrebuilder. These packages do not require GUID’s or DSM files.
Contains 1 app.reg, 1 app.dat, files subfolder and locale subfolder (optional), _skip or _only* files
App.reg - same thing as an RGU, serves the exact same purpose, no difference between RGU file
App.dat – same as initflashfiles.dat
They are applied in cooking process alphabetically by name.
Files folder – in here go all your files and modules.
Locale folder – for WWE (worldwide English) we use 0409. This folder is used when making an EXT that can be used in multiple language kitchens.
Module – a module is basically a file, but you see it as a folder. Think of this like a source code to the file. Inside the folder you see an imageinfo.txt (this file contains information about where in memory this particular module will live.), S000, S001, etc. the S* files are what I call module source. Sometimes there is also a imageinfoPE.txt.
About modules – modules were designed for critical processes and files that are made to always stay loaded in RAM. A module has a designated address in RAM when the phone boots. Modules can be DLL files, MUI files, or executable files. A lot of people like to load up on modules because they believe they are good and everything should be a module because it will be faster. This is not the case. Modules do in fact load faster and operate faster because they are always in RAM. This means they do not have to be loaded and unloaded when called upon. This is known as residency. A resident process is always there. I learned from NFSFAN everything I know about modules. I like to keep the SYS modules as is, as a general rule of thumb, if it is in SYS, it is always used and always loaded in memory. I do not modulate MUI files unless they are in SYS. Chances are Microsoft knows what they are doing and the SYS should generally be left as is in terms of files and modules. For my kitchen, I keep the dll files in OEMDRIVERS modulated, and the executables as files. Modules require at least 64kb of memory to hold them. Therefore, it is a waste to modulate a 2kb file. It will end up wasting memory, which wastes CPU power, which wastes battery. The less modules you have that do not need to be (benefit from being) modules the better your RAM consumption will be.
_skip file – when an empty file with the name _skip is in the root directory of an EXT (root directory meaning top-level, the highest folder within the EXT (the name of the package). When platformrebuilder comes to this package it will be entirely ignored and not included in the ROM.
_only* file – Similar to _skip files, but work in the opposite direction. I have never seen one of these files in the wild, but I do use them in my kitchen. When platformrebuilder starts up it needs to have the following environment variables set:
BUILD – this the name of the build. If you (or whatever kitchen you are using) sets BUILD as titanium, then packages that contain _only_titanium files will be included in the ROM as well as any files that do not have an _only file in them. If BUILD is set to manila, then _only_titanium packages will be ignored and _only_manila files will get cooked in. It is allowed to have multiple _only files within a package. I also set my BUILD variable to both when I want titanium and manila in my ROM. So everyhwere I have a _only_titanium or _only_manila file, I also have an _only_both file.
ROMHDR – this is the path to a file (romhdr.bin) that contains memory address information for the kernel. Usually in ROM\
XIP_PATTERNS – path to the kernel. Generally ROM\XIP\*. The star means it will include all subfolders of XIP.
EXT_PATTERNS – path to the EXT files. If you categorize your EXTs by function as I do, you will; need to specify that here as *’s. For example, I have my EXTs in EXT\Baseline\1_system all the way through EXT\Baseline\9_registry. Therefor my EXT_PATTERNS variable looks like this:
EXT\Baseline\*\*. Meaning it will look in EXT\baseline, then then any subfolders within Baseline, and then finally within any subfolders within that subfolder.
OEM_PATTERNS – path to OEM files. For me, this is OEM\*. This means it will include all subfolders of OEM.
DSM_TEMPLATE – this is theDSM file that contains a template for all DSM’s. platformrebuilder rebuilds all DSM’s based on this file. This file resides in MSxipKernel. (rom\xip\msxipkernel). It cannot be anywhere else unless you specify the path to it. Otherwise it is just the name of the DSM: 723fb954-d931-4348-b672-82a188e587b5.dsm
DSM_INCLUDES – I do not know what this is to be honest, it is set as *.* (everything)
SYS_LOC – where the SYS resides. generally SYS\ . At the end of this I will paste my entire kitchen script and explain what it does line-by-line to explain how I take advantage of these variables to provide flexibility within the kitchen.
SYS – this is the main core of windows mobile presented in OEM-style packages. In here is everything that makes up the core functionality of the system. Most windows drivers reside here. SYS usually comes in two formats, what I call old style and new style. New style means that the SYS folders are all categorized based on what they are: lang (0409 for WWE), resolution specific(dpi_192 for TP) , and global (shared). PRB (platformrebuilder) can handle SYS in any format you like, as long as SYS_LOC is set accordingly (SYS_LOC=SYS\*\*), I prefer the old style where everything is in one directory, easy to find. (SYS_LOC=SYS\*)
OEM – here you will find OEM-style packages. I use this for stuff that it essential to the ROM. Anything with OEM* in its name I put here. I also include dummy FWUPDATE and dummy SQM (normally part of SYS, but they are useless to me. More on this later) I also include wince.nls in here. I do not know exactly what wince.nls is, all I do know is it is part of the kernel and specific to the device.
ROM – here you will find the kernel or windows mobile. It contains two parts: oemxipkernel and msxipkernel. Oemxipkernel is never changing, it is specifically for the device, hence OEMxipkernel. Msxipkernel however changes with every new build from MS (hence, MSxipkernel). Os.nb.payload is also included here, this file contains critical information, without it the ROM will not boot.
Temp – a temporary directory where platformrebuilder places all the files it has rearranged to be made into a flashable rom.
Tools – directory that contains all the executable files that play with each other to make a ROM, also where I include tools I use to do various things like hex-editing, manila editing, package creating, OEM-EXT converting, shortcut creating, etc.
Here is my kitchen with a breakdown of what each section does, to give you an idea or a starting point if you want to create your own kitchen:
:start beginning of file
@echo off – does not show what each command is as it is executed, only its output unless redirected, you’ll see
Title Welcome to RZ Baseline Kitchen... – the title of the window as the kitchen runs
if EXIST temp echo Cleaning up after last run... – if the temp directory is still there, this displays the text that states it is removing it.
if EXIST temp rmdir /s /q temp - where it actually deletes the folder and all its subfolders and contents. (/s switch) /q means do it quietly, or do not list each file as it is erased and clutter up the window.
Cls – clear the screen after the first part finishes
copy TOOLS\msvcr71.dll . 1>nul 2>nul copy the file msvcr71.dll into the working directory – this is needed in case the user does not have the correct runtime libraries available (very rare)
copy "TOOLS\Donate to raidzero.url" . 1>nul 2>nul copy the donate link to the working directory
SET CHANGELOG=RUU\Changelog.txt – one of my custom environment variable that sets where the the changelog will reside.
if not exist %CHANGELOG% (
echo Welcome to raidzero's changelog, for your cooking pleasure! > .\RUU\Changelog.txt
echo __________________________________________________ _________ >> .\RUU\Changelog.txt
)
If the changelog file, does not exist, create it and write that text to the file. The > means replace the whole file with whatever follows it. >> means append to the file. From here on out, we will only append to this file.
set LOCALE=0409 – needed to set the locale. 0409 is WWE. This is only used when EXT packages have locale folders.
set /P NAME="Please Enter the name of your ROM: " – custom variable that will be used to name the rom for flashing
set /P buildver="Please enter your desired SYS/XIP version: " – custom variable to allow the user to cook multiple builds with the same kitchen
set /P BUILD="Please Enter titanium/manila/both/none (lowercase): " – sets the build (see how this is used? )
set /P skip="Would you like to baseline the SYS? (y/n): " custom variable to determine whether or not to trim useless items from the SYS
set /P pagepool="Please enter desired pagepool size (0-64): " –custom variable used to set page pool size
set ROMHDR=ROM\%buildver%\romhdr.bin
set XIP_PATTERNS=ROM\%buildver%\XIP\*
set SYS_PATTERNS=SYS\%buildver%\*
set OEM_PATTERNS=OEM\*
set EXT_PATTERNS=EXT\Baseline\*\*
set DSM_TEMPLATE=723fb954-d931-4348-b672-82a188e587b5.dsm
set DSM_INCLUDES=*.*
set SYS_LOC=SYS\%buildver%
those were all discussed earlier
if exist SYS\%buildver%\DPI_192 ( check for the existence of a folder named DPI_192 in SYS\buildver
echo Visual Kitchen SYS detected. If it exists assume it is the wrong style of SYS
cd %SYS_LOC% - change to the directory where the SYS is located
echo Please wait, converting SYS to our format... – tell the user to wait while it is converted to the correct format
echo _skip > skipfiles – create a temporary file that will be used by xcopy to tell it to not copy any _skip files.
xcopy DPI_192\0409 . /D /H /E /C /Y /Q /EXCLUDE:skipfiles
xcopy DPI_192\COMMON . /D /H /E /C /Y /Q /EXCLUDE:skipfiles
xcopy DPI_192_RESH_480_RESV_640\0409 . /D /H /E /C /Y /Q /EXCLUDE:skipfiles
xcopy DPI_192_RESH_480_RESV_640\COMMON . /D /H /E /C /Y /Q /EXCLUDE:skipfiles
xcopy SHARED\0409 . /D /H /E /C /Y /Q /EXCLUDE:skipfiles
xcopy SHARED\COMMON . /D /H /E /C /Y /Q /EXCLUDE:skipfiles do the copying
del skipfiles delete the file called skipfiles as it is now useless
rmdir /S /Q SHARED remove this old dir
rmdir /S /Q DPI_192 remove this old dir
rmdir /S /Q DPI_192_RESH_480_RESV_640 remove this old dir
echo SYS converted. Tell the user its done
cd ..\.. go up two directories (back to the root of the kitchen)
)
if exist OEM\WinCENLS_WWE ( check for the existence of a folder called WinCENLS_WWE in OEM, if it exists, do the following:
echo Patching shell32.exe\s000 against timebomb.. – patch for timebomb, may or may not work, as the timebomb location is always changed.
cd TOOLS\xvi32 change to the xvi32 directory
xvi32 ..\..\SYS\%BUILDVER%\Shell\shell32.exe\S000 /S=remove_timebomb.xsc execute my xvi32 script that removes the timebomb.
cd ..\.. go up two directories
echo Patched! Tell the user it finished.
)
if not exist OEM\WinCENLS_WWE (check for the existence of a folder called WinCENLS_WWE in OEM, if it does not exist, do the following:
echo wince.nls not present in OEM. Aborting. Tell the user that it was not found
echo Without this the rom will not boot! Tell the user how important this file is
pause pause everything to let the information sink in.
exit –exit the kitchen
)
cd EXT\baseline – change to the EXT directory
echo Unlocking EXT files.. – tell the user what its doing
attrib -S -H -R /S remove all system, hidden, and read-only attributes from the files in EXT
echo Done! Tell the user it finished
echo Removing DSM's from EXT's.. tell the user what it happening
for /F "tokens=*" %%A in ('dir /S /B *.dsm') do del %%A >NUL delete every file with a DSM extension from all EXT,s
echo Removing RGU's from EXT's
for /F "tokens=*" %%A in ('dir /S /B *.rgu') do del %%A >NUL
echo Removing _skip's from EXT's
for /F "tokens=*" %%A in ('dir /S /B _skip') do del %%A >NUL
echo Removing Package.ini's from EXT's
for /F "tokens=*" %%A in ('dir /S /B Package.ini') do del %%A >NUL same thing for rgus, package.ini file and skip files
cd ..\..
cd SYS\%buildver%
echo Unlocking SYS files... inform user
attrib -S -H /S --S -H -R /S remove all system, hidden, and read-only attributes from the files in SYS
echo Done! Tell the user its done
cd ..\.. move up two directories, back to the root of the kitchen.
echo > SYS\%buildver%\Chome\_only_both
echo > SYS\%buildver%\Chome_DPI_192\_only_both
echo > SYS\%buildver%\Chome_Lang_0409\_only_both
echo > SYS\%buildver%\Bronze\_only_both
echo > SYS\%buildver%\BronzeNonEA\_only_both
echo > SYS\%buildver%\Bronze_DPI_192\_only_both
echo > SYS\%buildver%\Chome\_only_titanium
echo > SYS\%buildver%\Chome_DPI_192\_only_titanium
echo > SYS\%buildver%\Chome_Lang_0409\_only_titanium
echo > SYS\%buildver%\Bronze\_only_titanium
echo > SYS\%buildver%\BronzeNonEA\_only_titanium
echo > SYS\%buildver%\Bronze_DPI_192\_only_titanium
make _only files for the SYS elements that are titanium only.
if %skip% == y ( check to see if the skip variable we set earlier is yes, if it is…
echo > SYS\%buildver%\ADC\_skip skip ADC – not sure what it is, but it is not needed
echo > SYS\%buildver%\ADC_lang_0409\_skip skip ADC’s locale files
echo > SYS\%buildver%\AdobeFlash\_skip skip flash
echo > SYS\%buildver%\AdobeFlash_Lang_0409\_skip skip flash’s locale files
echo > SYS\%buildver%\AdobeFlashCodecs\_skip skip flash codecsd
echo > SYS\%buildver%\AUTOUPDATE\_skip skip windows update
echo > SYS\%buildver%\Autoupdate_lang_0409\_skip skip windows update locale files
echo > SYS\%buildver%\Entertainment\_skip skip all games
echo > SYS\%buildver%\Entertainment_DPI_192\_skip skip games DPI files (font size)
echo > SYS\%buildver%\Entertainment_Lang_0409\_skip skip games locale files
echo > SYS\%buildver%\Entertainment_lang_0409_DPI_192\_sk ip skip games locale and DPI files
echo > SYS\%buildver%\IRDA\_skip -infrared? Do we have IR on our phones? no
echo > SYS\%buildver%\IRDA_Lang_0409\_skip same thing but for locale specific files
echo > SYS\%buildver%\MSTag\_skip tag reader – reads barcodes, not necessary
echo > SYS\%buildver%\MSTag_Lang_0409\_skip tag reader locale files
echo > SYS\%buildver%\Livesearch\_skip live search
echo > SYS\%buildver%\OneNote\_skip one note, part of office. I find the WM notes app sufficient
echo > SYS\%buildver%\OneNote_Lang_0409\_skip onenote’s local files
echo > SYS\%buildver%\SampleMusic\_skip sample mp3 files. A complete waste of megabytes
echo > SYS\%buildver%\Skybox\_skip myphone, I keep a better version (made by juggalo_x) in EXT
echo > SYS\%buildver%\Skybox_Lang_0409\_skip myphones, locale files
echo > SYS\%buildver%\Skymarket\_skip marketplace
echo > SYS\%buildver%\Skymarket_Lang_0409\_skip marketplace locale files
echo > SYS\%buildver%\WelcomeCenter\_skip we know how to use our phones if we are cooking ROMs…
echo > SYS\%buildver%\WelcomeCenter_Lang_0409\_skip welcome center locale files
echo > SYS\%buildver%\WindowsLive\_skip windows live, I have it cabbed for those who want it.
echo > SYS\%buildver%\WindowsLive_Lang_0409\_skip windows live locale
echo > SYS\%buildver%\WindowsLive_DPI_192\_skip windows live DPI-specific files
echo > SYS\%buildver%\WindowsLiveIM\_skip Instant messenger for Windows Live
echo > SYS\%buildver%\WMWidgets_Lang_0409\_skip widgets locale files
echo > SYS\%buildver%\WMMoneyWidget\_skip money widget
echo > SYS\%buildver%\WMWeatherWidget\_skip weather widget
echo > SYS\%buildver%\WMWidgets\_skip widgets framework
)
if %skip% == n ( if the users does not want to trim the sys, enable the following elements by deleting their skip files:
del SYS\%buildver%\ADC\_skip
del SYS\%buildver%\ADC_lang_0409\_skip
del SYS\%buildver%\AdobeFlash\_skip
del SYS\%buildver%\AdobeFlash_Lang_0409\_skip
del SYS\%buildver%\AdobeFlashCodecs\_skip
del SYS\%buildver%\AUTOUPDATE\_skip
del SYS\%buildver%\Autoupdate_lang_0409\_skip
del SYS\%buildver%\Entertainment\_skip
del SYS\%buildver%\Entertainment_DPI_192\_skip
del SYS\%buildver%\Entertainment_Lang_0409\_skip
del SYS\%buildver%\Entertainment_lang_0409_DPI_192\_sk ip
del SYS\%buildver%\IRDA\_skip
del SYS\%buildver%\IRDA_Lang_0409\_skip
del SYS\%buildver%\MSTag\_skip
del SYS\%buildver%\MSTag_Lang_0409\_skip
del SYS\%buildver%\OneNote\_skip
del SYS\%buildver%\OneNote_Lang_0409\_skip
del SYS\%buildver%\SIM_TKit\_skip
del SYS\%buildver%\Skybox\_skip
del SYS\%buildver%\Skybox_Lang_0409\_skip
del SYS\%buildver%\Skymarket\_skip
del SYS\%buildver%\Skymarket_Lang_0409\_skip
del SYS\%buildver%\WelcomeCenter\_skip
del SYS\%buildver%\WelcomeCenter_Lang_0409\_skip
del SYS\%buildver%\WindowsLive\_skip
del SYS\%buildver%\WindowsLive_Lang_0409\_skip
del SYS\%buildver%\WindowsLive_DPI_192\_skip
del SYS\%buildver%\WindowsLiveIM\_skip
del SYS\%buildver%\WMWidgets_Lang_0409\_skip
del SYS\%buildver%\WMMoneyWidget\_skip
del SYS\%buildver%\WMWeatherWidget\_skip
del SYS\%buildver%\WMWidgets\_skip
)
ren SYS\%buildver%\Skymarket\WMMLauncher.lnk \SYS\%buildver%\Skymarket\Skymarket.lnk remove the marketplace shortcut
del SYS\%buildver%\Skymarket\*marketplace*.provxml delete the provxml that recreates the marketplace shortcut
echo > SYS\%buildver%\FWUPDATE\_skip skip the useless FWUPDATE – in theory this is used for carriers to send out ROM upgrades OVER THE AIR?! I see a catastrophe in the making.
echo > SYS\%buildver%\SQM\_skip Soemthing about quality assurance “do you want to help make windows better?” no we are doing that now on our own
echo > SYS\%buildver%\Perfbox\_skip a tool used by MS to gauge performance of ROM’s its great, if you know how to read its files it makes. Only MS does and it has not been leaked that I know of. Therefore, it’s a waste of space.
REM Clean up the Start menu... the following lines remove shortcuts from the start menu and the provxmls that place them
del SYS\%buildver%\Skybox\*MyPhone*.provxml
del SYS\%buildver%\WindowsLiveIM\*windowsliveim*.provx ml
ren SYS\%buildver%\WindowsLive\WLMLauncher.lnk "Windows Live.lnk"
del SYS\%buildver%\WindowsLive\*windowslive*.provxml
ren SYS\%buildver%\Skybox\MyPhoneConsole.lnk "My Phone.lnk"
ren SYS\%buildver%\WindowsLiveIM\WLMMessenger.lnk Messenger.lnk
ren SYS\%buildver%\RemoteDesktopMobile\wpctsc.lnk "Remote Desktop.lnk"
del SYS\%buildver%\Base_Lang_0409\*alarms*.provxml
del SYS\%buildver%\WelcomeCenter_Lang_0409\*welcomecen ter*.provxml
ren SYS\%buildver%\WelcomeCenter\welcomecenter.lnk "Getting Started.lnk"
REM skip Chinese codepage ignore the shinese stuff..
echo > Sys\%buildver%\gb18030\_skip
REM skip SIM toolkit ignore the GSM Stuff…
echo > SYS\%buildver%\SIM_TKit\_skip
FOR /F "tokens=*" %%R IN ('date /t') DO SET DATE=%%R make a variable called DATE with the current date
FOR /F "tokens=*" %%R IN ('time /t') DO SET TIME=%%R make a variable called TIME with the current time
Cls – slear the screen again
echo Building ROM: %NAME% Version %BUILDVER% %pagepool%MB pagepool print the name of the rom, the SYS version, and the pagepool size to the screen.
echo (%DATE% %TIME%) Building ROM: %NAME%-%BUILD%(%BUILDVER%) %pagepool%MB pagepool >> %CHANGELOG% print all the same stuff to the changelog for review later.
del SYS\%buildver%\Redist\welcome.lnk 1>nul 2>nul delete the link to the welcome app in the SYS, as I have my own version in EXT
TOOLS\platformrebuilder.exe YAY! Finally, platformrebuilder runs and does its magic
if not "%errorlevel%"=="0" goto error if there were no errors continue, if there were, go to the error part
ren donation.url "Donate to bepe.url" 1>nul 2>nul – rename the donation link to donate to bepe.
del donation.url 1>nul 2>nul delete the old link
REM ================================================== =========================================
start "Creating ROM..." /D temp /WAIT "%~d0%~p0TOOLS\CreateROM.bat" where the second part of the kitchen takes over.. createrom.bat (it will be discussed next)
if not "%errorlevel%"=="0" goto error
REM ================================================== =========================================
echo Executing HTC ROM Tool- tell the user what’s going on.
echo [Project] > .\temp\herm.htcrtproj
echo Magic=kateiloveyou >> .\temp\herm.htcrtproj
echo Version=1 >> .\temp\herm.htcrtproj
echo [Buildrom] >> .\temp\herm.htcrtproj
echo Device=Kaiser >> .\temp\herm.htcrtproj
echo ModelId=RAPH6400 >> .\temp\herm.htcrtproj
echo CountryId=11111111 >> .\temp\herm.htcrtproj
echo VersionId=%NAME% >> .\temp\herm.htcrtproj – stamp the name the user chose on the NBH file
echo LanguageId=WWE >> .\temp\herm.htcrtproj
echo Sect_0x400=False,"OS-new.nb" >> .\temp\herm.htcrtproj create a file called herm.htcrtproj in temp (this file is used by htc rom tool to make an NBH)
tools\htcrt.exe /buildrom "%cd%\temp\herm.htcrtproj" "%cd%\temp\RAPHIMG.nbh" run htc rom tool with the file herm.htcrtproj as an argument and tell it where to place and what to name the output nbh
del .\temp\herm.htcrtproj 1>nul 2>nul delete the temporary file when finished
echo. Print a blank line
del .\temp\OS-new.nb delete the os.new.nb file as it is not needed
del .\RUU\RAPHIMG.nbh 1>nul 2>nul delete the current NBH file to make room for the new one
move .\temp\RAPHIMG.nbh .\RUU copy the final NBH file to the ruu directory.
echo.
REM echo Executing Pagepool Changer... tell the user what is going on
cd RUU change to the RUU directory
echo Executing Update Utility... tell the user what is going on
echo.
echo Enjoy your flash! tell the user what is going on
FOR /F "tokens=*" %%R IN ('date /t') DO SET DATE=%%R create date variable
FOR /F "tokens=*" %%R IN ('time /t') DO SET TIME=%%R create time variable ( to tell how long it took to cook )
echo (%DATE% %TIME%) Build Completed! >> Changelog.txt print the date and time to the changelog file
FOR /F "tokens=*" %%A IN ('dir RAPHIMG.nbh ^| FIND "RAPHIMG"') DO SET IMAGEATTRIBS=%%A print the name and file size of the nbh file to a variable called IMGAEATTRIBS
echo %IMAGEATTRIBS% print the variable contents to the screen
echo %IMAGEATTRIBS% >> Changelog.txt also print that info to the changelog.
set /P NOTES="Please enter any changes for the changelog: " create a variable called notes and allow the user to put whatever they want in it.
echo (%DATE% %TIME%) Notes: %NOTES% >> Changelog.txt put the date and time and the notes in the changelog
start ROMUpdateUtility.exe start flashing!
echo Removing temporary files used... delete everything
del ..\msvcr71.dll
rmdir /s /q ..\temp
echo.
echo Done!!!
pause
goto :EOF goto end of file, there is nothing there so this is the same as exit.
:error error label
echo.
echo ERROR! (errorlevel: %errorlevel%) print the error level to the screen
echo Cleaning up...
rmdir /s /q temp remove temporary files
pause pause to let the info sink in
exit exit the kitchen
CREATEROM.BAT:
@echo off do not print commands to screen, only output unless redirected
Title Creating ROM.. title of the window
echo Now repairing System Attributes tell the user what is going on
cd dump >NUL change to the dump directory
attrib S00? +H /S >NUL make all S* files inside modules hidden
attrib *.dll +S +H +R >NUL make all dll’s system, hidden and readonly
attrib *.exe +S +H +R >NUL make all exe’s system, hidden and readonly
attrib *.lnk -S -H -R >NUL make all lnk’s not system, hidden or readonly
attrib *.csv +S +H +R >NUL make all csv’s system, hidden and readonly
attrib *.htm +S +H +R >NUL make all htm files system, hidden and readonly
attrib *.mui +S +H +R >NUL make all muis system, hidden and readonly
attrib *.doc +S +H +R >NUL make all .doc files system, hidden and readonly
attrib *.dat +S +H +R >NUL make all dat files system, hidden and readonly
attrib *.provxml +S +H +R >NUL make all provxmls system, hidden and readonly
attrib *.xls +S +H +R >NUL make all xls files system, hidden and readonly
attrib *.xml +S +R >NUL make all xmls system and read only
attrib *_manila +H >NUL make all manila files hidden
attrib *manil* +H >NUL make all manila files hidden
attrib *.mid +S +R >NUL make all mid files system and read only
attrib *.vol +S +R >NUL make all .vol files system and read only
attrib *.txt +S +R >NUL make all txt files system and read only
attrib *.wav +S +R >NUL make all .wav files system and read only
attrib *.wma +S +R >NUL make all wma’s hidden and read-only
attrib *.png +H >NUL make all PNG files hidden
attrib *.brn +H >NUL make all brn files hidden
attrib *.gif +S +R >NUL make all gifs system and read-only
attrib *.jpg +S +R >NUL make al jpg files system and read only
attrib *.bmp +S +R +H >NUL make all bmp system and read only
REM Fix for smartskey.inf COMMENT in the code, does not get read by the windows batch parser
attrib *.inf -S -R -H >NUL make all inf files not hidden, system or read only
attrib +A +R +H +S *.provxml >NUL make all provxmls hidden, systm, read only, set the ARCHIVE bit
attrib -H -S -R *.jpg >NUL make all jpgs not hidden system or read only
attrib -H -S -R *.bmp >NUL not hidden system or read only
ECHO. Fixed Attributes.. tell the user
cd.. move up one dir ( to temp )
ren ..\donation.url "Donate to bepe.url" 1>nul 2>nul rename bepe’s donate link
copy "donate to raidzero.url" .. 1>nul 2>nul move my own into the kitchen root.
echo Copying OS.nb.payload... inform the user
copy ..\ROM\%buildver%\OS.nb.payload ..\temp\OS.nb.payload copy the payload file into temp
if not "%errorlevel%"=="0" goto error
REM ================================================== =========================================
echo.
..\TOOLS\ervius_implantxip -xip xip.bin -payload ..\temp\OS.nb.payload -pp %pagepool% -uldr –nocert this is where the xip is inserted into the payload and the page pool is set
if not "%errorlevel%"=="0" goto error
REM ================================================== =========================================
echo.
..\TOOLS\IMGFS\ImgfsFromNb ..\temp\OS.nb.payload imgfs.bin this creates IMGFS.bin from the payload (after the xip has been inserted)
if not "%errorlevel%"=="0" goto error
..\TOOLS\IMGFS\ImgfsFromDump ..\temp\imgfs.bin imgfs-new.bin this makes imgfs.bin from the whole dump folder as imgfs-new.bin (since the payload is now in there and is basically the whole rom)
if not "%errorlevel%"=="0" goto error
..\TOOLS\IMGFS\ImgfsToNb ..\temp\imgfs-new.bin OS.nb.payload OS-new.nb.payload –bigstoragemove this is where the new imgfs is converted to a new os.nb.payload
if not "%errorlevel%"=="0" goto error
..\TOOLS\IMGFS\NBMerge -kaiser ..\temp\OS-new.nb NBmerge with the Kaiser flag
if not "%errorlevel%"=="0" goto error
REM ================================================== =========================================
del ..\temp\imgfs-new.bin
del .\temp\imgfs.bin
del ..\temp\OS.nb.payload
del ..\temp\OS-new.nb.payload remove unused stuff
REM ================================================== =========================================
exit 0
:error
echo.
echo ERROR! (errorlevel: %errorlevel%)
pause
exit 1
|
hope it helps take some of the mystery out of it.. as fasr as VZW goes, you need working OEMDRIVERS from the stock VZW ROM, and a working VZW carrier package.
|