If I want to customize a ROM that I have in update.zip format, do I just manually modify the contects of the update.zip and change the update-script and build.prop files or should I be doing this another way through an IDE or something?
If so, can someone please link me to where I might get some relevent info?
Thanks.
dsixda's kitchen will let you pretty much cook and modify any ROM.
I wouldn't use the root function on there, but if you look at the No Idea Blog link on the first page of that thread it tells you how to add root permissions if your ROM doesn't already have them (it's really easy).
Also, if you're on Windows and don't like the fact that you can't use the kitchen to its full potential, you can download a copy of Ubuntu Linux and VirtualBox (both free) and run Ubuntu as a virtual machine within Windows. Alternatively you can try WUBI as pointed out by kendong2 here
Using the kitchen will ensure that your customised ROM is signed - Amon RA requires signed update.zips, I think there was something called Clockwork Recovery which doesn't need the package to be signed.
TheAshMan said:
dsixda's kitchen will let you pretty much cook and modify any ROM.
I wouldn't use the root function on there, but if you look at the No Idea Blog link on the first page of that thread it tells you how to add root permissions if your ROM doesn't already have them (it's really easy).
Also, if you're on Windows and don't like the fact that you can't use the kitchen to its full potential, you can download a copy of Ubuntu Linux and VirtualBox (both free) and run Ubuntu as a virtual machine within Windows. Alternatively you can try WUBI as pointed out by kendong2 here
Using the kitchen will ensure that your customised ROM is signed - Amon RA requires signed update.zips, I think there was something called Clockwork Recovery which doesn't need the package to be signed.
Click to expand...
Click to collapse
Thanks, I'v already managed to add root myself a few times to various ROMs so i don't think that'll be an issue.
Does the ROM need to be re-signed on each modification? Which is why I wouldnt be able to edit it manually?
Thanks again.
EDIT: I have no problem running linux, infact I have Ubuntu on my laptop and will install Fedora 12 on my desktop now.
alias_neo said:
Thanks, I'v already managed to add root myself a few times to various ROMs so i don't think that'll be an issue.
Does the ROM need to be re-signed on each modification? Which is why I wouldnt be able to edit it manually?
Thanks again.
EDIT: It would seem I need to be running a linux OS to do this properly, is that correct? If so, I better start setting up something on a spare harddrive in my PC or get my laptop out.
Click to expand...
Click to collapse
yes resign after every update. just unpack, modify, repack and resign. not that complicated if you get yourself some handy scripts (write them or use dsixdas kitchen).
kendong2 said:
yes resign after every update. just unpack, modify, repack and resign. not that complicated if you get yourself some handy scripts (write them or use dsixdas kitchen).
Click to expand...
Click to collapse
So for my working folder I extract (for example) lox's clean ROM update.zip?
alias_neo said:
Thanks, I'v already managed to add root myself a few times to various ROMs so i don't think that'll be an issue.
Does the ROM need to be re-signed on each modification? Which is why I wouldnt be able to edit it manually?
Thanks again.
EDIT: It would seem I need to be running a linux OS to do this properly, is that correct? If so, I better start setting up something on a spare harddrive in my PC or get my laptop out.
Click to expand...
Click to collapse
As far as I know yeah (unless you're using that other recovery image I mentioned). It's pretty easy with the kitchen - press 9 and it cooks the ROM. Takes about 2-3 minutes for each bake - its flashing the ROM that takes ages.
You could sign manually, I'm sure I found a tutorial on how to do that when I was modifying some apps.
It works fine on OSX too. If you read the first post, he does say some things won't work on Windows. Like I said, you could use VirtualBox or WUBU which will save you the hassle of extra hardrives, partitions, dual-booting and all that.
Q
Ok, got the kitchen open under linux now, first question is this, the ROM i'm using doesn't have a system.img, it has a folder "system" so it naturally won't let me continue in the kitchen without it, how do I solve this problem?
Thanks.
To customise an existing ROM, extracts all its contents.
In the kitchen make a folder starting with "WORKING_" the underscore can be followed by any name of your choice e.g. WORKING_ALIASNEOROM
Inside that folder paste the boot.img, system, META-INF and data (if its there) folders from the ROM you extracted.
Inside the META-INF folder delete the 3 files - just leave the com folder.
After that you should be good to go with the ROM.
TheAshMan said:
To customise an existing ROM, extracts all its contents.
In the kitchen make a folder starting with "WORKING_" the underscore can be followed by any name of your choice e.g. WORKING_ALIASNEOROM
Inside that folder paste the boot.img, system, META-INF and data (if its there) folders from the ROM you extracted.
Inside the META-INF folder delete the 3 files - just leave the com folder.
After that you should be good to go with the ROM.
Click to expand...
Click to collapse
Thanks a lot, really appreciate the help.
One more question, hopefully the final one, when i remove apps or add them to the relevent folder, are permissions and linking taken care of automatically where necessary?
alias_neo said:
Thanks a lot, really appreciate the help.
One more question, hopefully the final one, when i remove apps or add them to the relevent folder, are permissions and linking taken care of automatically where necessary?
Click to expand...
Click to collapse
No problem, I was in your shoes a couple of weeks ago! Yeah, you just copy the apks - worked for me so far.
Most ROMs come with a data/app folder, but incase yours doesn't just create it next to the system, boot.img etc and then in the update-script add:
Code:
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
before the format CACHE command.
TheAshMan said:
No problem, I was in your shoes a couple of weeks ago! Yeah, you just copy the apks - worked for me so far.
Most ROMs come with a data/app folder, but incase yours doesn't just create it next to the system, boot.img etc and then in the update-script add:
Code:
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
before the format CACHE command.
Click to expand...
Click to collapse
and make that
Code:
set_perm 1000 1000 0771 0771 DATA:app
for eclair roms...
TheAshMan said:
No problem, I was in your shoes a couple of weeks ago! Yeah, you just copy the apks - worked for me so far.
Most ROMs come with a data/app folder, but incase yours doesn't just create it next to the system, boot.img etc and then in the update-script add:
Code:
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
before the format CACHE command.
Click to expand...
Click to collapse
Where can I find the syntax for this file? I like to understand the commands so I can use them properly, i get that set_perm is setting permissions and 0771 are the permissions being set, but what are the "1000 1000"?
Google wasn't my friend this time and I couldn't find a syntax.
Have a look in here, I've not got enough Linux experience to tell you how those permissions work. I update that file by comparing ones from other ROMs and slowly got the hang of it.
Cool
TheAshMan said:
Have a look in here, I've not got enough Linux experience to tell you how those permissions work. I update that file by comparing ones from other ROMs and slowly got the hang of it.
Click to expand...
Click to collapse
Exactly what I was looking for, thanks.
Just failed two flashes because of:
1) because i conned the kitchen into setting up the working folder (by putting a fake system.img) it didn't delete the symlinks so i had to do it manualy (after trying to flash then figuring out why it failed) and
2) it couldnt chmod "su" because it didn't exist, strange since i was working based on an existing ROM and didn't delete the "su" binary.
Question: How and where do I change the build name that shows up on the device to my own name?
EDIT: 3rd flash was successful but on boot it hangs at the HERO screen, logcat just says "waiting for device". Ideas?
TheAshMan said:
No problem, I was in your shoes a couple of weeks ago! Yeah, you just copy the apks - worked for me so far.
Most ROMs come with a data/app folder, but incase yours doesn't just create it next to the system, boot.img etc and then in the update-script add:
Code:
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
before the format CACHE command.
Click to expand...
Click to collapse
This is useful info, thanks. I might add this as an option to the kitchen in the future.
alias_neo said:
Exactly what I was looking for, thanks.
Just failed two flashes because of:
1) because i conned the kitchen into setting up the working folder (by putting a fake system.img) it didn't delete the symlinks so i had to do it manualy (after trying to flash then figuring out why it failed) and
2) it couldnt chmod "su" because it didn't exist, strange since i was working based on an existing ROM and didn't delete the "su" binary.
Click to expand...
Click to collapse
Someone's custom ROM may have it someplace else. My kitchen was mainly designed for new cooks making their own ROMs from the stock ROMs.
Question: How and where do I change the build name that shows up on the device to my own name?
Click to expand...
Click to collapse
I think it's in the build.prop. Just compare the field values with what you see on your phone right now for the build name.
dsixda said:
Someone's custom ROM may have it someplace else. My kitchen was mainly designed for new cooks making their own ROMs from the stock ROMs.
Click to expand...
Click to collapse
That's what I don't get, the update-script isn't edited by the kitchen right? But the chmod command in the update-script was from the same ROM, so surely it's "su" binary should be in the same place the update-script looks for it, or am i missing something?
I think it's in the build.prop. Just compare the field values with what you see on your phone right now for the build name.
Click to expand...
Click to collapse
Thanks, I'v given it a go, will see what happens if/when i get a successful flash.
As for your adding that info from Ash to your kitch, I think it would be useful because I forgot the last line (setting permissions) and it just caused my ROM to hang on boot, reflashing now and hoping adding it was the fix. Will update this post once complete.
UPDATE: Still hangs on boot even with that line added. Where do I go from here in debugging since I can't get logcat?
alias_neo said:
Exactly what I was looking for, thanks.
Just failed two flashes because of:
1) because i conned the kitchen into setting up the working folder (by putting a fake system.img) it didn't delete the symlinks so i had to do it manualy (after trying to flash then figuring out why it failed) and
2) it couldnt chmod "su" because it didn't exist, strange since i was working based on an existing ROM and didn't delete the "su" binary.
Question: How and where do I change the build name that shows up on the device to my own name?
EDIT: 3rd flash was successful but on boot it hangs at the HERO screen, logcat just says "waiting for device". Ideas?
Click to expand...
Click to collapse
If you used my instructions about the WORKING folder earlier, then you don't need to use option #1 in the kitchen to setup working folder - that's only if you're working with stock images. The result of that command is a WORKING folder - which you already have by extracting the files and making that folder manually.
dsixda said:
This is useful info, thanks. I might add this as an option to the kitchen in the future.
Click to expand...
Click to collapse
Happy to help! You know you've done a great job with that kitchen, and got me started with ROMs,
dsixda said:
Someone's custom ROM may have it someplace else. My kitchen was mainly designed for new cooks making their own ROMs from the stock ROMs.
Click to expand...
Click to collapse
Yup, I built my 1.5 ROM using a stock ROM, but a 2.1 based on BeHero.
kendong2 said:
and make that
Code:
set_perm 1000 1000 0771 0771 DATA:app
for eclair roms...
Click to expand...
Click to collapse
sorry i was misled about that. it is
Code:
set_perm 1000 1000 0771 DATA:app
for eclair aswell. i am confused about this myself somewhat, have you checked the android documentation?
kendong2 said:
sorry i was misled about that. it is
Code:
set_perm 1000 1000 0771 DATA:app
for eclair aswell. i am confused about this myself somewhat, have you checked the android documentation?
Click to expand...
Click to collapse
You only need the permission twice if its for the recursive set, because the first is the directory and the second is it's contents.... or so I believe.
Hi,
I am a newbie in porting ROMS. Just started with one. But while flashing the ROM i'm getting Status 7 error.
I took RazoDroid ROM which is for Galaxy Fit and SplashMod ROM of Wildfire.
The following are the steps i followed while porting which were guided from here.
1.Extracted boot.img and replaced the kernel from SplashMOD.
2.From the ramdisk changed to init.buzz.rc
3.Repacked kernel.
4.Replaced the following folders/files from SpashMOD
Code:
/system/lib/modules/
/system/lib/hw/
/system/usr/keylayout/
/system/usr/keychars/
/system/etc/vold.fstab
/system/etc/wifi/
/system/etc/ppp/
5.In updater-script changed following lines
Code:
format("ext4", "EMMC", "/dev/block/stl12");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
to
Code:
format("yaffs2", "MTD", "system");
mount("yaffs2", "MTD", "system", "/system");
5.Rebuilt the ROM and signed.
6. Flashed using ClockworkMOD v5.0.2 i got the following error
Code:
Assert Failed
write_raw_image("/tmp/boot.img", "boot")
Can anyone please tell me what is the problem?
Else the procedure itself is wrong or the ROM can not be ported?
Please help me...
same problem happened to me when i tried to port a samsung rom to wildfire...
someone knows what is the problem?
isn't ext4 better than yaffs2?
otherwise it seems to be fine, the updater-script seems perfect
after googling it seems like many people have it.
usaff22 said:
isn't ext4 better than yaffs2?
otherwise it seems to be fine, the updater-script seems perfect
after googling it seems like many people have it.
Click to expand...
Click to collapse
might be ext4 is better but SplashMod rom is working fine with yaffs2.
but the problem i see is not with the system partition which i formatted it when writing the boot.img
what did you find after googling?? what do many people have??
bittu4u4ever said:
might be ext4 is better but SplashMod rom is working fine with yaffs2.
but the problem i see is not with the system partition which i formatted it when writing the boot.img
what did you find after googling?? what do many people have??
Click to expand...
Click to collapse
After googling lots of people seem to have the status 7 boot.img problem, that is what I meant
I have successfully installed the ROM.
Problem was with the size of ramdisk having extra lib files so deleted them and now the ROM gets installed perfectly.
Now the problem is its not booting up. Got stuck at htc Splash Screen (about 20mins) and no logcat tooo
How can i solve this...??? Anyone please help???
Hi,
I tried again to port a ROM from Huawei ROM 360Gravity.
Followed the same guide mentioned in 1st post.
Installed the ROM Successfully.
But again as my previous ROM this also got stuck at htc Splash Screen. And no logcat
Please guys help me out to solve this boot issue...
I have just ported GB Miui from the Galaxy Miui you might want to try and see if they have the rom too if they do then use that with the base you have already choosen. If you need a hand PM me.
Hi all,
Can someone point out what is wrong with this updater script?
vaibhavknockout said:
Hi all,
Can someone point out what is wrong with this updater script?
Click to expand...
Click to collapse
I can tell you what is wrong with this thread, it belongs in Q&A.
Luckily, I took care of that for you.
Secondly, I don't know if there are more mistakes, but this line:
Code:
package_extract_file("boot.img", "/tmp/boot.img");write_raw_image("/tmp/boot.img", "boot");
is for flashing kernel via recovery which is not possible with Xperia phones.
What are you trying to do and what error does recovery give?
iridaki said:
I can tell you what is wrong with this thread, it belongs in Q&A.
Click to expand...
Click to collapse
LOLMAX!
iridaki said:
I can tell you what is wrong with this thread, it belongs in Q&A.
Luckily, I took care of that for you.
Secondly, I don't know if there are more mistakes, but this line:
Code:
package_extract_file("boot.img", "/tmp/boot.img");write_raw_image("/tmp/boot.img", "boot");
is for flashing kernel via recovery which is not possible with Xperia phones.
What are you trying to do and what error does recovery give?
Click to expand...
Click to collapse
Sorry madam for posting this in wrong thread. How stupid of me........I am trying to learn writing updater scripts and I am modifying CM9's script to do that. Recovery gives me Error 6. I am modifying this in notepad++, I had already checked for newline characters. Since I am a newbie in porting and stuff, I don't even know whether I need to make a new update-binary for every change I make in updater-script. I searched for hours on google about this problem but with no sucess. I never felt this miserable...
Sorry again for the wrong section.
vaibhavknockout said:
Sorry madam for posting this in wrong thread. How stupid of me........I am trying to learn writing updater scripts and I am modifying CM9's script to do that. Recovery gives me Error 6. I am modifying this in notepad++, I had already checked for newline characters. Since I am a newbie in porting and stuff, I don't even know whether I need to make a new update-binary for every change I make in updater-script. I searched for hours on google about this problem but with no sucess. I never felt this miserable...
Sorry again for the wrong section.
Click to expand...
Click to collapse
First of all, there is much more to updater-script than you appear to have knowledge of, and I am only saying this to point you to the right direction.
You need to do a little reading in order to really understand what each line does.
Otherwise, chances are, you will not be able to make a bootable ROM.
Update-binary does not need any changing though.
You should not feel miserable, just search and look in the right places.
iridaki said:
First of all, there is much more to updater-script than you appear to have knowledge of, and I am only saying this to point you to the right direction.
You need to do a little reading in order to really understand what each line does.
Otherwise, chances are, you will not be able to make a bootable ROM.
Update-binary does not need any changing though.
You should not feel miserable, just search and look in the right places.
Click to expand...
Click to collapse
I read the link you gave, it is informative indeed. But still doesn't solve my problem. The link is for syntax used in update-scripts. Since I am a Perl programmer by hobby, I do understand quite a lot of those commands in both update-script and updater-script and correct syntax associated with them (mostly based on linux). My questions are -
1. Do we have to write an update-script or an updater-script to flash a zip?
2. Updater-script is associated with an update-binary. What is it's role? Can we copy it from anywhere? If yes, then why is this binary encoded file of different size?
3. Can I write an update-script and use kitchen to convert it to updater-script? If yes, then why is kitchen giving me padded zeroes at the end of updater script?
4. If my build.prop has "ro.product.device="anzu"" and if my updater-script asserts for it using correct syntax, then why on earth is recovery giving me error 6 at the assert step?
5. If I don't have a file (say /system/lib/hw/abc) and if my updater-script calls it (say symlink toolbox /system/lib/hw/abc), then will the updater-script execution fail completely or does it skip it and move forward?
6. How would I know whether I can write boot image in xperia phones or not? Is there any list?
So in sum, I know and have found many guides to write syntax in updater-script and update-script but I couldn't find any guide which could explain all the above question clearly. Since android community (especially at xda) believes in helping out each other, I am astonished by the fact that what is the purpose of keeping this secrecy in instructions on how to make a proper bootable zip or port a ROM. I wanted to learn all this so that I could bridge this gap of knowledge like I did with my Namaste guide.
PS: You have something with colors. You have an elegant way of choosing colors in things as complex as themes and as trivial as fonts. I am a fan.
Ciao,
Vaibhav
vaibhavknockout said:
1. Do we have to write an update-script or an updater-script to flash a zip?
Click to expand...
Click to collapse
update-script is for "Amend Scripting" used in CWM prior to 3.0. update-script (and binary associated) is for "Edify Scripting" used in CWM 3.0 +. Both have different syntax. Basically use updater-script as it is latest.
vaibhavknockout said:
2. Updater-script is associated with an update-binary. What is it's role? Can we copy it from anywhere? If yes, then why is this binary encoded file of different size?
Click to expand...
Click to collapse
As mentioned above! updater script requires update-binary to work as all functions are defined in the binary.
vaibhavknockout said:
3. Can I write an update-script and use kitchen to convert it to updater-script? If yes, then why is kitchen giving me padded zeroes at the end of updater script?
Click to expand...
Click to collapse
Yes, you can! Probably kitchen's converter is messed-up. You can manually remove the zeroes.
vaibhavknockout said:
4. If my build.prop has "ro.product.device="anzu"" and if my updater-script asserts for it using correct syntax, then why on earth is recovery giving me error 6 at the assert step?
Click to expand...
Click to collapse
What error is it giving? Also, make sure to use the correct update-binary as there are different versions floating around.
vaibhavknockout said:
5. If I don't have a file (say /system/lib/hw/abc) and if my updater-script calls it (say symlink toolbox /system/lib/hw/abc), then will the updater-script execution fail completely or does it skip it and move forward?
Click to expand...
Click to collapse
Yet to try!
vaibhavknockout said:
6. How would I know whether I can write boot image in xperia phones or not? Is there any list?
Click to expand...
Click to collapse
boot image cannot be written in recovery for all Xperia phones. Basically boot partition is locked when phone is turned on, in all Xperia phones.
ameer1234567890 said:
update-script is for "Amend Scripting" used in CWM prior to 3.0. update-script (and binary associated) is for "Edify Scripting" used in CWM 3.0 +. Both have different syntax. Basically use updater-script as it is latest.
As mentioned above! updater script requires update-binary to work as all functions are defined in the binary.
Yes, you can! Probably kitchen's converter is messed-up. You can manually remove the zeroes.
What error is it giving? Also, make sure to use the correct update-binary as there are different versions floating around.
Yet to try!
boot image cannot be written in recovery for all Xperia phones. Basically boot partition is locked when phone is turned on, in all Xperia phones.
Click to expand...
Click to collapse
Thanks for answering some of my doubts and clearing the difference between update-script and updater-script. Your pointing my attention towards update-binary and it's importance caused me to read in that direction and ultimately solving it. It turns out that update-binaries are made chipset specific and if we don't use mogami specific update-binary (e.g. from CM9 for xperia arc), then assert check will fail. Hope this will help a lot of people.
PS: And this time I will try and compile another guide (like Namaste guide) to explain making flashable update.zip's, avoiding the commonly followed syntax part and focusing more on importance and functions of each component in the process.
Cheers,
Vaibhav
I'm not a developer but I'm building a deodexed version of the e700h stock 5.1.1
This is my first rom and I'm using SuperR's Kitchen for linux which can almost do all the Job
After creating an initial flashable zip and trying to flash it using TWRP by nepalbiraj
When flashing, I got an error that the installer cannot mount /dev/block/bootdevice/by-name/system as its not available or not found
Please find attached META-INF files
if anyone can check the updater script and tell me where the mistake is
thank a lot
META-INF files
Files re-attached due to upload error
Can anyone help me with some options that I still not aware of ?
Try this! https://drive.google.com/file/d/0B_8xPQyhA4WxNFk1SWlpYjEtVFU/view?usp=docslist_api
hashiesh said:
Can anyone help me with some options that I still not aware of ?
Click to expand...
Click to collapse
hashiesh use the mmcblk for mounting the partitions. It would be dev/block/mmcblk
was it a successfull one
Did u succeed in deodex process
if yes please send me the meta inf files
thanks
Instead of trying to flash by-name, try:
dd if=/PATH/to/your/img of=/dev/block/mmcblk0p16 (boot partition)
mmcblk0p17 (recovery partition)
Double check that I have the partitions correct. At a terminal emulator: ls -aln /dev/block/platform/7824900.Which/by-name
Hi There.
I just wanna make a simple update.zip file to clear bloatware and install some new app because I am studying mod android. My work must reflash ( odin ) many time to save my time and i'll not depend PC.
So, I found the way on google: Modfy updater-script and flash it via TRWP.
I am learning now, but stuck on beginning.
This is my code of updater-script
ui_print(" Start... ");
ui_print("-- Mounting: /system ");
run_program("/sbin/busybox", "mount", "/system");
ui_print("-- Delete Bloatware...");
delete("/system/app/ARCore/ARCore.apk");
Click to expand...
Click to collapse
This is used for mout system partion and delete ARCore.apk file in /system/app/ARCore dir.
Follow my knowledge the syntax is correct and when i flash it with TWRP without errors in result.
They only show me:
script susseded: result was [0]
Click to expand...
Click to collapse
But, this ARCore.apk file still there.
I don't know the way to fix it.
Can somebody help me.
Thank!
mrttd said:
Hi There.
I just wanna make a simple update.zip file to clear bloatware and install some new app because I am studying mod android. My work must reflash ( odin ) many time to save my time and i'll not depend PC.
So, I found the way on google: Modfy updater-script and flash it via TRWP.
I am learning now, but stuck on beginning.
This is my code of updater-script
Click to expand...
Click to collapse
@mrttd Thread closed as duplicate of
How to make updater-script.
Hi. I have a samsung A70 device I want to make a simple zip can to delete bloatware and install some app after reflash rom. So, i try many time with updater-script file but seemlike it not working. There is code example: ui_print(" Starting ...
forum.xda-developers.com
Please review the XDA Forum Rules with special emphasis on rule no. 5 and post only ONCE! Your other duplicate thread has been closed, too. Thanks for your cooperation.
Regards
Oswald Boelcke
Senior Moderator