Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

DIY your ROM

OP gmap

19th November 2005, 09:56 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Nov 2005
Hi,
I write some code that can modify the ROMs, it can save your time to add and delete files by hand.

RomMaster V2.0 Beta
Usage: RomMaster [options] imagefile
-d[m] <dfile> - delete file
replace file/module together with -a option
'm' delete module, deleting module isn't suggested
-a[c] <afile> - add file into the rom
'c' means use compress(need CECompressv4.dll)
-o <ofile> - output imagefile name
-v <0~9> - print info, 0 detail, 9 only show errors, default is 5
-w <5> - 5 is 2005, default is 2003&SE
-x - only save XIP(OS) data
-s <0x...> - Fix XIP start address(Hex)
-e <0x...> - Fix XIP end address(Hex)
In replace mode, 'c'&'m' is useless

It is now 2.0 Bata Release.
You can delete file/modules you don’t like from the ROM.
RomMaster –d “filename” –o “newROMname” “ROMname”
You can add files into the ROM.
RomMaster –a “newfilename” –o “newROMname” “ROMname”
You can replace file in the ROM
RomMaster –d “filename” –a “newfilename” –o “newROMname” “ROMname”
“newfile”’s size should be the same or small than the file you want to replace, new file will occupy the same space as the old one.

I test some ROM in my SP; include SDA, Dopod 575 & 585. I only tested one 2005 ROM. Replace module may don’t work, I am still working on it.

Before you burn the image generated by the tool, make sure you finish follow step:
1. RomMaster –o “TestROM” “SrcROM”
2. Do binary compare “SrcROM” with “TestROM”
a) If they are 100% same, I think you can safely use this tool.
b) If they are 99% same, you should be careful, make sure you only burn the OS part. Because some ROM are modified by someone before, there are maybe some useless data in the ROM, only burn the OS part won’t damage your SP.
c) Else, the “SrcROM” may contain some unknown structure or data, the “TestROM” may won’t work, don’t try burning it into you SP. If you want to modify it, tell me where I can find the ROM, if I am free, I can give some help.
3. I only tested one 2005 ROM, its structure isn’t very correct, and I think that ROM is extracted form emulation ROM. So if 2005 ROM isn’t 100% same, don’t try and be careful even they are 100% same.
Attached Files
File Type: zip rommaster.zip - [Click for QR Code] (70.8 KB, 7128 views)
File Type: rar rommaster.rar - [Click for QR Code] (62.9 KB, 4785 views)
19th November 2005, 08:48 PM   |  #2  
Senior Member
Lisboa, Portugal
Thanks Meter: 1
 
230 posts
Join Date:Joined: Jul 2003
This is great!!!

Going to try it!
19th November 2005, 11:30 PM   |  #3  
oltp's Avatar
Senior Member
Thanks Meter: 22
 
1,486 posts
Join Date:Joined: Oct 2005
ncruz,

I'll wait for your experience, cause if this is working we can all save space by directly burning upgraded cameras etc into the rom. will save me at least 1MB ram or storage.

The tools sounds great gmap.
21st November 2005, 12:56 AM   |  #4  
Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
Re: DIY your ROM
There already exists MKROM tool - http://www.xs4all.nl/~itsme/projects/xda/romtools.html
it is 100% working with WM2003/2003SE devices. But it is rather inconvenient.
I'll test your "-w 5" option on a real device. Real WM5 device has one XIP kernel section with only few modules and about 1Mb free space. All other data is kept in IMGFS partition, I'm currently working on a tool that would work with it.
And one question. When you add new files to ROM, do you add them to a new XIP or extend the existing XIP? And when you delete modules, do you reuse the freed space after adding new ones?
22nd November 2005, 04:14 PM   |  #5  
OP Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Nov 2005
Re: DIY your ROM
Quote:
Originally Posted by mamaich

