Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,037 Members 52,714 Now Online
XDA Developers Android and Mobile Development Forum

[FULL HOW-TO][!DEV] How to Make a ROM --Explained In every Step-- ALMOST!!

Tip us?
 
bangalorerohan
Old
(Last edited by bangalorerohan; 1st April 2012 at 06:29 AM.)
#1  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
Angry [FULL HOW-TO][!DEV] How to Make a ROM --Explained In every Step-- ALMOST!!

.:Index:.
Basic Needs and Extraction of ROM (.rfs)
Editing your ROM and Removing and addition of System Apps
Custom Boot Animation And Boot Sound
nstalling the Cygwin and Setting up the Kitchen

Cygwin Basics and De-Odexing Firmware
Extracting and odin build
.: Downloads :.





What You Need?

->Cygwin

-> DSIXda Kitchen
-> A windows/ Linux environment.
-> MagicISO
-> Base ROM --NOT CUSTOM ROM-- --AN OFFICIAL ROM--

*Dont take works of Developers of Custom ROM. Develop your OWN custom ROM*
You can find ALL official Firmwares(ROMS) here**

->7Zip

Basic Thing.

Extraction of RFS.

Well, THis is the First thing you should do.
Here are the steps:
-> Download a Firmware of your choice from the above link.
-> If you Firmware is in .zip format, be sure to extract the FW to a folder.
-> In the folder, you should find a PDA file ( The file which use put in the PDA place when you flash using ODIN)
-> Install 7-Zip if you dont have it, if you have it...Proceed to next step
->Right Click on the PDA file and open the archive using 7-zip.
-> Now, you can see a file named "system.rfs" or "factoryfs.rfs" or "systemFS.rfs", just copy the file to your C:\ (YOU CAN COPY IT ANYWHERE. I am taking C:\ as my base location)

Part II - Extracting RFS

-> Download and Open MagicISO.
->Click on File-> Open and browse to the place where you have your extracted system.rfs or factoryfs.rfs or systemfs.rfs.
-> Now, you should be able to see many folders like lib,system,xBin,vendor,etc.
-> Copy ALL the folders to your desired location. Be sure to put all of them in a folder called system. For example, In C:\ , create a folder called ROM and create a sub-folder called "system" and put the files there.

In my case, The Extraction is placed at C:\ROM\system

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

END OF STEP 1


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 44 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
bangalorerohan
Old
(Last edited by bangalorerohan; 29th December 2011 at 04:21 AM.)
#2  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
Step 2-> Editing your ROM and Removing and addition of System Apps

First, Go to the folder where you extracted the ROM and then go to \System\App.
Here, you can find ALL the applications which are un-installable by the user.
So, If you want to REMOVE apps, you can remove them and their .odex's. But, be sure, For what apps you are planning to keep, DONT REMOVE THE ODEXES.

------

If you want to add up apps, just copy the .apk of that app and put it to \system\app. But, the User can not uninstall this app.
For any Theme changes, replace the Framework-res.apk in the \system\framework.
For Status Bar Changes, replace the systemui.apk in the \system\app.
Do Not Change Anything in xBin and Vendor folder.
On changing stuff there, your ROM will not boot.

-----

If you want to put apps which the user can un-install, here's how to do it.

-> Go to your BASE FOLDER. In my case C:\ROM
-> Create a folder called Data and a sub-folder called \data\app.
-> Put ALL your .apks in here. On doing so, the user of the ROM can un-install the app.

------
Just copy the META-INF folder of any other ROM and put it in your base folder. (C:\ROM in my Case)


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 15 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
bangalorerohan
Old
(Last edited by bangalorerohan; 28th December 2011 at 09:15 AM.)
#3  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
Custom Boot Animation And Boot Sound


Cutom Boot sound

First, navigate to /system/etc and find PowerOn.wav. This will enable you to change the boot sound. Replace it with a short tone of .wav format only. Now you,have changed the boot sound

To change the boot animation

1) Download the bootanimation and samsungani file attached in the Downloads Section
2) Put them in the /system/bin folder and replace the existing files there
------------->>>> The Above two steps are not needed<<<<------------------ Only if the bootanimation does not work, use these files >>>>>>>>>-----------<<<<<<<<
3) Now download any boot animation, and rename the bootanimation to “sanim.zip”.
4) Now, navigate to /system/media and replace the “ODEanim” with “sanim.zip”
You are done with the bootanimation change



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


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 15 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
bangalorerohan
Old
(Last edited by bangalorerohan; 1st April 2012 at 06:29 AM.)
#4  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
nstalling the Cygwin and Setting up the Kitchen

