Spent a lot of time on it, trying to figure out what went wrong with mkrom when cooking 4.00.xx roms. finally figured it, well, almostly. here is a short step by step tutorial for people who do not want to set up the complicated kitchen but wish to use mkrom as in the good old 3.17 time.
I assume you already know the rom flush process already, if given a NBF file. also you need a linux box with perl.
I know quite a few people struggled and have not had a clue. and I believe there is some bugs in the mkrom package that gives the trouble.
1. download the newest mkrom from http://xda-developers.com/~itsme/download/mkrom_136.zip. this is the only piece of software you would need.
2. unpack it to, say mkrom, directory. then make directories cfg
3. get hold of a copy of rom file and its corresponding paramter files. the parameter files can be obtained from the demo kitch download ftp://kitchen:[email protected]/data look inside the "00_base ROM" and the parameter files should be under cfg directory of each rom directory. bascially the parameter files tells mkrom, where to start to put added files and how large space there is. there are two blocks of space that can be used. so the file has format
wincever=4
start1=81740000
size1=00040000
start2=81b00000
size2=003c0000
startbmp=81ec0000
startop=81b00000
the first three lines are same for all 4.00.xx roms, start2 varies for different roms, startbmp is also the same for all roms. startop should be the same as start2. size2 will be startbmp-start2, remember they are all in hex. you can calculate how large space there is once you get hold of the start2 parameter.
anyway, put the parameter files under the mkrom/cfg directory, with name "params"
4. copy a rom file (.nbf), say rom.nbf, into mkrom directory and run "./setup rom.nbf". this will creates several files under cfg.
5. mkdir a directory mkrom/romfile, enter it and make another directory file , then type "../dumprom ../cfg/rom.nb1 -4 -d file"
here comes the first bug. the setup.sh tells you that dumprom can only be used in windows box. but in fact, there is a compiled dumprom for linux in the directory (you might need to set it to be executable though). however, this linux version does not put extracted files into the "file" directory as it is supposed to, instead it just write file as "file\xxx" where xxx is the actual file name extracted from rom. it is a bug but as long as we know it, not a big deal. the is someone posted a correct version of dumprom in this forum though.
6. you should be able to find three files (or with the "file\" prefix added) with name default.fdf initobj.dat initdb.ini. these are the three files that needs to be process as indicated by setup.sh. follow the instruction to create the default.reg initobj.txt initdb.ini and copy them to cfg directory.
7. make a directory mkdir/files. you are ready to create a clean rom now by running "./mkrom output.nbf", the created output.nbf should be fine.
So far so good, followed the instruction of mkrom. next would need to add our files. then comes the problem. if you add files into the mkrom/files directory, and run "./mkrom output.nbf" again, it is almost definitely that the created rom is bad. I am not 100% sure why, but here is what I believe:
the mkrom script scan files in the "files" directory and put files in there into the "files1", "files2" directory, each of them is supposed to fill the two space in rom starting from "start1" and "start2" in parameter file. the size of files under "file1" should be less than "size1", similar "files2" and 'size2". when mkrom does this, it is highly possible that the three critial files "default.fdf, initobj.dat, initdb.ini" are placed into "files2" directory instead of "files1" directory and renders the rom bad.
here is what I did
edit the mkrom.sh, delete the line that splits files in "files" into "files1, files2" directory. change the three lines that convert the three critial files so that these three files are created in "files1" directory instead of "files" directory. then put your files into "files1" and "files2". just be careful, keep the size less than specified by "size1" and "size2".
then you can run "./mkrom.sh output.nbf" as before, and the resulted rom will be good.
hope this helps. however still a couple of problems
1. the fdf2reg.pl won't recoganize the default.fdf extracted from 4.00.21 rom or 4.01.00 rom
2. if i change the content of initobj.txt, the created rom won't boot. I might have done something wrong in initobj.txt though. but I used to be able to do this for 3.17 rom
3. I did not try to modify registry, as my only purpose is to put my files into ROM to save space. all registry can be done later by installing the software and choose not to overwrite existing files in ROM. must simpler.
the unix version of dumprom does not decompress files, that is why your default.fdf etc seem corrupted.
this is because I only have the decompression code in the form of a binary library, which I have not figured out how to link to under linux.
the only use of dumprom under unix is to find the offsets in rom where filepointers to default.fdf etc should be patched.
I should maybe disable the '-f' option in dumprom for the unix version, to make things less confusing.
but it looks to me that the dumprom under linux worked for pre- 4.00.16 rom. only not for after 4.00.21 roms. so are they different?
maybe the default.fdf was not compressed in the 3.x roms?
I am quite sure it does not work for compressed files under linux - I just did not implement the compression routines.
dumprom worked with 4.00.05 4.00.11 4.00.16 roms. I cooked 4.00.11 and 4.00.16 roms, and the rom was fine. I never used windows box during the process. only when i tried 4.00.21 and 4.01.00, there was error. anyway, i don't care, since I need as much rom as possible and 4.00.11 seems to be the best choice for me.
thanks for writting mkrom, a terrific tool. I don't like the way xda-developers.com promoting kitchen but not mkrom. mkrom is much simpler to setup and run, as long as you know about linux. the kitchen is much more complicated to get it to work and most people don't actually need such flexibility I believe.
ok i installed cygiwin and was with u till step 5, then i am lost.. when i run step 6 dumprom (in DOS) gives me an ewrror here atr the first few lines from dumprom( wiht latest ATT official release)
img 00000000 : hdr=8c0a1000 base=8c078000 commandlineoffset=8c077fe0
img 00040000 : hdr=800cdde0 base=80000000 commandlineoffset=7fffffe0
img 00180000 : hdr=8024db88 base=80000000 commandlineoffset=7fffffe0
img 00380000 : hdr=8039b334 base=80000000 commandlineoffset=7fffffe0
img 00670000 : hdr=80be2c40 base=80000000 commandlineoffset=7fffffe0
img 00c00000 : hdr=80e99400 base=80000000 commandlineoffset=7fffffe0
img 01050000 : hdr=813efc74 base=80000000 commandlineoffset=7fffffe0
img 01400000 : hdr=815d2ba4 base=80000000 commandlineoffset=7fffffe0
img 015f0000 : hdr=815f0650 base=80000000 commandlineoffset=7fffffe0
img 017c0000 : hdr=81bba0a4 base=80000000 commandlineoffset=7fffffe0
ERROR: could not find pointer for ofs 8c0a1000
invalid romhdr ofs 8c0a1000
ERROR: could not find pointer for ofs 00000000
7fffffe0 - 80000000 L00000020 unknown 30315750 452d3142 412d474e 2d30332e 2d353030 62373239 2d2d2d2d 2d2d2d2d
80000000 - 80000004 L00000004 romsection id=ea0003fe
80000004 - 80000040 L0000003c NUL
80000040 - 80000048 L00000008 'ECEC' -> 8c0a1000
errorsgalore...
so help me here how do i make sure the files extracted are all good also the size (as per ) windows explorer is 33+ not sure how all has been installed in the 32mb rom
did you get default.fdf initobj.dat initdb.ini out of dumprom. dumprom also reported tons of errors but as long as you get the three files out, it is ok.
Dumprom tries to figure out for each byte in the rom what it does. If it doesn't know it says 'unknown' this is not an error, just that dumprom could not determine the use of this byte. The 'could not find 00000000' message means that it encountered a NULL pointer somewhere in rom where it did not expect it, the other one is a pointer to RAM, which dumprom does not know exists. You can safely ignore these errors.
Dumprom was initially written to assist in figuring out what I did not know about the rom, so it tries to figure out stuff that is unknown. Later I added the code to extract files to it. Maybe I should split dumprom in one research tool, to do a detail examination of the rom, and one tool to only extract files.
Most files in rom are compressed, that is why they are more than 33M when uncompressed.
ok i understande the messages...
now here is what i did
ran ssnap and got a picture of the OS and did a compare and have a list of entries i want to add to registru and a folder with bunch of subfolders that need to be added on install
not sure how step 6 goes.. to convert the files to .reg and .txt and how/where do i add my files and registry entries....
any tips...
update...
i did fdf2reg and made a .reg file added my entries in there and then ran reg2fdf to recreatre the fdf...
i hope this is right now i need to fig out how to specify where the files i want added are to be copied i mean some go into windows some in new filders that need to be created...
plz tell me how to go forward.
you don't need to re-create the fdf file again, mkrom does it for you, you only need to take care of the default.reg file under cfg
I am not sure whether you can put files under directories other than \windows only. I did not try that. I suppose all files under /files1 and /files2 go to \windows directory just they happen to locate in different memory location in ROM
I need this files from the root of my running device (not windows folder)
mxip_lang.vol
mxip_notify.vol
mxip_system.vol
But I cant copy them!
Is there any way or tool to get them?
Try to dump the rom with This tool
but i don't know if the PE headers will be correct ...
hi TofClock,
this tool dumps only files in the Windows folder, but I need the files from the root.
This files are the databases of the system, the files in the windows folder are the templates for the first boot.
Also the content of the .dsm and .provxml files is writen to this databases (after first boot).
My idea is to use the finished database in a ROM and delete the .dsm files
i've just finished a dup with the tool , and in the "Files" , i've mxip_lang.vol , mxip_notify.vol and , mxip_system.vol
EDIT : **** , it should not work :/
Test that :
I've succefully copied , with built-in explorer :
- mxip_initdb.vol
- mxip_lang.vol
- mxip_system.vol
but i can't copy or rename mxip_notify.vol
does anyone how to edit those files (mostly mxip_lang.vol from /Storage folder) and how to replace them?
my phone always says that it is in use and i can not do anything with it
this is the last file I have to change to get my phone fully translated
With Sktools you can export metabases mxip_lang.vol into .xml files . Also SKtools has import function. But I don't understand how it is work. I tried to insert some new rows in metabase but sktools say: 0 records imported. May be anybody know how to import new record in metabase with sktools? Please, help me!
I successfully translate mxip_lang.vol !!! I used Sktools for dump this file. After that I translated all english records in to russian ( text file in unicode format). Then I have put DevPrepSP.exe utility ( with its configuration .xml file) and my .txt file in \Storage\MUI\ folder on my Qtek8310. I have started the DevPrepSP.exe and have added records in to mxip_lang.vol. It has worked!!!
My txt file has such format of records:
\MetabaseLabels
0#19#1;1049#31#Размер сист. шрифта:;
0#19#2;1049#31#Время нажатия:;
0#19#3;1049#31#Макет начального экрана:;
..................................................... ;
Can anyone tell me where do i go to read on how to edit .bin images and port files from nbf to bin, edit registry in bin?
bin files only with msn messenger most editet
http://www.coolcode.cn/andot/bin2nb-nb2bin-released/277
Convert to NB and Edit NB by RomEdit Tool
Work for me.
Creative7419 said:
http://www.coolcode.cn/andot/bin2nb-nb2bin-released/277
Convert to NB and Edit NB by RomEdit Tool
Work for me.
Click to expand...
Click to collapse
Been looking for this for quite sometime and now its here courtesy of ANDOT(the famous cooking master of Tornado WM6).
Before, converting os.bin to os.nb involves tedious tasks. It involves hex editing and now with a simple typing of correct commands on dos prompt and voila you have a converted os.nb or os.bin file. Thanks ANDOT...
Chinese Edition: http://www.coolcode.cn/andot/bin2nb-nb2bin-released/277
Hello, everyone. I find there is no tools can convert bin file to nb file or convert nb file to bin file. so I made these tools: bin2nb & nb2bin. They only can convert os.bin to os.nb, and os.nb os.bin, they can't convert gsm, spl or ipl nb file to bin file.
They are all command line tools, and easy to use.
if you want to convert os.bin to os.nb, you can type:
Code:
bin2nb os.bin os.nb
and then, you will get os.nb file.
when you want to convert os.nb to os.bin, you can type:
Code:
nb2bin os.nb os.bin
you will get the new os.bin file.
The default setting is Typhoon(Feeler/Amadeus), if you want to convert other device nb file to bin file, you can add two parameters:
Code:
nb2bin <file.nb> <file.bin> [offset] [partbytes]
offset is a hex number without prefix, for example, the offset of Typhoon is 80240000.
partbytes is the size of the partition, it is also a hex number without prefix, for example, the partbytes of Typhoon is 1b00000.
Excuse me,
I've a Toshiba G900, I've used the Grab_it tool to create a DUMP of the ROM.
I obtained a "dump.bin" file.
Now I've to create a .nb file from this .bin file.
Do you thing your tool could works?
I've to imput a different code becouse my device is not a Typhoon?
I hope you can help me.
Thanks.
davideuck,
Have you solve your problème? Because i have the same and bin2nb doesn't work for me (My device is a Samsung Player Addict)
Thank,
McCoy.
it doesn't support diamond NB files.... anyway, thanks
I'm looking for information on the format of Hermes nb files. I am aware that there are perl scripts to unpack these files, but they are not working on a diagnostic image i have in nbh and (converted to) nb format. When I try to unpack the nb file with rdmsflsh.pl I get: could not find imgfs header
The file has plaintext readable strings and begins with 0xB000FF.
Does anyone have technical information on this file format? I know the file is valid since it can boot into the image just fine.
-fluxist
fluxist said:
I'm looking for information on the format of Hermes nb files. I am aware that there are perl scripts to unpack these files, but they are not working on a diagnostic image i have in nbh and (converted to) nb format. When I try to unpack the nb file with rdmsflsh.pl I get: could not find imgfs header
The file has plaintext readable strings and begins with 0xB000FF.
Does anyone have technical information on this file format? I know the file is valid since it can boot into the image just fine.
-fluxist
Click to expand...
Click to collapse
There is a lot of good information about the NBH format (here) that may be useful. Also, the wiki in general may be helpful.