[FULL-HOWTO][DEV] Make Your Own CWM-Flashable Custom ROM -Edited on 14th Jan! - Samsung Galaxy S (4G Model)

Code:
THIS TUTORIAL IS MEANT FOR DEVELOPERS.
NOOBS WHO ARE TRYING THIS OUT,
BE READY TO RISK YOUR BRAINS.
AND, THIS METHOD CAN HARM YOUR PHONE. ON WRONG BUILDING OF ROMS,
YOU MAY BE STUCK ONTO A BOOT-LOOP.
ALWAYS, HAVE A NANDROID BACKUP FOR SAFETY!
FEEL FREE TO ASK QUESTIONS. AND, YOUR WARRANTY IS NOW OFFICIALLY VOID. CONGRATS.
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*
->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
P.S-> You Just finished Step 1

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)

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

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

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.

Awesome
Sent from my SGH-T959V using XDA App

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

:: Downloads ::
Cygwin
MagicISO
Kitchen (Thanks to dsiXDA)
--
Optional
Custom booting Files

Reserved.......

--For the Future!

Last one!
Press The THANKS!

Thank you for writing this but wrong section. Guides should go in the general section. You could probably ask for it to be stickied.

Kool. Is to understand lol well if u understand the basic. I try other devs Rom for base but of course all credit goes to them. Its just fun to experiment sometime
Sent from my SGH-T959V using xda premium

Funny i just linked you like yesterday in general forum haha
Sent from my SGH-T959V using xda premium

ericmpanda said:
Funny i just linked you like yesterday in general forum haha
Click to expand...
Click to collapse
Maybe it should have stayed there and just linked to the one in the general forum in the wiki.
Oh well.

ericmpanda said:
Funny i just linked you like yesterday in general forum haha
Sent from my SGH-T959V using xda premium
Click to expand...
Click to collapse
I did not quite get you? :-/
Sent from my I9100 using XDA Premium App

bangalorerohan said:
I did not quite get you? :-/
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1441619

bhundven said:
http://forum.xda-developers.com/showthread.php?t=1441619
Click to expand...
Click to collapse
Bahaha! Lol!

Thats what i was like at first i thought you stole it then checked the original I saw and it was you lol
Sent from my SGH-T959V using xda premium

bangalorerohan can you please upload the kitchen and all files again in a pack since megaupload got out of you know bussiness i dont really know which versions i should use in order to follow your guide .
and Thanks for your guide man :3

Related

[GUIDE] How to create a your own ROM

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://forum.xda-developers.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!
the finger print is found in build.prop is this correct and what app do you use to edit your build.prop
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.
how abt kernel parameters?
How would one go about customizing this with Hero? Or is that not possible at this point?
detox702 said:
How would one go about customizing this with Hero? Or is that not possible at this point?
Click to expand...
Click to collapse
Would like more info on hot to incorporate senseui
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!
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.
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
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.
DeleteExtras.txt or DeleteExtras.bat doesn't work. I have to delete the extra files by myself - one by one.
codysoloman said:
DeleteExtras.txt or DeleteExtras.bat doesn't work. I have to delete the extra files by myself - one by one.
Click to expand...
Click to collapse
check this: http://forum.xda-developers.com/showthread.php?t=633246
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?
ping pong...
Can i install my own rom on samsung ace?????
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
Question
androidcustomrom said:
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://forum.xda-developers.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!
Click to expand...
Click to collapse
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:

[HOWTO][TUT] Create a Custom ROM for Samsung Galaxy i9003

