FORUMS

EVLeaks Shows Off Possible BlackBerry Android Phone

It wasn’t too long ago that we received reports of BlackBerry planning to use … more

Mysterious GG1 Google Device Stops by FCC. Glass v2?

As the year progresses, we draw further away from Google’s annual I/O … more

Material and Material Dark Hit Samsung’s Theme Store

The latest version of Touchwiz, launched alongside the Galaxy S6 and S6 Edge, … more

Swappa’s New App Helps You Value Your Device

There comes a sad time in everyone’s life where you must part ways with your … more

DIY your ROM

3 posts
Thanks Meter: 0
 
By gmap, Junior Member on 19th November 2005, 08:56 AM
Post Reply Subscribe to Thread Email Thread
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, 7140 views)
File Type: rar rommaster.rar - [Click for QR Code] (62.9 KB, 4787 views)
 
 
19th November 2005, 07:48 PM |#2  
Senior Member
Lisboa, Portugal
Thanks Meter: 1
 
More
This is great!!!

Going to try it!
19th November 2005, 10:30 PM |#3  
oltp's Avatar
Senior Member
Thanks Meter: 22
 
More
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.
20th November 2005, 11:56 PM |#4  
Retired Recognized Developer
Thanks Meter: 216
 
Donate to Me
More
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, 03:14 PM |#5  
OP Junior Member
Thanks Meter: 0
 
More
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, 01:57 AM |#6  
Retired Recognized Developer
Thanks Meter: 216
 
Donate to Me
More
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, 02:32 PM |#7  
Senior Member
Thanks Meter: 64
 
More
gmap, can you tell me what file i can use this with? Is it for nbk or nba files? Thanks
13th December 2005, 05:52 PM |#8  
Senior Member
Bordeaux
Thanks Meter: 0
 
More
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 ?
13th December 2005, 11:53 PM |#9  
Retired Recognized Developer
Thanks Meter: 216
 
Donate to Me
More
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, 07:59 AM |#10  
Senior Member
Bordeaux
Thanks Meter: 0
 
More
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