There already exists MKROM tool - http://www.xs4all.nl/~itsme/projects/xda/romtools.html
it is 100% working with WM2003/2003SE devices. But it is rather inconvenient.
I'll test your "-w 5" option on a real device. Real WM5 device has one XIP kernel section with only few modules and about 1Mb free space. All other data is kept in IMGFS partition, I'm currently working on a tool that would work with it.
And one question. When you add new files to ROM, do you add them to a new XIP or extend the existing XIP? And when you delete modules, do you reuse the freed space after adding new ones?

That's great if we can modify IMGFS partition I am waiting for it.

I know that tool and i don't know how it works. I made this tool only for interesting.

You can find XIP chain in 2003 ROM, by XIP chain, you can know the address and length of each XIP section. I will scan the hole XIP region before inserting the new file to reduce memory fragment. When a module is deleted, its space will be freed and reused when adding files. I freed about 6M space in my own ROM by deleteing the useless files, and add about 5M files into it, it works OK.

It seems 2005 don't have XIP chain information in the ROM, i only test one 2005 ROM, and i didn't find the XIP chain info. If your 2005 ROM don't have XIP chain info too, you should modify ROMHDR.physlast to a correct value by hand. Because if i can't find the XIP chian info, I use ROMHDR.physlast to decide the end address of XIP. Or, there are almost no space for you to add new file. My 2005 ROM physlast=0x8c253278, and only about 78732 bytes free before 0x8c253278.

I update the the tool V2.2 , fixed a bug when deeling with MDA(818) ROM.
23rd November 2005, 02:57 AM   |  #6  
Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
Re: DIY your ROM
Quote:
Originally Posted by gmap

That's great if we can modify IMGFS partition I am waiting for it.

I've PMed you a test version. I'll make it available to public later.

Quote:

... If your 2005 ROM don't have XIP chain info too, you should modify ROMHDR.physlast to a correct value by hand.

My ROM has all needed info, I had to extract everything from rom image after 1C0000 address to a separate file and gave it to your tool. It is working perfectly. I've managed to delete and add a new file to ROM. I have not tested "-dm" option. It seems that all modules/files in XIP section of WM5 are uncompressed. I'm using BlueAngel's WM5 ROM. Later I'll try to replace boot.hv file with my own version.
Can you add a switch to your program "-s bytes" so that it woud skip the given number of bytes from file start, so it would be possible to work directly on NBA files with header?
1st December 2005, 03:32 PM   |  #7  
Senior Member
Thanks Meter: 64
 
1,544 posts
Join Date:Joined: Nov 2004
More
gmap, can you tell me what file i can use this with? Is it for nbk or nba files? Thanks
13th December 2005, 06:52 PM   |  #8  
Senior Member
Bordeaux
Thanks Meter: 0
 
268 posts
Join Date:Joined: May 2005
I'm not able to edit the xip sextion ...

i've tried your tool on 1.60c.07CHS rom for xdaII :

RomMaster.exe -w 5 -x -o test.bin nk.nba
result :
[Info] It is a common ROM.
[Error] File is damaged, end address small than start address.
[Error] File is damaged, end address small than start address.

RomMaster.exe -w 5 -x -o test.bin imgfs_raw_data.bin (created with mamaich's tool)
result :
[Info] It is a common ROM.
[Error] Load nb00 failed.

RomMaster.exe -w 5 -x -o test.bin img.bin (created by nba part 1C0000 to end)
result :
[Info] It is a common ROM.
[Error] File is damaged, end address small than start address.
[Error] File is damaged, end address small than start address.

How to save the XIP section ?
14th December 2005, 12:53 AM   |  #9  
Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
Quote:
Originally Posted by TofClock

RomMaster.exe -w 5 -x -o test.bin imgfs_raw_data.bin (created with mamaich's tool)

This would not work. My tool works with IMGFS and you need to edit XIP
14th December 2005, 08:59 AM   |  #10  
Senior Member
Bordeaux
Thanks Meter: 0
 
268 posts
Join Date:Joined: May 2005
and ... how to edit XIP ?

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes