Need help analysing a non-Windows Mobile ROM .nbh file - Windows Mobile Development and Hacking General

I have a diagnostic .nbh image for Hermes devices. When copied to the storage card and started in bootloader mode, the device will boot the image and enter a diagnostics sort of mode. The utility ends after a bit when some "security checks" fail. I'd like to analyse the file but I'm having some trouble. I am somewhat experienced in disassembling ARM code, but I'd like to start at a higher level than that. I can convert the file to a .nb using the tools available on the forums, but I can't seem to break it down any further from there. Is anyone here familiar with the .nb file format? When I attempt to use the tools that convert a .nb to a ROM dump it fails saying "Not an img file" or something like that. It reads as a straight binary file in IDA so I'd have to manually identify an entry point in order to analyse it further.
The interface of the diagnostic mode looks similar to what is displayed when a ROM is being updated - a gray screen with a blue system font.
I can tell from looking at the .nb that there is significant functionality that I would like to check out further.
Any help?
fluxist

Related

WallabyRom and *.nbf files

Hi folks,
I found a WallabyRom151 from HTC and it says it is a mask rom tool. I've been successful flashing a NB0 file into my mda.
Now I wonder if this tool could alse hande *.NBF files from the /RUU directory my carrier suppies with their updates. The tool also mentions a menu entry BIN2ABX, so here I'd assume a possibility to convert files. But may someone shed some light on the purpose of these ABX files for me?
Have a good XDA/MDA weekend!
Peter
Where did you find this utility?

XDA tools nearly there but can't understand, any help plse