Download the Cygwin files attached below. Extract the zip to a folder. Now, you can see 3 icons, a read-me,a setup, and a folder. Choose the setup. Here You will choose install from local directory. Next, Navigate to the the folder of extraction of cygwin and choose the folder Cygwin_packages inside the cygwin extraction folder. Wait for some time. Then, You will come across a list of file. Click the 2-circle-arrows,untill, it displays “install”

After the procedure is complete, run the batch file. Now, minimise it and extract the android kitchen.
Keep it in some location like C:\Kitchen

Now, open the batch file window and type

cd C:\Kitchen

Wait for some time and then when the location the changed, type

./menu

As this is a HTC kitchen, you can't use all the features,

Now, go back to the base folder (C:\ROM in my case) and create a zip (Recomended to use Winzip) ( I repeat zip and NOT rar) of all the folder in the “Bse Folder”(C:\ROM in my case). After that is done, navigate to the kitchen folder (C:\Ktichen) and palce the .zip in the “original_update” folder.

P.S- Here's one of the amazing Threads on how to setup cygwin. (Credits to ajay8055) http://forum.xda-developers.com/show....php?t=1532660


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 15 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
bangalorerohan
Old
(Last edited by bangalorerohan; 14th January 2012 at 05:17 AM.)
#5  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
Come back to the Cygwin Batch window. Now you select 1 (i.e. the first option and press enter.

Then, again press 1 twice!

Now after this is done, you can also use option 2 (rooting). You can change the ROM's name using option 8.

De-odexing the FW.

In the batch window, choose option 0 and then choose 1.

Using this you can de-odex your FW.

Next, choose 99 to build and pack you ROM.

You are now Done with the custom ROM and can find your build in the Output_zip folder of the Kitchen (C:\Kitchen in my case)

WARNINGS::

-> IF you are asked to add a fake boot.img, choose yes.
-> If you are asked to change updater-script to update-script, choose NO.


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 13 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
bangalorerohan
Old
(Last edited by bangalorerohan; 28th December 2011 at 02:24 AM.)
#6  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
For EXPERIENCED DEVS and LINUX USERS.

No n00b Post

Extracting and odin build

xvf ODIN_FILE.tar.md5
NOTE:.md5 is optional

Rebuilding
Code:
$ tar -H ustar -c amss boot.img csc.rfs recovery.img system.rfs >ODIN_FILE.tar
$ md5sum -t ODIN_FILE.tar >>ODIN_FILE.tar (signing the file)
$ mv ODIN_FILE.tar ODIN_FILE.tar.md5
Of course,u Have to put the name of ur file in place of ODIN_FILE
Mounting rfs(on linux)
Code:
 mkdir system_mount
$ mount -o loop system.rfs system_mount
$ cp /folder/application.apk system_mount/app/  (adding aplications)
$ rm system_mount/app/application.apk           (removing applications)
$ cp /folder/application.apk system_mount/app/application.apk  (replacing aplications)
$ umount system_mount


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 12 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
bangalorerohan
Old
(Last edited by bangalorerohan; 24th February 2012 at 08:56 AM.)
#7  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
:: DOWNLOADS ::

-> Cygwin
-> MagicISO
-> Kitchen
-> Custom Booting Files


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 9 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
bangalorerohan
Old
(Last edited by bangalorerohan; 29th December 2011 at 04:31 PM.)
#8  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
You can do the following withthe kitchen.
Please dont try anything else, else, you will get bored of seeing the Same boot-animation again and again!

-> Zip-Align
-> Dis-Able bootscreen sounds
-> Add Root Permissions
->Change name of ROM
->Deodex files in your ROM
->Add Apps2SD
->Add custom boot animation functionality
->Build ROM from working folder (Duh :P)


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 7 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
bangalorerohan
Old
#9  
bangalorerohan's Avatar
Senior Member - OP
Thanks Meter 941
Posts: 1,319
Join Date: Apr 2011
Location: Bangalore,Karnataka,India
Last one reservation please!


My DOnation E-Mail is pleasepressthethanksbutton@ihatedonations.com



** I am back after a loooong time. So, Give me sometime to see the Developments done **
The Following 5 Users Say Thank You to bangalorerohan For This Useful Post: [ Click to Expand ]
 
Mr.Oug
Old
#10  
Senior Member
Thanks Meter 92
Posts: 494
Join Date: Dec 2011
Location: Pune
I don't find word to express my feelings thank-you

Sent from my GT-S5670 using xda premium

The Following User Says Thank You to Mr.Oug For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes