FORUMS
Remove All Ads from XDA

A guide to rom cooking, a bit of theming and a bit of modding!

1,586 posts
Thanks Meter: 786
 
By coldflid, Senior Member on 26th June 2011, 03:12 PM
Post Reply Email Thread
Although it does seem rom cooking is difficult, in fact, it's easy to create a simple rom, with everything you want in it. There are still a few things missing which i'll add in the next few days

Here it goes....

Lets start with a bit of theory:

Needed programs:
Cygwin
7zip
Baksmali/smali
Apk manager
Text editor (notepad ++ for example)
SGS kitchen (https://github.com/rmgeren/Android-K.../tree/galaxy_s)
Autosmali: http://forum.xda-developers.com/showthread.php?t=970728


First of all, download the cwm stock deodexed rom from here http://forum.xda-developers.com/showthread.php?t=948790
This will save a lot of time since you wont need to deodex, nor to extract /system from factoryfs.rfs
There are three folders inside:
META-INF - here is where the updater-script and updater-binary are located. This files are very important, because they are in charge of making the phone copy files from the zip, symlinking etc...
updates - here is were the kernel (zimage) and modem (modem.bin) are located
system - here are all libs, apks and things that will be copied to /system

Explanation of some directories in /system
System/app:
Here are all system apps
System/framework:
By modding files here, you'll be able to theme.
System/lib:
Here are libs needed for many things to work.
System/Build.prop:
Mod this line to change the name of the rom shown in about ro.build.display.id=
System/media -
Ringtones, bootanimations and othet things are stored here
System/etc:
Here are some files you might want to mod, like hosts ( for adfree), files for gps, and you can create an init.d folder for scripts that you want to get executed at startup (if kernel supports it)

Those are all the main directories you'll need to mod


Setting up the kitchen


Download cygwin and install it. Then download rmgeren's sgs kitchen. Create a folder called kitchen wherever you want and copy all files of rmgeren's github into it.
Create a folder inside kitchen called WORKING_111111_111111
Extract the zip of the stock deodexed rom to kitchen/WORKING_111111_111111/
In case you are having any problems with it, please do take a look at this post : http://forum.xda-developers.com/show...00&postcount=3

Cleaning up system/app


I usually delete this apks:
Aldiko
Layar
Infoalarm
Dualclock
Protips
Samsung widgets
Minidiary
Writeandgo
Phonesetupwizard
Days
Pressreader

APK Modding:


For theming use method 1, for modding xml use method 2
Method 1 - right click on the apk and select 7zip and extract in /* (* is the name of the apk)
Open the folder, then res, then drawable-hdpi, and then mod the pngs you want.
Once yoy're finished, open the apk with 7zip and replace res/drawable-hdpi with the new one
Method 2-
Place the apk inThe apk modding folder (apk manager)
Open script, choose a project to work on (22 in windows), then decompile (for some apks you'll need dependencies).
Go to projects and the folder of your apk, then mod any xml you need to mod
Recompile it, it will ask if it is a system/app. Just answer Y or N.
You'll be asked another thing, type Y, press enter
Then it'll say something about a keep folder, go to the keep folder and look for the xmls you modded and delete them. In case you cant find one, delete the ones you can find and delete resources.arsc
Now press enter
You'll have an unsigned*.apk just rename it to the old ones name.

Theming

Same process that you use for apks, but this time you mod twframework-res.apk and framework-res.apk, you also mod systemui.apk for status bar

Some xml and pngs you might want to mod (framework-res.apk)
Xml:
Res/values/styles.xml
Res/values/bools.xml
Res/drawable/progress_horizontal (for colour of this bar Click image for larger version

Name:	bar colour.jpg
Views:	516
Size:	3.3 KB
ID:	637481)

Png's (drawable-hdpi)

default_wallpaper.png - it's the default homescreen wallpaper

For overscroll glow:
overscroll_glow.png
overscroll_edge.png

For this (the bar you move) Click image for larger version

Name:	bar seek_thumb.jpg
Views:	432
Size:	4.2 KB
ID:	637482:
seek_thumb_normal.png
seek_thumb_selected.png
seek_thumb_pressed.png


There are many more, but this are a few that are quite useful. You can easily find out about any, but in case you can't, you can just ask here and i'll be glad to answer
If you want to pre-install a theme, just copy the files of the theme into the correct places. For example system/framework to system/framework
For ctr off animation, decompile framework-res.apk, go to res/values/bools.xml
and in the line: config_animateScreenLights, turn it to false. If you want a more step by step guide, try this guide: http://forum.xda-developers.com/showthread.php?t=977501

Using baksmali/smali

To mod classes.dex, i use baksmali/smali
I use ubuntu for this, but you can use another linux distro if you want.

This is what i do in Ubuntu:

Steps to follow:
1. Get the .jar you want to mod. framework.jar for example
2. Open it and get classes.dex
3. I usually copy it to the desktop
4. Open terminal
5. Type sudo su and then your password
6. then cd /home/Coldflid/Desktop ( type the location where you have copied it).
7. java -jar baksmali-1.2.6.jar classes.dex
8. Once you've modded it, type java -jar smali-1.2.6.jar (name of the output folder)
9. A new .dex file will be generated, just replace the old one with the new one

This is what i do in windows

1. Grab the jar you want to mod
2. Open it with 7zip and get classes.dex
3. Copy classes.dex to the same folder autosmali is in
4. Run baksmali.bat
5. Make the desired changes
6. Create AutoSmali_In folder and place the folder of the decompiled classes.dex inside
7. Run smali.bat
8. Rename AutoSmali_Out.dex to classes.dex and replace the old one in the .jar with the new one (using 7zip)



Finishing the rom


Now that you've finished with modding, theming etc... Now replace apks with new ones, add a few that you want, and copy libs if needed.
You can add ringtones from other phones to system/media, bootanimation of sgs ii etc...
Replace the kernel with the kernel you like the most, and the modem with the one that works best for you.

Now it's time to zipalign. Open cygwin, type cd c:/ * (where * is where you have the kitchen). Press enter
type ./menu, then press enter
Now you just select the zipalign option.

When it finished, select all three folders of the rom and right click, 7zip, add to file, zip, name it and then you're good to go.
Install it using cwm.

If you want to make it flashable through odin, follow darky's guide:
http://forum.xda-developers.com/showthread.php?t=960946

If this was useful, hit the thanks button

Hope you like it.
If there's something wrong, tell me and i'll correct it. Also post if it was useful

Thanks


rmgeren for sgs android kitchen
[Ramad] for stock deodexed roms
creator of baksmali/smali and the creator of cygwin
Daneshm90 for apk manager
Thanks to dsixda for cygwin faq, and to gazza1988 for suggesting the idea of including it in this post
Thanks to Daneshm90 for the ctr off animation tutorial i've linked to in this thread
schmittx for autosmali: http://forum.xda-developers.com/showthread.php?t=970728
The Following 27 Users Say Thank You to coldflid For This Useful Post: [ View ] Gift coldflid Ad-Free
 
 
26th June 2011, 10:10 PM |#2  
OP Senior Member
Thanks Meter: 786
 
Donate to Me
More
Reserved...
27th June 2011, 05:47 AM |#3  
Member
Thanks Meter: 0
 
More
Smile
thanks alot...will try this so how can we make wipe and non wipe? is there a way?
27th June 2011, 07:35 AM |#4  
OP Senior Member
Thanks Meter: 786
 
Donate to Me
More
Quote:
Originally Posted by zaanrider

thanks alot...will try this so how can we make wipe and non wipe? is there a way?

You need to modify the updater-script

Enviado desde mi GT-I9000 usando Tapatalk
27th June 2011, 09:28 AM |#5  
Rahulrulez's Avatar
Senior Member
Flag India
Thanks Meter: 1,480
 
Donate to Me
More
There's option for Wipe state in kitchen right?
27th June 2011, 09:46 AM |#6  
slaphead20's Avatar
Senior Member
Flag Out there somewhere
Thanks Meter: 4,762
 
Donate to Me
More
Not interested in doing this myself, but a very informative guide, much knowledge gained......only one critisism....how about some credits ie ramad for deodexed etc etc....once again many thanks

Insanity cm 015/glitch
27th June 2011, 10:03 AM |#7  
somberi's Avatar
Senior Member
Flag Cardiff
Thanks Meter: 147
 
More
Thanks for the guide. Always wanted to try, now this guide make me want to do it. Thanks gain Coldflid! You are Awesome!
27th June 2011, 10:48 AM |#8  
cenonmin's Avatar
Senior Member
Flag Sydney
Thanks Meter: 298
 
More
Hi Tweaky,

I am not a ROM cooker but hopefully I can pass info to UTO Kitchen. A lot of devs like to add "overscroll glow". Can you tell us how to revert this if possible?

I for one like the default overscroll effect like this http://www.youtube.com/watch?v=dOyWCDhlxv8

And if it is possible I would like to pass the information to UOT.

Thanks.
27th June 2011, 01:43 PM |#9  
Rahulrulez's Avatar
Senior Member
Flag India
Thanks Meter: 1,480
 
Donate to Me
More
Hello.. I did exactly what you said in OP. Can you assist me, what if I've to add custom kernel in my custom ROM? There's option for it in Kitchen. I placed zImage into working folder, Kitchen moved it to /updates. I packed the files in zip using menu BUILD ROM in kitchen. I got bootloops..

Can you help me please?
27th June 2011, 01:58 PM |#10  
Vertumus's Avatar
Recognized Themer
Flag Belgrade
Thanks Meter: 12,815
 
Donate to Me
More
Very nice Cold, GJ m8. Helped me a lot
27th June 2011, 04:24 PM |#11  
Fr4gg0r's Avatar
Inactive Recognized Developer
Thanks Meter: 688
 
More
Quote:
Originally Posted by cenonmin

Hi Tweaky,

I am not a ROM cooker but hopefully I can pass info to UTO Kitchen. A lot of devs like to add "overscroll glow". Can you tell us how to revert this if possible?

I for one like the default overscroll effect like this http://www.youtube.com/watch?v=dOyWCDhlxv8

And if it is possible I would like to pass the information to UOT.

Thanks.

overglow sux
The Following User Says Thank You to Fr4gg0r For This Useful Post: [ View ] Gift Fr4gg0r Ad-Free
Post Reply Subscribe to Thread

Tags
cooking

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

Advanced Search
Display Modes