yashsingh1/xdaforums huggingface dataset:
[Android] Droidzone:
See my instructions above..

You really should read up some background info before compiling a kernel or rom. The minimum required is to read the updater-script/update-script in a text editor. It isnt hard to understand what each command. If you understood, you wouldnt ask if you should replace the entire list of commands required for installing a rom, with the commands for just replacing a current kernel.
[Android] dsixda:
How was it throwing you off.. It said to copy the relevant parts of the kernel's update-script into your ROM's update-script. That's as crystal clear as can be.
[Android] dsixda:
A summary of the updater-script/update-script's purpose is also given in the FAQ, but droidzone pretty much summed it up.
[Android] kdb424:
I guarentee that I didn't. I have re-tested. Put the rom(untouched) in the folder, chose that, it made a new working directory, used all defaults, used 99, rebuilt, all defaults, same issue. I was using the Virtuous Rom for Android Incredible. Please test and let me know if that happens to you.
[Android] troby1986:
Heres the kernel script:

ui_print(" ");

ui_print("XXXXXXXXXXXXX");

ui_print("If you have any problems please report them in my thread.");

ui_print(" ");

ui_print("Extracting System Files...");

set_progress(1.000000);

mount("MTD", "system", "/system");

package_extract_dir("system", "/system");

unmount("/system");

ui_print("Extracting Kernel files...");

package_extract_dir("kernel", "/tmp");

ui_print("Installing kernel...");

set_perm(0, 0, 0777, "/tmp/dd");

set_perm(0, 0, 0777, "/tmp/mkbootimg.sh");

set_perm(0, 0, 0777, "/tmp/mkbootimg");

set_perm(0, 0, 0777, "/tmp/unpackbootimg");

ui_print("Repack Kernel Files...");

run_program("/tmp/dd", "if=/dev/block/mmcblk0p22", "of=/tmp/boot.img");;

run_program("/tmp/unpackbootimg", "/tmp/boot.img", "/tmp/");

run_program("/tmp/mkbootimg.sh");

ui_print("Flashing boot.img ...");

assert(write_raw_image("/tmp/newboot.img", "boot"),

delete("/tmp/boot.img"));

ui_print(" ");

ui_print("Finished! Remember to set failsafe profiles in SetCPU");

Where do I copy to and from?
[Android] Droidzone:
The kitchen automates all that. Instead of doing the repacking of kernel at boottime, which is what this update-script does, the kernel makes the boot.img at runtime and replaces the boot.img in your Rom working directory. The instructions for that is what I've posted. Just try that. The kitchen menu is pretty intuitive. Just follow the instructions starting from 20.Unpack/Repack boot.img
[Android] troby1986:
Ok, so the kernel I have is a .zip, so do I just upack the boot.img on my ROM and drop in the zImage from my kernel, then repackage? No modifying the ROM updater-script at all?
[Android] Droidzone:
Right ho! :)
[Android] troby1986:
Well, I already tried that.

I copied over the original zImage with mine, then repackaged, added root permissions, and flashed, but the flash takes about 15 secs, and my original rom is still there.
[Android] Droidzone:
Oh I almost forgot...You have to add the system/lib/modules manually to the working dir
[Android] Droidzone:
Well, you only modified the kernel with this procedure. Why should the original Rom disappear? What exactly do you wish to do?
[Android] troby1986:
Yea, I copied the zImage to my Rom, repackaged, then copied the bcm4329.ko

to system/lib/modules, built the rom, but after the short flash period, I still end up with my original rom
[Android] troby1986:
Ok, heres the breakdown:

Right now I have CyanogenMod 7 RC1 on my G2

I am trying to flash my own rom. I am also trying to add a different kernel to the rom before I flash it.

I built my working folder, unpacked the boot.img.

unzipped my kernel, and copied the zImage to by boot.img extract

repackaged

then copied the bcm4329.ko to system/lib/modules

built the rom and flashed, but still have CM7
[Android] Droidzone:
If your Rom is modified from CM, I dont think you'd notice any difference just because you replaced the kernel.

Do a full wipe, and flash your own Rom, check Software information for the kernel info to verify that the kernel was successfully flashed. If you have modified the Rom name from kitchen, that should also be reflected in build info
[Android] troby1986:
My Rom is not a CM modification. My Rom is a stock 2.2, deodexed.

All I am simply trying to do is add the kernel to the stock deodexed rom.
[Android] troby1986:
If my stock rom already has a bcm4329.ko file, do i need to copy over the one from my kernel?
[Android] theintelligent:
Have you tried flashing some other rom's e.g. mike1986 Android Revolution ROM? Is that giving you the same problem? Also can you compare your rom's bin folder with some other's rom bin folder to see if there are some files missing.
[Android] dsixda:
In this case you don't need to copy anything from here because it is actually automating the boot.img unpacking and repacking. Sorry, maybe my instructions had too much information.

What do want this kernel to do? You won't necessarily see anything visible in the actual ROM other than things like speed.
[Android] dsixda:
I can't test because I only have a Nexus One. If you know the line in error then just post it here. Also please provide links, I don't want to spend time searching for other people's ROMs. Thnxs
[Android] troby1986:
This is just the updater-script that was provided with the zImage. The zImage I have is overclockable to 1.8Ghz.

All I need to know is can I just copy the 1.8Ghz zImage over the original stock zImage, then flash the ROM?
[Android] troby1986:
Your instructions are great, I'm just having trouble adding my kernel to the ROM, which already has a stock kernel and stock boot.img.
[Android] dsixda:
I am not an expert on this.

But if the zImage (kernel) is made for YOUR device then you can use it. If it's from another device then don't use it unless you want a boot loop.

If it has module files then you gotta copy those as well, because they have specific functions used by that kernel.
[Android] Droidzone:
If you follow the steps I posted earlier, it should replace the stock kernel in the kitchen with your kernel.

But you were saying that even flashing the rom over Cm didnt change the "Rom". You lost me there. I dont see why flashing a Sense rom over the Cyanogen Rom failed to change the Rom. The Rom you build should work before you modify the kernel.
[Android] troby1986:
Yea, the stock rom works perfect until I add the new zImage and bcm4329.ko files.

The only thing I haven't done yet is add the lines from the kernels updater-script file to the updater-script in the ROM
[Android] Droidzone:
That shouldnt be necessary. So check the Software info tab in Settings and see if the kernel has been replaced. Most devs add their names to that tab.
[Android] Atsutane:
Been trying to do this for 3 days already... never had problem cooking for Desire and Wildfire... but not DHD... LOL

Anyway... trying to format system using instruction at the F.A.Q but CMW throwing some error saying "format() expect 2 args got 3"...

Any idea what went wrong..?
[Android] _fm:
hai,

dsixda, any idea with my question here? http://xdaforums.com/showpost.php?p=11392922&postcount=3429

well, the first question, i don't really mind, but it is affected when i am flashing boot partition,. i often get bootloop then i just flash boot.img from fastboot to fix it, and it means i didnt flash boot correctly,. i dont change anything related to boot.img in updater-script,. how to flash the boot.img correctly?

for the second question, its kinda weird,.

i am using anything of your kitchen feature, and all booted well (sometime i need to flash boot.img from fastboot, just like the first question), and everything runs well,.

but, after installing custom kernel or custom boot.img that contain custom kernel the camera became black and white (no colour),.

and after that, i flash stock boot.img (means that is not rooted, and still secured) or boot.img that in my working folder (no contain custom kernel), , and the camera back well, and the application that need ROOT and SUPERUSER permission is able to be installed,.

well,. is there something i've done wrong with the kitchen related to the question number 2?

thanks so much,.

BR
[Android] dsixda:
@fm

Firstly, I don't know much about kernels, I just write scripts. I don't know why your camera doesn't work with a different kernel.

Also why are you re-using someone else's updater-script? That only makes things worse if the ROM is different. You sure you know what you're doing??

Your own update-binary (you said u were using different one) may be out of date so it doesn't support those extra parameters.

Just ask someone in your device's development thread for real answers.
[Android] dsixda:
Expects two arguments for the format command but you used three. That's all I can say. Maybe ask the other guys what version of custom recovery they use.
[Android] -Mr. X-:
dsixda, if you are interested i made a simple plug-in that will generate an ad-free enabled host file from the same databases that the market application "AdFree" does merges them and moves it to system/etc