Hey there,
This is a guide on How to create a ROM
For boot sound, boot animation and themeing
Installing cygwin and Setting the kitchen up!
Finalizing , de-odexing, additional option and packing the ROM
Things you will need
-Cygwin
-Android Kitchen
-Patience
-Base ROM
--All files attached at the end--
-MagicISO
PS-> WIndows 7 users set the UAC level to minimum until you finish the whole thing. And also, make sure that nothing wxcept the META-INF folder in your ROM ins capital in letters! Just a small obseravtion in my third ROM! =P
First of all, let us extract the ROM files:
As you can see, In the folder of the XXKPH ROM, you have a system.rfs file. Copy that out to a seperate folder. In case, of any other base ROM, you can find it in the PDA file.
Now use MagicISO in order to extract the system.rfs into a seperate folder!
After that, you may find something with folders like, : app, vendor,etc,media and xbin.
Adding your apps!
Step 2
You are done with the first step!
Now, rename the folder where you have extracted system.rfs to “System” (without quotes) and move it to another folder. Call the new folder as “Custom FW”. Now create a folder called data, in which you create a sub-folder “app”. All the apps what you want to be pre-installed and can be deleted by the user go in here. (only .apk format). If you want apps which the user can not un-install, put the .apk in system/app.
Step 3
You may want to add custom boot sound and some themes,right? Okay! So here is the method.
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 below.
2) Put them in the /system/bin folder and replace the existing files there
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
TO change the theme
Just replace the framework-res.apk and twframework-res.apk in the /system/framework folder
Installing Cygwin
Installing 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 folder “custom FW” and create a zip ( I repeat zip and NOT rar) of all the folder in the “Custom FW”. After that is done, navigate to the kitchen folder (C:\Ktichen) and palce the .zip in the “original_update” folder
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.
Step 5
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
And you are done with the custom ROM
---------------------------------------------------
Thanks to @sakindia123
Extracting and odin build
Code:
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
Regards,
Rohan Mallya! =D
The essential files!
For the Kitchen ( thanks to dsixida)
For cygwin
Remeber to thank and vote in the POLL!!
Custom booting files ( one you have to replace for the bootanimation before you add sanim.zip!)(samsungani and bootanimation files)
MagicISO
Credits -.-
Misledz
Ganaboy
ronhoover88
Namaless
Vivek
Erahgon
Very informative posts. I hope this will lead to more ROM for our cellphone.
More things! ☻☻
You can zipalign and sign the ROM in HTC Android Kitchen itself! While COmpiling your ROM, Just select the interactive method! You can do it all there!
If you want to changes the build date and all, you can open the build.prop(present in /system folder) and change the values!
Reserved for future
If I may ask, do you have a source link for this or is it from you?
I typed it WHOLE? So..?? I did not get you well?
No worries, it's just I like to read the comments which are usually a good complement for every tut/info, so if it were from elsewhere I would have been happy to read them, that's all
can i use this port the miui rom?
r u sure u hav not copied this from elsewhere....bcoz the boot ani thing is wrong......i9003 has different format.....(i mayb wrong)
What boot ini,sak? Elaborate please??
You could also use the link below
http://forum.xda-developers.com/showthread.php?t=1168916
Sent from my GT-I9003 using XDA App
@ronhoover88 I went through it now. But, I think you cant use that meta-inf folder, the kernel adn the root script from that guide..If you feel this is thread is a WASTE OF TIME..Please tell me..I will make an attempt to delete it!
You dont have to delete...you have put a lot of effort...what i feel is, its better if you have created a rom using this guide and got it working...
Sent from my GT-I9003 using XDA App
Dude combined all this info in a single post
Sent from my GT-I9003 using XDA Premium App
The bootanimation thing is totally from vivek's thread..try it! It woooorks!

[i9001][DEV/GUIDE]----Make your own ROM & KERNEL!----

