Jump to content

[REF] Cooking info, kitchen, tools, etc ....


Guest rodrigofd

Recommended Posts

hi can i ask a few questions to clarify.

1) NB0 consists of a 256B header + 'PDA.OS.NB'

- Where do I get this PDA.OS.NB?

2) IMGFS.BIN can be extracted using OSNBTOOL from PDA.OS.NB

- What is IMGFS.BIN for?

3) IMGFS.BIN can be dumped using IMGFSDUMP.EXE

- What is the dumping for?

- What can you do with the dumped data?

4) Recompose NB0 from the original 256B header + PDA.OS.NB.NEW

- Is the PDA.OS.NB.NEW referring to the PDA.OS.NB that has been expanded to 0x1B200000?

- Where do i find the 'original' 256B header from?

Thanks!

To answer your question (you probably would have found an answer if you read all posts in this and other threads about cooking)

1. you will get .nb file when you dump it from the phone using Sorg's application. You have to change the name of the dumped file from .bin to .nb.

2. that's where all files for operating system and applications are.

3. After you dump it with  ImgfsToDumpxxx.exe you should dump it to packages with PkgTool.exe. Then you will see folders \sys and \oem. When you go into, for example oem\oemapps folder you will see files for some applications.

4. After you make changes to the rom files you have to pack with imgfsFromDump.exe. You will get a new imgfs.bin file. You have to insert it back to your pda.nb0.os.nb (you can give it any name as you like as long as it is .nb extension). Osnbtool will create a new file with extension .NEW. This is you modified .nb file. After you add the header you have to rename it to .nb0. 

If you don't have any other .nb0 file you could create the header yourself with hex editor. You could use Pako's EXEcutor (you need test version 2.5) to rebuild .nb0 file from dump. Or you can download any cooked rom and you will find it there.

Hope it answers your questions. But before you start cooking, please do some reading. There is a lot of information about it here and on xda-developers web site.

Link to comment
Share on other sites

Yes, I8000 .ROM module has an unconventional size... just take .ROm from another device WM 6.5 rom.. e.g. HD2... its legal ;) Trust me

I just deleted 8 bytes to make sure that I have other bytes at the right position. But what puzzles me, why don't I have to put those bytes back after relocation? If I do it doesn't work.

Link to comment
Share on other sites

Guest rodrigofd
I just deleted 8 bytes to make sure that I have other bytes at the right position. But what puzzles me, why don't I have to put those bytes back after relocation? If I do it doesn't work.

OK ... did you do xip porting.. or just rellocated imgfs modules?

Link to comment
Share on other sites

OK ... did you do xip porting.. or just rellocated imgfs modules?

Yes, I did both.

Edit:

I thought, that since it is a thread about cooking I might as well post instructions how I did it. And also, I got a PM from Khuanchai that it worked for him as well, so why not. If someone else wants to try it, go for it.

What you need is ExtReloc and XipPort. You can google it and you should be able to find it.

1. Extract imgfs.bin and xip.bin with osnbtool.exe

2. Dump imgfs.bin with ImgfsToDumpxxx.exe

3. Make packages with PkgToolexe

4. Dump xip.bin with Dump.exe

5. Move \dump\sys to \sys folder

6. Move \dump\oem to \oem folder

7. Create \rom folder and move \xip folder and romhdr.bin to this folder

8. Copy xip.bin to the folder where you have xipport.exe

9. Run xipport and press "dump xip.bin" button. Then press "write maps". Then press "make pkgs" This will create \out folder in your xipport directory

\out\romhdr.txt

\out\parthdr.txt

\out\files\OEMXIPKernel\*.* <--files

\out\modules\OEMXIPKernel\*.* <--modules

10. Delete folders MSXIPKernel and MSXIPKernelLTK in both \Files and \Modules directories. Rename \out folder to let's say \outold

11. Get xip.bin for new OS and do the same steps as in point 9

12. Delete everything except for MSXIPKernel and MSXIPKernelLTK in both \Files and \Modules directories.

