[GUIDE] How to create a your own ROM

Search This thread

androidcustomrom

New member
Sep 30, 2009
2
3
How to create your own ROM update.zip for the T-Mobile MyTouch 3G

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


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.


1.
First Root your phone and install a new Recovery image, either Amon Ra or Cyanogens Recovery image.
Instructions for one-click root: http://theunlockr.com/2009/08/22/how-to-root-the-mytouch-3g-or-g1-in-one-click/

2.
Download the Android 1.6 System image from
http://developer.htc.com/google-io-device.html

extract the contents of signed-google_ion-img-14721.zip.

3.
You now need to extract the contents of system.img using a tool called unyaffs. The source code is here:
http://code.google.com/p/unyaffs/downloads/list
Or download a prebuilt win32 version here.
http://jiggawatt.org/badc0de/android/index.html
Note you may also need cygwin1.dll and cygz.dll (zlib0 package). Found at cygwin.com

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.

4.
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:
"!<symlink>toolbox..."
And we will remake the symbolic link when it is installed.


5.
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.


6.
-- 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:
http://xdaforums.com/showthread.php?t=547718
or here
http://docs.google.com/Doc?docid=0AZNbAmKkmakoZGZxZHNwMnpfMjJkaHg3ejN3eg&hl=en

Turn data roaming off by default by editing line in the build.prop file:
ro.com.android.dataroaming=false

Also to fix the Market program to show "Protected" applications change the ro.build.fingerprint line to the following:
ro.build.fingerprint=tmobile/opal/sapphire/sapphire:1.5/COC10/150449:user/ota-rel-keys,release-keys

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

--------------

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

Zip up the following file and two folders:

boot.img
META-INF
system


8.
Now sign the zip file.
See here how to sign a ZIP file for flashing it.
http://androidforums.com/developer-101/8665-how-signing-roms.html

9.
Copy it to your SD card, boot into recovery, wipe, apply the update, Reboot.
You are now running Android 1.6!
 

Attachments

  • DeleteExtras.txt
    1.2 KB · Views: 1,900
  • update-script.txt
    2.3 KB · Views: 2,578

Zarboz

Known Scammer
Mar 5, 2009
145
9,339
Denver
the finger print is found in build.prop is this correct and what app do you use to edit your build.prop
 

androidcustomrom

New member
Sep 30, 2009
2
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.
 

detox702

Senior Member
Mar 23, 2008
245
4
How would one go about customizing this with Hero? Or is that not possible at this point?
 

Bhups

Senior Member
Oct 17, 2006
117
20
London
Google Pixel XL
Google Pixel 3
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.
 

lodewj

Senior Member
Aug 27, 2008
73
4
Aarschot
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 :D
 

penguinmod

New member
Jul 28, 2010
3
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.
 
Last edited:
  • Like
Reactions: bydefault

phazei

Senior Member
Feb 17, 2008
275
49
Seattle
Perhaps someone here knows or could point me to the right resources, but if the phone isn't supported by Cyanogen, how would a custom rom be made in that case?

How is a custom rom made from scratch? Since android is just linux, is it simply a matter of building it with the right drivers for the phone and installing it? How can an image be manually copied to the phone if it isn't supported by Clockwork recovery? How can it's steps be manually done?
 
  • Like
Reactions: navidzzz

goldiecalypso

Senior Member
Jan 30, 2012
202
42
anybody knows how to make a ROM customized and make a "update.img" to run on a un-rootable device? I know when you backup a linux image for example ubuntu, this image will run on all other PCs, the image will automatically knows the new PC's drivers and adapt everything with that, is it what happening to an android too ?

---------- Post added at 08:36 AM ---------- Previous post was at 08:33 AM ----------

and pls let me know how to open/edit a "update.img" file, thnx
 
  • Like
Reactions: navidzzz

chaselxm

Senior Member
May 7, 2013
54
7
Question

How to create your own ROM update.zip for the T-Mobile MyTouch 3G

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


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.


1.
First Root your phone and install a new Recovery image, either Amon Ra or Cyanogens Recovery image.
Instructions for one-click root: http://theunlockr.com/2009/08/22/how-to-root-the-mytouch-3g-or-g1-in-one-click/

2.
Download the Android 1.6 System image from
http://developer.htc.com/google-io-device.html

