12
8/7/2019 ROM_COOK_GUIDE http://slidepdf.com/reader/full/romcookguide 1/12 Tutorial Tools http://sourceforge.net/projects/notepad-plus/files/ First lets go over a few keywords that you will need to know. Kitchen: This is the folders/files that will be stored in one location. It will include the tools to make the flash ROM image. If we had a visual kitchen then that would be different, but since we don't have one, no use talking about it. ROM: This is usually refered to as the flashable image that can be loaded on your phone. OEM: These are packages or applications that are optional during the cooking process. There is an OEM folder that has the OEM drivers, and this is mandatory for actual phone use. SYS: This is the Windows Mobile version that the phone will use. XIP: This is where the kernal for the windows mobile resides. eXecute In Place is the acronym in case you were wondering. Registry: This is a file or set of files that will contain specific settings for the phone. EXT: These are not used in our kitchen as we don't have a visual one yet. CAB: These are setup files to be run under Windows Mobile. Often we just use these to convert CAB to OEM  packages. STEP 1: In this step you are going to setup your kitchen. I suggest you create a folder on a drive that you will remember. I use i920 as the base folder so I know that its for this phone. So on my drive I have it set up as D:\ROM\i920 DC23 Stock\ Download and extract the kitchen wherever you like.

ROM_COOK_GUIDE

Embed Size (px)

Citation preview

Page 1: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 1/12

Tutorial

Tools

http://sourceforge.net/projects/notepad-plus/files/

First lets go over a few keywords that you will need to know.

Kitchen: This is the folders/files that will be stored in one location. It will include the tools to make the flashROM image. If we had a visual kitchen then that would be different, but since we don't have one, no use

talking about it.

ROM:

This is usually refered to as the flashable image that can be loaded on your phone.

OEM:

These are packages or applications that are optional during the cooking process.

There is an OEM folder that has the OEM drivers, and this is mandatory for actual phone use.

SYS: This is the Windows Mobile version that the phone will use.

XIP: This is where the kernal for the windows mobile resides. eXecute In Place is the acronym in case youwere wondering.

Registry: This is a file or set of files that will contain specific settings for the phone.

EXT: These are not used in our kitchen as we don't have a visual one yet.

CAB: These are setup files to be run under Windows Mobile. Often we just use these to convert CAB to OEM

 packages.

STEP 1:

In this step you are going to setup your kitchen. I suggest you create a folder on a drive that you willremember. I use i920 as the base folder so I know that its for this phone.

So on my drive I have it set up as D:\ROM\i920 DC23 Stock\

Download and extract the kitchen wherever you like.

Page 2: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 2/12

As you can see there are many things in this folder.OEM is where you will put most of your OEM packages, and this is where the samsung stuff is.

ROM is where your XIP is located

SYS is where your version of Windows Mobile isTools is where the batch/cmd files are run. Leave this folder alone for now

The files are required so don't mess with them. The only one you are really concerned with is BuildROM.cmd

This is how we make a flash ROM out of all these files.

So lets take a look at this specific OEM folder to get familiar with it.

Page 3: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 3/12

The 192 in OEM is for the image file sizes. 192 is for WVGA devices.The 409 is for English. We are using an English ROM.

Samsung in their infinite wisdom has decided to put all their apps in ONE folder. This makes trimming your ROM a hassle/nightmare depending on how you look at it.

Lets Look in OEM_Lang_409 for a minute.

Right off the bat we are shown an odd looking folder. LBSDriver.dll.409.mui

This is actually not a folder, rather a file that will be compressed into the proper folder during the cooking

 process. We will look at RECMOD later on.

The important file is one starting with 45efa50f...