13. From \MSXIPKernel folder delete hd.dll, hd.dll.txt, osaxst0.dll and osaxst0.dll.txt.

14. copy MSXIPKernel and MSXIPKernelLTK folders in both \files and \modules to \outold folder. You can delete \out folder and rename \outold to \out.

15. Run xipport and press "undo" this will convert modules to flat dump.

Now you have xip ready for relocation.

16. Opem imageinfo.bin located in \sys\.rom\ folder in hexeditor. Delete 8 bytes from the offset 18(hex) otherwise ExtReloc will not recognize it as a WM6.5 rom.

17. Run buildos.exe. Don't run all_packages_to_one.

18. Start ExtReloc

19. Go to setting page in imgfs path, point it to \TEMP\DUMP. Set appropriate nk.exe type (wm6.1 or wm6.5) all other setting you can use but default

20. Set path to your XIPort folder where you have your ported XIP (from step 15)

21. Tick Show page "Debug" and "Set active page "Debug" during reloc. Here you will see if you get any error during relocation.

22. Untick "Use packages.cif for reloc IMGFS (I am not sure what this does so I unticked it)

23. Go to work page, press "import xipport" and xipport start

24. Press "ReallocV" in extreloc

25. Go to xipport and press "realoc P". Press "write map" in xipport

26. Go to extreloc and double click on "physlast" number, press "realloc nk.exe gsiir" ... button

27. Go to xipport and press "realloc P" again. You shouldn't get any errors on Debug tab. Xip is now ported.

28. In extreloc drag the vertical white line to the left and press "realloc imgfs". Check for errors

29. Press "Save .VM and .ROM". Close extreloc

30. In xipport press "Build xip_out.bin". This is is new xip. I made it the same size as original one by inserting 0 bytes to the end of the file. Is it necessary, not sure.

31. Use imgfsfromdump to make new imgfs from \temp\dump folder

32. Insert xip_out.bin with osnbtool to you .nb file. This will create a new file .nb.new. Rename it so it is a .nb file.

33. Insert imgfs_new.bin with osnbtool to the file that you inserted new xip before.

34. The rest you know what to do... header, file size, checksum etc. and hopefully it will work.

Edited by wes58
Link to comment
Share on other sites

wes58:

can i apply imgfsfromdump with the following folder?

my imgfsfromdump keeps crashing when i apply this folder.

can u elaborate on

After you make changes to the rom files you have to pack with imgfsFromDump.exe. You will get a new imgfs.bin file. You have to insert it back to your pda.nb0.os.nb (you can give it any name as you like as long as it is .nb extension). Osnbtool will create a new file with extension .NEW. This is you modified .nb file. After you add the header you have to rename it to .nb0.

how to pack using imgfsfromdump.exe since its in package form,

and how to use osnbtool to insert imgfs.bin to form a .NEW nb file?

Instructions I wrote were intended for people who have some knowledge about the software used for dumping and packing back. The best advice I have is for you to start searching and reading on this and other forums. There is no point re-writing something that already has been written before. The instruction I wrote relate to porting new OS to the rom. If you are just modifying it only part of them apply.

I will give you only a brief explanation:

1. When you dump the rom (imgfs.bin) with imgfsToDump it creates 'flat' dump - files and folders are together in a dump folder. So you don't know which files are OEM (Samsung) and which are SYS.

2. After you run pkgTool.exe, it separates them to two folders \OEM and \SYS. It makes it easier to modify and add files. 

3. After you change what you want you have to get to the 'flat' again. To do it you need to use BuildOS.exe. BuildOS is looking for a certain structure of folders:

Let's say that you root folder is \omnia. In this folder you have to have the following

\OEM\  <- you will have all files from oem dump

\SYS\  <- you will have all files from sys dump

\ROM\XIP\  <- XIP folder will be created in your root folder after you dump xip.bin with dump.exe. You have to move it here

