Remove All Ads from XDA

[How TO] Create/Modify Your Own HD2 ROM[Discontinued]

240 posts
Thanks Meter: 961
By isidromxz, Inactive Recognized Developer on 13th September 2011, 05:04 AM
Post Reply Email Thread

This tread is not monitored or updated any more use for reference only
Who is this tutorial for?
  • Beginners like me
  • People with little or no programming skills
  • You love to or would like to flash,modify and test roms

This is a very basic tutorial!!


Step one: Setting up the Android kitchen

First you will need to set up dsixda's android kitchen

Here is a summary of the installation process( I recommend you read the tread first)

1. Before you do anything install the java jdk(find it in dsixda's thread)
2. Download and extract the provided by dsixda on third post
3. Run the set up(make sure there is no previous cygwin installation)
4. Follow the kitchen read me txt!!!
5) local package directory *must* be the path to the cygwin_packages folder that you just extracted

6) when it shows all the package names, go to the top and select "all <-> default" until it changes to "all <-> install" (you must click on the arrows)

7. Run the cygwin at least once and close, now you will see a folder inside the cygwin installation like this: Home\your user name\

8. Download the kitchen and extract to the home\your user name\
9. Rename the dsixda-android-kitchen-*** folder to just "kitchen"
10. Now your ready to run the kitchen type:
cd kitchen(enter)

11. If you did things right you should see this:



Step Two: Setting up a working folder
1. First our folder structure should look like this:
cygwin folder/home/your user name/kitchen
2. Inside the kitchen it should look like this:

3. Now we need a rom to work on, for this tutorial i will use my own rom but you can use any hd2 rom. Place the original rom zip in the original_update folder inside the kitchen. the cygwin.exe again type:
cd kitchen(enter)
./menu(enter) enter option 1, enter again. You should see your rom listed, choose and enter will be asked about changing the working folders name, at this point it makes no difference so just continue. will be asked to convert to update-scrip do it and continue
8. Now you can view the roms info
9. congratulations you have a working folder!!!


Step Three :change/modify/update!

First I will be covering basic changes you can make to your rom, later I will be adding more helpful hints.


Adding/removing applications
1. Go to the working folder where you extracted your rom, inside you will find:


2. Then go to "system/app" inside this folder you will find all the rom applications(apks) you may also find some in the data folder if your rom has this folder.
3. Copy, replace, and change any app(apk) be carefull if you dont know what the apk is do not delete!!
4. Congrats you have modified a rom, if your ready and want to see if it worked skip to step four to buil rom from working folder.


Adding new boot animation
1. Just replace the located in "workingfolder/system/media" with the boot animation of your choice.
here is a sample of my bootanimation to try.


Edit the gps script for your country/location
1. In the workingfolder/system/etc/ you will find a file named gps.conf, you can
edit this file with notepad++ or even word.
2. using the right gps script in this file can speed up gps lock, you can
find some from angeldeath, download extract and replace the gps.conf.


Changing the default wallpaper
1. Be very careful doing this, do not edit,delete or modify an apk without knowing what it is or does.not all things are as simple as copy and paste.
2. go to the workingfolder/system/framework/
3. Install 7zip and open the framework-res.apk
4. With in the framework-res.apk with 7zip go to "res/drawable-hdpi/" and look for the default_wallpaper.jpg. You can extract modify and replace with new one.
5. Make sure its the same file format and image dimensions.(in some roms you can also modify the default_lock_wallpaper.jpg)


MMS Fix for T-mobile
1. *I Have only tested this on MIUI Roms*
2. Go to "workingfolder/system/app"
3. Find MMS.apk
4. Right click and open with 7zip

5.Inside mms.apk go to "rex/xml/"
6.replace the "mms_config.xml" with this "mms_config.xml"


modifying build.prop

"build.prop" is a file that contains various system-vital "parameters"
Some can be modified with little risk, some can cause havoc. So Please do this Carefully!!!!!!

1. Locate the file "workingfolder/system/"
2. Open with notepad++

There is several simple changes that can be done, I will start with some and add more later.


LCD Density
1. If you dont know anything about this topic Here is some info to get started
2.Locate this line inside the build.prop "ro.sf.lcd_density=240"

3.The only value you will modify is the "240" to your preference.

Difference is simple and visible!


Update Kernel From
Note that it's not always as easy as copy and paste

1. Extract you
2. Copy and replace the extracted files to the corresponding folders inside your finished ROM
3.Start with the boot folder

4. If the kernel was from another rom replace initard.gz from your rom
5. Than the system folder (there might be some libs and modules associated with the rom)

6. Another helpful hint is to open the updater-script
to see if your kernel requires you to delete anything for the kernel to work correctly.

sample script:


Update GPS librarys From

1. Extract you
2. Copy and replace the extracted files to the corresponding folders inside your finished ROM
6. Another helpful hint is to open the updater-script
to see if your gps lib's require you to delete anything for the lib's to work correctly.


Make a wifi calling

1. Download tytung's T-Mobile WiFi Calling Apps and Lib's
2. Open with 7zip
3. Extract the build.prop
4.Open build.prop with notepad++
5.Now open your build.prop from you rom
6.copy the txt from your rom's build.prop
7.paste to the top of the wifi calling buil.prop and with 7zip insert the new build.prop to tytun's wifi calling
9. Flash and test