I have installed jeff summers version of xda tools. And though I think I understand what I am doing I am not totally convinced. Before I embark on cooking roms and upgrading etc I would like to be able to do the following:
1: Dump my current rom from my device to my PC I can do this using XDAtools OSImage but can only Can this only be NB1(windows CE(*.nb1) type files if I try to call this NBF I get the following error:
error opening C:\program files\xdatools\bootloader_v5_15.nb0ea for reading. the system cannot find the file specified.
error opening source bootloader from C:\program files\xdatools\bootloader_v5_15.nb0ea. error opening target device.
Can I dump my device memory into a file called ‘xxxx.NBF’?
2: When I try to upgrade my ROM by:
Start OSImage tool and select source as:
‘C:\PROGRAM FILES\XDATOOLS\BINARIES\ATT160204.NB1’
Select destination as ‘device memory (via programmeA) ‘
When attempting to load an ‘NB1’ ROM from my PC to my device memory (via programmeA) I always get the following message:
ProgrammeA not found - run with --register error opening target device.
I originally ran the programmeA with --register when first installed.
I have tried searching for a solution but to no avail. Any help appreciated.
Thanks John.
If you're trying to burn your original ROM back to the device that shouldn't be a problem. Use the [...] button to locate your .nb1 ROM for the source, and select Device Memory (via Programme A) as your destination.
Have you installed ProgrammeA.exe into the binaries folder of XDATools? That's the only thing I can think of.
Thanks I have tried this but believe the problem is the ProgrammeA file but it is definetly in the binaries folder. I am running win98SE but don't think this should be a problem. When you run jeffs tools it extracts itself out under program files and places all the required files in the right directories. Would appreciate it if any one out there can supply some help ?
Thanks John
I think I know what the problem is...
I have the same problem. If you look at the dos box that pops up you see that programmeA.exe looks in to the \\Binaries\English\ folder for a *.nbf file. It looks like you will have to provide it a *.nbf file in stead of a *.nb1

How to extract WM5 .nbf?

Anyone know how I can extract .nbf files? I need to see what is in this nbf file. Refer to this thread if you are curious
http://forum.xda-developers.com/viewtopic.php?p=250201#250201
Use the tools made by Buzz on this page:
http://buzzdev.net/index.php?option=com_content&task=view&id=65&Itemid=1
To see the contents of the nbf (converted to nba using the above method) file, you need to use these tools:
http://wiki.xda-developers.com/index.php?pagename=WM5EditROM
Its rather simple and hardly takes about 5 minutes for the whole thing
Cheers!
Thanx for the fast response. I gave it a go and it dosent seam to work. I get the .nba from the .nbf then when trying to
"prepare_imgfs.exe nk.nba"
I get this
"Searching for IMGFS start... Not found!"
I think that the .nbf is password protected. If anyone more gifted than me can help out with this one I know we will find a way to change the splash screen on all the newer (2.17 an so forth) ROMS.
Thanx again; Lew
then how do you extract NBF file from 8125 instead of NBA file ? Is there a way to do this ?
I would like input on this as well. I think we are missing a password here or something.
universaldoc said:
Use the tools made by Buzz on this page:
http://buzzdev.net/index.php?option=com_content&task=view&id=65&Itemid=1
Click to expand...
Click to collapse
I don't believe this works with (newer?) wizard nbf's.
Is there anyone here that could crack this would be "encryption" on the .nbf in question? I tried encoding my splash backup from aWizard using the project file from the "decoded" nk.nbf from "ruu_forcedalias_splash_245_425.exe" and it was a no go. It said that my storage was the wrong size for this ROM update (or something to the effect of NO). So it looks as if this nk.nbf from "ruu_forcedalias_splash_245_425.exe" is the key to unlocking the ability to change splash screens to custom images.
Later; Lew
u can try the tools in the attachment to extract files from image file.
the typho2 can extract parts from a SD card image, and the typhoonnbftool_04 can extract parts from a NBF file. they work well while do with the 1.x ROM, but I've never experienced it in extracting a 2.x ROM.
any exciting info, pls let me know,
Ok, good news, thanx to BrightMoonHeart I have been able to extract the BMP from the NBF using "typhoonnbftool_04.exe". The bad news is so far I can't seem to add an image (bmp) to the nbf or remove the current image. So this was a great step forward, just need a little help to get r done. I tried "typho2.exe" but I couldn't get it to do anything except give me the same info "typhoonnbftool_04.exe", It says it can extract the ".NBF" to an ".SPL" and that may allow us to edit it but I was not able to get it to convert. Any ideas guys? Always appreciated
Thanx; Lew
Ok I'm even closer now. I am using "typhoonnbfdecode.pl" and I can extract the ".nb" from the ".nbf". I can create custom splash using "nb_image_converter_859_418_826.exe" and make a ".nb" but when trying to put it back to ".nbf" i get this error
Code:
read 00030000 for splash from 92000000-Splash.nb
no sm signature at 0 in Splash
If anyone can help me out with any of this I would really appreciate it. I keep getting held up with all these conversions. I think some out there must know how to do this already, and I'm close but I keep hitting road blocks.
my head hurts; Lew

Samsung i718 (i710, i718+) ROM Kitchen

Hello!
Thanks to ppl from this forum I've managed to assemble from various sources files required to dump, build and flash back to device WM6 English ROM. It is not a "plug & play" style kitchen yet, so I call it "ROM Kitchen essentials"
Most of files are made by other people. Mine part was converter and flasher hacking. As for now, you have to edit dumped ROM absolutely manually. There are no support for initflashes.dat automatisation. You may want to use rgucomp to make changes to default.hv and user.hv.
Thanks goes to (not in any order )
trinca
mamaich
bepe
itsme
faria
double_ofour
yhauwang
and many others...
Actual version is 0.1 and RAR archive is about 50Mb.
All required files (including WM6 Eng ROM distribution and flasher) can be downloaded from:
h**p://www.r*pidshare.com/files/47189318/Juggler_Samsung_WM6_Eng_ROM_Kitchen_0.1.rar.html
You also may want to download original WM6 English ROM from here:
h**p://r*pidshare.com/files/45439904/Juggler_WM6_i718ZMGF4_PDA_Eng.rar.html
And radio firmware (required for some i71x to work with WM6):
h**p://r*pidshare.com/files/45950071/Juggler_WM6_i718ZMGF4_Phone_Eng.rar.html
In case somebody don't know how to flash Samsungs i71x:
Make backup!
Have your your firmware at hand so in case of troubles you can flash your original firmware back!
Turn off device.
Disable all ActiveSync connectivity (usb, comm, etc).
Run flasher and click start.
Hold "down" button on device and turn it on while holding "down".
Flasher recongnize it and start to flash.
After flashing make a hard reset.
If GPRS/EDGE do not work your radio firmware is not compatible with new WM6. You have to go back to your original firmware or flash new radio!
To flash new radio firmware you should have SPECIAL FLASHING CABLE for samsung phones! It is not the one that comes with device!
Now you have options to buy such cable, build one yourself, flash your original fimware back or continue using WM6 without GPRS/EDGE - it is your choice.
So - to flash WM6 you need usual usb cable. New WM6 probably work with your radio. If not - you should flash radio!
Special flashing cable is the cable with USB-Serial adapter or plain serial cable:
h**p://www.fonefunshop.co.uk/datacables/samsung.htm
Search for UNLOCK / FLASH CABLES and you'll see
"Samsung D800 - T809 - E900 - D900 USB Cable
This cable is needed to unlock / flash the Samsung D800 - T809 - E900 - D900 etc."
Notice the difference with the usual USB cable supplied with device!
Have you read my thread on the Samsung i60x?
Hello, there,
Please refer to this thread:
http://forum.xda-developers.com/showthread.php?t=316647
It seems very familiar to the i600. I will download your image just for the sake of taking a look... The ROM with header B000FF is prepared with the Romimage tool from the MS WCE IDE and is named the Run-time image, the nb0 ROM (that works with the WM5 kitchen) is prepared by Romimage by splitting the nb0 ROM in 128 KB records, a header is added containing start address, record length and Checksum 32. Then all this chunks are added together and compressed with another tool named compbin, the "encryption" you are seeing is no other than the aftermath of this compbin tool.
If you read myu thread you will find I was able to extract the flat image using cvrtbin (also another MS tool that comes with visual studio) you may grab a copy from here:
http://www.toradex.com/colibri_downloads/Linux/linux_to_wince/?D=D
Then you will be able to use the common tools from xda-developers such as prepare_imgfs (with the switch -acer) and so on.
Making the ROM back to the B000FF format is going to be the trouble. Again, read the thread.
There is also an excellent article on Mobilepro BIN roms made by cmonex, you can get a copy of that tutorial inside his Romtool packege, get it from here:
http://hpcmonex.net/nec900/files/releases/romtoolpack.zip
Be informed the Mobilepro ROM is very different in the way the Runtime file is organized, however is the best resource I have seen so far.
Besides, there are some really good tools inside that package
Best regards and start cooking!
trinca
Thanks trinca, at least I have something to read to start with. But the first thing a can't figure out how correctly RIP rom image from EXE file and then after modifing it PUT it back to flasher. There s.b. some proprietary tools for samsung phones or pdas.
Extracting the i718 ROM image: a suggestion
JugglerLKR said:
Thanks trinca, at least I have something to read ...
Click to expand...
Click to collapse
My friend, we are all navigating uncharted waters..., this requires some research, and the courage to flash the phone with the outcome of your research.
Please read my post:
http://forum.xda-developers.com/showthread.php?p=1371344#post1371344
It will give you a hint on how I found out how to extract the O/S payloads for the i60x, pretty sure it may work for your model as well. A quick look to your executable shows the arrangement may be similar, I would say for the i718, the O/S ROM is located last as it is on the i60x, starting at address 0x01620000 now, just by looking for the end indicator (following the string B000F, 0x0A, 0x00000000 which is the ROM start address, 0x00CA5F03 which should be the offset -little endian-, actually would be 035FCA00), however be noticed the runtime image is compressed using compbin during preparation, therefore I would guess is a little more beyond. You may have to do some research here.
Start by cutting the area surrounding such an offset and use viewbin to determine the offset length and cvrtbin to find if your cut was successful.
BTW it would be nice to find a tool to just decompress B000FF Runtime ROMS. (differently of what it does cvrtbin converting and decompressing Runtime images)
One other thing you may do is to use xdautils, you may find those here:
http://wiki.xda-developers.com/index.php?pagename=XdaUtils.
This collection of utilities has pdocread allowing you to extract the contents of raw partitions in the pda. Make sure to use the handle to extract each raw partition.
Regards,
Trinca
I had no success with cvrtbin. How to decompress image after compbin? I've found pdocread and put it to phone, but it won't work :-( Are there any tools to dump ROM to flash card or something like that?
JugglerLKR said:
I had no success with cvrtbin. How to decompress image after compbin? I've found pdocread and put it to phone, but it won't work :-( Are there any tools to dump ROM to flash card or something like that?
Click to expand...
Click to collapse
To decompress the image:
Get a tool named viewbin, also part of the MS PE, run it on your file and will tell you the start address and the offset of the img files. THen use this information with cvrtbin. If viewbin reports the start address is 0, then use 1 in cvrtbin, otherwise the extraction will fail.
To use PDOCREAD, you run it from your computer, it will install itsutils.dll in your phone and you must accept this in the smartphone. Your phone must be unlocked to do that and the policies set to allow unsigned applications to be installed in your phone. TO accomplish the above you need to modify the registry on the phone. See how it is done here:
http://www.modaco.com/index.php?showtopic=244205
TO dump the ROM with PDOCREAD, see a detailed procedure here:
http://wiki.xda-developers.com/index.php?pagename=Hermes_HowtoDumpRom
Be informed some phones like the i607 require the disk kernel handle, reported with pdocread -l, if you follow the procedure in the above link with no results, then add the disk handle.
Wish you good luck....
CAn Anybody help PLEASE????
I have a i718 but was bought in China and the OS is in Chinese. The blur me can only read English. Is the ROM in English? If I were to download it (still struggling now with the russian words), how can I change it? All I need is the phone to be in English. I do not need to improve anything as WM5 is good enough. I know I am a newbie and I might not be in the right thread. Can anybody please help? Any links to show "how-to-change the ROM" would be most appreciated. Thank you in advance
Your phone is also known as i710
Your phone Samsung i718 is the chinese version of the Samsung i710, all you have to do is to install the phone serial/modem drivers from the companion CD and place the phone in bootloader mode. If you get the ROM package cited above in the first post of this thread by JugglerLKR you will find complete instructions on how to download the ROM into your phone.
Good Luck!
Thank you
Thank you very much for the quick response sir! Really appreciate it. I finally managed to download the ROM and will give it a go this weekend. Wish me luck. I will be reading more to make sure I am doing the right thing as I am definitely a nOObie. First time flashing a phone .
I looked at the CD that came with my phone and the only thing I see is the ActiveSync 4.2. Worse of all, everthing seems to be in Chinese. Guess I have to do more research to see where I can get the drivers you mentioned. There are also alot of things I do not understand like bootloader, how to do a hard reset, etc. I will continue searching and reading and will post the development of my virgin "flash" as I move along.
Thank you once again.
Trinca - so I dumped my ROM from device to .raw files. What can I do with them now? viewbin shows only zeros on b000f .bin image extracted using winhex from .exe
Use Mamaich's ROM Kitchen
You can find instructions to do some cooking and tools here:
http://forum.xda-developers.com/showthread.php?t=249836
This is self-explanatory, tell me if this is enough or you need some extra info. Once finished, the trouble would be to put that back in B000FF format for flashing, as there is no tool to do that yet, and you can't just download a raw image back into the phone. The Runtime image is formed as follows:
Byte---->--1--2--3--4---5--6--7--8---9--10--11--12--<----------- 128KB------------>
Record 0> 42-30-30-30-46-46-06 <Start add> <lenght of ROM> -----------------(42-30-30-30-46-46 = B000FF in ASCII ; 06 = end of header B000FF)
Record 1>--<Address> < length > < CHKSUM32 > <----Chunk of Raw image-->
Record 2>--<Address> < length > < CHKSUM32 > <----Chunk of Raw image-->
" "
" "
V V
Last Rec>-00-00-00-00--00-00-00-00--00-00-00-00
I am doing some crazy splitting and Hex scripts to achieve that, but it is a pain in the neck. So I have decided to make a proggie to help me out with that. Please see the thread
http://forum.xda-developers.com/showthread.php?t=316647
on the 2nd post you will see what I am talking about.
Regards,
trinca
Tried viewbin on my extracted from .exe bin file - Image Start = 0x00000000, length = 0x02C1D3E0
Start address = 0x00000000
Done.
Looks like something is missing. Also cvrtbin is not working also, as it cannot accept 0x00000 as start adress
JugglerLKR said:
Tried viewbin on my extracted from .exe bin file - Image Start = 0x00000000, length = 0x02C1D3E0
Start address = 0x00000000
Done.
Looks like something is missing. Also cvrtbin is not working also, as it cannot accept 0x00000 as start adress
Click to expand...
Click to collapse
Start address = 0001ffe0
So, How to convert dumped LZX packed rom to B000F format for flashing to device?
How to convert dumped LZX packed rom to B000F format
Please refer to my thread:
http://forum.xda-developers.com/showthread.php?p=1392761#post1392761
I am unable to download your file (can you post it on rapidshare ou megaupload?). I am in the same situation as well but I appiled the english patch from asukal and Buzzlightyear and it worked .. I now have a device in english ... I am waiting for the firmware in english.. I have wm6 roms in chinese that I have not tested it ...
I also have a i710 rom but it's also a .bin file dumped from a i710 device ...
Hope this helps,
-Hau
I have uploaded several files... Can you tell me which one you have trouble with?
trinca
Oops ... My message was intended for Juggler uploading his ROM ...
Thanks,
-Hau
Thanks to trinca and bepe, mamich and many others i've managed rom kitchen essentials - look at first page.
i downloaded your flasher but why when i run i718ZMGF4_PDA_Eng, i click detect but nothing detected....
phone is on and connected via active sync

Help me kick the limit of my Herald to the curb!

Hey guys. I need your help. I think that with our combined know how, we can achieve this.
The Herald formats its storage memory using the size of the os.nb within the nbh file. It completely ignores the actual partition table within the os.nb. The problem is that the flasher for the Herald and Atlas has a size requirement of 51.2mb. If the file is smaller than this, the ruu says the image is corrupt. I can pad the image with FF's but it will still use the physical size of the file. (This is an observation, I haven't had time to "test" out my assumption.)
Can someone help me figure out a way to hack the RUU to allow flashes of smaller size?
ANY help will be GREATLY appreciated.
Bump. Anyone willing to help? I've been trying to decompile the RomUpdateUtil to no avail. I don't have the tools and the knowhow.
At the very least does anyone know what tools I can use? All my decompiling tools only work on Win32 files.

Categories

Resources