yashsingh1/xdaforums huggingface dataset:
[Android] onicrom:
scripts/convert_updater_script: line 238: [: too many arguments

running into the following errors with my evo:

OTA_Supersonic_3.29.651.5-3.26.651.6_release8yp9szc4r5dsdg85.zip

./menu
Found an updater-script but not an update-script. The
kitchen currently can only modify an update-script.
Choose an option number:

1 = Convert the updater-script (Beta)
2 = Let the kitchen create an update-script
3 = Do nothing

option 1 dumps a loop of errors:

scripts/convert_updater_script: line 238: [: too many arguments
sed: -e expression #1, char 31: unknown option to `s'
scripts/convert_updater_script: line 238: [: too many arguments
sed: -e expression #1, char 31: unknown option to `s'

option 2 dumps the following error:

? (default=1) 2

Adding an update-script ...

Looking for symbolic links under /system/bin ...
find: `bin': No such file or directory
None found
Adding a default set of symlinks to update-script ...
ls: cannot access bin: No such file or directory

i followed the prompts (saying y to all) and go the following error

Working folder found
Error: boot.img not found!

BOOT-EXTRACTED folder not found

Press Enter to continue

i opened up convert-updater-script and havent been able to debug anything yet, as far as I can see the following cases never get met:

#
# Check for all lines with boot.img
#

line_num=`grep -n -m 1 boot.img temp.log | sed 's/:.*//g'`

if [ "$line_num" != "" ]
then
boot_img_found=1
else
boot_img_found=0
fi

while [ "$line_num" != "" ]
do
sed -i -e ''$line_num' s/.*/\n/' temp.log
line_num=`grep -n -m 1 boot.img temp.log | sed 's/:.*//g'`
done

if [ "$boot_img_found" == "1" ]
then
cat temp.log | sed '$a\write_raw_image PACKAGE:boot.img BOOT:' > temp2.log
mv -f temp2.log temp.log
fi

Ideas anyone?
[Android] deprecate:
No I know...that was tongue in cheek :)

I left updater-script in-place and if needed, I manually update it. So far it's proving to work.

osx.
[Android] puertoblack2003:
getting this error when trying to extract rom.zip from the htc ace ruu rom
[Android] RyanLee:
I'll give this a shot. The wireless_tether_2_0_2 was giving me FC on the latest OTA for EVO,3.29, but was working on the older 3.26. Both are 2.2.

Thanks for the info MB.
[Android] -Mr. X-:
the ace's system.img is ext3 file system so the kitchen wont extract it.

you have to mount the image by hand, chown and copy out.
[Android] dsixda:
Yeah it's been discussed in the Ace / Desire HD forum -- it's not yaffs2 format.

EDIT: Juggalo beat me to it
[Android] dsixda:
That's a 23MB update file, not a full ROM. Of course it won't work.. :p
[Android] dsixda:
I've uploaded version 0.100 to address some of the concerns of the last 24 hours.
[Android] RedFury:
[: 72: 0: unexpected operator
[: 32: update.zip: unexpected operator
scripts/choose_rom: 71: file_array[1]=update.zip: not found
[: 71: update.zip: unexpected operator

Available ROMs:

(1) update.zip

Enter file number (0 = cancel):

wtf mate?

whats happening here?

this is with the latest version.

didnt do this on my older copy.
[Android] wrxtc714:
G2 rom help

I'm trying to cook a rom for the g2 (HTC Vision for those that still think the g2 is a mytouch or hero) from the factory PC10IMG.zip

when I create the working folder I am getting The following error

Error: unyaffs - stackdump file found under /system folder

I know that this is a brand new device and nobody has really experimented with rom cooking for it yet but I figured I would start

it has a weird partition layout on the flash memory

I dont know if this affects the files use in the kitchen

any help to get this working would be greatly appreciated
[Android] rs125:
This is my update-script:

#
# Generated by dsixda's HTC Android Kitchen
# xda-developers.com
#
show_progress 0.1 0
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
symlink dumpstate SYSTEM:bin/bugreport
symlink dumpstate SYSTEM:bin/dumpcrash
symlink toolbox SYSTEM:bin/newfs_msdos
symlink toolbox SYSTEM:bin/sleep
symlink toolbox SYSTEM:bin/insmod
symlink toolbox SYSTEM:bin/getprop
symlink toolbox SYSTEM:bin/notify
symlink toolbox SYSTEM:bin/setconsole
symlink toolbox SYSTEM:bin/date
symlink toolbox SYSTEM:bin/ifconfig
symlink toolbox SYSTEM:bin/wipe
symlink toolbox SYSTEM:bin/dmesg
symlink toolbox SYSTEM:bin/renice
symlink toolbox SYSTEM:bin/cat
symlink toolbox SYSTEM:bin/cmp
symlink toolbox SYSTEM:bin/watchprops
symlink toolbox SYSTEM:bin/rmdir
symlink toolbox SYSTEM:bin/route
symlink toolbox SYSTEM:bin/mv
symlink toolbox SYSTEM:bin/top
symlink toolbox SYSTEM:bin/mount
symlink toolbox SYSTEM:bin/stop
symlink toolbox SYSTEM:bin/sendevent
symlink toolbox SYSTEM:bin/mkdir
symlink toolbox SYSTEM:bin/setprop
symlink toolbox SYSTEM:bin/iftop
symlink toolbox SYSTEM:bin/lsmod
symlink toolbox SYSTEM:bin/umount
symlink toolbox SYSTEM:bin/log
symlink toolbox SYSTEM:bin/nandread
symlink toolbox SYSTEM:bin/rm
symlink toolbox SYSTEM:bin/schedtop
symlink toolbox SYSTEM:bin/ps
symlink toolbox SYSTEM:bin/smd
symlink toolbox SYSTEM:bin/sync
symlink toolbox SYSTEM:bin/chownto
symlink toolbox SYSTEM:bin/netstat
symlink toolbox SYSTEM:bin/printenv
symlink toolbox SYSTEM:bin/id
symlink toolbox SYSTEM:bin/kill
symlink toolbox SYSTEM:bin/getevent
symlink toolbox SYSTEM:bin/ln
symlink toolbox SYSTEM:bin/chown
symlink toolbox SYSTEM:bin/ls
symlink toolbox SYSTEM:bin/rmmod
symlink toolbox SYSTEM:bin/ionice
symlink toolbox SYSTEM:bin/ioctl
symlink toolbox SYSTEM:bin/chmod
symlink toolbox SYSTEM:bin/start
symlink toolbox SYSTEM:bin/dd
symlink toolbox SYSTEM:bin/vmstat
symlink toolbox SYSTEM:bin/df
symlink toolbox SYSTEM:bin/hd
symlink /system/bin/su SYSTEM:xbin/su
set_perm_recursive 0 0 0755 0644 SYSTEM:
set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
set_perm 0 3003 06755 SYSTEM:bin/ip
set_perm 0 3003 02755 SYSTEM:bin/netcfg
set_perm 0 3004 02755 SYSTEM:bin/ping
set_perm 0 2000 06750 SYSTEM:bin/run-as
set_perm_recursive 1002 1002 0755 0440 SYSTEM:etc/bluetooth
set_perm 0 0 0755 SYSTEM:etc/bluetooth
set_perm 1000 1000 0640 SYSTEM:etc/bluetooth/auto_pairing.conf
set_perm 3002 3002 0444 SYSTEM:etc/bluetooth/blacklist.conf
set_perm 1002 1002 0440 SYSTEM:etc/dbus.conf
set_perm 1014 2000 0550 SYSTEM:etc/dhcpcd/dhcpcd-run-hooks
set_perm 0 2000 0550 SYSTEM:etc/init.goldfish.sh
set_perm 0 0 06755 SYSTEM:bin/su
set_perm_recursive 0 0 0755 0555 SYSTEM:etc/ppp
show_progress 0.1 10
show_progress 0.2 0
show_progress 0.2 10
write_raw_image PACKAGE:boot.img BOOT:

but my rom does not start. It should be looped animation. What am I missing?
[Android] puertoblack2003:
thanks for the heads up guys
[Android] dsixda:
It has just been answered in the previous page.. or you can search Google for how to solve it possibly.

I can't do anything about it.
[Android] rs125:
Using the SDK and the adb logcat gives me this error:

W/zipro ( 567): Unable to open zip '/system/etc/customer/bootanimation.zip': No such file or directory
D/HtcBootAnimation( 567): Get cid:HTC__405
D/HtcBootAnimation( 567): filepath:/system/customize/CID/HTC__405.xml
D/HtcBootAnimation( 567): Load /system/customize/CID/HTC__405.xml
D/HtcBootAnimation( 567): Using OpenGL
E/HtcBootAnimation( 567): Could not find width.
E/HtcBootAnimation( 567): Could not find height.
E/HtcBootAnimation( 567): Could not find framerate.
E/HtcBootAnimation( 567): Could not find part1.
E/HtcBootAnimation( 567): Could not find part2.
E/HtcBootAnimation( 567): Could not find part3.

I created a folder and I put the customer file they want. You say it solve?
[Android] dsixda:
I don't know why some of you guys get all these strange errors, I never have problems on mine. Make sure you are not copying over ROMs to your folder while the kitchen scripts are running. I just don't want to risk spending another couple of hours of my weekend again debugging issues, only to find out that they aren't really issues. If this is happening all the time then let me know and try to give more info if possible, like the operating system.
[Android] dsixda:
I don't know, but please make sure you know what you are doing.

Your bootanimation.zip file looks like it is from another device that has different resolution.
[Android] rs125:
But you can not! I'm working on ... the buzz of 2.10 shipped!
[Android] dsixda:
Ok then I don't know, I am not an expert on this. I just write scripts, man.
[Android] mike1986.:
Is this "delete DATA:app" above not a problem of missing apps in flashed ROM that I put before in the kitchen to data/app?
[Android] mike1986.:
And those two lines:

delete SYSTEM:xbin/busybox

delete_recursive SYSTEM:xbin

don't have to be in the update-script because there is "copy_dir PACKAGE:system SYSTEM:" just after it, right?
[Android] dsixda:
No the "delete" lines don't cause an error if your ROM doesn't have the files.

No it will likely complain if it is trying to overwrite existing files. Plus you will still have files from the previous flash if you don't delete them.
[Android] mike1986.:
ok but I have data/app enabled and I have files there.

But going back to another issue. I discovered where the problem is when ROM is hanging on HTC screen and doesn't want to boot. It's because of busybox run-parts. Every time I add this via kitchen then my ROM wont boot up. Is there any possibility to fix that?

EDIT:

YES! Finally! I figured out this data/app problem. Doing WIPE after flashing ROM will remove data/app. So if someone needs to do wipe it's better to do it BEFORE flashing. I think it's worth mentioning somewhere.

Is there any method to prevent wipe from removing data/app? If someone wants to wipe then he will need to flash ROM again to restore files from data/app.
[Android] dsixda:
The data partition holds your private apps and data, of course a wipe is going to remove it. So is "format DATA:"..which is already an option on the first screen.
[Android] dsixda:
Then what's the point of doing a wipe?? Use Titanium Backup to restore your apps + data, that's common knowledge.

P.S. You can do "delete_recursive DATA:data" probably, if you just want to remove private data and not apps.
[Android] mike1986.:
That's true but I used to do wipe always after flashing new ROM. Well it's even recommended in most cases to do full wipe after flashing any new ROM. So this wipe thing was kind of automatic activity for me. Sorry for my misunderstanding this data/app thing.
[Android] mike1986.:
Ok, thanks. I should add it to the script or do it via terminal?

I think I will give up with this busybox run-parts issue. Have no idea how to fix it. Anyway can you think of adding

delete DATA:dalvik-cache

at the beginning of the update-script? I think it could be useful. Or maybe add it only when someone choose wipe status of ROM.
[Android] HeckNoTechnO:
I keep getting this error in cygwin when i try to run ./menu "scripts/check_binaries: line 12: Clear: command not found"
[Android] dsixda:
And it tells you right below the error that you didn't follow the instructions for setting up the kitchen. You did not install Cygwin as was directed in the text file. Come on guys.
[Android] dsixda:
You can do that when you wipe a ROM but it would make no sense otherwise, unless you want to wait five minutes on first boot of a no-wipe ROM.
[Android] rs125:
I solved my problem on the rom with your kitchen. My ROM start with bootanimation.zip and with ADB I control many process.

This kitchen it's fantastic. We will have a graphical interface ?
[Android] onicrom:
duhh

thanks
[Android] -Mr. X-:
the proper proses is to wipe before, so you're not wiping anything that the rom may have installed. Wiping after is not recommended. Even when you flash with rom manager it wipes before when you tell it to do a wipe.
[Android] dsixda:
No problem, I updated the kitchen to check for those cases ;) Thanks
[Android] dsixda:
Also, if you wipe after you flash a ROM you would be probably removing whatever was installed in the /data/app folder by the ROM you just flashed (if it contained a /data folder).
[Android] dsixda:
Good to know you fixed it and that you took the time to learn + figure out the problem with adb logcat. :)

Regarding a graphical UI, I have not done anything like that in many years and it would also require a re-write of probably 75% of the scripts... in addition it would probably cause compatibility issues when trying to make it work with Mac / Linux / Cygwin. I don't see any advantage other than increased headaches, and I don't have time to re-write 8 months of work ;) There was already a thread about this question in this subforum, so you can read that too. I am currently only concerned with making the kitchen as stable as possible without issues.
[Android] rs125:
Of course I used adb logcat which is fantastic and I resolved as I had already written to the graphics in the thread ... it was just a small question. know what you mean. then have problems of incompatibility!

Other features ... Thanks for the ROM? What can you add in the kitchen?
[Android] HeckNoTechnO:
I read the text file inclosed in zip. Not at home now but I directed it in the path of the files as directed
[Android] dsixda:
Make sure you followed those instructions carefully, but it shouldn't be tricky. Did you get any other errors?
[Android] echoside:
Ive installed this kitchen a bunch of times and this last time I was just rushing through it not paying attention. When installing Cygwin I forgot to click the arrows to change All - Default to All - Install. That is what causes the error you are having.
[Android] dsixda:
Thanks for helping out :)

So is it always the .bash_profile file that needs to be changed, or does .bashrc ever apply (or can either file be changed)?
[Android] Noonski:
Thanks for the updates DsiXda, will update my **** with it this weekend :D

Finding my way through the framework this week, still a few blanks to figure out:

​

Dank u wel DsiXda.

(Yeah figured this didn't need any translation)
[Android] omar.elhelw:
HOW Do I work on a ROM and then resume later???
[Android] Noonski:
Just exit. It will resume with the open "Working Folder XXXXX" when you get back.

If you already zip aligned you won't need to to that again, when you get back etc.
[Android] dsixda:
Thanks a lot, I'll update the FAQ to mention .bash_profile instead of .bashrc.

So I guess .bashrc is similar to .tcshrc and .cshrc, which are only initiated when you request the shell...
[Android] BlaY0:
It's been a while since I did read this thread last time... now I have read like about 100 or so pages (was reading for two hours) and I haven't found the answer...

It's about signing after deodexing...

if I don't sign anything, everything works but theming is limited... I can replace existent files in apk but cannot add new ones

if I sign everything, then theming is possible since I can resign with the same cert that was signed before... the only problem is that Gmail sync push stops working

Have anyone had this problem before? I mean I can log-in to Google account, Market works, Google account sync but only manually - push sync doesn't work at all. And since Google account has no scheduling to set for sync, the only option is manually pressing "Sync now" button to sync your Gmail.

Can anyone who has deodexed and sign all apks try Gmail push sync?
[Android] TMartin:
This is the prime reason I don't theme. Signing Google apks can do this. I normally could log into my google account but couldn't download in the market. My suggestion would be to try to sign every google apk at the same time.
[Android] nfinitefx45:
Well you dont want to sign anything , do your all your edits then once ready open the original apk with 7zip and drag in the res folder this will change the graphics while keeping the original certs. This way it will not fail the signature verification.
[Android] TMartin:
Even better idea!!
[Android] BlaY0:
Well, I managed to solve the issue. First I checked the public part of certificate for all the apks. Then I signed only those that were signed by HTC, leaving all the rest as they were (Google's too). Now everything is working as it should...

This approach is misleading. Every file in apk has its digest that was made by using certificate whose public part and can be found in META-INF as *.RSA. If you replace some files, digests of those files don't match any more. But that's basically not that of a problem since rare apps check digest of all files they try to load. Bigger problem is that you can't add files with approach you suggested. You can surely replace files but adding won't work that way, since you will have to add file paths to MANIFEST.MF and CERT.SF. Good example woud be circle battery MOD which adds a bunch of new files to framework-res.apk and changed xmls that describe what should those files do.

But what you suggested is exactly what MetaMorph does... it zip-replace files in let say framework-res.apk and zipalign it afterwards. And that's pretty much it.
[Android] Karl:
is there a way to downgrade or upgrade app2sd in the kitchen

i tried just replacing the data and system folder in the app2sd folder but that doesn't work i get error when flashed :confused:
[Android] nfinitefx45:
AGreed but you noticed I was refering to graphics if you want to do xml edits then you need to use something like apk manager or apk tool, then once done all edits adn repacked I will still copy over the original certs folder to the new apk so it will still work for the signature verification
[Android] BlaY0:
You don't need apk manager for that... you just need to get hold of framework-res.apk that already contains something you need, extract that, put that into your apk and resign it, assuming you wanna add something not just replace...

But if you are doing your own theme, I mean you write your own xml and make your own grafix especially if you make stretchable bitmaps, then you will most probably need such tools you mentioned.

And no, you are not copying over the original cert, because you don't have it. What's inside of META-INF is onyl a public part which is used to decode hashes but can't be used to produce ones. Thet's why we are signig everything with a test cert which is available to everyone (private and public part).
[Android] Crimton:
the OP said its best to use ubuntu 9.10 and i have my kitchen set up and working but i was just wondering if anyone has it working with newer versions of ubuntu?
[Android] alekosy:
I can test it on Ubuntu 10.04 Lucid Lynix, if anyone showed me the correct way to do it in steps. :(
[Android] BlaY0:
Here's one step... extract the zip into an empty dir of your choice and run the menu script. It wil tell you which parts are U missing.

C'mon guys, U are all wannabe chefs but U can't even find the way to the kitchen. Even the lowest rank of aprentices who just wash dishes should know the way.
[Android] puertoblack2003:
I guess the kitchen is to hot to handle...:p
[Android] Crimton:
for anyone wondering i just upgraded to 10.10 and my kitchen is up and running with no issues that i see.
[Android] Noonski:
+1

Testing, Trying out and thinking of your own ways to test thing is the basis of going from knowing nothing to at least knowing the results from your tests and it's effects.

And all of sudden it's like you actually know something :)

At least that's how I've been teaching myself for years now.
[Android] rs125:
I can't dump the ACE ROM.

I have a this problem:

Adding an update-script ...

Compiling unyaffs ...

unyaffs successfully compiled

Extracting contents of system.img ...

Error: /system folder is empty!

Unfortunately unyaffs cannot open this system.img

Where is the problem?
[Android] dsixda:
Search the thread for HTC Ace :p
[Android] Bloodykiller86:
hey idk if its been stated but does any1 know why cyanogenmod roms...well the only one ive used is the Evo nightlies but anyways when i try to flash a CM6 nightly rom i messed with using dsixda's kitchen it doesnt boot. any1 know why or how to fix it?
[Android] dsixda:
By the way, the command above would be redundant because wiping a ROM involves "format DATA:", so there is no point following it up with the above command, since data partition is already formatted at that point..

Also adding the command to a non-wipe ROM would not be desirable, unless you want to wait a few minutes at the very first boot.
[Android] dsixda:
I had gotten my CM6 ROM to boot but it's not stable. It's partly because he uses updater-script, and my updater-script conversion to update-script is not 100% accurate. This is due to commands like 'package_extract_file' which do not have an equivalency in update-script syntax, as well as the TMP: partition which I cannot get working when flashing with an update-script. I have had to do workarounds. You may want to convert the update-script back to an updater-script before building the ROM. Otherwise, i don't know .. try a logcat.

P.S. I don't use CM6 ROMs on my device anymore, I had a LOT of stability issues, even without using the kitchen .. it's just my opinion though (I had a long rant on Twitter a few weeks ago). It's an awesome ROM nonetheless. I use my own ROMs now... I love having control over everything and not having to deal with the hassle of asking the developer whenever an issue arises (and most of the time they don't reply).
[Android] mike1986.:
dsixda can you tell me how can I incorporate this kernel http://xdaforums.com/showthread.php?t=801435 to the kitchen? Only by copying and replacing the files from /system and /kernel or do I have to add something from meta-inf as well?
[Android] dsixda:
Did you read the FAQ?
[Android] mike1986.:
I did but long time ago and I forgot that the answer is there. Anyway if the kernel I'm talking about is in zip then I should add it according to the 3rd option?
[Android] dsixda:
I don't know, I haven't looked at the file.. if it matches the description for the 3rd option then follow it. If it has system module files then you'll need to copy those over as well. I've updated the steps in case you want to take a look again.
[Android] jostrander:
New link? I tried downloading but it's dead. (working now, nevermind)
[Android] ToastPwnz:
I keep getting an error when I type ./menu that says:

Please wait .....sed: illegal option -- -

usage: sed script [-Ealn] [-i extension] [file ...]

sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...

I installed the GNU SED from that website, but when I type sed --version I get that same error. Any way around that? >.<
[Android] dsixda:
Did you read the instructions in the FAQ about the .bash_profile file?
[Android] dsixda:
At long last, version 0.101 is now up!
[Android] ToastPwnz:
Yeah but I couldn't find it, I found a file called bash. I wasn't sure if that was the right file or how to edit it though.
[Android] dsixda:
Well you should have mentioned that in your original post, to prevent confusion -- as it was part of the procedure to get sed working.

If you do an "ls -a" you should be able to see the file. Edit it with a text editor of your choice. Let me know.
[Android] ToastPwnz:
Hmm that didn't work either. As far as . files all it found was "., .., and .DS_Store.
[Android] mike1986.:
Ok so I know what to do with kernel folder, system folder and updater-script. What about update-binary which is located in the same folder as updater-script?
[Android] BlaY0:
Just leave it there...