\ROM\romhdr.bin <- this file will be created as above, you have to move it to \ROM folder.

\Tools <- where all kitchen software is

Then you can run BuildOs, which will create \temp\dump folder.

4. After that you have to run imgfsFromDump (you have to change to temp folder and run it from there) which will create imgfs.bin

5. You have to insert it to your nb file using osnbtool.

How you use each program? You can type on the command line for example osnbtool and you will see all the options. 

You can have a look in the attached files, you will see commands used (or you can drag you pda.nb0 file into each of them to extract or pack). I wrote those files a while ago but rarely used i,t so there may be some errors. That's something for you to learn and fix. The files from the archive have to be in your root folder \omnia (or whatever you decide to call it, as long as other folders are there). The files expect that you program files (buildos, osnbtool etc.) are in the \Tools folder.

Hopefully this will help you a little bit.

test.rar

Edited by wes58
Link to comment
Share on other sites

wes58 :

Using dump.exe to dump xip.bin i get error. Keep telling me usage dumprom file.nb. Am i using wrong version?

Edit : nvm. I thought you were saying dump xip.bin with dump.exe so to extrack xip to modules and files ... My mistake.

Edited by jermx
Link to comment
Share on other sites

Thanks guys esp. wes58.! I finally managed to cook 28008 ROM with HTC Sense. Hope RFD wont mind me using his ROM as a base (:

Btw, for 28014 and 28011 also can use same method by just using xip.bin? SYS no need change?

Link to comment
Share on other sites

Guest mattb777
Thanks guys esp. wes58.! I finally managed to cook 28008 ROM with HTC Sense. Hope RFD wont mind me using his ROM as a base (:

Btw, for 28014 and 28011 also can use same method by just using xip.bin? SYS no need change?

now that sounds like the ultimate rom! great job man

Link to comment
Share on other sites

Guest rodrigofd
Thanks guys esp. wes58.! I finally managed to cook 28008 ROM with HTC Sense. Hope RFD wont mind me using his ROM as a base (:

Btw, for 28014 and 28011 also can use same method by just using xip.bin? SYS no need change?

Jermx please do not post Sense 2.5 rom based on mine

Link to comment
Share on other sites

Jermx please do not post Sense 2.5 rom based on mine

Yep. Okay i know. But personal usage would it be fine ? (:

Even if i were to post i would post a clean ROM maybe without titanium. Sorry if it had offended you .. ):

Link to comment
Share on other sites

Guest rodrigofd
Yep. Okay i know. But personal usage would it be fine ? (:

Even if i were to post i would post a clean ROM maybe without titanium. Sorry if it had offended you .. ):

No offense taken, and of course you can have it for personal use, in any case i don't own author rights to demand anything regarding HTC software... just i kindly ask you to don't 're-use' my rom 'dissection' work, to publish new custom roms...

Link to comment
Share on other sites

Wes, I tried following your guide to cook a custom ROM containing all Samsung stuff with a 6.5.3 wm build but I stumbled upon the following:

16. Opem imageinfo.bin located in \sys\.rom\ folder in hexeditor. Delete 8 bytes from the offset 18(hex) otherwise ExtReloc will not recognize it as a WM6.5 rom.

There is no "imageinfo.bin" file located in \sys\.rom. Only an "imageinfo.txt" file.

17. Run buildos.exe. Don't run all_packages_to_one.

Just to see what happens, I tried following through this step. BuildOS crashes at the end, saying an external component caused an exception. The status bar said something about missing initflashfiles.dat.

Could you please explain what went wrong? Up to step 16 I encountered no error.

Thanks, and sorry if I sound like a real noob.

Link to comment
Share on other sites

Guest Khuanchai
Yes, I did both.

Edit:

I thought, that since it is a thread about cooking I might as well post instructions how I did it. And also, I got a PM from Khuanchai that it worked for him as well, so why not. If someone else wants to try it, go for it.

What you need is ExtReloc and XipPort. You can google it and you should be able to find it.

1. Extract imgfs.bin and xip.bin with osnbtool.exe

2. Dump imgfs.bin with ImgfsToDumpxxx.exe

3. Make packages with PkgToolexe

4. Dump xip.bin with Dump.exe

5. Move \dump\sys to \sys folder

6. Move \dump\oem to \oem folder

7. Create \rom folder and move \xip folder and romhdr.bin to this folder

8. Copy xip.bin to the folder where you have xipport.exe

9. Run xipport and press "dump xip.bin" button. Then press "write maps". Then press "make pkgs" This will create \out folder in your xipport directory

\out\romhdr.txt

\out\parthdr.txt

\out\files\OEMXIPKernel\*.* <--files

\out\modules\OEMXIPKernel\*.* <--modules

10. Delete folders MSXIPKernel and MSXIPKernelLTK in both \Files and \Modules directories. Rename \out folder to let's say \outold

11. Get xip.bin for new OS and do the same steps as in point 9

12. Delete everything except for MSXIPKernel and MSXIPKernelLTK in both \Files and \Modules directories.

13. From \MSXIPKernel folder delete hd.dll, hd.dll.txt, osaxst0.dll and osaxst0.dll.txt.

14. copy MSXIPKernel and MSXIPKernelLTK folders in both \files and \modules to \outold folder. You can delete \out folder and rename \outold to \out.

15. Run xipport and press "undo" this will convert modules to flat dump.

Now you have xip ready for relocation.

16. Opem imageinfo.bin located in \sys\.rom\ folder in hexeditor. Delete 8 bytes from the offset 18(hex) otherwise ExtReloc will not recognize it as a WM6.5 rom.

17. Run buildos.exe. Don't run all_packages_to_one.

18. Start ExtReloc

19. Go to setting page in imgfs path, point it to \TEMP\DUMP. Set appropriate nk.exe type (wm6.1 or wm6.5) all other setting you can use but default

20. Set path to your XIPort folder where you have your ported XIP (from step 15)

21. Tick Show page "Debug" and "Set active page "Debug" during reloc. Here you will see if you get any error during relocation.

22. Untick "Use packages.cif for reloc IMGFS (I am not sure what this does so I unticked it)

23. Go to work page, press "import xipport" and xipport start

24. Press "ReallocV" in extreloc

25. Go to xipport and press "realoc P". Press "write map" in xipport

26. Go to extreloc and double click on "physlast" number, press "realloc nk.exe gsiir" ... button

27. Go to xipport and press "realloc P" again. You shouldn't get any errors on Debug tab. Xip is now ported.

28. In extreloc drag the vertical white line to the left and press "realloc imgfs". Check for errors

29. Press "Save .VM and .ROM". Close extreloc

30. In xipport press "Build xip_out.bin". This is is new xip. I made it the same size as original one by inserting 0 bytes to the end of the file. Is it necessary, not sure.

31. Use imgfsfromdump to make new imgfs from \temp\dump folder

32. Insert xip_out.bin with osnbtool to you .nb file. This will create a new file .nb.new. Rename it so it is a .nb file.

33. Insert imgfs_new.bin with osnbtool to the file that you inserted new xip before.

34. The rest you know what to do... header, file size, checksum etc. and hopefully it will work.

I guarantee that wes's guide here works great. A little complicated though.

I'm asking pako if he can help modify his i900executor to include all essential tools together. Hope we can get the easiest i8000 kitchen tool that everyone can use. ;)

Link to comment
Share on other sites

Wes, I tried following your guide to cook a custom ROM containing all Samsung stuff with a 6.5.3 wm build but I stumbled upon the following:

There is no "imageinfo.bin" file located in \sys\.rom. Only an "imageinfo.txt" file.

Just to see what happens, I tried following through this step. BuildOS crashes at the end, saying an external component caused an exception. The status bar said something about missing initflashfiles.dat.

Could you please explain what went wrong? Up to step 16 I encountered no error.

Thanks, and sorry if I sound like a real noob.

Run BuildOS first before getting imageinfo.bin. For step 17 i had no error. Try redumping another ROM.

Link to comment
Share on other sites

Guest monyozt
Yep. Okay i know. But personal usage would it be fine ? (:

Even if i were to post i would post a clean ROM maybe without titanium. Sorry if it had offended you .. ):

i hope titanium will be make default as today screen ;)

Link to comment
Share on other sites

i hope titanium will be make default as today screen ;)

Hmmm. Will try it out late this week. Now about to flash 6.5.3 28014 + Sense then have a good rest. Midnight here in SG. Night folks

Link to comment
Share on other sites

Guest Khuanchai

Great, great, great news!

I have discussed all the processes for i8000 ROM pack with Pako and he will release his new version of i900executor very soon. This new version will have a tool to completely pack i8000 ROM including the ExtReloc. Please wait and enjoy his great tool.

Edited by Khuanchai
Link to comment
Share on other sites

Guest tacchan23
Great, great, great news!

I have discussed all the processes for i8000 ROM pack with Pako and he will release his new version of i900executor very soon. This new version will have a tool to completely pack i8000 ROM including the ExtReloc. Please wait and enjoy his great tool.

Many great news during the few days I've been away on a trip (Hatyai)!

Link to comment
Share on other sites

Guest rodrigofd
Many great news during the few days I've been away on a trip (Hatyai)!

Great news, pal. I was trying to pack up my kitchen in useful tools, guess i can now better invest that time ;)