Its very simple but it gets the job done nicely.

By the way, This is Juggalo_X i had my name changed on xda-devs :)
[Android] dsixda:
Sure, just post an attachment with a description, or a link to your thread/post. And I will link it from Post #1.

I had problems with AdFree last night. I couldn't view YouTube videos. After disabling it and rebooting, they worked again. But maybe it was just coincidence.

Thanks
[Android] -Mr. X-:
I have not run into this issue, but ifi t persists i can rewrite part of the plug-in to just grep and remove any lines that may cause issues with youtube. Where you using the mobile site?

Im just running a few more tests and then ill attach to a post here.
[Android] dsixda:
I was using the Froyo YouTube app
[Android] -Mr. X-:
Alright, well i have finished my plug-in, it could have probably been written smaller but im new to the whole writing your own stuff.

it works, and i have tested it as much as I can and don't seem to find any ill effects using the hosts updates, and i don't think i see any offending entries that would cause issues with some of our apps.

I use the Youtube app by Google, not HTC's and have found no issues.

Attached are 2 plugins

the first labeled v.2 is for everyone but sprint users

the second labeled "v.3 Sprint Ready" is for sprint users, since with out using this version it will block some sprint services like VVM

Extract both files to your scripts/plugins directory in your kitchen.

What it does:

It uses wget to acquire public host files from http://www.mvps.org/winhelp2002/hosts.txt and http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts merges then and writes them out to a hosts file that is then moved to your working in system/etc.
[Android] dsixda:
Thanks Mr. X

You may want fix several of the spelling errors in the help description in the plugin script.

Also, why do you have "busybox" being called in the PC environment? That means the user needs to install busybox for desktop PCs (not android version) for this script to work?
[Android] -Mr. X-:
LOL yeah, i did not proof read that. I shall now.

Also the reason why it calls busybox, as you can see is because it needs to convert the generated host file to unix format, as it is in dos for some reason by default. If its not converted android will ignore the host file.

So yes users will have to have busybox, until i can figure out an alternative.

Edit: i have fixed the spelling mistakes in the plugin and re-uploaded to the previous post. I also see there is a cygwin version of dos2unix so ill work on updating the plugin to identify the OS and then run one or the other command.
[Android] dsixda:
Actually dos2unix is not required, you may want to use this code as a guide:

# Converting end-of-line character in files created in DOS
cat scripts/plugins/$plugin_file | tr -d '\r' > scripts/plugins/temp.plugin
rm -f scripts/plugins/$plugin_file
mv scripts/plugins/temp.plugin scripts/plugins/$plugin_file
chmod +x scripts/plugins/$plugin_file
[Android] -Mr. X-:
very nice, heh... see i am pretty noob.

ill get that put in right now.
[Android] dsixda:
I'm a noob too ;) I am no shell scripting genius, I'm learning and Googling as I go along :-D

BTW I would test this first though.
[Android] -Mr. X-:
Looks like i got it. I'll update the post yet again LOL

Updated here > http://xdaforums.com/showpost.php?p=11432959&postcount=3494
[Android] dsixda:
Thanks, will update the first post when I get home from work.
[Android] -Mr. X-:
no problem, i updated it one more time, its about as short as i know how to make it.
[Android] dsixda:
Just a minor update - 0.126 has been uploaded.
[Android] fdespotovski:
Where can I get the system.img?I can only get a system folder.I need the .img file to flash my rom with fastboot.Is this possible?
[Android] Droidzone:
How can that possibly have anything to do with dsixda's kitchen?
[Android] cedric123:
can you make and option for compiling an kernel and add it to my ROM?

Or exctracting a kernel and make some caches on lit like the acpuclock.c and other stuff i want to edit

THankyouSO MUCH FOR your work
[Android] dsixda:
You need a custom recovery to flash a ROM in a zip file. Fastboot cannot be used. There are tools to convert it to system.img (see yesterday's posts) but I don't know how reliable they are.
[Android] dsixda:
;-)

If you want to edit stuff like that then you need the AOSP code and know what you are doing. The kitchen is not going to decompile a kernel or crazy stuff like that. I'm already crazy but I'm not an assembly code hacker. Neither am I going to do stuff like that for you. Read up on how to set up your system to download source code and to build a kernel. Don't be lazy ;)

