Jump to content

Hacked ROM!


Guest GNU

Recommended Posts

Sorry for the delay guys!

Ok here is what I THINK is going on, and from the little bits ive talked to the XDA guys I gather:

The .nbf files for smartphone are slightly different than XDA, thats why the dumprom.exe doesnt work properly.

What i did was to split the .nbf file into smaller sections, each one starting 0x70 bytes before the ECEC

so if there are 6 ECEC signatures in the file, i would make 6 smaller files and then run each one with dumprom. Some would work some wouldn't.

Then what I did was to slowly remove ECEC sections of the code which didnt run when it was a smaller file, theoretically removing the section that dumprom didn;t like. I also removed the bootloader.

This is how i dumped the qtek and orange ch roms as well as the eurotel.

I think some of the ECEC sections of the file are microsoft operating system files, and other section(s) are additional files added to the windowss directory by orange (kind of an operator area). you will see this when you dump the smaller files, one will have files like aeupdate.exe and all the *orange.dlls etc etc.

All the files are not corrupted, they work fine. but something with the security with smartphones doesn't allow someone to take an .exe and copy it to their phone and run it (say copying orange backup to an imate phone). I have a feeling it has something to do with the XIP chains but I am not sure on this either.

My latest hope was to get a better program, (actually a perl script) working called splitrom.pl (again made by the xda clan).

The splitrom.pl file will take a complete .nbf file and then extract the xip chain, the default registry setup file, the bootloder, the operator section (such as orange) and the OS.

http://www.xs4all.nl/~itsme/projects/xda/romtools.html

usage for this script is here:

Usage: splitrom [options]

-wx xipchain where to write xipchain

-wo osrom where to write output image

-wb bitmap where to write bitmap

-wl bootloader where to write bootloader

-rl bootloader which bootloader to use for NBF

-n nbfinfotext what NBF header to use [ex: PW10A1-ENG-3.16-007]

-ri nbfinfofile or where to read NBF header info from

-wi nbfinfofile where to save NBF header info

-rx xipchain where to get xipchain from

-rb bitmap where to get bitmap from

-rm romsection@offset insert new romsection.

-ob offset where to find the bootup image

-oe offset the end of the desired os image ( default: 0x81f00000 )

-t NBF | B000FF | NB? | IMG type of result image (default is NB1)

I beleive once you run splitrom on your rom, you will get other .nb1 and .nb0 files which can be dumped.

The xda clan also has a tool which will write .nb1 files onto a smartcard or directly to the device to upgrade. what is nice about this is that the .nb1 file doesn't touch the bootloader area so it is lesss likely that anyone will bugger up their phone.

There are even tools to update the XIP chain which is what I think we need to do in order to make the exe's and dll's we extract run on the phones.

I don't know that much about perl or the .nbf format at all but I think the next step we need to take is to get the splitrom.pl script working with smartphone roms.

I have contacted the author as well but I am unsure how much time he has or how eager he is to adapt his program to run with smartphone roms.

Link to comment
Share on other sites

Guest florin_m

How to full extract the files from rom:

Tools needed:

1. 32M or bigger SD/MMC card

2. Card read/writer for PC (USB one for fast transfer)

3. Winhex

4. USBTerm

6.dumprom

7. free time :)

Let's start:

First open winhex, open SD phizical not logical (the same as copying new bootloader on it) and fill it all with FF's

Now be sure all card is ff'd

Put SPV/e100/Qtek/tanager in bootmode

Connect sd card in

connect USB cable

run USBterm

now:

type this:

qfs 10 (format card)

qfs 64 (dump smartphon area to card)

After finish this, put card in usbreader read it full and save it as smartphon.bin

Now how to edit the .bin file

first let's trim it

look where the data's finish and all ff's begin (be sure that are all ff's till the end of card). From there delete , meaning that the zone finished

now at begin of .bin file

U'll have "Hilter......" then something alike a FAT structure, then chain list and then the contents. so where out part begin?

at the end of 0x23 's u'll see sonething alike so:

"#####þ êÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ

Link to comment
Share on other sites

Guest vijay555

OMG Floring :shock:

To quote ST:TNG, "his eyes are open".

Whether we (I) can do anything with it will be interesting :)

Anyone heard any interesting rumours about Orange 1.6?! :?

V

Link to comment
Share on other sites

Guest morpheus2702

Posted from my SmartPhone! Well, in keeping with TNG theme, it would appear to be caught in a temporal anomaly. someone needs to 'make it so' rather quickly. Shame it wasn't the Orange suited guys that were cannon fodder...

Link to comment
Share on other sites

Hey florin_m,

Is it possible to load the bin back onto the phone using USBTerm just like you did to copy the flash from the phone to the SD card?

Using a QFS command like:

QFS HELP: MODE

0: Bootloader --> CARD

1: CARD --> Bootloader

2: WinCE --> CARD

3: CARD --> WinCE

4: GSM --> CARD

5: CARD --> GSM

6: CE+GSM --> CARD

7: CARD --> CE+GSM

8: IPSM --> CARD

9: CARD --> IPSM

10: Format CARD

---------- XIP Update ----------

100: SMARTFON --> CARD

101: OPERATOR --> CARD

102: CHAIN --> CARD

103: OEM --> CARD

104: LANG --> CARD

105: CARD --> SMARTFON

106: CARD --> OPERATOR

107: CARD --> CHAIN

108: CARD --> OEM

109: CARD --> LANG

How hard would it be to take our modified versions of the operator and lang sections, put them back into the format they came from off the card and then re-loaded them onto the phone using the QFS command?

I think this would be the safest way so that we could leave our bootloader alone, unless you have a better idea/method of doing this?

Also, how can we re-create the header we stripped out of the SD card dump, i understand its a basic fat system with some sort of CRC checking ??

Mike

Link to comment
Share on other sites

Guest florin_m

Re-inserting the file on sd card is not a simple task (lot's of crc's) but i gona realease a tool for flashing it via usb/serial wich will be secure (not touching bootloader and other funny parts). Unfortunate i have not so much free time cause i got to work to make some money for my family (i'm self employed just now) and I'm the only one working cause my wife is still in colage, so as soon i'll have some spare time i'll put all toghether and i'll make tool for it (i have all info, is build in a version, but is not user friendly) need some "reajustments" to be sure that will not kill any phones.

So u can wait till i put it toghther or u can try to do it yourself (all infos are there waiting for you if u know what i mean).

Regards,

Florin

Link to comment
Share on other sites

OK florin_m,

Thanks for replying. Hopefully you will grace us with your software soon :).

Untill then I will try to get mkrom adjusted to build bin files from the files that result from your method of dumping.

A few quick questions though:

1. after completing the mkrom process, you should get a .nb1 file, if you included a bootloader (which you shouldnt cause we wont be touching bootloaders here boys!) then you will get a .nbf too.

If you check this page: http://www.xs4all.nl/~itsme/projects/xda/w...le-formats.html some nice person has already described the differences between all the different flash formats.

i also have noticed that teh same author has also written a program called splitrom.pl which is supposed to convert between file formats.

My question is this:

Can we take the .nb1 output from the mkrom program and then somehow run the splitrom script to convert the .nb1 back to a .bin which we can then copy onto the SD card using winhex and ultimately loading the .bin back onto the phone using the QFS commands?

Can you see any potential problems with this method also?

Thanks,

Mike

Link to comment
Share on other sites

Hey guys,

Just to make something clear:

When we make a custom rom, we wont be able to change the IPSM size from what it originally was in the rom. According to florin_M, the IPSM is hard coded into the kernel for specific memory address range. Untill we change this, the IPSM will remain the exact same size as it was in the original rom.

When we will strip out applications we dont need, like the orange tools we naturally will gain space (i think i calculated 2-5mb just for "orange" crap but i am not sure of the exact number (i am at work)).

that extra 2-5mb cannot be added to the IPSM just yet, but what we can do is take applicaitons that everyone normally uses and installs on their IPSM (such as pocketmusic, pocketmvp, xbar, taskman, smart explorer) etc and put them in the space where the orange stuff originally is.

So technically we are not increasing hte size of the IPSM, just increasing the % of IPSM space available to the user because they will have to install less.

Another hope is to take the best t9xxxx.dll's from each release (we already know some t9english.dll work better than others, some even having non english words etc) and include them into the custom rom.

Hope this clears things up a bit.

I hoped to get some development on smartphone done this week but I have an upcoming vacation soon and therefore I am extremely busy at my work - hopefully this weekend I can build a custom rom, no promises though.

Mike

Link to comment
Share on other sites

tnx for the info and i will wait for improvments..

Yeah, but if you loose some of those USELESS CRAP, you can take advantage of some APPZ that is really nesessary. But will that slowdown the phone? Will there be any effect?(sorry 4 asking silly qest)...

Link to comment
Share on other sites

Hey all

Sorry for the long delay in adding to this thread, I've been busy at work since I am going on vacation soon (Oktoberfest in Munich ;) )

Anyways, I got a SD card reader and dumped the files as per Florin_m's instructions.

I dumped the all the regions of my Swiss 1.50 Orange rom and then again using the Imate 1.50.8.6 Rom Update. I have also backed up the Orange Radio Stack (because the Imate update updates the radio stack) and will be required if I want to downgrade to an Orange Update. If anyone needs this radio stack I can send it to them but I will not post it online yet.

It seems that the Imate and the swiss rom both have IPSM sections of 7.50 megabytes.

About the OEM sections of the ROMS:

The swiss 1.5 orange rom has alot of Orange software, such as Orange Update and Orange Backup and Sound Manager and others equalling about 5.5mb.

The Imate 1.50.8.6 rom uses about 4.5mb and has no orange software (obviously) but does include IA Album and other software.

If anyone has linux/unix installed on any of their machines, I am proposing a very simple test rom creation where we can utilize the additional 1 mb of space in the OEM section of the rom with some software , say Smart Explorer, Smart Task Manager and Pocket Music.

Florin_M suggested to edit the makerom script (a linux shell script) with the appropriate memory regions. From looking at this script and the information florin has provided, this shouldn't be too hard.

After that we need a guinea pig to test this on.

Any volunteers to build this rom using their linux box?

I have a machine i can install linux on but I wont have time for about 3 weeks until I get back from germany.

