Need a smaller boot.img - Nexus One General

Hi All
Thank you for the great work however in order to enjoy the ROMS I will need to have a smaller boot.img in order to flash the roms.
The image must be 2.35 MB at most, A good example is the Enomther ROM that is flashable.
However the CM6 roms are not (except KANG O RAMA).
Since I dont think that someone is going to do it for me, can you at least explain how can I do that?
There are at least 10 more people that check this forum regulary looking for a solution.
Thank you.

CM6 boot image is just 2.25MB!!!

OHH yea.... checked it out on his site yesterday, then how come rodriguez's image is bigger?

He's most probably using another kernel for CM6, just like MicroMod uses another kernel for TheOfficial.

OK. How can I use those features with a smaller kernel? Is there a way?

1) Ask the kernel / ROM creator to "pack" it to fit in 2.5MB of space.
2) Compile your own kernel and make your own boot.img.
3) Try to mix your desired ROM (for example, Micromod's) with the kernel that fits your limited boot space (for example, Enomther's original). Or you could try to use rodriguez's ROM with CM kernel. To do that mix, replace the boot.img and the WiFi driver - bcm4329.ko - in their locations in the original ROM zip and resign the zip, then flash it.

Why the need for a smaller boot.img?
Sent from my Nexus One using XDA App

HTCinToronto said:
Why the need for a smaller boot.img?
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Many N1s do not allow kernels later than 2.4MB (or something like that)... the kernel does not flash because of bad MTD blocks...

Jack_R1 said:
1) Ask the kernel / ROM creator to "pack" it to fit in 2.5MB of space.
2) Compile your own kernel and make your own boot.img.
3) Try to mix your desired ROM (for example, Micromod's) with the kernel that fits your limited boot space (for example, Enomther's original). Or you could try to use rodriguez's ROM with CM kernel. To do that mix, replace the boot.img and the WiFi driver - bcm4329.ko - in their locations in the original ROM zip and resign the zip, then flash it.
Click to expand...
Click to collapse
OK. Thanks.
Can you send me a link with the instructions on how to change and resign roms?
[sorry for being a noob]