The kitchen is there to give you the push to get you started; it's up to you to learn everything after that. ROM "cooking" is not about using an automatic tool to mass-produce ROMs; it's about using your mind and hard work into making something you can truly call your own creation. Good luck!
[Android] mike1986.:
Since I added installbusybox file some of my users are experiencing booting issues. For some ROM is working with no problems but for some it stuck on HTC screen. So I'm trying to track this issue. Here is the first idea. Instead of:

package_extract_file("installbusybox", "/tmp/installbusybox");
set_perm(0, 0, 0777, "/tmp/installbusybox");
run_program("/tmp/installbusybox");

I suggest this:

assert(package_extract_file("installbusybox", "/tmp/installbusybox"),
set_perm(0, 0, 0777, "/tmp/installbusybox"),
run_program("/tmp/installbusybox"),
delete("/tmp/installbusybox"));

What do you think dsixda?
[Android] -Mr. X-:
the file would be delete anyways as its in temp,

why not have them do a logcat and see where its failing?
[Android] dsixda:
Or they could show the recovery.log as well -- after the flash and before they reboot it.
[Android] -Mr. X-:
Yep, also would work
[Android] IzaacJ:
Hello. A little note for the update; since I updated from 0.122 to 0.126 the boot gets messed up somehow as there is no boot.img in the zip, its a boot folder and now it can't read the info (root etc) which it could in 0.122... Could you please fix that? :)

EDIT: Also gets an error on each and every 260 lines in the converted update-script... Never happened before !? What is this? Going back to 0.122 for now !

Building CM7 nightlies (link in sig) for a HTC Leo.
[Android] dsixda:
It's supposed to be a boot folder, for NAND ROMs... since version 0.118.
[Android] IzaacJ:
It can't read the info from the boot folder from the zip, it requires me to add a fake boot.img to continue... But read the edit in my prev post, going back to 0.122 again as I know everything works there.
[Android] dsixda:
I don't see errors in the screenshot. Those aren't error messages -- what are you talking about?

The fake boot.img is added only if your original ROM had no boot folder or boot.img. I'll check later to make sure it didn't conflict with the boot folder condition. In the meantime make sure your original ROM is okay.

Edit: ouch, looks like I made a mistake in 0.125.. I'll fix it tonight. Sorry about that.
[Android] IzaacJ:
Oh, yeah noticed that now that you said it >_<'' but the first about 100 lines were full of errors for some reason...

EDIT: Does anyone know how to include settings for apps? I've replaced the default launcher (ADWLauncher) with GO Launcher EX, and I've included GO SMS, and I'd like to make them to be pre-configured but I haven't found a way to do so. Like default icons on the screens in GO Launcher EX and a custom appearance in GO SMS.
[Android] dsixda:
Well you need to be specific, 'full or errors' wont help. eg. Please post a screenshot. Thanks
[Android] IzaacJ:
It might have been because of my edited updater-script. I often edit it, then convert it to apply some of the functions in the kitchen. And I deleted my whole working folder when I reinstalled 0.122 again so I don't have the edited updater-script anymore. Sorry. But I'll see if I can get them to reappear again and post the lines causing it.

EDIT: got another problem now... I get an error in my updater-script when trying to flash. Format complaining about 3 arguments and not 2, as it expects. No biggie if the unedited rom isn't flashing perfect with 3 arguments (!) :O

from working script:

format("yaffs2", "MTD", "boot");
mount("yaffs2", "MTD", "boot", "/boot");
package_extract_dir("boot", "/boot");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
show_progress(0.500000, 0);

from non-working script:

ui_print("Welcome to Izz0dr0id 1.0!");
ui_print("==============================");
ui_print("Installing boot...");
format("yaffs2", "MTD", "boot");
mount("yaffs2", "MTD", "boot", "/boot");
package_extract_dir("boot", "/boot");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
show_progress(0.500000, 0);

And I know it is the boot format as I have put a lot of ui_print in it so I can see where the problem is, if there is one... But as you can see, they are exactly the same :O