extract the contents of signed-google_ion-img-14721.zip.

3.
You now need to extract the contents of system.img using a tool called unyaffs. The source code is here:
http://code.google.com/p/unyaffs/downloads/list
Or download a prebuilt win32 version here.
http://jiggawatt.org/badc0de/android/index.html
Note you may also need cygwin1.dll and cygz.dll (zlib0 package). Found at cygwin.com

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.

4.
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:
"!<symlink>toolbox..."
And we will remake the symbolic link when it is installed.


5.
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.


6.
-- 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:
http://xdaforums.com/showthread.php?t=547718
or here
http://docs.google.com/Doc?docid=0AZNbAmKkmakoZGZxZHNwMnpfMjJkaHg3ejN3eg&hl=en

Turn data roaming off by default by editing line in the build.prop file:
ro.com.android.dataroaming=false

Also to fix the Market program to show "Protected" applications change the ro.build.fingerprint line to the following:
ro.build.fingerprint=tmobile/opal/sapphire/sapphire:1.5/COC10/150449:user/ota-rel-keys,release-keys

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

--------------

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

Zip up the following file and two folders:

boot.img
META-INF
system


8.
Now sign the zip file.
See here how to sign a ZIP file for flashing it.
http://androidforums.com/developer-101/8665-how-signing-roms.html

9.
Copy it to your SD card, boot into recovery, wipe, apply the update, Reboot.
You are now running Android 1.6!


Could you tell me where I can correct the fake data in the phone like the real RAM is 512 MB but it say 1GB ,can you tell me how to
correct it thanks in advance:good:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    How to create your own ROM update.zip for the T-Mobile MyTouch 3G

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


    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.


    1.
    First Root your phone and install a new Recovery image, either Amon Ra or Cyanogens Recovery image.
    Instructions for one-click root: http://theunlockr.com/2009/08/22/how-to-root-the-mytouch-3g-or-g1-in-one-click/

    2.
    Download the Android 1.6 System image from
    http://developer.htc.com/google-io-device.html

    extract the contents of signed-google_ion-img-14721.zip.

    3.
    You now need to extract the contents of system.img using a tool called unyaffs. The source code is here:
    http://code.google.com/p/unyaffs/downloads/list
    Or download a prebuilt win32 version here.
    http://jiggawatt.org/badc0de/android/index.html
    Note you may also need cygwin1.dll and cygz.dll (zlib0 package). Found at cygwin.com

    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.

    4.
    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:
    "!<symlink>toolbox..."
    And we will remake the symbolic link when it is installed.


    5.
    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.


    6.
    -- 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:
    http://xdaforums.com/showthread.php?t=547718
    or here
    http://docs.google.com/Doc?docid=0AZNbAmKkmakoZGZxZHNwMnpfMjJkaHg3ejN3eg&hl=en

    Turn data roaming off by default by editing line in the build.prop file:
    ro.com.android.dataroaming=false

    Also to fix the Market program to show "Protected" applications change the ro.build.fingerprint line to the following:
    ro.build.fingerprint=tmobile/opal/sapphire/sapphire:1.5/COC10/150449:user/ota-rel-keys,release-keys

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

    --------------

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

    Zip up the following file and two folders:

    boot.img
    META-INF
    system


    8.
    Now sign the zip file.
    See here how to sign a ZIP file for flashing it.
    http://androidforums.com/developer-101/8665-how-signing-roms.html

    9.
    Copy it to your SD card, boot into recovery, wipe, apply the update, Reboot.
    You are now running Android 1.6!
    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.

    Kudos!
    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.
    1
    Perhaps someone here knows or could point me to the right resources, but if the phone isn't supported by Cyanogen, how would a custom rom be made in that case?

    How is a custom rom made from scratch? Since android is just linux, is it simply a matter of building it with the right drivers for the phone and installing it? How can an image be manually copied to the phone if it isn't supported by Clockwork recovery? How can it's steps be manually done?
    1
    anybody knows how to make a ROM customized and make a "update.img" to run on a un-rootable device? I know when you backup a linux image for example ubuntu, this image will run on all other PCs, the image will automatically knows the new PC's drivers and adapt everything with that, is it what happening to an android too ?

    ---------- Post added at 08:36 AM ---------- Previous post was at 08:33 AM ----------

    and pls let me know how to open/edit a "update.img" file, thnx