Ok,let's start with kernel first....
I want this guide to be n00b friendly...so lets start!
1)Install Ubuntu 10.10 or later(virtual distro may work too!)......Ubuntu coz its easy for beginners....This guide should work on Fedora distros,but u will need to download separate packages.
Use this for samsung devices:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
2)Download the source code from opensource.samsung.com(easier) or sync the sources from the git repo(easy,but download the tarball as its even easier!)
3)Open terminal and download the the necessary tools:
For 32/64 bitsi use this)
Code:
apt-get install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
For 64 bits ONLY:
Code:
ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
4)Download the code soucery toochain:Toolchain
Note:This is an old toolchain.u may/should use a newer one...(optional)
ur machine is good to GO!
Ok,so i assume u have set up your machine
Now,all of the files should be placed in ~/Downloads (for my convinience to explain!but u may put it anywhere)
extract the sources and everything else u downloaded....then go into the top directory
Code:
cd Kernel
u enter into the root of the kernel directory with this
then type :
Code:
gedit Makefile
The Make file will open.........look out for this and change CROSS_COMPILE= "your toolchain path"
EXAMPLE:
Code:
CROSS_COMPILE ?= /home/sarthak/Downloads/Toolchains/arm-eabi-4.4.3/bin/arm-eabi-
This will open up the Makefile in a gedit,and the changed values will correspond to wherever u placed your toolchain................the EXTRAVERSION refers to current sub-version of your linux kernel version on ur phone
Get the config from your phone..Type:
Code:
adb pull /proc/config.gz
This will fetch a working config from the current kernel on your phone....u can alternatively make a new one with "make menuconfig"
Then gunzip it and copy it to to ur kernel source root:
Code:
gunzip config.gz
rename to .config
Now,make the necessary changes in your source.When you are done,type:
Code:
make -jX
,where X=no.op cpu threads multiplied by 1 or 2.
Sit down and have a smoke!
The resulting kernel will be in Kernel/arch/arm/boot/zImage
Easy,ain't it?
Remember,this guide doesnt teach u how to make particular changes,it just helps u setting up your build environment and compiling from a given source.
This will work for all android phones!
Making Rom Under Windows
This post is for making your custom rom under Windows environment..
FEw basic steps based on guide by bangalore rohan
-Cygwin
-Android Kitchen by dsixda
-Patience
-Base ROM(like xxkps,zskp7,etc.)
LOOK AT THIS POST FOR A KITCHEN THAT SUPPORTS i9001
-MagicISO
PS-> WIndows 7 users set the UAC level to minimum until you finish the whole thing. And also, make sure that nothing wxcept the META-INF folder in your ROM ins capital in letters!
STEP 1
First of all, let us get the ROM files:
A)
Download terminal emulator from market.
Then open it and type 'su' without quotes and press enter. Then it will ask for root rights.
Grant them.
Then type this line and press enter key
Code:
tar -c /system/* >> PDA.tar
You will get a file named pda.tar in ur sd card.
Then after that type 'mount'
While getting pda.tar if ur phone hangs wait for sometime if it still doesn't repond then remove battery and start the phone .
2)Another way to get the files
Get something like Root Explorer from market........
Copy the /system folder somewhere and put it onto ur comp.
After that, you may find something with folders like, : app, vendor,etc,media and xbin.
NOTE-There are other ways,like mounting the system.ext4.img in linux....
Step 2:Installing cygwin on Windows(U dont need this on linux!)
Installing 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.....U can also manually make changes w/o use kitchen.
Go back to the directory,and make a .zip(I REPEAT-A .zip) of the files like META-INF,data,system etc.
When u r done,u r good to flash it !
Ending Notes/Tips
Do not forget to sign the rom!u can find it in the rom kitchen menu..
Its pretty much the same of linux,but
*U dont need to install Cygwin(or u cant!)
*It's much faster!
U can also use kitchen to unpack/re-pack a boot.img of ur choice.
To get boot.img,download any kernel,take the boot.img out,and using kitchen,split it
U will get ramdisk and zImage....Replace the zImage with your own!
Then pack it again...
To make updater-script,use META-INF from some other rom,or make ur own..
WANT TO MAKE UR OWN THEME?Take a look below..........(by wilfredcool007)
Theme Developing, XML Editting:
Tools Needed :
APK Manager Photoshop or other photo editing software’s ( corel draw etc etc) FS Resizer or GIMP NOTEPAD ++ From the start:
Make sure u hav a deodexed ROM….If your ROM is not deodexed dendsixda's kitchen with the help of cygwin to deodex…. You will get a zip or rar file in which u will find “meta inf” and “system”…. We will be concentrating only on the system folder…..Extract it to the desktop or which ever location u want…. Inside the system folder u would see folders called “app” “framework” “media” “bin” etc…. Let me explain what does these folders Hav to do,,,,,
v “app” is the major folder which has to do with all the pre installed apps(default apps) like calculator camera mms(messaging) touchwiz bluetooth etc…..
v “framework” is the folder associated with the body formation (i.e) the skeleton of out fit…..examples like the battery icon,icons in the notification panel like “autorotate” “Wi-Fi” “GPS” etc….
v “media” consists of “bootanimation.zip” file allows u to change the boot animation ( we would discuss about this later)
Procedure for only ICON changing
TUTORIAL ON HOW TO CHANGE THE ICON OF APPS:
STEP 1: First go into the “apps” folder and extract everythin(if u wish extract everythin or extract only the file u want) to the desktop…….
Don’t be bothered about the .odex files… concentrate only on the .apk files….. for ex: if u wish to change the “messaging” icon…select mms.apk….enter into that and u would find folders called “res” “metainf”…….. ENTER into “res” folder and u would see folders such as “drawable” “drawable ldpi”( or similar to that) leave the folders like “xml” etc and just concentrate on “drawable-ldpi” and extract it to the desktop…..enter into that folder and u would find all the images which u see on the mobile while messaging….. Hope u would remember how the icon for the messagin app be….now search for that….for this apk it would be as “ic_launcher_smsmms”….. and BINGO your done…… download a png of the icon u want from google (for that go into google and type message icon png and select images…. Select the image of ur choice and save it) now copy that downloaded image (for ex the downloaded image name is 123.png replace that name to “ic_launcher_smsmms”)After renaming it copy and replace the default image in the “drawable ldpi” folder….. Similarly make changes for wat ever icon u want but REMBEMBER the icon ur changing should hav the same name of the default icon” Since u’ve modded(changed) only the “drawable ldpi” folder copy that folder in which u hav changed the icon to the folder in “res” of “mms.apk”…… to make it clear delete the default drawable ldpi and replace it with the one u modded from the desktop……(to replace just drag from the desktop to the rar file) IF WINRAR asks a confirmation “update changes made” click YES…… cool now u’ve changed the icon of the messaging app…. Similarly try replacing the default icon of the calculator camera dialer tab activity etc by just moving into the apk file “res”à”drawable ldpi (hdpi, land-ldpi or wateva) To go more interior take dialer tab activity and follow the above steps first.,….den replace the number icons, dialer_tab_background image with any image u like J but it should be of PNG and of the same default name while replacing it in the folder…… That’s it now u’ve learnt how to change the icons and images…… Now do the reverse of STEP 1….. copy the modded(changed) apk files from the desktop into the “system”à”app” folder and don’t forget to save the changes….. TUTORIAL ON HOW TO CHANGE THE ICON OF FRAMEWORK:
SIMILARLY just like how u replaced the icons of “apps” try replacing icons of framework folder…. Open “framework” folder…..u’ll find many .JAR files and “framework-res.apk” and “twt-framework.apk” Go into framework-res.apkàresàand extract drawable (ldpi,hdpi,mdpi,land-hdpi) or wateva file is der to ur desktop…. Just as how u did it in “apps” replace the PNGS in it…. For ex: replace the alarm clock icon “auto rotate” “vibrate” “sound””battery icons” etc….. After doing all the changes in drawable folder replace the drawable folder in “framework-res.apk” and replace this “framework-res.apk” in the framework folder of the RAR file…. XML EDITTING:
XML editing is the trickiest and difficult part yet a challenging part
To do this u must need “apk manager” version 4 or higher…..
These are the folders inside the apk manager
Take the apk file for which u r goin to edit the xml for example to change the conversion of sms to mms from 4pgs to any no of pgs u want……copy the “mms.apk” file from “system”à”app” to “PLACE APK HERE FOR MODDING” of the apk manager….. HINT: for beginners u can edit only one file at a time :O After this open “SCRIPT”
ULL find a window like this…..IF u hav placed mms.apk file in “PLACE APK HERE FOR MODDING” den “NONE” would be shown as “mms.apk” or if u had placed “touchwiz.apk” it would show as “touchwiz.apk” on the place of NONE
Now press no 9….. the “DECOMPILING” would start and would finish with no alert…
now go to the “APK manager” folder and go into “PROJECTS” u’ll find mms.apk or wateva apk u hav used….
Den go into “RES”à”XML” ..... u’ll find “mms_config” open it with notepad or notepad++….(notepad++ is advisable and recommended)
You will find a line called <int name="smsToMmsTextThreshold">4</int> replace that four with whatever number u want….
Well u hav learnt how to edit the XML’s also…….try to edit xml of touchwiz (androidmanifest.xml) to enable touch wiz rotation or touchwiz(launcher_config{to change number of rows and columns}….”default_mainapplication_order”{to change order of the apps in the touch wiz}
All the changes must be made in the projects folder and COMPILE it again by pressing number 11…..
copy the COMPILED .APK back into “apps” or “framework-res” or from wer ever u took the apk file…..
THEME DEVELOPING DOESN’T COME WITHIN A DAY SO TRY IT REPEATEDLY TILL U GET THE ART OF IT
Click to expand...
Click to collapse
Make An Odin-Flashable One-Package(by broodplank1337)
Here's how to make an odin flashable:
unpack the base rom:
adsp.mbn
amss.mbn
boot.img
cache.img.ext4
preload.img.ext4
recovery.img
system.img.ext4
Now go into adb shell and do:
Code:
adb shell
su
mount -o remount rw /system
dd if=/dev/block/mmcblk0p8 of=/sdcard/boot.img bs=4096
dd if=/dev/block/mmcblk0p13 of=/sdcard/recovery.img bs=4096
dd if=/dev/block/mmcblk0p15 of=/sdcard/system.img.ext4 bs=4096
copy those files in the base rom dir
then do the following:
Code:
tar -c adsp.mbn amss.mbn boot.img cache.img.ext4 preload.img.ext4 recovery.img system.img.ext4 > craniumrc5.tar
then do this:
Code:
md5sum –t craniumrc5.tar >> craniumrc5.tar
mv craniumrc5.tar craniumrc5.tar.md5
Click to expand...
Click to collapse
NOTE:U can change 'Cranium' to anything u wish!
Windows users,take a look at this for managing .tar.md5 archives!(buy nikagl)
DOWNLOADS
Rom kitchen by dsixda
Cygwin packages
Sign Your Zip
QtADB(Nice Software to manage ,well Everything!)
Sample Kernel Sources On Github
Cranium Kernel by sakindia123
Feacore_Phoenix by manveru0
sakindia123 said:
finally the last one.this should be enough!
Click to expand...
Click to collapse
Reading and waiting
Sent from GT-I9001 using XDA Premium
i'll try to install those tools in Arch Linux. Wish me luck cuz i m really nOOb)
Arch Linux a simple, lightweight linux distribution
u cud say i completed the guide ,so go ahead and take a look!
A good one... but isnt the theme devoloping which u've written is my file...
wilfredcool007 said:
A good one... but isnt the theme devoloping which u've written is my file...
Click to expand...
Click to collapse
yup i know........that's i put it in quotes
didnt know u were on xda.......will add ur name der
sakindia123 said:
yup i know........that's i put it in quotes
didnt know u were on xda.......will add ur name der
Click to expand...
Click to collapse
^_^ cool thanks
---------- Post added at 06:01 PM ---------- Previous post was at 05:45 PM ----------
http://www.multiupload.com/IBYDUCRX4S
@sakindia123: the above link is a file which helps in auto signing the ROM
thought it might complete ur work
Updated the guide with even more information!
a lil of something about adding modules would be nice too
oh , u might also find this thread useful ( yes yes i'm aware it's a whole different kernel on the desire )
thanks for that link...pretty interesting stuff!
also, u might do "make modules" or even "make" to compile modules...
hope u finish your guide,otherwise I have installed ubuntu for nothing
sakindia123 said:
Ok,let's start with kernel first....
2)Download the source code from opensource.samsung.com(easier) or sync the sources from the git repo(easy,but download the tarball as its even easier!)
Click to expand...
Click to collapse
Colud you provide commands(for git repo) and links(what to download from samsung.com) for this part??
sakindia123 said:
4)Download the code soucery toochain:Toolchain
Note:This is an old toolchain.u may/should use a newer one...(optional)
Click to expand...
Click to collapse
Could you provide link for latest toolchain, because i cannot find last one.
Sorry for asking details but it would be nice if that HOWTO was for Noobs .
And of course, done a very good job.
oisis said:
Colud you provide commands(for git repo) and links(what to download from samsung.com) for this part??
Could you provide link for latest toolchain, because i cannot find last one.
Sorry for asking details but it would be nice if that HOWTO was for Noobs .
And of course, done a very good job.
Click to expand...
Click to collapse
i will upload new toolchain later
and i just saw that i9001 doesnt have a git repo by samsung................
in the search field,search for "i9001"...as simple as that!
BTW, to clone any repo,here's the syntax
Code:
git clone url
where url is replaced with the url of git repository
sakindia123 said:
i will upload new toolchain later
and i just saw that i9001 doesnt have a git repo by samsung................
in the search field,search for "i9001"...as simple as that!
Click to expand...
Click to collapse
So we have to download from this site latest SGS+ package: GT-I9001_OpenSource.tar.gz. Right?
sakindia123 said:
BTW, to clone any repo,here's the syntax
Code:
git clone url
where url is replaced with the url of git repository
Click to expand...
Click to collapse
So this part is not working for us because there is no GIT repo for i9001.
What about the kernel, it can be any linux kernel or we have to download kernel for Android from some site? I just download Cranium kernel but maybe someday will need vanilla kernel(not from Cranium).
I created a thread for DOS (sorry, no unix, could have done that too but mainly use my Win7 laptop for this stuff) scripts that allow building the Odin package based on broodplanks instructions:
http://forum.xda-developers.com/showthread.php?t=1399356
Regards,
Nika.
if u want to compile vanilla kernel,first clone the Cyanogen Mod kernel source like this (since android servers are probably down)
Code:
git clone git://github.com/CyanogenMod/cm-kernel.git
For more instructions,take a look here

[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
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)
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
----------------------------------------------------
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/showthread.php?t=1532660
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.
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
:: DOWNLOADS ::
-> Cygwin
-> MagicISO
-> Kitchen
-> Custom Booting Files
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 )
Last one reservation please!
I don't find word to express my feelings thank-you
Sent from my GT-S5670 using xda premium
Mr.Oug said:
I don't find word to express my feelings thank-you
Sent from my GT-S5670 using xda premium
Click to expand...
Click to collapse
You're Welcome
Firstly, thanks a lot for this!!! Will surely try it out when my exams get over!!!
And there are a lot of additional stuff that you didn't cover, hopefully you will add them...
(Like kernal development, do you know about it??)
a.cid said:
Firstly, thanks a lot for this!!! Will surely try it out when my exams get over!!!
And there are a lot of additional stuff that you didn't cover, hopefully you will add them...
(Like kernal development, do you know about it??)
Click to expand...
Click to collapse
I have No idea of the Kernel Development!
Total n00b there!
I know only about Themes and ROM's!
And, A BIT of .apks
http://forum.xda-developers.com/showthread.php?t=1186409
found this for kernel dev
If the file is not a .zip and a .tar.md5 file, where will I find the .rfs file?
Please help
Thanks for the Link!
Will Post it in the OP!
rgshah3 said:
If the file is not a .zip and a .tar.md5 file, where will I find the .rfs file?
Please help
Click to expand...
Click to collapse
Just Open the .ta.md5 file using 7-Zip and you can find a file named System.rfs / systemfs.rfs / factoryfs.rfs
bangalorerohan said:
Thanks for the Link!
Will Post it in the OP!
Click to expand...
Click to collapse
The kernel development guide is for galaxy 3 which uses zImage while galaxy fit doesn't! So this guide is quite useless
Aah!
Never knew about a device also called Galaxy 3
bangalorerohan said:
I have No idea of the Kernel Development!
Total n00b there!
I know only about Themes and ROM's!
And, A BIT of .apks
Click to expand...
Click to collapse
dude, i appreaciate for the work, bt fit has a low internal memory, for that we need app2sd working which further needs ext4 partition !!
so this guide willnt be complete without that ,
i saw the same guide on Galaxy SL forums by you only,
n before posting the Custom Booting file (if same as G-SL's) u must check it on Fit, because that might cause a boot loop !!

[Tutorial] How to port cf-root to other i9003 Firmwares [23/02/2012]

Tutorial for Porting Cf-root To Newer Firmware's
There were quite a few requests for a tutorial to create ginger bread cf-root. So here it is folks.
Big Thanks to skin1980 for helping me out.
Credits:
Chainfire for the cf-root.
Skin1980 for porting it to Samsung Galaxy SLCD.
Prerequisites:
Any Linux. Basic knowledge of linux is mandatory.
Tools for Unpacking and Packing images.
Base Samsung Galaxy SLCD Gingerbread Cf-root.
Samsung Galaxy SLCD Gingerbread Firmware ROM for cf-root creation.
Downloads & Setup
Any Linux: For this tutorial I am using Linux Mint KDE. You are free to use the Linux of your choice. Ideal starting point for downloading and installing Linux would be Distrowatch.com.
Tools for unpacking and packing images: These are sets of tools that allow you to unpack and pack boot images. Basically one requires just a few tools to achieve.
Link to Download: cfroot-tools.zip - 19 KB.
Download and exatract it into your home folder. It will create a cfroot-tools folder under home folder. Go to the folder and execute the following comand:
Code:
chmod +x *
Base Cf-root: Download any latest cf-root from this Link. Extract the normalboot.img from the cf-root tar file.
normalboot.img: Require normalboot.img extracted from downloaded Gb ROM.
Hex editor: You will require and Hex Editor. I am using bless hex editor. You can use any one which you are comfortable or the one available under your linux distribution.
Open terminal window and enter the following commands:
Code:
[FONT=Microsoft Sans Serif][SIZE=2]cd
[/SIZE][/FONT][FONT=Microsoft Sans Serif][SIZE=2]gedit ~/.bashrc[/SIZE][/FONT]
You can use any editor of your choice. The main purpose is to set the tools path. At the bottom of this file, add the following lines:
Code:
PATH=$HOME/cfroot-tools:$PATH
export PATH
Save and close the file.
Logoff from linux and login again for the new path to take effect.
The Actual Process
For the purpose of tutorial, I am going to use XXKPQ cf-root as the base and DDKP3 for creating new one.
Create a folder called “cfroot” with out the quotes under home.
Go to the created folder and create two more folders: DDKP3 and XXKPQ.
Now copy the normalboot.img extracted from XXKPQ cf-root and copy it into the XXKPQ folder. Next copy the normalboot.img fromDDKP3 firmware and copy it into DDKP3 folder.
Now go to the cfroot-tools folder under HOME and copy the decom.sh and recom.sh into XXKPQ and DDKP3 folders.
The above steps can be accomplished by the below code. Open command window and type the following:
Code:
cd
mkdir ~/cfroot
mkdir ~/cfroot/XXKPQ
mkdir ~/cfroot/DDKP3
cd ~/cfroot/XXKPQ
cp ~/cfroot-tools/*.sh .
chmod +x *.sh
cd ~/cfroot/DDKP3
cp ~/cfroot-tools/*.sh .
chmod +x *.sh
You need to press enter after each command.
From terminal window, first to change directory to XXKPQ, type the following commands:
Code:
cd ~/cfroot/XXKPQ
./decom.sh
After the execution of the above command, the following files and folders will be created:
normalboot.img-base
normalboot.img-cmdline
normalboot.img-pagesize
normalboot.img-ramdisk.gz => Ramdisk
normalboot.img-zImage => Kernel
Click to expand...
Click to collapse
Apart from these files, a folder called ramdisk will be created, into which the contents of normalboot.img-ramdisk.gz would have been extracted.
Now once more from the terminal window execute the following command:
Code:
cd ~/cfroot/DDKP3
./decom.sh
Also make note of the following values, which are shown, when the decom.sh script is executed.
Code:
BOARD_KERNEL_BASE 81800000
BOARD_PAGE_SIZE 00001000
Now under DDKP3 folder, edit the recom.sh file. Replace the value after --base with the value after BOARD_KERNEL_BASE. Replace the value after --pagesize with value after BOARD_PAGE_SIZE. Save the file.
Now we can switch to file manager. It will be easier to work using a file manager from here on. Open the XXKPQ/ramdisk and DDKP3/ramdisk folders separately in file manager.
Copy the folders res & sbin from base cf-root (XXKPQ in our case) and paste into DDKP3/ramdisk folder. Overwrite all when prompted.
Copy all the files under XXKPQ/ramdisk (in the root) to DDKP3/ramdisk.
From XXKPQ/ramdisk/lib/modules/2.6.35.7/kernel/ copy the fs folder into DDKP3/ramdisk/lib/modules/2.6.35.7/kernel/.
At this point of time, we no longer require the XXKPQ folder. So we can close the file manager window browsing XXKPQ folder.
Now comes the tricky and critical part. This must be done very carefully. We need to edit the .ko files using a hex editor.
Under the kernel/crypto/ folder, there is a pcbc.ko file, edit it using an hex editor. Search for 2.6.35.7 using find option in the editor. Now note down the six digit numbers starting immediately after 2.6.35.7-CL. In our case the magic number is 882023. Close the file and the editor.
Now we open the kernel/fs/ folder in the file manager.
Now open the mbcache.ko file in the hex editor. Search for 2.6.35.7 again. As we can see that the six digits after 2.6.35.7-CL is not 882023. In our case it is 709629. We need to change 709629 to 882023 and save the file. Different editors provide for different methods of editing. In my case I can just simply click on starting number that is 7 and start typing 882023 and save the file.
Now you need to do the same for two more files under kernel/fs/jbd2/ and kernel/fs/ext4/.
Now go back to ramdisk folder. Under ramdisk/sbin/boot/ there is a file called install.sh. We are now going to edit this file. This not important that you edit this file.
Edit the first line and replace XXKPQ with DDKP3.
Similarly under the “# Once be enough”, there is another XXKPQ which is to be replace with DDKP3.
Now save this file.
Now back to command prompt and execute the following commands:
Code:
cd ~/cfroot/DDKP3
./recom.sh
Executing the above script recreates the normalboot.img-ramdisk.gz, the normalboot.img and create DDKP3-CFROOT-16-02-2012.tar.
The DDKP3-CFROOT-16-02-2012.tar is the cf-root for DDKP3 and can be flashed using ODIN as Pda file.
*
Thats it folks. Hope my effort is worthwhile and benefits some of you.
*
Additional Links:
A text file Create Custom Rom (though not for our phone but is quite useful all the same) - Found it while searching google. Don't know who created it. But here is the link. Create_Custom_Rom.txt - 5 KB
The link to tools zip mentioned in the above text file. tools.tar.gz - 49 MB
Script to uncompress and compress UC Kernel
uc_decom.sh - 258 b
uc_recom.sh - 382 b
10 Chars ......
For Future Use
Whoa! This is huge! Awesomr work man! Thanks.
Edit - No offence meant, but it would be appropriate if the title is How to "port" or similar. Since it ws "created" by ChainFire and we just porting it.
ganeshbiyer is good, very patient, did not think that my trouble!
Has been helping me! Am very grateful!
great job! & i already translate it into chinese^^
and a problem:
after i run the script "decom.sh",it display following words:
[[email protected] xxkpq]# ./decom.sh
./decom.sh: line 5: unpackbootimg: command not found
gunzip: ../normalboot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
[[email protected] xxkpq]#
help me please~what's going on?
cRainin said:
great job! & i already translate it into chinese^^
and a problem:
after i run the script "decom.sh",it display following words:
[[email protected] xxkpq]# ./decom.sh
./decom.sh: line 5: unpackbootimg: command not found
gunzip: ../normalboot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
[[email protected] xxkpq]#
help me please~what's going on?
Click to expand...
Click to collapse
unpackbootimg must be in the path.
also it must be executable.
ganeshbiyer said:
unpackbootimg must be in the path.
also it must be executable.
Click to expand...
Click to collapse
sorry,i paste the wrong code. my problem is this:
[[email protected] XXKPQ]$ ./decom.sh./decom.sh: /home/chenyu/cfroot-tools/unpackbootimg: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
gzip: ../normalboot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
[[email protected] XXKPQ]$
cRainin said:
sorry,i paste the wrong code. my problem is this:
[[email protected] XXKPQ]$ ./decom.sh./decom.sh: /home/chenyu/cfroot-tools/unpackbootimg: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
gzip: ../normalboot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
[[email protected] XXKPQ]$
Click to expand...
Click to collapse
Need to install the missing file ld-linux.so.2
Sent from my GT-I9003 using xda premium
Thank you Ganeshbiyer! this is the tutorial for which send multiple private messages and never answered .. Thanks again, nowI can make a version for Gingerbread UBKPD.
goodbye
Yeah ganesh! A superb work..well done bro
thanks bhaiya....
Thanks for the tutorial buddy
Hope it has been useful.
_
Release all PERFECT! I had no problem in making the entire guide .. BUT ... when flashing in ODIN, and says that when it failed to finish.
I knew that I would be so easy, so I started to analyze both folders (my UBKPD and XXKPQ) and did not get that at the root of KPD I have 12 files and only 11 KPQ. The 12th file executable type KPD called RECOVERY. This file should remove it before using recom.sh?
Thanks again for the guide. goodbye
Edit2:
Well, my little patience led me to delete that file and then went back to RECOVERY recom.sh run and throw me error that could not erase normalboot.img and did not understand, but looking at the files in the root, not the size you normalboot.img was higher than the stock then replace the stock normalboot (+5 mb), run again and finally he created recom.sh cf.root, I flash with ODIN successfully without any problem in these +30 minutes.
Thanks (again).
Now I have as including UV & OC (freqmax 1100MHz is very good speed and would think you do not need more with this phone)
maybe a stupid question:
would it work with other phones as well? natually with the files of the other phone and not with the 9003 files
fabsau said:
maybe a stupid question:
would it work with other phones as well? natually with the files of the other phone and not with the 9003 files
Click to expand...
Click to collapse
Well you can always try
thanks for your reply
I will try it soon^^
wait for my next reply
greetings fabsau
i do it all at this tutorial and it create .tar fine without trouble.. i flash with odin also no problem happen.. but while device open.. at boot logo get stuck or freeze at long time.. why it happen???
i confuse with this line:-
-Copy the folders res & sbin from base cf-root (XXKPQ in our case) and paste into DDKP3/ramdisk folder. Overwrite all when prompted.
-Copy all the files under XXKPQ/ramdisk (in the root) to DDKP3/ramdisk.
-From XXKPQ/ramdisk/lib/modules/2.6.35.7/kernel/ copy the fs folder into DDKP3/ramdisk/lib/modules/2.6.35.7/kernel/
Click to expand...
Click to collapse
why do not copy all the file in ramdisk n skip copy file inside the ramdisk folder.. it is difference?? please tell me if i do a mistake.

Categories

Resources