[GUIDE] How to create a your own ROM

2 posts
Thanks Meter: 3
By androidcustomrom, Junior Member on 30th September 2009, 07:38 PM
Post Reply Email Thread
How to create your own ROM for the T-Mobile MyTouch 3G

Things you will need to perform this:
Java SE Dev Kit from Sun.
May need Cygwin with zlib0 package, from

This will give you Android 1.6 with all the Google applications, Root access.
I never found one place where all this information is all together, so that is why I compiled this together.
Now anyone can do this themselves.

Thanks to all the hard work others have done before this.

First Root your phone and install a new Recovery image, either Amon Ra or Cyanogens Recovery image.
Instructions for one-click root:

Download the Android 1.6 System image from

extract the contents of

You now need to extract the contents of system.img using a tool called unyaffs. The source code is here:
Or download a prebuilt win32 version here.
Note you may also need cygwin1.dll and cygz.dll (zlib0 package). Found at

Of course if you already have Cygwin installed with the GCC packages, you can just compile it yourself. Then also
if you comment out the line 67 to "// symlink(oh->alias, full_path_name);"
then it will not create the copies of the symbolic link file, and you will not have to worry about deleting duplicate
symbolic link files later.

Now in the directory where system.img exists, create a new directory called "system"
go into the "system" directory.
type the following command:
unyaffs ..\system.img

That should extract all the files from the system.img file into the system directory.

Now we just need to clean up some items. Since the system.img is a linux file system, it has symbolic
links built into it, but when we extracted it, it just created duplicate files, if you used the prebuilt unyaffs.exe.
So we can just delete the duplicates and have a script recreate the symlink on install.

So we need to delete some extra files from the system\bin directory.
Run the attached DeleteExtras.bat file from the same directory where system.img is in.
If you notice, all the files it deletes are 28 byte files, and if you open them in notepad only contain:
And we will remake the symbolic link when it is installed.

Now from the directory where the system.img is, enter the following commands
mkdir META-INF
mkdir META-INF\com
mkdir META-INF\com\google
mkdir META-INF\com\google\android

Now copy the included file "update-script.txt" into the "META-INF\com\google\android" directory
and RENAME it to just "update-script".
This update-script gets run to recreate the symbolic links.

Not sure if these two are needed but they are in some custom ROMs here:
Copy the two files "fix_permissions" and "flash_image" to the "system\bin" directory.

-- Optional --
These add root and Superuser access to the ROM, plus the Terminal Emulator application.

Copy the file "su" from Cyanogen's rom to the folder "system\bin"
Copy the file "Superuser.apk" to the folder "system\app"
Copy the file "Term.apk" to the folder "system\app"

You can also replace the "system\etc\apns-conf.xml" with a more complete one from here:
or here

Turn data roaming off by default by editing line in the build.prop file:

Also to fix the Market program to show "Protected" applications change the line to the following:,release-keys

Only phones with a fingerprint of a "released" device can access some market applications.


Now we just need to create a ZIP file for the final ROM

Zip up the following file and two folders:


Now sign the zip file.
See here how to sign a ZIP file for flashing it.

Copy it to your SD card, boot into recovery, wipe, apply the update, Reboot.
You are now running Android 1.6!
Attached Files
File Type: txt DeleteExtras.txt - [Click for QR Code] (1.2 KB, 1890 views)
File Type: txt update-script.txt - [Click for QR Code] (2.3 KB, 2556 views)
The Following 3 Users Say Thank You to androidcustomrom For This Useful Post: [ View ] Gift androidcustomrom Ad-Free
30th September 2009, 07:48 PM |#2  
Zarboz's Avatar
Known Scammer
Flag Denver
Thanks Meter: 9,259
Donate to Me
the finger print is found in build.prop is this correct and what app do you use to edit your build.prop
30th September 2009, 07:57 PM |#3  
OP Junior Member
Thanks Meter: 3
Yes the fingerprint is in build.prop

Make sure to use an advanced text editor like TextPad, UltraEdit, or EditPlus. It has to handle UNIX text files.
Also use this for the update_script.
30th September 2009, 08:35 PM |#4  
Senior Member
Thanks Meter: 2
how abt kernel parameters?
1st October 2009, 09:50 PM |#5  
Senior Member
Thanks Meter: 4
How would one go about customizing this with Hero? Or is that not possible at this point?
30th November 2009, 04:53 AM |#6  
Flag Moncton, NB
Thanks Meter: 3
Originally Posted by detox702

How would one go about customizing this with Hero? Or is that not possible at this point?

Would like more info on hot to incorporate senseui
17th May 2010, 04:48 AM |#7  
Junior Member
Flag Dallas, Texas
Thanks Meter: 1
Thanks for sharing... Got nothing to do today, so I experimented on my phone... I gotta say, I'm pretty amazed w/ this feature. Was able to sort out and organize my files.

The Following User Says Thank You to JettAustin For This Useful Post: [ View ] Gift JettAustin Ad-Free
23rd July 2010, 02:47 PM |#8  
Bhups's Avatar
Senior Member
Flag London
Thanks Meter: 20
How does one create the system.img file once one has the system files...

What I want to do is use some of the custom roms here and put it on an AVD emulator system.

Can someone help with this please.

NOTE: I dont have linux. So if there is an alternative to mkbootimg, it will be excellent.
23rd July 2010, 03:25 PM |#9  
Flag Aarschot
Thanks Meter: 4
the ion is the 32b if I'm not mistaken?
Is there an image for the 32a or do we always have to use the ion and throw a patch over it?
Sorry if this is a stupid question
29th July 2010, 01:05 PM |#10  
Junior Member
Thanks Meter: 1
in step 5. it says

Not sure if these two are needed but they are in some custom ROMs here:
Copy the two files "fix_permissions" and "flash_image" to the "system\bin" directory.

Where do i copy the files from or download please?
thanks in advance

P.S. any tips on changing the splash screen would be much appreciated.
The Following User Says Thank You to penguinmod For This Useful Post: [ View ] Gift penguinmod Ad-Free
22nd September 2010, 01:57 PM |#11  
Thanks Meter: 0
DeleteExtras.txt or DeleteExtras.bat doesn't work. I have to delete the extra files by myself - one by one.
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