The IMATE 1.50.8.6 rom dumped (with each section in it's own folder) can be found here:

http://www.planetsmartphone.com/files/imate15086.ZIP

also included are the txt files generated by dumprom.

Mike

Link to comment
Share on other sites

I almost forgot!

in the LANG region of the IMATE 1.50.8.6 rom (as well as other roms) there is a FDF file which can be converted to a registry file.

From what I understand, this file is used to initialize the registry upon a cold boot. there is a tool that an xda developer made to convert this file into a readable format:

REGEDIT4

[HKEY_CURRENT_USERMUI]

"CurLang"=dword:00000409

[HKEY_LOCAL_MACHINESecurityPoliciesPolicies]

"00001019"=dword:0000008c

"00001018"=dword:00000010

"00001017"=dword:00000010

"00001013"=dword:00000001

"00001011"=dword:00000001

"0000100f"=dword:00000e94

"0000100e"=dword:00000040

"0000100d"=dword:00000c00

"0000100c"=dword:00000800

"0000100b"=dword:00000c84

"00001009"=dword:00000003

"00001008"=dword:00000001

"00001007"=dword:00000040

"00001005"=dword:00000040

"00001001"=dword:00000002

"0000000a"=dword:ffffffff

[HKEY_LOCAL_MACHINEMUI]

"SysLang"=dword:00000409

"Enable"=dword:00000001

[HKEY_LOCAL_MACHINEinit]

"Launch95"="cprog.exe"

"Launch90"="cdial.exe"

"Launch85"="appman.exe"

"Depend80"=hex:23,00,28,00,21,00

"Launch80"="home.exe"

"Depend75"=hex:28,00,21,00

"Launch75"="cpmwarn.exe"

"Depend55"=hex:15,00,21,00

"Launch55"="srvtrust.exe"

"Launch45"="connmgr.exe"

"Depend40"=hex:1e,00,21,00,23,00

"Launch40"="telshell.exe"

"Depend35"=hex:14,00,21,00

"Launch35"="cpmpsl.exe"

"Depend33"=hex:0f,00,1e,00

"Launch33"="updatexip.exe"

"Depend30"=hex:15,00

"Launch30"="gwes.exe"

"Depend21"=hex:14,00

"Launch21"="coldinit.exe"

"Depend20"=hex:05,00,0f,00

"Launch20"="device.exe"

"Launch15"="regupdater.exe"

"Depend10"=hex:05,00

"Launch10"="shell.exe"

"Launch5"="bootscan.exe"

[HKEY_LOCAL_MACHINECommSecurityCryptoDefaultsProvider TypesType 001]

"Name"="Microsoft Enhanced Cryptographic Provider v1.0"

[HKEY_LOCAL_MACHINECommSecurityCryptoDefaultsProviderMicrosoft Enhanced Cryptographic Provider v1.0]

"Signature"=hex:4d,95,d6,cf,44,ae,9c,92,bb,51,22,b3,a3,aa,bb,e4,af,62,b8,d1,

31,cf,17,50,f3,19,83,b1,54,93,71,d7,47,d1,f2,bb,89,cd,f2,fa,8c,12,30,e0,ac,

57,fc,30,a1,55,33,44,09,7d,d5,be,04,6e,3e,f9,e3,a9,06,22,8a,f7,8e,d6,24,c6,

3e,cc,1e,6f,10,05,ae,19,27,47,ed,19,96,46,2b,09,58,02,2b,f8,83,ff,65,f6,fc,

b6,6f,00,8b,af,7c,2f,78,e8,d3,4e,cd,10,76,61,26,0e,02,6f,66,fb,bd,dd,f2,2c,

8c,5c,d7,61,75,af,1a,16,00,00,00,00,00,00,00,00

"Type"=dword:00000001

"Image Path"="Windowssaenh.dll"

Just for shits n' giggles, here is the default.fdf from the Orange Swiss 1.50 rom:

REGEDIT4

[HKEY_CURRENT_USERMUI]

"CurLang"=dword:00000409

[HKEY_LOCAL_MACHINESecurityPoliciesPolicies]

"00001019"=dword:0000008c

"00001018"=dword:00000010

"00001017"=dword:00000010

"00001013"=dword:00000001

"00001011"=dword:00000001

"0000100f"=dword:00000e94

"0000100e"=dword:00000040

"0000100d"=dword:00000c00

"0000100c"=dword:00000800

"0000100b"=dword:00000c84

"00001009"=dword:00000003

"00001008"=dword:00000001

"00001007"=dword:00000040

"00001005"=dword:00000040

"00001001"=dword:00000002

"0000000a"=dword:ffffffff

[HKEY_LOCAL_MACHINEMUI]

"SysLang"=dword:00000409

"Enable"=dword:00000001

[HKEY_LOCAL_MACHINEinit]

"Launch95"="cprog.exe"

"Launch90"="cdial.exe"

"Launch85"="appman.exe"

"Depend80"=hex:23,00,28,00,21,00

"Launch80"="home.exe"

"Depend75"=hex:28,00,21,00

"Launch75"="cpmwarn.exe"

"Depend55"=hex:15,00,21,00

"Launch55"="srvtrust.exe"

"Launch45"="connmgr.exe"

"Depend40"=hex:1e,00,21,00,23,00

"Launch40"="telshell.exe"

"Depend35"=hex:14,00,21,00

"Launch35"="cpmpsl.exe"

"Depend33"=hex:0f,00,1e,00

"Launch33"="updatexip.exe"

"Depend30"=hex:15,00

"Launch30"="gwes.exe"

"Depend21"=hex:14,00

"Launch21"="coldinit.exe"

"Depend20"=hex:05,00,0f,00

"Launch20"="device.exe"

"Launch15"="regupdater.exe"

"Depend10"=hex:05,00

"Launch10"="shell.exe"

"Launch5"="bootscan.exe"

[HKEY_LOCAL_MACHINECommSecurityCryptoDefaultsProvider TypesType 001]

"Name"="Microsoft Enhanced Cryptographic Provider v1.0"

[HKEY_LOCAL_MACHINECommSecurityCryptoDefaultsProviderMicrosoft Enhanced Cryptographic Provider v1.0]

"Signature"=hex:4d,95,d6,cf,44,ae,9c,92,bb,51,22,b3,a3,aa,bb,e4,af,62,b8,d1,

31,cf,17,50,f3,19,83,b1,54,93,71,d7,47,d1,f2,bb,89,cd,f2,fa,8c,12,30,e0,ac,

57,fc,30,a1,55,33,44,09,7d,d5,be,04,6e,3e,f9,e3,a9,06,22,8a,f7,8e,d6,24,c6,

3e,cc,1e,6f,10,05,ae,19,27,47,ed,19,96,46,2b,09,58,02,2b,f8,83,ff,65,f6,fc,

b6,6f,00,8b,af,7c,2f,78,e8,d3,4e,cd,10,76,61,26,0e,02,6f,66,fb,bd,dd,f2,2c,

8c,5c,d7,61,75,af,1a,16,00,00,00,00,00,00,00,00

"Type"=dword:00000001

"Image Path"="Windowssaenh.dll"

Does anyone have any ideas what the crypto section does?

Mike

Link to comment
Share on other sites

Hey all

Sorry for the long delay in adding to this thread, I've been busy at work since I am going on vacation soon (Oktoberfest in Munich ;) )

I'm going there Friday/Saturday this week !!!

Cheers

PT-1

Link to comment
Share on other sites

Here is the initflashfiles.dat file from the IMATE 1.50.8.6 rom converted from unicode to ansi so it is readable.

This is what files are copied from ROM and placed into the IPSM when the smartphone is cold booted. It is also what sets up the default directory structure.

root:-Directory("My Documents")

root:-Directory("Program Files")

root:-Directory("MAPI")

Directory("MAPI"):-Directory("ATTACHMENTS")

Directory("Program Files"):-Directory("Connections")

Directory("Program FilesCommunication"):-Directory("Mail Attachments")

Directory("Windows"):-Directory("Help")

Directory("Windows"):-Directory("Fonts")

Directory("Windows"):-Directory("Accessories")

Directory("Windows"):-Directory("StartUp")

Directory("Windows"):-PermDir("Start Menu")

Directory("Windows"):-Directory("Temporary Internet Files")

Directory("Windows"):-Directory("Favorites")

Directory("Windows"):-Directory("homeimg")

Directory("Windows"):-Directory("ConfigMgr")

Directory("Windows"):-Directory("AppMgr")

Directory("Windows"):-Directory("Debug Apps")

;*** Start {

; explorer will sort

;Directory("WindowsStart Menu"):-PermDir("Settings")

Directory("WindowsStart Menu"):-PermDir("Accessories")

; This link represents the SIM Toolkit application -- it should NOT be localized

Directory("WindowsStart Menu"):-File("SimTkUI.lnk","WindowsSimTkUI.lnk")

Directory("WindowsStart Menu"):-File("Settings.lnk","Windowssettings.lnk")

; tmp until have CPL (?)

Directory("WindowsStart Menu"):-File("Speed Dial.lnk","Windowsscut.lnk")

Directory("WindowsStart Menu"):-File("Call History.lnk","Windowsclog.lnk")

; todo: Directory("WindowsStart Menu"):-File(LOC_SVCSLNK,"Windowssvcs.lnk")

Directory("WindowsStart Menu"):-File("Notes.lnk","Windowstnotes.lnk")

Directory("WindowsStart Menu"):-File("Tasks.lnk","Windowstasks.lnk")

Directory("WindowsStart Menu"):-File("Contacts.lnk","Windowsaddrbook.lnk")

Directory("WindowsStart Menu"):-File("Calendar.lnk","Windowscalendar.lnk")

Directory("WindowsStart Menu"):-File("Voicemail.lnk","Windowsvoicemail.lnk")

Directory("WindowsStart Menu"):-File("Internet Explorer.lnk","Windowspie.lnk")

Directory("WindowsStart Menu"):-File("Inbox.lnk","Windowstmail.lnk")

Directory("WindowsStart Menu"):-File("ActiveSync.lnk","Windowssync.lnk")

Directory("WindowsStart Menu"):-File("MSN Messenger.lnk","WindowsMSNMsgr.lnk")

Directory("WindowsStart Menu"):-File("WMPlayer.lnk","WindowsWMPlayer.lnk")

Directory("My Documents"):-File("WindowsMedia.asf","Windowswm_start.lnk")

; }

;*** Programs {

; explorer will sort

Directory("WindowsStart MenuAccessories"):-File("Infrared Receive.lnk","Windowsirrx.lnk")

Directory("WindowsStart MenuAccessories"):-File("Calculator.lnk","Windowscalc.lnk")

Directory("WindowsStart MenuAccessories"):-File("Player.lnk","WindowsWindows_Media.lnk")

Directory("WindowsStart MenuAccessories"):-File("ATCIUI.lnk","WindowsATCIUI.lnk")

; }

;*** Games

; explorer will sort

Directory("WindowsStart Menu"):-Directory("Games")

Directory("WindowsStart MenuGames"):-File("Solitaire.lnk","Windowssolitare.lnk")

;*** Startup

; explorer will sort

; Startup Folder

Directory("WindowsStartUp"):-File("coldinit.lnk","Windowscoldinit.lnk")

;*** Debug Utilities

Directory("WindowsStartUp"):-File("Usbcnect.lnk","WindowsUsbcnect.lnk")

Directory("WindowsStartUp"):-File("eloff.lnk","Windowseloff.lnk")

Directory("WindowsStartUp"):-File("SmsClassZero.lnk","WindowsSmsClassZero.lnk")

Directory("WindowsStart Menu"):-File("SIM Manager.lnk","WindowsSIMMgr.lnk")

Directory("WindowsStartUp"):-File("EzPushRouterRegister.lnk","WindowsEzPushRouterRegister.lnk")

Directory("WindowsStart MenuAccessories"):-File("MMS Setup.lnk","WindowsEzMmsCpl.lnk")

Directory("WindowsStartUp"):-File("MMSSvc.lnk","WindowsMMSSvc.lnk")

Directory("WindowsStart Menu"):-File("Photo.lnk","WindowsIA_Album.lnk")

Directory("WindowsStart Menu"):-File("Camera.lnk","WindowsIA_Camera.lnk")

Directory("My Documents"):-File("Lady.jpg","WindowsLady.jpg")

Directory("WindowsStartUp"):-File("LaunchSTK.lnk","WindowsLaunchSTK.lnk")

Directory("WindowsStart Menu"):-File("STK Service.lnk","WindowsSTK_Service.lnk")

Directory("WindowsStart MenuAccessories"):-File("Authentication.lnk","WindowsAuthentication.lnk")

Directory("WindowsStart MenuAccessories"):-File("CSDType.lnk","WindowsCSDType.lnk")

Directory("WindowsStart MenuAccessories"):-File("CellBroadcast.lnk","WindowsCellBroadcast.lnk")

Directory("WindowsStartUp"):-File("USSD.lnk","WindowsUSSD.lnk")

Directory("WindowsStartUp"):-File("AutoConfig.lnk","WindowsAutoConfig.lnk")

;-----------------------------------------------------------------------------

; Define the operator specific File system files here

; Before stating Sysgen ,this file will be appedned at the END of the

; platform.dat of the generic code.

;-----------------------------------------------------------------------------

I think the most important line we must look at is:

Directory("WindowsStartUp"):-File("coldinit.lnk","Windowscoldinit.lnk")

I have a feeling that this coldinit.lnk program is what sets up the default registry and object stores/databases (mail, contacts, etc) upon a cold bootup

I'll get back to you guys on this one.

Mike

Link to comment
Share on other sites

Hey florin,

What program did you use to turn a directory of files back into an image

I have extraced the different regions like you suggested (like oem, smartphon, lang ,etc) but I cannot find the right application to then rebuild the files back into a .bin file etc.

could you point me in the direction of the right tool?

My idea is to add a couple files to the OEM section first, pack those files into a .bin and then add that to a smartcard, which will then be loaded back onto the phone using the QFS commands.

I was hoping to see then If i rebooted if the files would be present that I added.

could you provide some ideas/ suggestions/feedback?

Thanks,

Mike

Link to comment
Share on other sites

  • 3 weeks later...

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.