BTW.. Khuanchai, sorry for not sharing rellocation technique with you in time, i was about to but wes did it for me, funny he reached the exactly same steps as me, and we worked completely separated..

In any case, i am currently very frustrated with reserved memory thing... it is really serious and limitating... and i'm starting to loose hope.. i almost crossed to dark side ('buy hd2) hehe ...

Link to comment
Share on other sites

Guest Khuanchai
Great news, pal. I was trying to pack up my kitchen in useful tools, guess i can now better invest that time :)

BTW.. Khuanchai, sorry for not sharing rellocation technique with you in time, i was about to but wes did it for me, funny he reached the exactly same steps as me, and we worked completely separated..

In any case, i am currently very frustrated with reserved memory thing... it is really serious and limitating... and i'm starting to loose hope.. i almost crossed to dark side ('buy hd2) hehe ...

That's OK, RFD. I know both of you are smarter than me on programming and will finally find out solutions. ;) Glad that I haven't lost my hope and changed to another device before both of you have passed the hurdle.

For me the memory limit is not very crucial since we now get almost 100 MB free program memory. I remember the 20+ MB free memory when I was playing with Dopod P800W few years ago. B)

Anyway, HD2 is nice but there are also some limitations. I don't like a big thing over my ear for talking. B)

Link to comment
Share on other sites

Guest tacchan23

Two points from the first custom ROM for B7610 http://www.modaco.com/content/b7610-omnia-...big-difference/

1) making front camera accesible from camera app

2) fix the auto close program issue (i opened 15 apps and wait 4 hours,no apps closed automatic and gwes.exe go to 14.3M and not increase)

Maybe you guys could contact him and try to do the same?XD

Link to comment
Share on other sites

Guest rodrigofd
Two points from the first custom ROM for B7610 http://www.modaco.com/content/b7610-omnia-...big-difference/

1) making front camera accesible from camera app

2) fix the auto close program issue (i opened 15 apps and wait 4 hours,no apps closed automatic and gwes.exe go to 14.3M and not increase)

Maybe you guys could contact him and try to do the same?XD

Great... i added the front camera fix in my kitchen.. next roms will include it.

I don't currently have the auto close program issue 8-)

Link to comment
Share on other sites

Guest tacchan23
Great... i added the front camera fix in my kitchen.. next roms will include it.

I don't currently have the auto close program issue 8-)

so currently you can use the same 15 or so apps without problem too? that would be very nice too^^

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.