Author Topic: How To – Create Your Own Custom ROM for Android, Part 2 – 2  (Read 2009 times)

Offline javajolt

  • Administrator
  • Hero Member
  • *****
  • Posts: 35986
  • Gender: Male
  • I Do Windows
    • windows10newsinfo.com

continuation from pt.1

Creating Your First ROM

       
I. Before You Begin

1. We are assuming you have already setup the Android kitchen. If not, use our How To Setup The Kitchen (http://theunlockr.com/2010/03/26/how-to-create-your-own-custom-rom-for-android-part-1-setting-up-the-kitchen/)procedure and then come back to this one when done.

2. We are also assuming you have already done our How To Root and How To Load a Custom ROM for your phone and have  a custom recovery image.

2. This ONLY works for HTC Android devices at the moment, later versions might support others (check here for an update when it does).

3. Open the Kitchen in your Ubuntu Virtual Machine we created in the Kitchen Setup procedure by typing ./menu in the Terminal window in Ubuntu. Leave it open.

4. All of this is done INSIDE THE UBUNTU VIRTUAL MACHINE (that includes when I say “save to your computer” anywhere in here, means save to you Ubuntu Virtual Machine)!

II. Find a ROM to Dissect

There are two kinds of ROMs you can dissect to create your own custom ROM; Stock ROMs and Custom/Cooked ROMs. DsiXDA, creator of the ROM kitchen we are using, has put together a list of places to get stock ROMs for different devices and a quick how to load them into the kitchen:

From a Cooked ROM (Easiest Method):

1. Copy the update.zip (or equivalent ZIP file) to the original_update folder in the kitchen

2. Type 11 (or 2 if it is a newer version of he kitchen) and hit enter in the Kitchen to create your working folder.

From a Shipped ROM:

1. Find the shipped ROM for your device, usually from htc.com or from searching xda-developers (check the Wiki or sticky posts under your device’s sub-forum).

The links below may help:

HTC Hero (http://forum.xda-developers.com/showthread.php?t=559622)

Google Nexus One (http://android.modaco.com/content/google-nexus-one-nexusone-modaco-com/300414/22-mar-erd79-epe76-stock-rom-for-nexus-one-images-zip-online-kitchen-optional-root-insecure-himem/)

HTC Magic (http://forum.xda-developers.com/showthread.php?t=659403)

HTC Tattoo (http://forum.xda-developers.com/showthread.php?t=591746)

HTC Droid Eris (http://android.grdlock.net/)

Various devices (http://www.shipped-roms.com/shipped/)

2a. If the shipped ROM is in a .ZIP format, then simply extract the system.img and boot.img.

2b. If the shipped ROM is in .EXE format, then do the following:

A. In Windows, run the shipped ROM’s .EXE file till it gets to the first dialog. Stop there but don’t close the window yet.

B. Go to Start->Run and type: %TEMP%

C. When the folder opens, search for Rom.zip. Then, open it with an unzip tool. If you get errors trying to open the ZIP file with WinZip or the default Windows unzip program, then use 7Zip (download ► http://www.7-zip.org/download.html) to extract it.

D. Extract only two files from Rom.zip: system.img and boot.img

3. Copy the two .IMG files to your kitchen’s img_files folder in your Ubuntu Virtual Machine.

4. In the Terminal window that you opened in Section I, type 1 and hit enter to create a working folder from the two .img files.

Now, that you have either the update.zip in the original_update folder of the kitchen OR the system.img and boot.img of a shipped ROM in the img_files folder of the kitchen, you are ready to play with the ROM to make it your own.

III. Tweaking the Imported ROM Using the Automated Options in the Kitchen

So this is a basic kitchen, but you can do things like, add Root support, add/remove apps from the ROM, enable saving apps to the sd card, enabling Wifi tethering, do some automatic optimizations, and a few other things automatically just by selecting the option and hitting enter. It even allows you to put in your own scripts for the ROM to run (but that’s for more advanced users who know how to create scripts of course).

1. After importing a ROM using section II, select the options you want to do to the ROM (by typing the number of the option you want into the terminal/kitchen window and hitting enter. They are all pretty self explanatory.)

2. Continue this until you have all the automated options you want in the new ROM.

IV. Adding/Removing Applications from the ROM

1. In your Ubuntu Virtual Machine, goto Places at the top. Then click on Home Folder, then the WORKING folder that was created in section II when you dissected the original ROM or img files. Then goto system > app.

2. In the app folder you will see all the .apk files for all the applications you have currently in the ROM. Simply delete the ones you do not want to remove them from the ROM.

3. To add applications, simply copy any .apk file for the applications you want to add into the app folder.

V. Create Your Own Custom Splash Image (COMING ASAP)

VI. Repackage the ROM so it can be Flashed onto a Phone

1. Once you have done whatever changes you want, you just need to type 99 and hit enter in the kitchen/terminal for the kitchen to take the working folder you have been messing with and compile it into a flashable update.zip ROM.

2. Once it is done compiling the ROM, the easiest way to get it onto your phone is to use RapidShare.com and upload the .zip file.

3. Once it is done uploading, highlight and copy the link rapidshare gives you and paste it into your browser OUTSIDE of the Ubuntu virtual box. Download the file to get it to save onto your regular Windows machine instead of inside the Ubuntu Box.

4. Plug in your phone via USB cable and click mount to mount the SD card.

5. On your computer copy the .zip file to the root of your SD card (NOT in any folders, on the SD card itself).

6. Unplug the phone and turn it off.

7. Turn it back on by holding down home and power (do not let go until the recovery screen comes up) to get to recovery mode (you must have a custom recovery screen to do this, if you don’t find out How To Root and Load a ROM procedure for your phone and do those first).

8. Now select Nandroid Backup to create a backup before we flash the new ROM.

9. Once the backup is done, select Wipe Data / Factory Reset in recovery mode.

10. Select flash zip from sd card and select the ROM you just put on the sd card.

11. Once it is done flashing, click reboot. Enjoy!

Enjoy! Will update this as we add more things for you to tweak  Feel free to suggest some in the meantime.

Thanks to DsiXDA for his awesome kitchen!

source:theunlockr
end