Unfortunately, I don't have any instructions available anywhere, but you can use some Google searching.
The boot.img resides in the root of the ZIP, the bcm4329.ko is in /system/lib/modules/.
Changing the files in the ROM is easy - ROM is just a ZIP file, you take a ROM you want to change, open it in WinZip / WinRar / your favorite freeware archiver, find the files you want to replace (the ones I've mentioned above), download the original ROM which is the base (Enomther for MicroMod, CM6 for Rodriguez), extract those files from there, drag&drop them into the ROM you're modifying, that's it.
Then you search Google for "android sign zip apk", and you get a couple of guides that show you how to sign ZIPs.
Then you load the ROM and hope it works.

does not sound complicated
thanks.... I will try that.

Yes, what you need is:
boot.img and everything in /system/lib/modules
It's important that you replace everything in /system/lib/modules with the correct content for the specific boot.img you're using and delete everything else.
My boot.img which is based on Wildmonks BFS 950 kernel supports apps2ext and 720p and should be sufficient for any CM6 rom. It's worth noting that the current one in Kang-o-rama 1.0 Final is not as stable as I would like and I'll be updating it soon.
Since this seems a bit challenging for some rom devs an alternative approach could be:
Create update.zip for small boot image (I can help with this)
Rom dev creates rom update.zip without a kernel (may not boot properly)
Install rom without kernel
Install small kernel update.zip
Or everyone could use Kang-o-rama...

Related

CUSTOM ROM (deodexed)

Hey guys,
you probably don't know me, but I have created a custom rom for our Galaxy 3 based on Froyo.
It comes with both, the TW Launcher and the stock launcher, Launcher2.
So YOU are able to choose one of them.
It has modiefied framework-res.apk and twframework-res.apk too (Gingerbread look).
And last but not least, I rebuild the zImage kernel for speed and this is probably the first DEODEXED rom avaiable for Galaxy 3.
The only PROBLEM is, that my rom comes an an update.zip package which i cannot sign with the samsung key since I don't have it.
So if you guys could manage to create a custom recovery that lets us apply update.zip packages like in times of ECLAIR, we could use my rom.
So I need you guys to to this.
Then we can use my deodexed, optimized froyo rom.
rayman33 said:
Hey guys,
you probably don't know me, but I have created a custom rom for our Galaxy 3 based on Froyo.
It comes with both, the TW Launcher and the stock launcher, Launcher2.
So YOU are able to choose one of them.
It has modiefied framework-res.apk and twframework-res.apk too (Gingerbread look).
And last but not least, I rebuild the zImage kernel for speed and this is probably the first DEODEXED rom avaiable for Galaxy 3.
The only PROBLEM is, that my rom comes an an update.zip package which i cannot sign with the samsung key since I don't have it.
So if you guys could manage to create a custom recovery that lets us apply update.zip packages like in times of ECLAIR, we could use my rom.
So I need you guys to to this.
Then we can use my deodexed, optimized froyo rom.
Click to expand...
Click to collapse
question: what deodexed means??? i never heard that word before...
why this isnt in dev forum?
Thats good buddy.... Plz upload the zImage kernel with Deodexed
ready to try
Need some more information
Ok buddy,
I'll upload it...let's see..
maybe tomorrow after school.
But can you tell me : For theming and so on,
what needs to be deodexed ?! I only deodexed /system/app .
Does /system/framework also need to be deodexed ?!
AND : GOOD NEWS :
I succesfully created a flashable ODIN package based on XXJPA, which is deodexed in /system/app !
So please tell me if I should deodex /system/framework !
I'll add the Kernel and all the other stuff in my 2nd release
STAY TUNED BUT HELP ME .
rayman33 said:
Ok buddy,
I'll upload it...let's see..
maybe tomorrow after school.
But can you tell me : For theming and so on,
what needs to be deodexed ?! I only deodexed /system/app .
Does /system/framework also need to be deodexed ?!
AND : GOOD NEWS :
I succesfully created a flashable ODIN package based on XXJPA, which is deodexed in /system/app !
So please tell me if I should deodex /system/framework !
I'll add the Kernel and all the other stuff in my 2nd release
STAY TUNED BUT HELP ME .
Click to expand...
Click to collapse
If possible, could you PM the instructions on how to deodex a ROM?
Sent from my Samsung Galaxy 3 FROYO
great now we can modify the indivisual apps in the samsung...crap.......
and yes i thinkthe framework folder also needs to be deodexed...
right now we can only modify /hack the framework-res.apk and twframework-res.apk as they do not have odex files with them i.e deodexed....
while others are odexed...
this is the first great step to galaxy 3 custom roms and from that i mean great roms....
Instructions
So for you guys, here is the instruction for deodexing .
First, go to youtube and follow the video instructions of nokia7vista's tutorial for creating a custom rom for Samsung Galaxy S.
(Download a base rom that you want to customize (i.e. XXJPF) and download and install magiciso to open the factoryfs.rfs from XXJPF (in magic iso, go to open and then select all files, then you can open factoryfs.rfs). When you have done this, extract the content of factoryfs.rfs to your desktop and put it into a folder called "System". Put the folder "System" into a new folder called "CFW". Now you have to download the rombasics.zip based on JPA FROYO, which are found in another post in the xda - Forum in the development section. (Sorry I'm a new user so i'm not allowed to post links. When I am, I'll do !
Then, put the content of rombasics.zip into the folder "CFW".
After that, follow nokia7vista's tutorial part 4 to install cygwin correctly and install the HTC Android kitchen.
When you followed the tutorial, you should know how to start the kitchen (open cygwin, cd to folder where you placed the kitchen and type "./menu" (without quotes ).
And in the kitchen, you must first do nr. 1 (building working folder from the folder "CFW"). Then, you can type 0 to access the advanced options and type 11 to deodex. Easily select if you only want to deodex either only /system/app or only /system/framework or both.
AFTER you have followed all these steps, you have to select 99 in the kitchen. This will set up "CFW.zip" in the /kitchen/output folder.
When this is finished, you have to extract the "CFW.zip" and copy the factoryfs.rfs to any Froyo based ROM for Galaxy 3 you like.
THEN you're done
rayman33 said:
So for you guys, here is the instruction for deodexing .
First, go to youtube and follow the video instructions of nokia7vista's tutorial for creating a custom rom for Samsung Galaxy S.
(Download a base rom that you want to customize (i.e. XXJPF) and download and install magiciso to open the factoryfs.rfs from XXJPF (in magic iso, go to open and then select all files, then you can open factoryfs.rfs). When you have done this, extract the content of factoryfs.rfs to your desktop and put it into a folder called "System". Put the folder "System" into a new folder called "CFW". Now you have to download the rombasics.zip based on JPA FROYO, which are found in another post in the xda - Forum in the development section. (Sorry I'm a new user so i'm not allowed to post links. When I am, I'll do !
Then, put the content of rombasics.zip into the folder "CFW".
After that, follow nokia7vista's tutorial part 4 to install cygwin correctly and install the HTC Android kitchen.
When you followed the tutorial, you should know how to start the kitchen (open cygwin, cd to folder where you placed the kitchen and type "./menu" (without quotes ).
And in the kitchen, you must first do nr. 1 (building working folder from the folder "CFW"). Then, you can type 0 to access the advanced options and type 11 to deodex. Easily select if you only want to deodex either only /system/app or only /system/framework or both.
AFTER you have followed all these steps, you have to select 99 in the kitchen. This will set up "CFW.zip" in the /kitchen/output folder.
When this is finished, you have to extract the "CFW.zip" and copy the factoryfs.rfs to any Froyo based ROM for Galaxy 3 you like.
THEN you're done
Click to expand...
Click to collapse
oh ... can you make deotexed (system app & framework) rom based on jpf ?
rayman33 said:
So for you guys, here is the instruction for deodexing .
First, go to youtube and follow the video instructions of nokia7vista's tutorial for creating a custom rom for Samsung Galaxy S.
(Download a base rom that you want to customize (i.e. XXJPF) and download and install magiciso to open the factoryfs.rfs from XXJPF (in magic iso, go to open and then select all files, then you can open factoryfs.rfs). When you have done this, extract the content of factoryfs.rfs to your desktop and put it into a folder called "System". Put the folder "System" into a new folder called "CFW". Now you have to download the rombasics.zip based on JPA FROYO, which are found in another post in the xda - Forum in the development section. (Sorry I'm a new user so i'm not allowed to post links. When I am, I'll do !
Then, put the content of rombasics.zip into the folder "CFW".
After that, follow nokia7vista's tutorial part 4 to install cygwin correctly and install the HTC Android kitchen.
When you followed the tutorial, you should know how to start the kitchen (open cygwin, cd to folder where you placed the kitchen and type "./menu" (without quotes ).
And in the kitchen, you must first do nr. 1 (building working folder from the folder "CFW"). Then, you can type 0 to access the advanced options and type 11 to deodex. Easily select if you only want to deodex either only /system/app or only /system/framework or both.
AFTER you have followed all these steps, you have to select 99 in the kitchen. This will set up "CFW.zip" in the /kitchen/output folder.
When this is finished, you have to extract the "CFW.zip" and copy the factoryfs.rfs to any Froyo based ROM for Galaxy 3 you like.
THEN you're done
Click to expand...
Click to collapse
please post your deodexed rom, atleast we can get to know if it works for g3 or not
is it working for you??
after deodexing what advantages have you taken of that???
So my deodexed base ROM so far has not booted.
Any reason why?
Custom Rom (XXJPA)
@DarkLestat :
My custom rom (deodexed) is working, yes. But I think it's way to slow to use it every day because it's based on JPA.
When you gyus want me to release a super fast and super stable deodexed rom, which I'm actually able to build, you have to share the rombasics.zip based on XXJPF.
If anyone could do that, that would be great.
rayman33 said:
@DarkLestat :
My custom rom (deodexed) is working, yes. But I think it's way to slow to use it every day because it's based on JPA.
When you gyus want me to release a super fast and super stable deodexed rom, which I'm actually able to build, you have to share the rombasics.zip based on XXJPF.
If anyone could do that, that would be great.
Click to expand...
Click to collapse
I'm using Gsam101's JPA Clean ROM with the ronbasics for JPA.
is that a reason?
How exactly did you get the factoryfs.rfs from the CFW.zip? All my .zip has are the folders I zipped into it, and its supposedly the finished ROM?
Sent from my Samsung Galaxy 3 FROYO
How would i go about creating a factoryfs.rfs?
EDIT: Anyone?
CFW.zip ?!
Ehhhhm...DarkLestat... If I#m understanding right, you wanna build a custom rom with an update.zip package..
If you are doing so, let me say that it don't works since samsung has implemented a new recovery in Froyo builds which don't allows us to flash the update.zip packages anymore.
You actually have to create a flashable odin package.
(including cache.rfs, datafs.rfs, factoryfs.rfs, modem.bin and zImage)
After you have done that, repack these files to a odin .tar package with the following commands in cygwin : (after you cd'd to your rom's folder)
Code:
tar -H ustar -c cache.rfs datafs.rfs factoryfs.rfs modem.bin zImage > output.tar
@The Dark Lestat: What's the source? JPF or older?
i have deodexed the jpf system/app all contents except settings .
deodexing settings causes loopback boot and phone does not boot.....
though i am verifying but deodexing is great....
i have tried changing the icons of apps, now they work, in odexed they were'nt...
though the gallery app, music player seems to be slower
spl. gallery is a tonn times slower. dont know the reason....
boot is fast.....
lets see..
Szaby59 said:
@The Dark Lestat: What's the source? JPF or older?
Click to expand...
Click to collapse
JPA
Sent from my Samsung Galaxy 3 FROYO
So we cant install this rom throw recovery menu, because samsung changed something in froyo update? Am i right? Its posible to flash back into enclair and flash it throw enclair recovery menu?
Meybe this is very newbie question.... i dont understand to these things (but i want to)
Sent from my GT-I5800 using XDA App
How do you create a factoryfs.rfs?
Terminal?
froyo is not released by samsung yet right??? i mean officially then how the hell can samsung change something in **** **** **** so the **** update cannot be done....i dont get this
is froyo out?

Looking for a tutorial: how to cook a ROM?

I'm looking for a guide which tells how to make a own custom ROM from another one
I mean:
1. How to add/replace/remove apps in /system/app/?
1. a) Do they need to have special permission?
2. How to replace boot screen?
3. How to add custom kernel?
4. How to add Desire lockscreen/flip clock?
5. How to add transparent notofication area?
6. How to add Power menu?
I've been serching forum, but didn't find such tutorial. Would be very thanful to get this knowledge.
I think that will be very useful for maaaany android maniacs
1. Simple delete/copy apks in .zip file using 7-Zip or any other.
2. I belive you need to put bootanimation.zip in /data/local/ folder.
3. Idk
4. For Desire lockscreen you need edited HtcLockScreen.apk; for flip clock - HtcClockWidget.apk
5. Edited /system/framework-res.apk or /system/framework/com.htc.resources.apk. I'm not sure
6. You need edited /system/framework/android.policy.jar
69. Resign your zip file using Auto Sign
Attachment doesn't load, but I know about resigning ROM after everything is done
Ad. 1. As I thought, but do the need special permissions? And I also wonder one thing. Are they installed while flashing? Cuz they need to be in system registry, I think...
I have found this: http://wiki.android.com.pl/wiki/Kon...iana_instalowanych_aplikacji_razem_z_systemem
No any permissions etc.
Found this, too. Thanks.
to add a custom kernel you have to unpack the boot image and edit the ramdisk manually, although i think there is an option in dsixda's kitchen to unpack and repack the boot.img
I've got two more questions:
1. When signing, three files are created in folder META-INF: CERT.RSA, CERT.SF, MANIFEST.SF. But in other packages I see also com/google/android/update-script in META-INF. How to make it? Is it necessary?
2. If I want to make only flashable update file which changes one app or another file, eg. framework-res.apk, I have to create folder structure: system/framework/framework-res.apk, add it to zip archive (no compression?) and sing using Auto-sing. Am I right?
Edit:
Found nice guide there: update-script syntax
tomekk_nt said:
I've got two more questions:
1. When signing, three files are created in folder META-INF: CERT.RSA, CERT.SF, MANIFEST.SF. But in other packages I see also com/google/android/update-script in META-INF. How to make it? Is it necessary?
2. If I want to make only flashable update file which changes one app or another file, eg. framework-res.apk, I have to create folder structure: system/framework/framework-res.apk, add it to zip archive (no compression?) and sing using Auto-sing. Am I right?
Click to expand...
Click to collapse
The most important part of a recovery update zip is the update script. It will tell the recovery what to do. If you want an example of a basic update package, which replaces one file in the /system/framework (although a different one) can found here. Open this and read the META-INF/com/google/android/updater-script (or whatever its called). The syntax is pretty straight forward and I think its easiest to learn from the examples of updater scripts found here on XDA. For the simple case, of only replacing/adding files to the /system partition you can leave the updater script from the above example as is and only change the files under the /system directory in the zip.
Note, that the above example uses the newer upader-script (I hope I am writing this correctly, I am writing from memory) which also has a binary file in the same directory. Some update zips use the older "update-script" lone text script. For these kind of scripts, you can find a guide here.
Personally, I use RA recovery, and for this recovery you need to sign the update zips (last thing you do of course). At least for RA recovery, both the older "update-script" and the newer "updater-script" work fine, so its up to your personal preference which do you prefer.
Thanks. Found a guide you mentioned a couple of minutes ago and read it.
The more I know, the more questions it brings So one more thing. If I'd like to use the newer version of syntax: "updater-script", I need also to put this binary file in this folder. But I create/edit only "updater-script", binary file is the same for all packages, or do I need to edit it, too?
I built a kernel tool long time ago, very easy to use (only for linux)
1: unzip the file, place it where you want it eg your desktop
2: place boot.img in the working directory
3: double-click the menu icon or launch from terminal
4: it creates a new directory named BOOT-EXTRACT,edit what you want in there or change the kernel etc.. and repack it again via the kernel tool
see screenshot. here for those how want the tool >>> http://www.elelinux.se/tools/kernel_tool.zip
Edit: Only for Hero
tomekk_nt said:
Thanks. Found a guide you mentioned a couple of minutes ago and read it.
The more I know, the more questions it brings So one more thing. If I'd like to use the newer version of syntax: "updater-script", I need also to put this binary file in this folder. But I create/edit only "updater-script", binary file is the same for all packages, or do I need to edit it, too?
Click to expand...
Click to collapse
Only the updater-script. The binary is a replacement of the script-interpreter I think, but thats just an assumption.
elelinux said:
I built a kernel tool long time ago, very easy to use (only for linux)
Click to expand...
Click to collapse
And that's a good reason to install newest Ubuntu Thanks!
riemervdzee said:
Only the updater-script. The binary is a replacement of the script-interpreter I think, but thats just an assumption.
Click to expand...
Click to collapse
That's mine assuption, too, but would like to know it for 100%
Edit: I see you use it in your kernel update package. So you write only updater-script and place also update-binary next to it?
LOL, you've got help from every well known hero dev on xda, I'm sure you'll have all the info you need now to start building rom's. Good Luck!
Found an app called Easy Flashable zip Builder on this thread. Will test it soon.
tomekk_nt said:
Found an app called Easy Flashable zip Builder on this thread. Will test it soon.
Click to expand...
Click to collapse
But it is for MS Windows, or saw I wrong ? I have also built a tool to javasign files,but should probably write a manual first,it is easy to use but some dependencies maybe not so easy for a beginner with Linux.
tomekk_nt said:
That's mine assuption, too, but would like to know it for 100%
Edit: I see you use it in your kernel update package. So you write only updater-script and place also update-binary next to it?
Click to expand...
Click to collapse
Correcto

[Q]Remove kernel installation from roms

Is there a way to remove kernel installation from a rom? Id like to try installing some fascinate GB roms over our Froyo kernel but most of the Fascinate GB roms include a kernel installation which I would like to avoid (for obvious reasons).
Basically what I want is a ROM only install no kernel.
Or better yet does anyone have our 2.2.2 kernel (just the kernel) in a flashable odin package?
Im only experimenting so no flaming..
Thanks
Yup, there is for either option too xP
Which option do you choose?
Sent from my SCH-I400 using xda premium
If you have the 2.2.2 kernel in an odin package I'll take that.. But for the sake of education I'll take both if you have the time to explain..
+1 for you
Thanks!
Alright, here is the 2.2.2 kernel only Odin Package Can you check now as a test to make sure it works? haha I didn't test it myself
http://www.mediafire.com/?qgkh35439o79sjl
and alright, here is how you can remove flashing the kernel in those packages...
First, open up the package in 7zip...
Delete the Kernel_Update folder, or something named closely to such, on the root of the zip
Then go to META-INF\com\google\android, and copy the updater-script to your desktop
open it up with Notepad++ or another advanced text editor (*Important!) and delete all the lines that look connected with the kernel...
The most important lines are "package_extract_dir("kernel_update"" and "run_program("/tmp/kernel_update/bmlwrite"" lines
K ill give it a try and let you know.
Sent from my SCH-I400 using XDA App
*Edit* Kernel works just fine.
I deleted the "updates" folder which contained a zImage file, redbend.ua, and modem.bin file. However in the META folder there were no instances of the word 'kernel' found. Just references to run the installer for the formentioned 'updates' folder which I deleted.
Should I just delete the 'zImage' file which I'm assuming is the kernel and leave the script to install the redbend.ua and modem.bin files?
Much Appreciated! :highfive:
trailblazer101 said:
Alright, here is the 2.2.2 kernel only Odin Package Can you check now as a test to make sure it works? haha I didn't test it myself
http://www.mediafire.com/?qgkh35439o79sjl
and alright, here is how you can remove flashing the kernel in those packages...
First, open up the package in 7zip...
Delete the Kernel_Update folder, or something named closely to such, on the root of the zip
Then go to META-INF\com\google\android, and copy the updater-script to your desktop
open it up with Notepad++ or another advanced text editor (*Important!) and delete all the lines that look connected with the kernel...
The most important lines are "package_extract_dir("kernel_update"" and "run_program("/tmp/kernel_update/bmlwrite"" lines
Click to expand...
Click to collapse

[SCRIPT/TOOL](Updated 10/22)Auto-deodexer 1.2.8 for the Captivate (Froyo-Gingerbread)

***I added some minor reliability improvements, by including more error checking, seems to run pretty smooth***
I've been playing around with making a deodexer script and having some issues, did a google search and came across these two posts.
http://forum.xda-developers.com/showthread.php?t=598026
http://forum.xda-developers.com/showpost.php?p=5775540&postcount=57
So I merged what I had with theirs and modified it to work on the Captivate ROM's.
I thought it would be a useful tool to have and thought I would share with anyone interested in deodexing their own stock ROM.
Why would you want to deodex your own ROM when you could download somebody elses? Something to do I guess.
It deodexes the app and framework folders in three passes, the first pass does the files that don't require a specific boot class path, the second pass deodexes the files that do require a boot class path and the third does a check for any files the for-do loop may have skipped.
It takes approximately 10 to 30 minutes to complete, depending on your computer, but considering that it took me almost a day to deodexed a ROM manually, , thats not so bad.
It can pull a stock ROM from your phone and deodex it, using adb or you can extract a factoryfs.rfs file and place app and framework folder into the app and framework folders for the script.
It also has a batch zipalign tool for when its done deodexing.
You have the option to select boot class paths for Captivate i897 (gingerbread or froyo), or you can input a custom boot class path string.
Extract the Deodexer_i897.zip to a folder that does not have spaces in the name.
Pull the system from your phone or add your app and framework folders to the extracted folder for the deodexer.
Then just doubleclick on deoall.bat and your off and running.
I included a Readme file with instructions.
You have to have the Java sdk and samsung usb drivers installed on your computer for it to work.
The script is a windows batch file and was modified on Windows 7. I assume it will work on XP as well, but haven't tested it.
I've tested it on:
i897 - KB1, KF1, KH3, KI1, KI2, KJ1, KJ2, KJ3, KK1 and KK2
Rogers - KH2
i9000 - JVO, JVR and JVS stock ROMs.
I've flashed and tested KF1, KH3, KI2, KJ1, KJ2 and KJ3 on my phone with no problems.
(Remember, stock KH3 - KJ3 do not have any ringtones so you will have to copy them to the media/audio folder from another ROM)
Note: Remember to check the app and framework folders for files that got skipped. If there is, try running the deodexer again just to make sure it just wasn't a glitch.
Thanks and credits goes out to Daneshm90 and crzyruski for the deodexer scripts and JesusFreke for giving us baksmali-smali and not to forget, Igor Pavlov for 7zip.
UPDATE- I'm adding a basic clockworkmod flashable script template that you can pop your system into. It includes redbend_ua, wipe, busybox, su and superuser.apk for root. You will have to add a kernel (zImage) and the appropriate modem (modem.bin) to the updates folder.
You will have to flash an update.zip (Froyo) http://forum.xda-developers.com/showthread.php?t=734163
or flash a kernel tar using odin, that has clockwork mod baked in (Gingerbread), and will need to add a cwm modded kernel to the update folder in the template if you want to keep clockwork mod recovery (Gingerbread). The template will not work with special kernels that have scripting included such as init.d, you will have to flash special MOD kernels that contain scripts, afterwards.
*****CAUTION:This is a full wipe template so be careful and know what you are doing.*****
***Fixed the Core_ROM.zip so it will install the modem and kernel, plus added the wipe script.***
It is beyond the scope of my talents and time to completely teach someone how to do all of this, but google is your friend when it comes to learning this stuff. There are allot of resources out there to help you accomplish your task. I'm just merely supplying some basic tools for you.
TOOLS
Notepad++ works great at editing the updater-script in the META-INF folder.
And the smali and xmls in the apks and jars.
http://notepad-plus-plus.org/
And Apkmanager is great to decompile and compile apk and jar files - Thanks raziel23x
http://forum.xda-developers.com/showthread.php?t=1227179
Just add .apk to the end of the .jar, do your modding, change it back to jar when you're done, works great.
Plus raziel23x has a new apk multi tool that is still in beta but is worth watching http://apkmultitool.com/
Also for those that want a free alternative to Photoshop to modify your graphics, there is a great program called Paint.Net http://paintnet.org/
If you are serious about MODDING here is another valuable tool, Beyond Compare available here $$ http://www.scootersoftware.com/
And this is a valuable reference for those interested in Modding
http://forum.xda-developers.com/showthread.php?t=822311
KERNELS
For KF1 I found this link for the cog5-beta2-kernel.tar, thanks to designgears. http://ftp.captivate.org.ua/samsung/captivate/2.3.x/2.3.3/ROM/cognition_5/
And of course, for KH3 and KI1-KI2 use Boogs kernel available here http://forum.xda-developers.com/showthread.php?t=1242533
For KJ1, KJ2 and KJ3 use Boogs kernel here http://forum.xda-developers.com/showthread.php?t=1294849
***The script has been updated to include the boot class path as an option, instead of having to copy and paste the whole thing, so the Bootclass_path.txt file is no longer needed... Thanks to ralphreyes ***
**NOTICE: due to the nature of DOS (Windows) environmental variables, the deodexer needs to be extracted to the root folder, or any folder it resides in, can't have a space in its name. e.g. Android SDK as opposed to Android_SDK***
As always, I am not responsible if it messes up your phone.
I hope someone finds this useful.
***NOW ITS FINAL***
This is awesome !! Thanks for sharing.
I will have to check this out when I get time this weekend...or sooner.
What about an odexer?
I would like to odex the ROM on my phone after I get my desired modifications in. Any chance on an odexer script?
Thanks I've been looking for an easy way to deodex my own stock rom. I will put it to good use.
Sent from my SAMSUNG-SGH-I897 using XDA App
gibson3659 said:
I would like to odex the ROM on my phone after I get my desired modifications in. Any chance on an odexer script?
Click to expand...
Click to collapse
Odexing is a little tricky, I haven't found a compiler to do that, something exclusive to google and phone manufacturing developers. Though the performance of an odexed ROM is so slight over a deodexed one, it probably wouldn't be worth it.
Nice job on the "Read me".
Will be trying my hand at this asap...
thanks again
4-2ndtwin said:
Nice job on the "Read me".
Will be trying my hand at this asap...
thanks again
Click to expand...
Click to collapse
Thanks, let me know how it goes. I did three more ROMs after I fixed it and flashed two of them and had no problems. When I get home tonight, was going to add an option to root plus will upload some templates for cwm recovery.
Sent from my SAMSUNG-SGH-I897 using XDA App
crt60 said:
**NOTICE** I added another deodexer for high performance computers with quad-core or high end dual core processors, even though the original deodexer works fine, because the script would run so fast, it can produce errors, or skip files because of possible memory segment overlap, causing null pointer exceptions, so I added a 3 second pause between each operation to solve this issue. It only adds a minute or two to the deodexing time, but should add reliability and integrity to the deodexed ROM -> Deodexer_i897x.zip
I've been playing around with making a deodexer script and having some issues, did a google search and came across these two posts.
http://forum.xda-developers.com/showthread.php?t=598026
http://forum.xda-developers.com/showpost.php?p=5775540&postcount=57
So I merged what I had with theirs and modified it to work on the Captivate ROM's.
I thought it would be a useful tool to have and thought I would share with anyone interested in deodexing their own stock ROM.
Why would you want to deodex your own ROM when you could download somebody elses? Something to do I guess.
It deodexes the app and framework folders in three passes, the first pass does the files that don't require a specific boot class path, the second pass deodexes the files that do require a boot class path and the third does a check for any files the for-do loop may have skipped.
It takes approximately 10 to 30 minutes to complete, depending on your computer, but considering that it took me almost a day to deodexed a ROM manually, , thats not so bad.
It can pull a stock ROM from your phone and deodex it, using adb or you can extract a factoryfs.rfs file and place app and framework folder into the app and framework folders for the script.
It also has a batch zipalign tool for when its done deodexing.
You have to manually add the boot class paths at the beginning when prompted, but I included a text file that you can just copy and paste the appropriate boot class paths into the script. I did that in case of future or other ROMs, so the boot class paths could be modified.
Just doubleclick on deoall.bat and your off and running.
I included a Readme file with instructions.
You have to have the Java sdk and samsung usb drivers installed on your computer for it to work.
The script is a windows batch file and was modified on Windows 7. I assume it will work on XP as well, but haven't tested it.
I've tested it on KB1, KF1, KH3, KI1-KI2, KJ1, KJ2, KJ3 and Rogers KH2 stock ROMs.
I've flashed and tested KF1, KH3, KI2, KJ1, KJ2 and KJ3 on my phone with no problems.
(Remember, stock KH3 - KJ3 do not have any ringtones so you will have to copy them to the media/audio folder from another ROM)
Note: Remember to check the app and framework folders for files that got skipped. If there is, try running the deodexer again just to make sure it just wasn't a glitch.
Thanks and credits goes out to Daneshm90 and crzyruski for the deodexer scripts and JesusFreke for giving us baksmali-smali and not to forget, Igor Pavlov for 7zip.
UPDATE- I'm adding a basic clockworkmod flashable script template that you can pop your system into. It includes redbend_ua, busybox, su and superuser.apk for root. You will have to add a kernel (zImage) and the appropriate modem (modem.bin) to the updates folder.
You will have to flash an update.zip (Froyo) http://forum.xda-developers.com/showthread.php?t=734163
or flash a kernel tar using odin, that has clockwork mod baked in (Gingerbread), and will need to add a cwm modded kernel to the update folder in the template if you want to keep clockwork mod recovery (Gingerbread). The template will not work with special kernels that have scripting included such as init.d, you will have to flash special MOD kernels that contain scripts, afterwards.
*****CAUTION:This is a full wipe template so be careful and know what you are doing.*****
It is beyond the scope of my talents and time to completely teach someone how to do all of this, but google is your friend when it comes to learning this stuff. There are allot of resources out there to help you accomplish your task. I'm just merely supplying some basic tools for you.
TOOLS
Notepad++ works great at editing the updater-script in the META-INF folder.
And the smali and xmls in the apks and jars.
http://notepad-plus-plus.org/
And Apkmanager is great to decompile and compile apk and jar files - Thanks raziel23x
http://forum.xda-developers.com/showthread.php?t=1227179
Just add .apk to the end of the .jar, do your modding, change it back to jar when you're done, works great.
Also for those that want a free alternative to Photoshop to modify your graphics, there is a great program called Paint.Net http://paintnet.org/
KERNELS
For KF1 I found this link for the cog5-beta2-kernel.tar, thanks to designgears. http://ftp.captivate.org.ua/samsung/captivate/2.3.x/2.3.3/ROM/cognition_5/
And of course, for KH3 and KI1-KI2 use Boogs kernel available here http://forum.xda-developers.com/showthread.php?t=1242533
For KJ1 and KJ2, use Boogs kernel here http://forum.xda-developers.com/showthread.php?t=1294849
As always, I am not responsible if it messes up your phone.
I hope someone finds this useful.
***Fixed Root***
Click to expand...
Click to collapse
thanks for your work ,so i can build my own rom by myself with less work
crt60,
Didn't get a chance to try this out last weekend. I hope to get to it this Sat. I'll give u some feed back afterwards.
Appreciate the work u are doing and sharing.
Sent from i897uckj3
How can I extract a one-click .exe stock ROM?
Thansk.
chappatti said:
How can I extract a one-click .exe stock ROM?
Thansk.
Click to expand...
Click to collapse
You can't that I know of, it is a microsoft mfc program and I haven't found a decompiler for it. You will have to find the original odin tar file
Sent from my SAMSUNG-SGH-I897 using XDA App
crt60 said:
You can't that I know of, it is a microsoft mfc program and I haven't found a decompiler for it.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Thanks for your quick reply !!
One thing is not clear in your reademe? Do I need to run the deodexer from the stock ROM folder, or do ineed to edit my win $path.?
chappatti said:
Thanks for your quick reply !!
One thing is not clear in your reademe? Do I need to run the deodexer from the stock ROM folder, or do ineed to edit my win $path.?
Click to expand...
Click to collapse
Copy the app and framework folders in system into the deodexer folder and merge with the app and framework folders already there.
Sent from my SAMSUNG-SGH-I897 using XDA App
crt60 said:
Copy the app and framework folders in system into the deodexer folder and merge with the app and framework folders already there.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
I have checked the updater-script and found it doesn't extract the 'updates' folder ,so the zImage and modem.bin can't be installed
q659503934 said:
I have checked the updater-script and found it doesn't extract the 'updates' folder ,so the zImage and modem.bin can't be installed
Click to expand...
Click to collapse
I will check it out when i get time
Sent from my SAMSUNG-SGH-I897 using XDA App
crt60 said:
I will check it out when i get time
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
I just add the script
ui_print("");
ui_print("extract files...");
package_extract_dir("updates", "/tmp");
set_perm(0, 0, 0777, "/tmp/redbend_ua");
i think you could build a ROM template ,it's more useful.
Yep, you're right. I must have accidentally deleted that, when I removed the wipe program, trying to simplify the script. It has been fixed, plus I went ahead and added the wipe script back in. Thanks for your input...
Sent from my SAMSUNG-SGH-I897 using XDA App
I thought I would make it a little easier on your script by adding a couple extra lines to the 'deoall.bat' file so the bootclass path is included within. When it prompts you to enter the bootclass path, you can enter 1 for GingerBread, 2 for Froyo, or you can just enter your custom one.
Replace the line that starts with
Code:
set /P INPUT=Enter BootClassPath (ex 1.jar:2.jar:3.jar): %=%
with the following:
Code:
echo Enter BootClassPath: 1=GingerBread, 2=Froyo,
set /P INPUT=or custom (ex file1.jar:file2.jar:file3.jar): %=%
IF %INPUT%==1 (set INPUT=core.jar:bouncycastle.jar:core-junit.jar:twframework.jar:services.jar:framework.jar:seccamera.jar:javax.obex.jar:com.google.android.maps.jar)
IF %INPUT%==2 (set INPUT=core.jar:twframework.jar:android.policy.jar:services.jar:framework.jar:seccamera.jar:javax.obex.jar:com.google.android.maps.jar)
Thank you for your excellent work crt60!!
ralphreyes said:
I thought I would make it a little easier on your script by adding a couple extra lines to the 'deoall.bat' file so the bootclass path is included within. When it prompts you to enter the bootclass path, you can enter 1 for GingerBread, 2 for Froyo, or you can just enter your custom one.
Replace the line that starts with
Code:
set /P INPUT=Enter BootClassPath (ex 1.jar:2.jar:3.jar): %=%
with the following:
Code:
echo Enter BootClassPath: 1=GingerBread, 2=Froyo,
set /P INPUT=or custom (ex file1.jar:file2.jar:file3.jar): %=%
IF %INPUT%==1 (set INPUT=core.jar:bouncycastle.jar:core-junit.jar:twframework.jar:services.jar:framework.jar:seccamera.jar:javax.obex.jar:com.google.android.maps.jar)
IF %INPUT%==2 (set INPUT=core.jar:twframework.jar:android.policy.jar:services.jar:framework.jar:seccamera.jar:javax.obex.jar:com.google.android.maps.jar)
Thank you for your excellent work crt60!!
Click to expand...
Click to collapse
Nice, I did make a script like that but thought it would be too confusing for those that use this for non-captivate ROMs. I'll update the link with the new code.
Thanks
could add option 3 , custom boot class list (as it is now) for other devices! or have them save it to a txt file in a list one per line and have the bat read the custom txt list

[Q] How to manually edit ROM files

i am very much concerned about using perfect things, i used alot of different ROMS both with .32 and .35 kernel, none was perfect even all the stock ROMs available does have something to hate about,
my question is Cant we manually edit Stock ROMs (Update.APP) and Custom ROMs and select few important and better apps and replace with unwanted apps in roms?
in this way we can manage to create a new ROM as per our requirements....
Can't do it with stock roms unless you install, root, delete apps from /system/app.
With custom rom, just use 7-zip in windows to open zip file and delete apps you don't want from /system/app and /data if it is there. Copy your own apps in and then install.
There is a perl script to extract system.img from update.app, but i dont think there is a way to pack again

Categories

Resources