[Q] Kitchen-Wicked-TWRP-Flashing Error - Sprint Samsung Galaxy S III

Hello, starting to get comfortable with Cygwin/Kitchen but still new at it. After repackaging and trying to flash Wicked Sensations, TWRP gives me an error (paraphrasing) "format, expect 3 args got 4".
I'm allowing the kitchen at the outset to convert updater script to "update" script, and allowing it to reconvert when it repackages. I'm accepting all defaults when repackaging.
I wonder if the kitchen is incompatible with some custom ROM's depending on what was used to create it in the first place? Or does somebody know where I'm going wrong? Thanks a million

Switch out the update binary with the original file from META-INF/com/google/android

CNexus said:
Switch out the update binary with the original file from META-INF/com/google/android
Click to expand...
Click to collapse
could you give me a little more detail? I see where the update-binary file is in the working ROM folder, but I don't see what to replace it with or where to paste that one?

SanDiegoHB said:
could you give me a little more detail? I see where the update-binary file is in the working ROM folder, but I don't see what to replace it with or where to paste that one?
Click to expand...
Click to collapse
It seems like the mayhem replaced the original update-binary...so replace it with the original update-binary from the Wicked Sensations rom zip

CNexus said:
It seems like the mayhem replaced the original update-binary...so replace it with the original update-binary from the Wicked Sensations rom zip
Click to expand...
Click to collapse
Sorry for the bother, I hate sounding dense, I'm just not following you because the only decompiled copy I have of the "update-binary" is the one in the Working ROM folder which was created from the original wicked sensations zip....

Huh...ok, post the "format(...." code that you have in your new updater-script

CNexus said:
Huh...ok, post the "format(...." code that you have in your new updater-script
Click to expand...
Click to collapse
thanks for your patience.
Here's what the "working rom" updater-script.orig says (note there are 3 arguments)
format("ext4", "EMMC", "/dev/block/mmcblk0p14");
But here's the error I get when I try to flash the rom with TWRP,
format () expects 3 args, got 4
E:Error executing updater binary in zip '/extern (it cuts off there)
Error flashing zip '/external_sd/(name of rom)
So I decided to decompile this output rom that gave me the error, and here's what the final updater-script says re: format:
format("ext4", "EMMC", "/dev/block/mmcblk0p14", "0");
As you said, it looks like something happens in the repackaging

Yeah, just use the original "format" command that only takes three arguments
And by "use" I mean copy it over to the new updater script

I also just found this http://forum.xda-developers.com/showthread.php?t=1906605 so I'll do some experimenting. What do you make of this:
"The problem is the Kitchen update to updater conversion. The kitchen doesnt make correctly the conversion. So the solution is: not give any script to kitchen for conversion, remove META-INF folder from original zip and let kitchen create a fresh updater.."

What is it that yoy are editing/changing with the kitchen? Because as long as you are not removing any files, you can use the entire META-INF folder from the original ROM in your edited ROM

CNexus said:
What is it that yoy are editing/changing with the kitchen? Because as long as you are not removing any files, you can use the entire META-INF folder from the original ROM in your edited ROM
Click to expand...
Click to collapse
Thanks for the tip! I was extracting (again) and decided to tell the kitchen to NOT do any update/updater conversion. Made my minor wallpaper edits. Repackaged. And everything worked like a charm.
Thank you very much!

SanDiegoHB said:
Thanks for the tip! I was extracting (again) and decided to tell the kitchen to NOT do any update/updater conversion. Made my minor wallpaper edits. Repackaged. And everything worked like a charm.
Thank you very much!
Click to expand...
Click to collapse
No problem

Whenever I try and flash Super Nexus, PA I get the same error Binary yada yada any general fix?

Related

Dev Question.

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.

[q] i need help with my kitchen in linux

