[Q] Updater script bug - Xperia Arc Q&A, Help & Troubleshooting

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

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] Why isn't my Updater-Script working!!!!

Hey can someone take a look at this updater script and see why it keeps giving me a status 6 error when I try to flash. I made sure it was in UNIX format when usig notepad++ and I tried signing the whole .zip with no prevail. I had to attach as .txt
You made sure to take off the .txt right? Great question huh?
EDIT: Oh and I have no freaking idea.
darkierawr said:
You made sure to take off the .txt right? Great question huh?
EDIT: Oh and I have no freaking idea.
Click to expand...
Click to collapse
Yes I did it just wouldn't let me attach without it. And yeah I cannot for the life of me see why this isn't working... ughhhh!!!!
I can't see nothing either... hopefully someone with more knowledge than me comes along...
Sent from my SPH-D700 using Tapatalk
The_Legendary said:
Hey can someone take a look at this updater script and see why it keeps giving me a status 6 error when I try to flash. I made sure it was in UNIX format when usig notepad++ and I tried signing the whole .zip with no prevail. I had to attach as .txt
Click to expand...
Click to collapse
I just checked it out and, regardless of what you said, it's using Windows-style EOL characters, not UNIX-style EOL characters.
Check out my post that covers this extensively, including how to fix it, in benzyniarz1's [Tool][TLC]UpdatezipCreator topic, which you will probably find to be an interesting tool--especially now that he's fixed it to write UNIX-style EOL characters!
Ok well I kid of figured it out, I got the script running but it was an important chunk I took out. This line
assert(package_extract_file("modem/modem_delta_el30.bin", "/tmp/modem_delta.bin"),
write_firmware_image("/tmp/modem_delta.bin", "modem_delta.bin"),
delete("/tmp/modem_delta.bin"));
Click to expand...
Click to collapse
I also tried adding this line that was in the flashable modem zip
# ---- Flash the modem update ----
Click to expand...
Click to collapse
I tried this after the first line of ui_print and still a no go
# ---- Flash the modem update ----
(tried with and without a ui_print here)
assert(package_extract_file("modem/modem_delta_el30.bin", "/tmp/modem_delta.bin"),
write_firmware_image("/tmp/modem_delta.bin", "modem_delta.bin"),
delete("/tmp/modem_delta.bin"));
Click to expand...
Click to collapse
I tried placing it at the beginning and end but still status 6. I take the line out and POOF!! it magically works. Which is odd sense I got that line from the script in the flashable zip. But it doesn't play nice with any other syntax.
Is this for MTD?

Can anyone explain the update-binary file to me

i'm learning how to make flashable zips and in the tutorial i'm reading he says that the one he linked is for that specific device. I understand the script provides access to update commands and functions or something. So if it is specific to each phone, does that mean i can pull the file out of any flashable that works on my phone and use it? if so, how do you make flashables that are universal?
i sense i'm missing some important information about this file, the tutorial is quite breif because he just links the file and says this is the update-binary file for this phone. I google update-binary explained and a few other things and couldn't seem to find anyone who could explain much about the file. my assumption is that the updater-script file calls on functions found in the binary file or something.
edit sorry forgot to mark this as a question

Edit build.prop through updater-script

Hello fellas.
Back in the day, if I wanted to keep my dpi setting of 280 after flashing a new nightly (talking CM now), I just made a local.prop with the modified line and put it in /data.
Since, I think, CM10, though, local.prop doesn't get loaded, so I have to manually change build.prop.
I know a solution to this would be just keeping the same build.prop and flashing it after the rom (I already have a zip with the modifications I like that I flash after each nightly), but I don't really want to keep an old build.prop. What I want is to juat modify the line through my zip, so it stays updated while I don't have to modify the line every single day.
I found very quickly that I can use this line:
sed -i 's/ro.sf.lcd_density=320/ro.sf.lcd_density=280/g' /system/build.prop
to get the job done, and it does indeed work if I run it using the terminal. The problem is, I can't get it to work in recovery.
Having very little experience with programming, I'm just trying stuff to see if it works. I treid directly including the like line in the updater-script, didn't have too much hope for that.
I also tried including another simple file with this code:
#!/sbin/sh
sed -i 's/ro.sf.lcd_density=320/ro.sf.lcd_density=280/g' /system/build.prop
that I then extract and run, as I've seen in threads in the forum, but still doesn't work. The file gets extracted, but it doesn't work
I even tried to do it in a userinit script form, just to see if the rom loaded it on boot, but nope.
This is pretty friggin' simple to do, and I'm sure I'm probably making a silly noob mistake, but I just don't have any experience with this kind of code, so if someone can tell me how to make my zip run that very simple line, I'd much appreciate it.
Thanks.
Ok, after moar and moar and moar search, I finally found a script that does the job.
Problem solved.
yay
yay
Hi,
can you please provide your solution. I'm also trying to edit values in build.prop.
I tried to do via init.d script. The script is fine but / system seems to be read only when executing script at startup.
So it would be great if you can reply how you did it (maybe complete other way).
Thanks in advanced!
This is the post in question.
Swiftkey'd from my GNexus
Perfect, thanks a lot! I already found a workaround via an init.d script but this looks very promissing....
Sent from my XT894 using xda app-developers app
It's very useful.
I just included it in my after-nightly zip, so everything becomes automated with cyandelta.
Swiftkey'd from my GNexus
Hi,
So how do I edit AND add lines to build.prop from recovery ZIP?
Easy solution
Or maybe using just the updater-script and this code (this should also work on every rom)
run_program("/sbin/sh", "-c", "sed -i 's:ro.sf.lcd_density=.*:ro.sf.lcd_density=280:' /system/build.prop");
Click to expand...
Click to collapse
You can change 280 to another value if you want.
..
Molitro said:
Hello fellas.
Back in the day, if I wanted to keep my dpi setting of 280 after flashing a new nightly (talking CM now), I just made a local.prop with the modified line and put it in /data.
Since, I think, CM10, though, local.prop doesn't get loaded, so I have to manually change build.prop.
I know a solution to this would be just keeping the same build.prop and flashing it after the rom (I already have a zip with the modifications I like that I flash after each nightly), but I don't really want to keep an old build.prop. What I want is to juat modify the line through my zip, so it stays updated while I don't have to modify the line every single day.
I found very quickly that I can use this line:
sed -i 's/ro.sf.lcd_density=320/ro.sf.lcd_density=280/g' /system/build.prop
to get the job done, and it does indeed work if I run it using the terminal. The problem is, I can't get it to work in recovery.
Having very little experience with programming, I'm just trying stuff to see if it works. I treid directly including the like line in the updater-script, didn't have too much hope for that.
I also tried including another simple file with this code:
#!/sbin/sh
sed -i 's/ro.sf.lcd_density=320/ro.sf.lcd_density=280/g' /system/build.prop
that I then extract and run, as I've seen in threads in the forum, but still doesn't work. The file gets extracted, but it doesn't work
I even tried to do it in a userinit script form, just to see if the rom loaded it on boot, but nope.
This is pretty friggin' simple to do, and I'm sure I'm probably making a silly noob mistake, but I just don't have any experience with this kind of code, so if someone can tell me how to make my zip run that very simple line, I'd much appreciate it.
Thanks.
Click to expand...
Click to collapse
Sir can you tell me what to do to change ro.product.name if same phone in different regions is having different ro.product.name so that the build.prop for every phone that's installed.

[Q] Kitchen-Wicked-TWRP-Flashing Error

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?

Categories

Resources