EDIT:EDIT: Removed the yaffs2 argument from the format command, but it still complains about 3 arguments ? Something has gone terribly wrong somewhere :O
[Android] dsixda:
I don't understand your question. You mention a working file, and a non-working file, and an unedited file that is not working. So your working file actually is the unedited one that doesn't flash?? If the unedited one doesn't flash then the kitchen has nothing to do with it.
[Android] Silverexp:
Setup working folder

When extracting a MODACO rom, it will ask “Add boot.img?” then I’m getting the following error…

cp: target ‘/home/[location]/boot.img ‘ is not a directory

scripts/check_no_bootimg: line 31: cd /home/[location]: No such file or directory

scripts/zip_file_to_working_folder: line 62: cd /home/[location]: No such file or directory

Error: no boot.img found, cannot continue

In the older kitchens, I would just get something about updater script to update script…

([location] – is my path , just shorten for the example)
[Android] dsixda:
OK this issue is fixed. Kitchen version 0.127 is now uploaded.. Hope to take a break from this!
[Android] dsixda:
Which Modaco ROM? There are lots, you need to be more specific and have links. Anyways try 0.127, I don't know why you have a Modaco ROM that doesn't have a boot.img inside.
[Android] Silverexp:
Sorry, you are correct, should have include that...

Nexus One r24 (Froyo FRG83D)

http://android.modaco.com/content/g...for-nexus-one-with-online-kitchen-2-2-frg83d/
[Android] dsixda:
Extracts fine with 0.127, dude. Give it a shot. The part that you mentioned wasn't working was actually the part I changed tonight.

Thanks for the feedback
[Android] Silverexp:
All works fine with the update... thanks
[Android] IzaacJ:
I have a rom based on charnsingh_online's unofficial cm7 nightlies.

I do some modifications in the build.prop, replaces adwlauncher with go launcher ex, adds go sms.

Do some modifications in the updater-script (not yet converted) then I convert it to add bootanimation.zip support, apps2sd. Convert it back to updater-script, checks the file and add all the ui_print commands. Build the rom, and it is not flashable. Complaining about format, requiring 2 args, but gets 3.

I take a script from an earlier build, which is flashable, put it in the new builds zip and tries to flash it. And there is the same error, format getting 3 args instead of 2. So it can't be the script. But I dont know what else it could be as it complains about the format command, in this zip only.
[Android] Droidzone:
Well it would certainly help if you could include the actual script from meta-inf, or at least the lines containing format command
[Android] Nixeus:
Hello DsiXda,

Thanks a lot for your kitchen :)

Like you, i'm cooker for Windows Mobile, and i would like to begin my android cooking experience ! Your kitchen is very simple to use, and it's very very good !!

Thanks and, rethanks :)
[Android] Nixeus:
You says that we need a custom receovery custom menu !

So i need to install a recovery custom menu in my device before falshing it , it's true?
[Android] IzaacJ:
There you have it. The "working script" is not working if I put it in my new ROM.

My base is flashing fine, but if I extract it in the kitchen, and then build it, without any modifications, it won't flash (!)
[Android] mike1986.:
I made some tests about those booting issues and this is what I found:

1. It's for sure connected with installbusybox file

2. Adding delete("/tmp/installbusybox"); doesn't help

Can this installbusybox file be also executed using init.d script? I know that init.d scripts are executed post boot while this method works differently.

I will have logcat soon.
[Android] mike1986.:
And btw there is chownto symlink missing :)

And also dumpstate is not a symlink. Why it's symlinked to dumpcrash?
[Android] sk806:
"Error kernel offset not found in boot.img!"

I also have been receiving the "Error kernel offset not found in boot.img!

" message since I updated the kitchen to .126. To give more details, I am the dev of Magnolia ROM for the Incredible forum. I simply placed my last, working version of the ROM, which uses the stock HTC kernel for the Incredible, in "original update", made a working folder from it, and tried to extract the kernel via option 20 of the menu and got this message.

The same error message is given if I try to re-cook the ROM with absolutely no changes. I have been using your kitchen for months, and this has never happened. Any ideas?

If I can provide any further info, please let me know. And thanks in advance.

Steve
[Android] Droidzone:
Well, the command should be:

format("MTD", "boot");