-there are several other options provided by dsixda's android kitchen for that I recomend you go to the tread and read.


Step Four: repackage the rom


Now that you have made some changes it's time to test!!
1. Run the kitchen and enter option 99 - "biuld rom from working folder"
2. Choose mgldr or clk
3. I recommend that you go with all default options until you get more experience with the kitchen.
4. When its all done you will find a folder inside "cygwin/home/yousername/kitchen" called output_zip
5. Inside the folder is your new rom ready to be flashed and tested!!!




Thanks to user langthang for a great updater-script guide.
Download it HERE

I had a couple of request on how to get custom txt during the ROM installation in CWM,
the updater-script basically tells CWM what steps to take during the installation(flashing rom).
If you don't have any experience please don't edit anything other than what is in this simple tutorial.

1.First once you have your Rom ready in .zip format, Open with 7zip
2.Go to META-INF/com/google/android
3.Extract the updater-scrip file
4.Open with Notepad++
5.Any text that would appear during the CWM install should be in this format :
ui_print("Put your text in HERE");
Here is the requested 3d MIUI LOGO for example:
ui_print("     ___                     ___                ");
ui_print("    /__/\\       ___         /__/\\       ___     ");
ui_print("   |  |::\\     /  /\\        \\  \\:\\     /  /\\    ");
ui_print("   |  |:|:\\   /  /:/         \\  \\:\\   /  /:/    ");
ui_print(" __|__|:|\\:\\ /__/::\\     ___  \\  \\:\\ /__/::\\    ");
ui_print("/__/::::| \\:\\\\__\\/\\:\\__ /__/\\  \\__\\:\\\\__\\/\\:\\__ ");
ui_print("\\  \\:\\~~\\__\\/   \\  \\:\\/\\\\  \\:\\ /  /:/   \\  \\:\\/\\");
ui_print(" \\  \\:\\          \\__\\::/ \\  \\:\\  /:/     \\__\\::/");
ui_print("  \\  \\:\\         /__/:/   \\  \\:\\/:/      /__/:/ ");
ui_print("   \\  \\:\\        \\__\\/     \\  \\::/       \\__\\/  ");
ui_print("    \\__\\/                   \\__\\/               ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
6.Add your text start at top and save,
then replace with new updater-scrip




There is allot more that I did not cover, didn't even scratch the surface.
This was not intended for porting roms or any mayor scripting, this wont help you
with writing drivers, kernels, libs etc. Just tried to make it as simple as possible for
beginners like me, so we can understand the amount of work devs go through.
Please! please! before you release any Rom, test and test again!!!!!!

Just want to thank XDA Forums for giving us this space to play learn and share.
The Following 100 Users Say Thank You to isidromxz For This Useful Post: [ View ] Gift isidromxz Ad-Free
13th September 2011, 05:51 AM |#2  
seaman2k's Avatar
Senior Member
Flag suez
Thanks Meter: 970
man that is wonderful threat from u ..thanks u try to make it simple and u success pls try to make this threat open and i think we can make it as a full guide in the future
13th September 2011, 07:47 AM |#3  
Senior Member
Thanks Meter: 11
wow it looks great I must try it later, thanks man
The Following User Says Thank You to Bareq For This Useful Post: [ View ] Gift Bareq Ad-Free
13th September 2011, 07:49 AM |#4  
TheATHEiST's Avatar
Senior Member
Flag Hull
Thanks Meter: 973
Gunna give this a go later, thnx bud
13th September 2011, 08:03 AM |#5  
Senior Member
Flag Brussels
Thanks Meter: 356
Thanks man ! I tried several times to build my own ROM with the kitchen but always failed. It builded right but never booted.

These are the topics I think should be mentionned :
- Injecting your own kernel (I mean : injecting a kernel that comes in a zip).
- clK special demands ?
- editing system configs/files that need a fix to work better with our device.

That's a lot of work but boy am I excited for this. I just might try again !
13th September 2011, 08:27 AM |#6  
mccmjoon76's Avatar
Inactive Recognized Developer
Thanks Meter: 4,002
Donate to Me
Nice going mate .... perhaps i post NAND Build some day
13th September 2011, 08:40 AM |#7  
Inactive Recognized Developer
Flag Hanoi
Thanks Meter: 2,892
Donate to Me
I saw a similar guide on Boyppc Theard longtime ago
But I hope we have more Cooker for HD2 here
13th September 2011, 08:52 AM |#8  
seaman2k's Avatar
Senior Member
Flag suez
Thanks Meter: 970
Originally Posted by mccmjoon76

Nice going mate .... perhaps i post NAND Build some day

u r welcome in nand we miss your great work here pls try to post nand rom , i know it will be icon here pls try
The Following User Says Thank You to seaman2k For This Useful Post: [ View ] Gift seaman2k Ad-Free
13th September 2011, 09:31 AM |#9  
htcfreak's Avatar
Senior Member
Flag Mumbai/Belgaum
Thanks Meter: 165
Nice work
13th September 2011, 06:03 PM |#10  
Flag Dallas
Thanks Meter: 1
* place holder *

Sent from my HTC HD2 using XDA App
14th September 2011, 09:30 AM |#11  
Senior Member
Thanks Meter: 11
when i open Cygwin from desktop it opens and close alone , any idea please?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes