yashsingh1/xdaforums huggingface dataset:
[Android Software Development] DamianGto:
i have a question.

i try to convert a edify script to amend.

what do i write if i want to copy from a sbin folder in the zip file to sbin folder on the phone?

if i want to copy to xbin i use SYSTEM:xbin but that don't work with sbin.

sbin is not in the system folder.

**DamianGTO Ultimate kernel. 350MB Ram. 600HZ. all ext2. Steam Rom. Js5**
[Android Software Development] nubecoder:
I'm not really sure about this, but you could try:

package_extract_file("sbin/FILENAME", "/system/xbin/FILENAME");

symlink("/sbin/FILENAME","/system/xbin/FILENAME");​

I really have no idea about all the bin folders though, I'm still a super nube when it comes to linux.

Don't blame me if you choose to try the above it fails miserably and breaks your phone.

=]
[Android Software Development] DamianGto:
well that's not amend syntax.

i know how edify do look like and that's not the problem. i want to know how the syntax look like in amend.

or do anybody has a guide on all syntax on amend?

its hard to find for every guide i find is only edify and some basic amend statement.

**DamianGTO Ultimate kernel. 350MB Ram. 600HZ. all ext2. Steam Rom. Js5**
[Android Software Development] nubecoder:
Amend is old news, so I'm not sure why, but maybe something like:

copy PACKAGE:sbin/FILENAME SYSTEM:xbin/FILENAME

simlink /sbin/FILENAME SYSTEM:xbin/FILENAME​

But you should ask around, I think sbin is just a simlink to the other bin folders.

But I could very easily be wrong, so...

This might help.

[edit]

Here is another I found during my research.

=]
[Android Software Development] DamianGto:
thanks. i will look into it.

**DamianGTO Ultimate kernel. 350MB Ram. 600HZ. all ext2. Steam Rom. Js5**
[Android Software Development] formula84:
Just want to say thanks for the great app idea, been using it for a while now.
[Android Software Development] nubecoder:
Thankx for the feedback.

Update, check OP.

Extra Notes::

I implemented dynamic mount type loading.

Now when someone sends me their phone's mount info, I can simply add it to the xml and put it up for download.

The program will only be updated when / if there needs to be changes to it, not every time I get new phone info.

=]

[edit]

I think I forgot to add a phone someone sent me, I'lll update the xml and post it up in a bit.

I'll edit the OP with some new info also.

[/edit]
[Android Software Development] nubecoder:
Added MyTouch4G to phoneDatabase.xml, check OP.

=]
[Android Software Development] nyunyu:
Thanks for this script. Tried converting an amend zip to edify and works ok so far. Will know after reboot :)
[Android Software Development] Daughain:
Has anyone done a linux implementation of this?? Props to OP for the dev work.
[Android Software Development] windywoo:
I tested on my Wildfire with Wildpuzzle and Openfire ROMs and neither seemed to work. Recovery says "Mounting Mount Points" and then there are no further progress bars until it says update complete after about 5 minutes.

Booting the phone just gets to the green HTC logo and I take the battery out and go back to recovery to try a new one.

What information should I post to be of help? The original script and the generated one?

*edit* hmmm I took the battery out after flashing a ROM and then let it boot and it booted! So maybe the original tests worked, I just needed to switch the phone off rather than reboot through recovery.
[Android Software Development] nubecoder:
Ubuntu 10.10 comes with Mono, but does not come with the winforms2.0-cli.

Simply install libmono-winforms2.0-cil with the package manager.

Then run:

cd /path/to/amend2edify/files

mono amend2edify.exe​

The zip signing feature won't work because it uses Windows shell commands.

I didn't test Batch Mode, but I don't see why it wouldn't work.

I'm glad you seem to have sorted it out.

=]

[edit]

Updated OP with Ubuntu info.

[edit]

Fixed a typo thanks to fishears.
[Android Software Development] windywoo:
Actually it was just the one ROM that worked in the end. All the rest just gave me a green HTC logo and didn't change from that even after 10 minutes.

The ROM that worked is called Sunaabh and didn't seem to have a data folder in the zip while all the others did. Could this make a difference? Should I post some scripts?

I did manage to get some smaller packages to work. A 4 in 1 reboot package and a desire adblock package both were successful.
[Android Software Development] nubecoder:
Feel free to post a converted script or two, just please use "code" blocks while posting, otherwise the posts can become difficult to read.

=]
[Android Software Development] nubecoder:
Those are the ones that stick out.

I think I will change the converter script up a bit to assert most things that can be asserted.

I'll also change the run program code to look something like:

Input:

run_program PACKAGE:installbusybox​

Output:

package_extract_file("/installbusybox","/tmp/installbusybox");

set_perm(0, 0, 0755, "/tmp/installbusybox");

run_program("/tmp/installbusybox");​

That should fix the problem.

You can manually convert those run_program bits in the output window before saving and see if it works.

If you do, let me know how it goes.

=]
[Android Software Development] windywoo:
No joy I'm afraid. Someone in this thread:

http://xdaforums.com/showthread.php?p=11677377#post11677377

mentioned that they had converted Wildpuzzle using your script without a hitch. This is really baffling.
[Android Software Development] nubecoder:
Check the [I need help] section in the OP and send me your mount info.. Could be that your mounts are different (?). IDK but worth a shot.

=]
[Android Software Development] Jedis:
Not working on my Evo 4G.

The app successfully converts the script, I've tried signing it/not signing it and then flashing through recovery. Both times it says it was successful, but the APK the script should be installing never actually gets installed.

http://forum.androidcentral.com/htc...rint-visual-voicemail-update-rooted-evos.html Is the APK I am trying to convert.

If I manually pull the APK out of the zip file from that thread and push using ADB, it works fine. Yes, I am choosing the Evo 4G mount point.

show_progress 0.1 0

copy_dir PACKAGE:system SYSTEM:

show_progress 0.1 10

ui_print("Script generated by amend2edify v1.0.1.0.");
ui_print("***********************************************");
ui_print("Performing Update...");
ui_print("Mounting mount points...");
run_program("/sbin/mount", "/dev/block/stl9", "/system");
run_program("/sbin/mount", "/dev/block/stl10", "/data");
run_program("/sbin/mount", "/dev/block/stl11", "/cache");
show_progress(0.1, 0);
package_extract_dir("system", "/system");
show_progress(0.1, 10);
ui_print("Unmounting mount points...");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
ui_print("Update Complete.");
[Android Software Development] fishears:
typo:

should be libmono-winforms2.0-cil
[Android Software Development] nubecoder:
Please check again, those mount points are for the Epic.

I'll check the xml database, just to be sure.

Sorry about that, will fix asap.

[edit]

Done.

=]
[Android Software Development] nubecoder:
From the file:

<phone name="Evo4G">
<mount>run_program("/sbin/mount", "/dev/block/mtdblock4", "/system");</mount>
<mount>run_program("/sbin/mount", "/dev/block/mtdblock6", "/data");</mount>
<mount>run_program("/sbin/mount", "/dev/block/mtdblock5", "/cache");</mount>
<umount>run_program("/sbin/umount", "/system");</umount>
<umount>run_program("/sbin/umount", "/data");</umount>
<umount>run_program("/sbin/umount", "/cache");</umount>
</phone>

Make sure you select the Mount Type before loading a file, the conversion is done on file load.

Let me know how it goes.

=]
[Android Software Development] nubecoder:
phoneDatabase update - (03-08-2011)

- added Shift4G. (Thanks dc13)

=]
[Android Software Development] ladios:
I was looking for a way to flash radio image with edify, then I found this converter.

input:

show_progress 0.1 0
write_radio_image PACKAGE:radio.img
show_progress 0.1 10

output:

ui_print("Script generated by amend2edify v1.0.1.0.");
ui_print("***********************************************");
ui_print("Performing Update...");
ui_print("Mounting mount points...");
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
mount("MTD", "cache", "/cache");
show_progress(0.1, 0);
assert(package_extract_file("radio.img", "/tmp/radio.img"),
write_firmware_image("/tmp/radio.img", "radio.img"),
delete("/tmp/radio.img"));
show_progress(0.1, 10);
ui_print("Unmounting mount points...");
unmount("/system");
unmount("/data");
unmount("/cache");
ui_print("Update Complete.");

"It doesn't seem right..." I thought. Then I used other keywords to google it again, and found <root of aosp/cm repo>/build/tools/releasetools/edify_generator.py in which there's a function:

def WriteFirmwareImage(self, kind, fn):
"""Arrange to update the given firmware image (kind must be
"hboot" or "radio") when recovery finishes."""
if self.version == 1:
self.script.append(
('assert(package_extract_file("%(fn)s", "/tmp/%(kind)s.img"),\n'
' write_firmware_image("/tmp/%(kind)s.img", "%(kind)s"));')
% {'kind': kind, 'fn': fn})
else:
self.script.append(
'write_firmware_image("PACKAGE:%s", "%s");' % (fn, kind))

that would output:

assert(package_extract_file("radio_image_filename", "/tmp/radio.img"),
write_firmware_image("/tmp/radio.img", "radio"));

or:

write_firmware_image("PACKAGE:radio_image_filename", "radio");

depends on self.version of the object.

self.version is initialized as 3 in the most up to date repo, was 2 in the original page I found:

http://www.netmite.com/android/mydroid/1.6/build/tools/releasetools/ota_from_target_files

That means we should use the later, but I think they both would work.
[Android Software Development] stfugtfo85:
I try to open a zip file and it says "update script not found."
[Android Software Development] nubecoder:
From the OP...

=]
[Android Software Development] ubunix:
I am trying to run this with Darchstars ENG_SPL hboot flash on my htc heroc, I use the wildfire's setting because they have the same mount points. But I keep getting this error when trying to flash "Error stat'ing /tmp/hboot.img" No such file or directory.
[Android Software Development] LifTeD_JK:
I believe my microsoft .net is version 4.0 does it have to be 3.0?
[Android Software Development] nubecoder:
It sounds like the file wasn't extracted correctly. I need to do some code changes to the conversion script, dunno when I'll get to doing though.

The minimum required version is 3.0, Vista and Win7 come with it.

So you are good to go.

=]
[Android Software Development] LifTeD_JK:
Could we put this in an app or will it not work due to .Net?

Sent from my ADR6300 XDA App
[Android Software Development] craigmack:
I would like to get the Thunderbolt added. I am little confused how to get you the info you need to add it to the data base.
[Android Software Development] roscoenr:
I can not seem to get this to work on the evo. It runs fine in recovery but when I reboot nothing has changed. Any help would be greatly appreciated

converted this

copy_dir PACKAGE:app SYSTEM:app

to this

ui_print("Script generated by amend2edify v1.0.1.0.");
ui_print("***********************************************");
ui_print("Performing Update...");
ui_print("Mounting mount points...");
run_program("/sbin/mount", "/dev/block/mtdblock4", "/system");
run_program("/sbin/mount", "/dev/block/mtdblock6", "/data");
run_program("/sbin/mount", "/dev/block/mtdblock5", "/cache");
package_extract_dir("app", "/system/app");
ui_print("Unmounting mount points...");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
ui_print("Update Complete.");
[Android Software Development] silverxbv2:
The original should look like this.

copy_dir PACKAGE:system SYSTEM:

Those two "app" don't need to be there.

Change the package_extract line to this.

package_extract_dir("system", "/system");
[Android Software Development] roscoenr:
i tried this but no go the amend version works with the script you had but i still and not get the edify version to work here are the test zips im trying to get to work
[Android Software Development] silverxbv2:
The script looks right. Maybe try it as generic HTC instead of EVO. I have a boot animation that I went from amend to edify with the generic mount points and it works on both the evo and inc. Give that a shot.
[Android Software Development] roscoenr:
that one got it thanks
[Android Software Development] silverxbv2:
You're welcome.

@op

There seems to be any issue with the evo option. Can you double check the mount points?
[Android Software Development] roscoenr:
the mount points seem to be correct to me here is my mount info
[Android Software Development] silverxbv2:
Sorry. That last part was at the op. The mounts look correct though. Just seems like some are having trouble with the evo.
[Android Software Development] roscoenr:
its fine i was just given the mounts so he has a reference of the mount points
[Android Software Development] nubecoder:
From roscoenr's file:

/dev/block/mtdblock4 on /system type yaffs2 (ro,relatime)
/dev/block/mtdblock6 on /data type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock5 on /cache type yaffs2 (rw,nosuid,nodev,relatime)

From the phoneDatabase.xml:

<mount>run_program("/sbin/mount", "/dev/block/mtdblock4", "/system");</mount>
<mount>run_program("/sbin/mount", "/dev/block/mtdblock6", "/data");</mount>
<mount>run_program("/sbin/mount", "/dev/block/mtdblock5", "/cache");</mount>

So the mounts are correct, maybe it's a problem with the location of the mount binary (/sbin/mount)?

You said the Generic HTC mounts ended up working?

If you could confirm, I'll put a note in the OP for EVO users.

Also, please forgive my recent lack of updates / support, been focused on other things a bit lately, I think I've been given the thunderbolt mounts(?), I forget, but I'll straighten it all out tomorrow.

=]
[Android Software Development] roscoenr:
Yes the generic htc mount seems to work just fine.I just looked in sbin and the mount is not located in there. I did find mount, mountpoint, and unmount in /system/xbin.
[Android Software Development] WhammyDroid:
Does this work on the HTC Incredible? Has anyone tried?
[Android Software Development] silverxbv2:
Yes it does. Use the Inc or generic HTC mounts.
[Android Software Development] tsachi:
Mounts for Thunderbolt

Here are the mounts for thunderbolt. Worked for a simple framework change.

<phone name="Thunderbolt">
<mount>run_program("/sbin/mount", "/dev/block/mmcblk0p25", "/system");</mount>
<mount>run_program("/sbin/mount", "/dev/block/mmcblk0p26", "/data");</mount>
<mount>run_program("/sbin/mount", "/dev/block/mmcblk0p27", "/cache");</mount>
<umount>run_program("/sbin/umount", "/system");</umount>
<umount>run_program("/sbin/umount", "/data");</umount>
<umount>run_program("/sbin/umount", "/cache");</umount>
</phone>
[Android Software Development] nubecoder:
Updated to 1.0.1.1 check OP / ChangeLog.

To those who have sent me mount infos, thank you, they should all be added now. Sorry for the delay.

-ps The Nexus S mounts look weird to me, here's to hoping they work.

=]
[Android Software Development] nubecoder:
Also, I'd like to point out that ZipThemer by kellinwood, has recently started using the phoneDatabase.xml.

He was even nice enough to ask my permission, and to place links back to this thread in the User Manual.

Thanks Ken, and thanks to everyone who has helped by sending mount info.

=]
[Android Software Development] kaos217:
What do I have to do to convert Supersonic_1.32.651.1_rooted.zip Rom to Edify?

I am stuck at a point where I only have a few roms on my SD card (phone wont boot) so I am trying to install the base rooted rom for EVO 4G.
[Android Software Development] coldflid:
Glad i found this, wasn't able to do a correct conversion using cygwin.

Thanks a lot.
[Android Software Development] EnemyOfGlaDOS:
so i tried to follow the directions in the link provided in the OP, but i really have no idea what I'm doing:confused: I DL'd the latest version and opened up amend2edify, opened the zip I wanted to make work with CWM3 and then in options i signed the zip. lol.. now what. JK:o, but for real, i don't know how to re-zip it, and or use the file I want after I open up amend2edify with the file I want. ..any help for a noob?:eek:
[Android Software Development] dgwood12:
You don't have to rezip. The tool saves your old amend file as filename.zip.bak I believe and the filename.zip is the edify version. Just look for it in the original directory. You can then just flash that .zip in recovery and if you used the tool correctly you should be good to go.

Be sure to make a backup prior to flashing.

Sent from my Droid Incredible
[Android Software Development] EnemyOfGlaDOS:
hmm, I looks like i did something wrong. I don't see "filename.zip.bak" or "filename.zip". It did make a folder named after the zip i was trying to convert but i looked in that folder and no dice.Is there something I am missing after opening the file in amend2edify program. It seems like once I do that- it does whatever it is it does and no options pop up to finish.. so thats why I'm a little confused.

*EDIT* Ok.. so after opening chosen zip, it did its thing and i saved it. Noticed a new zip on my desktop with same name as the one i was converting. I saved it to my phone and went into CWM3> chose my zip> flashed> and got success , but upon rebooting the change did not take affect. Tried a few times with no luck. But the conversion seemed to have worked as it flashes with no errors. Any suggestions? ..or is it some zips just wont work?
[Android Software Development] teorouge:
Hello, did anyone try this tool with data2whatever scripts? Is this reliable with that?
[Android Software Development] nubecoder:
OK, here are some quick instructions.

Beyond that I cannot help with out seeing the input and output of the script (if you want to post them, please remember to use code tags =]).

I'll update the readme with the above instructions some point in the future...

On another note (check OP),

I think that catches me up...

=]
[Android Software Development] EnemyOfGlaDOS:
Thank you.. ill try in the morning - just calling it for the night, but I appreciate the reply! :)
[Android Software Development] EnemyOfGlaDOS:
this is the input:

show_progress 0.1 0
delete SYSTEM:etc/init.d/S_volt_scheduler
delete SYSTEM:etc/init.d/S90scheduler
delete SYSTEM:etc/init.d/S99finish
show_progress 0.1 10

this is the output:

ui_print("Script generated by amend2edify v1.0.1.0.");
ui_print("***********************************************");
ui_print("Performing Update...");
ui_print("Mounting mount points...");
run_program("/sbin/mount", "/dev/block/stl9", "/system");
run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/data");
run_program("/sbin/mount", "/dev/block/stl10", "/dbdata");
run_program("/sbin/mount", "/dev/block/stl11", "/cache");
show_progress(0.1, 0);
delete("/system/etc/init.d/s_volt_scheduler");
delete("/system/etc/init.d/s90scheduler");
delete("/system/etc/init.d/s99finish");
show_progress(0.1, 10);
ui_print("Unmounting mount points...");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/dbdata");
run_program("/sbin/umount", "/cache");
ui_print("Update Complete.");

flashes fine with no errors, but it doesn't actually do anything.
[Android Software Development] nubecoder:
Everything looks fine in the conversion, the script is set to delete 3 files in /system/etc/init.d/.

From your sig, I see you have a Captivate, those mounts look about right (going from memory here).

You could wrap the delete commands in an assert, if the command fails, the script will error with code 7 (again from memory).

To wrap the delete commands in an assert would look like this.

assert(delete("/system/etc/init.d/s99finish"));

You would need to edit the Output tab before saving.

Good luck.

=]
[Android Software Development] EnemyOfGlaDOS:
hmm. It still allows it to flash without errors. The first time I tried I got error 6 but i tried again to edit the ("/system/etc/init.d/s99finish") line, and i must have put a space in between the asset and (. But after i did that, it flashed, but same thing.. it doesn't delete the voltage settings. ..i just don't know. Is this a file you could make on your end and send it to me so i can test it? just curious 'mate, I'd really like to get this program working!!:D

*EDIT* Got it. All I had to do was change the lower case "s" into a capitol "S" in the rm_S_voltage_scheduler.. THANKS for your help and replies.. much appreciated!
[Android Software Development] RashaMatt:
What is the "database" for?

I tried to download it from the link in the OP, but the forum gave me this error:

"Invalid Attachment specified. If you followed a valid link, please notify the administrator"
[Android Software Development] nubecoder:
Ahh.. good catch, I didn't notice the case differences, I'll have to look into that, I believe I'm using a ToLower() cmd on the conversion, so I'll have to fix that up it seems.

Glad you got it working.

I have no trouble downloading the phoneDatabase.zip attachment, not sure why you had a problem. You can also get the newest database from this link, in case you are still having trouble with the attached zip.

To answer your question, the database includes the phone mount points for the various supported phones. It allows me to add support for more phones with out having to update the entire package.

=]
[Android Software Development] fezzy102:
Converting a rom

To convert a rom file to be able to flash.do i just put the whole rom in and let it do its thing?or do i have to do somthing else?
[Android Software Development] EnemyOfGlaDOS:
Hmm. The file I used to convert I selected the zip and the program did the rest. But it also wasn't a ROM, it was just a zip file that couldn't be flashed from cwm 2.x. What ROM are you wanting to flash from CWM3 and why do you need 3.X to flash the ROM?
[Android Software Development] fezzy102:
The rom that i have is pretty much not supported anymore and i want to play around wkth the new gingerbread 1900 roms.they Re 3.xxx i think ot wojld just be easyer to flash back and forth then
[Android Software Development] EnemyOfGlaDOS:
Ahh. Yeah you could try it. The program does the whole script.
[Android Software Development] webstar1:
Im getting errors in clockwork:

Make updater script

Put together zip

To easily sign a zip file i usually delete the files from the rom im working on in the htc kitchen replace it with update

then it signs it for me

flash the signed zip and gives me status 0 error.
[Android Software Development] astrall:
Tested on Xperia X10 using GalaxySi9000 mount type. - SUCCESS! :)

Please support our device. :)
[Android Software Development] nubecoder:
Sounds like it already does. ;]

But I suppose I can dupe the GalaxySi9000 mounts and rename it to XperiaX10 (which I guess was your point).

Also, I have another mount or two that people have emailed me, I'll try to get the database updated soon.

Thanks to everyone who continues to support this software by sending mount infos and testing new devices (like astrall above).

It is people like you, who have truly made this software a "community effort", in it's support for different devices.

=]
[Android Software Development] astrall:
Here is the Xperia X10 mount info.

Hope to see our device on the list. ;)
[Android Software Development] nubecoder:
Updated database, check OP.

Sorry to those people that sent to me a mount that I hadn't included yet.

I should be all caught up now (for real this time).

=]
[Android Software Development] nubecoder:
Database updated check OP.

Re-organized and reworded some of the OP.

I'm no longer attaching the database as a zip.

To download, just use "right click->save as" the database link under the preview image.

It's easier for me to maintain this way.

=]
[Android Software Development] EnemyOfGlaDOS:
Awesome man, this program is helpful to a lot of people..and I'm glad to see it being updated :D