Alright I have post several times else where regarding this issue and nobody wants or can help me with an answer.
I am trying to start how to create,modify roms with Kitchen Version 0.87 in my Linux not in Virtual Box Though I've tried both still dont work.
Ok first I have done everything accordingly including Installing Java in the Terminal to Run Kitchen.
Here are my Errors Reports;
Note: (This Happens On any Rom I put in my Update Folder)
Make sure the ROM is under the original_update folder. The format
may be one of the following:
– A ZIP file for a cooked ROM (e.g. update.zip)
– A ZIP file containing *.img (e.g. rom.zip from shipped ROM)
– boot.img + system.img (e.g. from shipped ROM or Nandroid)
Press Enter to continue
[: 75: 0: unexpected operator
[: 34: DamageControl-3.5-final.zip: unexpected operator
scripts/choose_rom: 73: file_array[1]=DamageControl-3.5-final.zip: not found
[: 73: DamageControl-3.5-final.zip: unexpected operator
Available ROMs:
(1) DamageControl-3.5-final.zip
Enter file number (0 = cancel)[/COLOR]:
Nvm. Missed that line.
fr4nk1yn said:
Nvm. Missed that line.
Click to expand...
Click to collapse
So you don't know either?
Wrong forum.
have you tried a different rom zip, that one could be corrupted or just not work well in the kitchen. I would first try a completely different rom. If it works try to download DC again.
Also look at the scripts folder. The scripts are pretty easy to follow. Try doing the steps out by hand and you will probably get better error messages.
Sent from my PC36100 using Tapatalk
laydros said:
have you tried a different rom zip, that one could be corrupted or just not work well in the kitchen. I would first try a completely different rom. If it works try to download DC again.
Also look at the scripts folder. The scripts are pretty easy to follow. Try doing the steps out by hand and you will probably get better error messages.
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
Like I said in paragraph I've tried every rom I have witch is about 21 rom's
Post the question here... http://forum.xda-developers.com/showthread.php?t=633246

[10 JAN][SCRIPT]IMG2CWM Converter 1.2.2

birkoffsjunk's HD2 IMG2CWM Converter​
A simple windows batch script to convert DAF builds to Clockwork Recovery ZIPs.
Originally designed for MDJ's Gingerbread NAND and posted here. Results may vary!
Instructions​
Download DAF based NAND ROM
Download & Extract this script
Place Boot.img & System.img into the 'in' folder
Double click 'RunMe.cmd' (not as admin)
Manually make any changes you wish (when prompted)
Once done, update.zip will be in the same location as 'RunMe.cmd'
META-INF Info​How to: Create Clockwork Recovery flash files
How to Create Android Update Zip Package
An updated updater-script (META-INF\com\google\android\updater-script) is required for various other Builds.
Downloads​v1 >>> here <<<
v1.1 attached (7z changed to 9.20 (ghostkid2010) & renamed out folder to temp)
v1.2 attached (Added error checking & support for system.img only)
v1.2.1 attached (Specified xcopy path & removed old 7z.exe)
v1.2.2 >>> here <<< (arif-ali's linux bash script)
Addons​arif-ali's NexusHD2-Gingerbread_V2.0 updater-script
TODO​
Add error checking
Add support for system.img only
META-INF Information
Most importantly keep it simple
License​BSD License for the script not the tools
7zip is GNU LGPL
unyaffs is GNU GPL v2
same post from MDJ
Your script works great extracting the .img file. But it's not able to create zip file. Let me edit your script with the missing file/info.
Download this file and put in folder tools;
http://downloads.sourceforge.net/sevenzip/7za920.zip
change this line;
"%LOC%\tools\7z.exe" a "%LOC%\update.zip" "%LOC%\out\*"
to;
"%LOC%\tools\7za.exe" a "%LOC%\update.zip" "%LOC%\out\*"
and it should work. it will create a zip file.
Enjoy
how it works?
How does it use? What things do I have to put in the folder "IN"?
sathara said:
how it works?
Click to expand...
Click to collapse
let you extract system.img and boot.img from android build, once you extracted all the fill, it will put all the file into a zip file so you can load via CWM
VuNhatVan said:
How does it use? What things do I have to put in the folder "IN"?
Click to expand...
Click to collapse
boot.img & system.img
It has a function to edit apk. But how do you use that function and where do you add your own apk?
10507 said:
It has a function to edit apk. But how do you use that function and where do you add your own apk?
Click to expand...
Click to collapse
it does not have a function to edit apk (correct me if i'm wrong). once you extracted all the files, go into app and add your apk there.
ghostkid2010 said:
let you extract system.img and boot.img from android build, once you extracted all the fill, it will put all the file into a zip file so you can load via CWM
Click to expand...
Click to collapse
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?
what a usefull tool, thank you!!
VuNhatVan said:
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?
Click to expand...
Click to collapse
If there's no boot.img, it should still work. all the boot file is already in the system.img
Let me download that build and I can tell you for sure on how to do it.. I smell that a new version of this script will be out..
Yeah it's very much a work in progress, please feel free to attach updated versions... I'll add them to the first post with accreditation
ghostkid2010 said:
If there's no boot.img, it should still work. all the boot file is already in the system.img
Let me download that build and I can tell you for sure on how to do it.. I smell that a new version of this script will be out..
Click to expand...
Click to collapse
Is it work if there is only system.img?
drizztzou said:
Is it work if there is only system.img?
Click to expand...
Click to collapse
with a little bit of editing yes
ghostkid2010 said:
same post from MDJ
Your script works great extracting the .img file. But it's not able to create zip file. Let me edit your script with the missing file/info.
Download this file and put in folder tools;
http://downloads.sourceforge.net/sevenzip/7za920.zip
change this line;
"%LOC%\tools\7z.exe" a "%LOC%\update.zip" "%LOC%\out\*"
to;
"%LOC%\tools\7za.exe" a "%LOC%\update.zip" "%LOC%\out\*"
and it should work. it will create a zip file.
Enjoy
Click to expand...
Click to collapse
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?
ikkon said:
what a usefull tool, thank you!!
Click to expand...
Click to collapse
YEAH! Your not kidding man...i was stoked while playing with it...Id also like to know from here...Is there a similar script for SD->NAND bc my favbe ROM has always been CORECells builds of EVO/HD based...Gave me the best batttery of all SD except for the now current NAND builds. So i figure maybe itll be even better on NAND! TAHNKS again so much for your pos t BIRKOFF! ANYone know of the SD->NAND question?
psuser said:
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?
Click to expand...
Click to collapse
YOU have to add an "a" after the z in 7z WITHIN the RUNME script...you have to right click it and open with NOTEPAD on PC and add the "a"
psuser said:
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?
Click to expand...
Click to collapse
download the new version on page 1, its fixed
Really cool idea!! I gave it a shot, it just reboots after the MAGLDR screen showing the HTC logo over and over until you boot back into recovery. It flashed fine but just wouldn't boot.
VuNhatVan said:
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?
Click to expand...
Click to collapse
Use the following "RunMetest.bat"
http://hotfile.com/dl/95408413/0c085bd/RunMetest.rar.html
I tested with different build, system.img only, both boot.img and system.img, it was able to create a zip with all the file.
I'm not uploading the whole folder since this was started by birkoffsjunk, I'm just helping
Test it out

[HowTo] Create your own custom rom using kitchen

Not my responsibility if you soft brick your phone.
What you need:
1.Kitchen by Dsixda http://forum.xda-developers.com/showthread.php?t=633246
2./system directory of your custom/stock rom.
3.Root access on phone
Root browser https://play.google.com/store/apps/...xLDEsImNvbS5qcnVtbXkucm9vdC5icm93c2VyZnJlZSJd
Root explorer https://play.google.com/store/apps/details?id=com.speedsoftware.rootexplorer&feature=search_result
5.Common sense and half an hour (MOST IMPORTANT)
Instructions:
(I presume that you have already installed Cygwin.)
GETTING SYSTEM FILES
1.Install your preferable Root file browser in your phone.
2.Open and look down for system folder in it.
3.Copy the whole folder on your sd card
OR
1.Open your favourite custom rom and copy the system files in there.I personally used creeds v2.5
(Use this method if you want to test it or you are a lazy kid like me!)
SETTING UP ROM
1.Open Cygwin and type "cd kitchen" and press enter
2.Type "./menu" in it. You will see a menu after that.
3.Go to Cygwin>>home>>user>>kitchen>>original_update
4.Make a folder there named as "WORKING_XXXXX" and put the /system files you obtained in it.
5.Go back to Cygwin and press 1.
6.Press enter once again and select the name of your working folder by pressing the number against it.
7.After this it will ask for naming another folder.Do as you want.
8.Now you have a working folder which is going to become your future rom. Select any options from the menu which you would like to have in your rom.(I have not tested all of them so there is a chance that some of them wont work).
BUILDING THE ROM
1.Press 99 to build the working folder.
2.Go for the interactive mode so press 1.
3.Zipalign them by pressing y. A wall of text would come but dont worry
4.Add updater-script. Again a hell lot of text
5.Press y again
6.Sign your rom by pressing y
7.Change the name of your rom by pressing y
8.Press Enter to finish!
9.Go to OUTPUT_ZIP and open the your rom and go in META-INF fodler.Over here you need to put the updater scripts which you want for your rom. I have tested the scripts from Creeds v2.5 and it installs perfectly. (This is not a necessary step because you can also install your rom with the original META-INF script.)
10.Copy the rom to your sdcard
11.Boot in cwm and wipedata+cache and then install your rom.(Have a backup in hand)
12.It should install perfectly cuz it booted properly in my 9/10 tests.
If you want to customise your rom then look below. It should be done before the building the rom.
UNDER CONSTRUCTION
MORE TO COME: TWEAKS,ICONS,ICS SETTINGS,USEFUL APPS and many other customizations.
DONT KNOW IF THEY WORK OR NOT. I AM STILL TESTING THEM.
Ok here is it for tweaking and making your rom beautiful.
Tweaking-
Use these links for init.d scripts. To install them open the zip files on your pc and drag the scripts in system>>etc>>init.d into the WORKING_XXXX folder.
http://forum.xda-developers.com/showthread.php?t=1491714- [email protected]
http://forum.xda-developers.com/showthread.php?t=1227269
http://forum.xda-developers.com/showthread.php?t=1353903
http://forum.xda-developers.com/showthread.php?t=991276
Icon Packs-
Open the links and install these packs through cwm.
http://forum.xda-developers.com/showthread.php?t=1553292 - Specifically for Galaxy Y
http://forum.xda-developers.com/showthread.php?t=824656- Supports all phones and has over 700+ packs!!
http://forum.xda-developers.com/showthread.php?t=1552767- 3D icons
ICS Settings Mod-
Follow the thread
http://forum.xda-developers.com/showthread.php?t=1576565
Now adding launchers: There are two ways 2 do this.
1.Remove touchwiz30.apk from your system>>app and replace it with the apk of your launcher.
2.Put your launcher.apk system>>app directory and flash it. http://www.mediafire.com/?kr1oc425451nzvy (Please thank here once of you use htis http://forum.xda-developers.com/showthread.php?t=1602200 its the source of script)
Adding lidroid 14 bar toggle
http://forum.xda-developers.com/showthread.php?t=1511307
Locker
http://forum.xda-developers.com/showthread.php?t=1403761
UOT kitchen for many customizations
http://galaxyygaming.blogspot.in/2012/03/uotdevelop-ur-own-themesmaking-ur-own.html
Bootanimation
http://forum.xda-developers.com/showthread.php?t=1602200
Useful Apps:
UNDER CONSTRUCTION
Will add new things as I discover them. I am forgetting alot of things right now.
Sent from my GT-S5360 using XDA
TROUBLESHOOTING
1. If you get problems in installing a rom then change your META-INF folder with this one :http://www.mediafire.com/?0g1m8cobnby046u
1A .Use the script above if you have integrated kernel in your rom.
1B. If you have a rom without kernel then remove these lines:
Code:
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
2. If there is a package error then extract the files of the rom and repack them using any compression software.
3. If rom installed correctly but stuck onto logo screen?? Then remove try removing kernel and flashing rom again.
4. If rom installed correctly but got onto bootloop then there could be many possibilities which could lead to this. If you want accurate cause of it then do a logcat.
5. If there are some apk's which are not working then check if you correctly modded them.
Most of the problems occur because of updater-script problems so before trying any of the troubleshooting try the first tip.If you face different problem then post below.
Sent from my GT-S5360 using XDA
Last one maybe.
Sent from my GT-S5360 using XDA
in case if dsixda's script didn't work (show error 7) we can follow these guide:
1. extract the rom.
2. open updater-script with notepad++
3.1 if we want install only the rom, without kernel. delete 'write_raw_image PACKAGE:boot.img BOOT:'
3.2 if we want install the kernel and the rom, replace 'write_raw_image PACKAGE:boot.img BOOT:' with
package_extract_file("bmlunlock", "bmlunlock");
package_extract_file("boot.img", "boot.img");
set_perm(0, 0, 0755, "bmlunlock");
mount("vfat", "/dev/block/mmcblk0p1", "/sdcard", "rw");
run_program("bmlunlock");
run_program("/system/bin/dd", "if=boot.img", "of=/dev/block/bml7");
4. save the file
5. rezip the rom
kurotsugi said:
in case if dsixda's script didn't work (show error 7) we can follow these guide:
1. extract the rom.
2. open updater-script with notepad++
3.1 if we want install only the rom, without kernel. delete 'write_raw_image PACKAGE:boot.img BOOT:'
3.2 if we want install the kernel and the rom, replace 'write_raw_image PACKAGE:boot.img BOOT:' with
package_extract_file("bmlunlock", "bmlunlock");
package_extract_file("boot.img", "boot.img");
set_perm(0, 0, 0755, "bmlunlock");
mount("vfat", "/dev/block/mmcblk0p1", "/sdcard", "rw");
run_program("bmlunlock");
run_program("/system/bin/dd", "if=boot.img", "of=/dev/block/bml7");
4. save the file
5. rezip the rom
Click to expand...
Click to collapse
No chance of that error because I am not using any kernel (boot.img) in my rom.
well...you didn't need that but someone may want to install another kernel in their rom.
kurotsugi said:
well...you didn't need that but someone may want to install another kernel in their rom.
Click to expand...
Click to collapse
hmm.. ur right
btw, you can add another method to get system folder. in case if we dont have rootex we can get it from a nandroid backup. we can copy system.rfs.tar from the backup folder to original_update then use kitchen to extract it.
kurotsugi said:
btw, you can add another method to get system folder. in case if we dont have rootex we can get it from a nandroid backup. we can copy system.rfs.tar from the backup folder to original_update then use kitchen to extract it.
Click to expand...
Click to collapse
I hav not tried it so cant assure it yet
it is an exact copy of system partition. i made my rom in this way. you may test it if you want
sir can you update this? been waiting..by the way...have you created your custom rom already?
devion14 said:
sir can you update this? been waiting..by the way...have you created your custom rom already?
Click to expand...
Click to collapse
its already complete for basic cooking. I'm sure it will work. do you need another spesific information?
about this one?
MORE TO COME: TWEAKS,ICONS,ICS SETTINGS,USEFUL APPS and many other customizations.
will it be the same with your tut sir?
nope...I already put all I want on my post. there are several things that should be learned by ourself. I want my guide as easy as possible to be followed. I think its already too long to be called 'simple' guide (lol)
ok..thanks....by the way is there any offline uot kitchen or theming kitchen?
theming is not as difficult as you think. create our own theme is sure fun. I think you should give it a shot.
devion14 said:
sir can you update this? been waiting..by the way...have you created your custom rom already?
Click to expand...
Click to collapse
I will update this post tomorrow and yes I have created my own custom rom using this but its only for my friends presently ... u can also use kurotsugi's thread for some customization too...
will be waiting....
devion14 said:
will be waiting....
Click to expand...
Click to collapse
Updated it... There isnt a step by step tut cuz i dont hav much time(exams are near) and the threads are pretty much self explanatory. I will add many more, I just made this in a hurry.

[Q] Updater script bug

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

Categories

Resources