How to extract Smasung Galaxy Pcket tar.md5 Stock ROM - Miscellaneous Android Development

A friend of mine Spent a lot of time searching how to extract Galaxy Pocket GT-S5300 stock tar.md5 ROM!
That was for building Custom Arabic ROM because there is no Arabic Custom ROM for this Device yet.
i searched for a simple working Tutorial but i did not find ,, it is here in XDA Devs But Separated in more than thread..
So i just will refer to the threads and things are so simple:
A: Extracting tar.md5 ROM file : S5300JPLJ1_S5300OJPLI1_S5300XXLJ4_HOME.tar.md5
use this thred and TuT:
http://forum.xda-developers.com/showthread.php?t=2265298
and this is the command for this ROM (you can copy and paste it into the Terminal) :
PHP:
./splitfus2 -a -s -w2 S5300JPLJ1_S5300OJPLI1_S5300XXLJ4_HOME.tar.md5
B: Extracting System.img file contents for editing : Use this :
Step 1 download dsixdas android kitchen
download and install Cygwin
http://forum.xda-developers.com/showthread.php?t=633246
for windows go to the : 1) Windows (2000, XP, Vista, 7, 8) section.
Step 2 get your system.IMG and put it in original_update
Step 3 open terminal emulator or Cygwin in windows.
Go to where you extracted the kitchen
In my case its "cd kitchen"
Step 4 type ./menu wait for the GUI to pop up and choose create working folder and this will automatically extract the system.IMG that you have in your original_update folder
Step 5 wait and when its done it will mount system.IMG or something
Edited from : http://forum.xda-developers.com/showpost.php?p=45369856&postcount=6
and go to the work folder and you will find everything extracted .
***** we request proffisional XDA developers help in editing and imporoving this thread please.*****

Sorry for off topic, is there any stable rom for our device that has android 4.+? Ca I ask for the link?
Thanks!

Related

[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!

[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 !!

[FULL-HOWTO][DEV] Make Your Own CWM-Flashable Custom ROM -Edited on 14th Jan!

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

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

[Q] How to Create custom android update.zip file to System.img?

I have download a CM9 Rom from forum.xda-developers.com.
How can put the file to my android AVD Emulator. I have search many site but no use.
Many sites are telling, How to convert system.img to system folder using unyaffs win tool. But how can i convert the system folder to system.img?
My system config:- win7 ultimate 32bit. I've already installed cygwin.
Please guide me step by step instruction.
Same problem here. I'm trying to install MIUI V4 on Android emulator.

Categories

Resources