The .dsm is for the application specifics (I don't know how to modify them)The .rgu is for some registry settings.

Page 4: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 4/12

This is how the .rgu files are set up. They always start with REGEDIT4. Then the Key, and then thedword/string under each key. The @ symbol is just shorthand for the word default.

At the end of all .rgu files the MUST BE 2 LINE RETURNS. So this would mean if the last line was on line

10 then line 11 would be blank, but you would still have a line 11. This is important as if this is not done youwill have a failure during the build process.

Strings are enclosed in quotes, and dwords are preceded by dword:

in a string there cannot be any single slashes. They must always be \\

you will learn more about these are you get more comfortable with your kitchen.

Lets take a look at initflashfiles.dat for a second.

Inside you can see the basics of this file is to move files around on your phone.

Page 5: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 5/12

The semicolons are not parsed and gets ignored during the cooking process.Looking at the VZ Navigator Stub app it shows the 3 part line under it.

The first part is the destination directory, the second part is the destination File, the last is the source file.

Directory("\Windows\Start Menu\Programs"):-File("VZW Tones.lnk","\Windows\VZW Tones.lnk")

If you don't want your ROM to contain the vzw link, then you can place a semicolon in the front. This does not

remove the link, it just doesn't copy it to the start menu.

Going into the OEMApps folder (where you will spend most of your time btw) and searching for vzw will give

you these files. This is where you can start to trim things down. The file called VZW Tones is the one we saw

in the initflashfiles.dat file. You can remove this file so the link is not put in your ROM. Before you do thishowever, lets look at what it is linked to.

Page 6: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 6/12

As you can see this is the contents of the .lnk file. The 41# means this will be the 41st link in your start menu.This number can be overwritten later on by other files, so don't get too hung up on the number in front, you can

tweak that later. Notice that this link points to ExcuteVZWTones.exe If we deleted the .lnk file without looking

inside we would have left the program but killed the shortcut. So from here we can delet ExcuteVZWTones.exe

This is an easy one as it is stand alone, meaning it doesn't rely on a bunch of files to operate. Opera browser 9on the otherhand has a LOT of files that go with it.

Delete the VZW Tones.lnk and ExcuteVZWTones.exe files making sure you close it if you still have it open in Notepad++.

Just a quick note about why I like notepad++ so much is the ability to have multiple files open, the line number 

and the ability to save files properly as the .rgu files are all unicode (Little Endian). If this doesn't make sense

then don't worry about the coding as unless you make your own OEM packages you don't need to bother withcoding. Also before you can modify a .rgu file you must clear the read only flag (and reset it back when you are

finished before you can save).

Page 7: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 7/12

Before we get too far into tweaking lets make your first flash ROM. Go to your main folder in your kitchen andrun the BuildROM.cmd file (double click).

This command prompt pops up...

Page 8: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 8/12

And now this one. This is where you would select any OEM packages you wanted to include/exclude from the

ROM you are building. Since we don't have any OEM packages in our OEM folder yet, we can just click on

the green play button. It will parse all the files in your SYS & OEM folders to make sure there are no

duplicates, and then copy it ALL to the temp folder.

Wait for it to display Done at the bottom...

Page 9: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 9/12

That's when we know everything is okay. Later on after you start tweaking/adding/remove stuff you may get an

error. If it is a duplicate file, or this file is actually a directory it just means it cannot copy it all to the temp

folder because it already exists or is called the same name. You may get registry errors also and they will be

displayed in the log.txt file.

In our case everything went fine and we have the done! At the bottom. This means there were no errors. What

happens in the background is the copy to temp folder process and the combination of all the .rgu files. Together

they form the “registry” on your phone.

Close the BuildOS window now that it displays Done. This will force the Command Prompt windows to finish

the scripts to build your flashable ROM.

After the Command prompt closes, we have a flashable rom in the root of our kitchen.

Page 10: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 10/12

 Notice the size of this monster! Over 280MB! This is the stock size and will reduce the size of your availableROM in your phone. So the more we take out the better off we are. If you take out too much we won't have a

working phone though! This is where it gets tough.

The FlashRom.nb0 file is what is selected in Octans.

Page 11: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 11/12

Octans is not really covered in this guide but briefly what I do whenever I open it is tick the “Skip over waiting

for booting completely” check box and the “Start downloading immediately” check box.

I don't even know what this means but I click okay every time. I think it is saying be careful with this option as

it will flash the phone as soon as it is connected!

After selecting the file using the PDA button, click I click on Detect and connect my phone. It may take arestart or a remove/replace the phone cable as I'm using Windows 7 for flashing my phone.

Page 12: ROM_COOK_GUIDE

8/7/2019 ROM_COOK_GUIDE

http://slidepdf.com/reader/full/romcookguide 12/12

This concludes my first guide on cooking your own ROM. It is a good idea to make a copy of your ENTIREkitchen every time you make significant changes because this will save you a ton of time later on.