[TOOL] amend2edify script converter [Zip][Batch][Windows][Ubuntu]

Search This thread

nubecoder

Inactive Recognized Developer
Dec 5, 2010
569
556
:[Disclaimer]:
Use this at your own risk!

:[Requirements]:
Microsoft .Net 3.0 (or Mono for Linux / Mac).
An update zip or an "update-script" to convert.
An android phone with a custom recovery that supports edify scripted zip files.
The Java Runtime Environment (only required for signing zip files).


:[Tested and functional in Ubuntu 10.10 / 11.04]:
Please see this post for instructions.

:[Description]:
This is a tool for converting amend scripts to edify scripts.
I only have direct access to an Epic 4G, so I can't test this on other phones.
I rely on the community to give me the info needed to support other devices.
Many thanks go the the numerous people that have contributed, sorry there is no list, but you know who you are.

:[Features]:
Backup original files.
Convert script files from amend to edify.
Convert zip files from amend to edify.
Sign converted zip files (requires the JRE).
Batch Mode converts multiple zip files at once.
Mount Types for multiple phones using an easily upgradeable XML database file.

:[Instructions]:
These are in the README, but I'm leaving them here so maybe you will read them:
Open program.
Select "Options" -> check "Backup Original".
Select "Options" -> check "Delete Temp Files".
Select "Options" -> check "Sign Zip File". << Requires Java (probably won't work on Linux).
Select "Options" -> "Mount Type" -> Select your phone or it's closest equivalent.
Select "File" -> "Open" -> Browse for and select the file to be converted.
Check the "Output" Tab for the resulting conversion.
Select "File" -> "Save"...
NOTE::The conversion is done when the file is opened.
Make sure to set the settings before opening the file.​
amend2edify.png


[Download latest version Here]

[Download latest database version Here] (right-click, "save as")

:[Extra notes]:
Try "Universal" if your device isn't specifically listed.
VibrantMTD is based on mounts taken from a Vibrant running MIUI.

:[Error messages]:
Error: update-script could not be found in zip​
The zip you have tried to open does not contain an "update-script" file.
In other words, the zip is not an amend scripted file and there is nothing to convert.

:[WishList]:
Support for more phones. (See I Need Help notes below.)

:[Testing]:
This was originally tested on an Epic 4G with this GB keyboard, a battery mod that originally came from here, and some other random amend scripted zips.
It has since been successfully used on many different phones with many different amend based zips (by people other than myself).

:[Feedback]:
Please report bugs / errors.

:[I need Help]:
If you want specific mounts for your phone to be included, please help me by running this command from adb:
Code:
adb shell "mount > /sdcard/PHONENAME_mountinfo.txt"
or this command from a terminal:
Code:
mount > /sdcard/PHONENAME_mountinfo.txt
Then email the file to [email protected] with the subject "PHONENAME mountinfo".
Replace PHONENAME with your phone's name, so I know what phone it's for.

:[ChangeLog]:
Code:
phoneDatabase update - (04-08-2012)
- Added WildfireS-MarvelC

phoneDatabase update - (04-07-2012)
- Added Xperia X10 Mini
- Added Droid 3
- Added Galaxy S2 t989
- Added Transform Ultra
- Added Xperia Pro
- Added Optimus
(Sorry to those who had to wait for this.)

phoneDatabase update - (11-28-2011)
- Added GalaxyS2i777

phoneDatabase update - (11-28-2011)
- Added Sensation4G
- Added OptimusS
- Added Universal (note: this should work for [I]most[/I] custom recoveries)
[COLOR="Blue"]Try "Universal" if your device isn't specifically listed.[/COLOR]

phoneDatabase update - (11-11-2011)
- Added XperiaNeo
- Added GalaxyGio
- Added OptimusBlack

phoneDatabase update - (10-05-2011)
- Added NookColor

phoneDatabase update - (10-02-2011)
- Added XperiaArc
- Added Legend

phoneDatabase update - (10-01-2011)
- Added Epic4GTouch

phoneDatabase update - (09-28-2011)
- Added Photon4G
- Added HuaweiUM840

phoneDatabase update - (09-22-2011)
- Added CLIQXT
- Added DroidBionic

phoneDatabase update - (08-23-2011)
- Added myTouch4GSlide
- Renamed "MyTouch4G" to "myTouch4G"

phoneDatabase update - (08-02-2011)
- Added DroidX
- Added VibrantMTD
- Added Defy
- Added Evo3D

phoneDatabase update - (06-27-2011)
- Added EeePadTransformer

v1.0.1.2 - (06-21-2011)
- Added used mount point info to output comments.
- Added user configurable Comments area.
  (Thank you [URL="http://forum.xda-developers.com/member.php?u=2982370"]tsachi[/URL] for the idea and original code).
- Reworked some internals for the above changes.
- Minor changes to the AboutForm (ESC / ENTER to exit).

phoneDatabase update - (06-21-2011)
- Added GalaxyTab10.1.
- Added XperiaX8.

phoneDatabase update - (06-03-2011)
- Added Ascend.

phoneDatabase update - (06-02-2011)
- Added Blade.
- Added Milestone (Droid).
- Added G2x.
- Added OptimusOne.
- Added XperiaX10.

phoneDatabase update - (05-05-2011)
- Added Optimus2x.
- Added GalaxyS4G.
- Added Vibrant.

v1.0.1.1 - (04-12-2011)
- Adjusted conversion for write_radio_image and write_hboot_image.
- Misc. internal code changes.

phoneDatabase update - (04-12-2011)
- Added HeroC.
- Added NexusS.
- Added Fascinate.
- Added Thunderbolt.

phoneDatabase update - (03-08-2011)
- added Shift4G.

phoneDatabase update - (02-20-2011)
- added MyTouch4G.

v1.0.1.0 - (02-20-2011)
- added phoneDatabase.xml file for dynamic mount type loading.
- Misc. internal code changes.

v1.0.0.11 - (02-15-2011) [COLOR=Blue]Unreleased[/COLOR]
- Misc. internal code changes.

v1.0.0.10 - (02-14-2011)
- added Mount Type selection for HTC Incredible.
- added Mount Type selection for HTC G2.

pre v1.0.0.10
- see ChangeLog.txt (inside the zip)
=]
 

Attachments

  • amend2edify_v1.0.1.0.zip
    877.1 KB · Views: 9,937
  • amend2edify_v1.0.1.1.zip
    865.1 KB · Views: 1,289
  • amend2edify_v1.0.1.2.zip
    870.4 KB · Views: 18,118
Last edited:

squshy 7

Senior Member
Dec 6, 2010
1,414
450
If this works as intended, could any joe-shmo (like myself) plug in the scripts from a rom.zip, paste over the new output, and then proceed to flash the rom? (avoiding having to wait for the dev to do it)...

Or is it a little more complicated than that

Sent from my baked and emotionless SPH-D700
 
  • Like
Reactions: fkhaten

sauron0101

Senior Member
Aug 29, 2010
363
38
Ontario
It seems to be buggy right now. I've tried converting something small, a Gingerbread keyboard. Installation aborted.

Anyways, here's the link to what I copied:
http://forum.xda-developers.com/showthread.php?t=845162

Here's the output message:

# Unknown:: delete SYSTEM:app/ime-mtm-stock-gingerbread.apk ;
show_progress(0.1, 0);
# Unknown:: You shouldn't have seen this! o_O
# Unknown:: You shouldn't have seen this! o_O
show_progress(0.1, 10);
 

Dameon87

Inactive Recognized Developer
Oct 30, 2008
987
1,148
OnePlus 8
Doesn't look like proper syntax. You can't use keyword calls for system, data, tmp, etc in edify. Paths must be proper paths, /system

Sent from my SPH-D700 using Tapatalk
 

ksmullins88

Senior Member
Dec 16, 2010
1,904
1,213
31
Detroit, MI
so, this tool is for converting the old .zip files we used to use into the new edify .zip files we need to use for EXT4?

ive been trying to find out how to reformat the CIA boot animation and some custom sounds for boot and shutdown to work with EXT4 but so far everything is aborted when i try to install
 

nubecoder

Inactive Recognized Developer
Dec 5, 2010
569
556
It seems to be buggy right now. I've tried converting something small, a Gingerbread keyboard. Installation aborted.

Anyways, here's the link to what I copied:
http://forum.xda-developers.com/showthread.php?t=845162

Here's the output message:

# Unknown:: delete SYSTEM:app/ime-mtm-stock-gingerbread.apk ;
show_progress(0.1, 0);
# Unknown:: You shouldn't have seen this! o_O
# Unknown:: You shouldn't have seen this! o_O
show_progress(0.1, 10);

Looks like I forgot to add the delete cmd to the switch statement. =[

And the "you shouldn't see this" is from blank lines in the script (I think).

I'll fix it up when I get a chance (after work).

I'll be releasing the source as well if anyone cares...

@Dameon

You should still do the php thing... Some people hate .Net, and online is sometimes better than downloading a tool.

=]
 
Last edited:

nubecoder

Inactive Recognized Developer
Dec 5, 2010
569
556
If this works as intended, could any joe-shmo (like myself) plug in the scripts from a rom.zip, paste over the new output, and then proceed to flash the rom? (avoiding having to wait for the dev to do it)...

Or is it a little more complicated than that

Sent from my baked and emotionless SPH-D700

Pretty much, yes...

I plan on supporting zip input and signed zip output. I'll have to see how dificult it is to implement...

=]
 

DiGi760

Senior Member
Nov 7, 2010
641
83
does this do this auto or do you need the new edify scripts to paste in the output section? if you need the scripts could somone please post them.

Input is for the amend script. Output is where the edify scripts come out.

Remember the cardinal rule of nature, don't put anything in where something is supposed to come out.
 

DiGi760

Senior Member
Nov 7, 2010
641
83
I stripped nubecoders comments from his code for anyone who wants to see all the pieces being converted by this program. He has included his code with his prog, so if anyone wants to port at least the converter part to linux or whatever, look in a2eForm.cs.

Code:
* from: assert compatible_with("0.2") == "true"
*   to: assert(compatible_with("0.2") == "true");

* from: show_progress 0.1 0
*   to: show_progress(0.1, 0);

* from: format SYSTEM:
*   to: delete_recursive("/system");

* from: delete SYSTEM:app/ime-mtm-stock-gingerbread.apk
*   to: delete("/system/app/ime-mtm-stock-gingerbread.apk")

* from: delete_recursive SYSTEM:app
*   to: delete_recursive("/system/app");

* from: copy_dir PACKAGE:system SYSTEM:
*   to: package_extract_dir("system", "/system");

* from: copy_dir PACKAGE:app SYSTEM:app
*   to: package_extract_dir("app", "/system/app");

* from: symlink SYSTEM:xbin/su SYSTEM:bin/su
*   to: symlink("/system/xbin/su", "/system/bin/dumpcrash");
*							 
* from: symlink dumpstate SYSTEM:bin/dumpcrash
*   to: symlink("dumpstate", "/system/bin/dumpcrash");

* from: set_perm_recursive 0 0 0755 0644 SYSTEM:
*   to: set_perm_recursive(0, 0, 0755, 0644, "/system");

* from: set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
*   to: set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");

* from: set_perm 0 3003 02755 SYSTEM:
*   to: set_perm(0, 3003, 02755, "/system")

* from: set_perm 0 3003 02755 SYSTEM:bin/netcfg
*   to: set_perm(0, 3003, 02755, "/system/bin/netcfg");

* from: run_program PACKAGE:installbusybox
*   to: run_program("installbusybox");

* from: run_program programToRun arg1
*   to: run_program("programToRun", "arg1");

* from: run_program programToRun arg1 arg2
*   to: run_program("programToRun", "arg1", "arg2");

* from: run_program /system/xbin/busybox --install -s /system/xbin
*   to: run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");

* from: write_raw_image PACKAGE:boot.img BOOT:
*   to: assert(package_extract_file("boot.img", "/tmp/boot.img"),
*			write_raw_image("/tmp/boot.img", "boot"),
*			delete("/tmp/boot.img"));
 
  • Like
Reactions: mero01

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    :[Disclaimer]:
    Use this at your own risk!

    :[Requirements]:
    Microsoft .Net 3.0 (or Mono for Linux / Mac).
    An update zip or an "update-script" to convert.
    An android phone with a custom recovery that supports edify scripted zip files.
    The Java Runtime Environment (only required for signing zip files).


    :[Tested and functional in Ubuntu 10.10 / 11.04]:
    Please see this post for instructions.

    :[Description]:
    This is a tool for converting amend scripts to edify scripts.
    I only have direct access to an Epic 4G, so I can't test this on other phones.
    I rely on the community to give me the info needed to support other devices.
    Many thanks go the the numerous people that have contributed, sorry there is no list, but you know who you are.

    :[Features]:
    Backup original files.
    Convert script files from amend to edify.
    Convert zip files from amend to edify.
    Sign converted zip files (requires the JRE).
    Batch Mode converts multiple zip files at once.
    Mount Types for multiple phones using an easily upgradeable XML database file.

    :[Instructions]:
    These are in the README, but I'm leaving them here so maybe you will read them:
    Open program.
    Select "Options" -> check "Backup Original".
    Select "Options" -> check "Delete Temp Files".
    Select "Options" -> check "Sign Zip File". << Requires Java (probably won't work on Linux).
    Select "Options" -> "Mount Type" -> Select your phone or it's closest equivalent.
    Select "File" -> "Open" -> Browse for and select the file to be converted.
    Check the "Output" Tab for the resulting conversion.
    Select "File" -> "Save"...
    NOTE::The conversion is done when the file is opened.
    Make sure to set the settings before opening the file.​
    amend2edify.png


    [Download latest version Here]

    [Download latest database version Here] (right-click, "save as")

    :[Extra notes]:
    Try "Universal" if your device isn't specifically listed.
    VibrantMTD is based on mounts taken from a Vibrant running MIUI.

    :[Error messages]:
    Error: update-script could not be found in zip​
    The zip you have tried to open does not contain an "update-script" file.
    In other words, the zip is not an amend scripted file and there is nothing to convert.

    :[WishList]:
    Support for more phones. (See I Need Help notes below.)

    :[Testing]:
    This was originally tested on an Epic 4G with this GB keyboard, a battery mod that originally came from here, and some other random amend scripted zips.
    It has since been successfully used on many different phones with many different amend based zips (by people other than myself).

    :[Feedback]:
    Please report bugs / errors.

    :[I need Help]:
    If you want specific mounts for your phone to be included, please help me by running this command from adb:
    Code:
    adb shell "mount > /sdcard/PHONENAME_mountinfo.txt"
    or this command from a terminal:
    Code:
    mount > /sdcard/PHONENAME_mountinfo.txt
    Then email the file to [email protected] with the subject "PHONENAME mountinfo".
    Replace PHONENAME with your phone's name, so I know what phone it's for.

    :[ChangeLog]:
    Code:
    phoneDatabase update - (04-08-2012)
    - Added WildfireS-MarvelC
    
    phoneDatabase update - (04-07-2012)
    - Added Xperia X10 Mini
    - Added Droid 3
    - Added Galaxy S2 t989
    - Added Transform Ultra
    - Added Xperia Pro
    - Added Optimus
    (Sorry to those who had to wait for this.)
    
    phoneDatabase update - (11-28-2011)
    - Added GalaxyS2i777
    
    phoneDatabase update - (11-28-2011)
    - Added Sensation4G
    - Added OptimusS
    - Added Universal (note: this should work for [I]most[/I] custom recoveries)
    [COLOR="Blue"]Try "Universal" if your device isn't specifically listed.[/COLOR]
    
    phoneDatabase update - (11-11-2011)
    - Added XperiaNeo
    - Added GalaxyGio
    - Added OptimusBlack
    
    phoneDatabase update - (10-05-2011)
    - Added NookColor
    
    phoneDatabase update - (10-02-2011)
    - Added XperiaArc
    - Added Legend
    
    phoneDatabase update - (10-01-2011)
    - Added Epic4GTouch
    
    phoneDatabase update - (09-28-2011)
    - Added Photon4G
    - Added HuaweiUM840
    
    phoneDatabase update - (09-22-2011)
    - Added CLIQXT
    - Added DroidBionic
    
    phoneDatabase update - (08-23-2011)
    - Added myTouch4GSlide
    - Renamed "MyTouch4G" to "myTouch4G"
    
    phoneDatabase update - (08-02-2011)
    - Added DroidX
    - Added VibrantMTD
    - Added Defy
    - Added Evo3D
    
    phoneDatabase update - (06-27-2011)
    - Added EeePadTransformer
    
    v1.0.1.2 - (06-21-2011)
    - Added used mount point info to output comments.
    - Added user configurable Comments area.
      (Thank you [URL="http://forum.xda-developers.com/member.php?u=2982370"]tsachi[/URL] for the idea and original code).
    - Reworked some internals for the above changes.
    - Minor changes to the AboutForm (ESC / ENTER to exit).
    
    phoneDatabase update - (06-21-2011)
    - Added GalaxyTab10.1.
    - Added XperiaX8.
    
    phoneDatabase update - (06-03-2011)
    - Added Ascend.
    
    phoneDatabase update - (06-02-2011)
    - Added Blade.
    - Added Milestone (Droid).
    - Added G2x.
    - Added OptimusOne.
    - Added XperiaX10.
    
    phoneDatabase update - (05-05-2011)
    - Added Optimus2x.
    - Added GalaxyS4G.
    - Added Vibrant.
    
    v1.0.1.1 - (04-12-2011)
    - Adjusted conversion for write_radio_image and write_hboot_image.
    - Misc. internal code changes.
    
    phoneDatabase update - (04-12-2011)
    - Added HeroC.
    - Added NexusS.
    - Added Fascinate.
    - Added Thunderbolt.
    
    phoneDatabase update - (03-08-2011)
    - added Shift4G.
    
    phoneDatabase update - (02-20-2011)
    - added MyTouch4G.
    
    v1.0.1.0 - (02-20-2011)
    - added phoneDatabase.xml file for dynamic mount type loading.
    - Misc. internal code changes.
    
    v1.0.0.11 - (02-15-2011) [COLOR=Blue]Unreleased[/COLOR]
    - Misc. internal code changes.
    
    v1.0.0.10 - (02-14-2011)
    - added Mount Type selection for HTC Incredible.
    - added Mount Type selection for HTC G2.
    
    pre v1.0.0.10
    - see ChangeLog.txt (inside the zip)
    =]
    2
    any love for the photon?
    Snipped from the OP:
    :[WishList]:
    Support for more phones. (See I Need Help notes below.)

    :[I need Help]:
    If you want specific mounts for your phone to be included, please help me by running this command from adb:
    Code:
    adb shell "mount > /sdcard/PHONENAME_mountinfo.txt"
    or this command from a terminal:
    Code:
    mount > /sdcard/PHONENAME_mountinfo.txt
    Then email the file to [email protected] with the subject "PHONENAME mountinfo".
    Replace PHONENAME with your phone's name, so I know what phone it's for.

    =]
    1
    If this works as intended, could any joe-shmo (like myself) plug in the scripts from a rom.zip, paste over the new output, and then proceed to flash the rom? (avoiding having to wait for the dev to do it)...

    Or is it a little more complicated than that

    Sent from my baked and emotionless SPH-D700
    1
    I stripped nubecoders comments from his code for anyone who wants to see all the pieces being converted by this program. He has included his code with his prog, so if anyone wants to port at least the converter part to linux or whatever, look in a2eForm.cs.

    Code:
    * from: assert compatible_with("0.2") == "true"
    *   to: assert(compatible_with("0.2") == "true");
    
    * from: show_progress 0.1 0
    *   to: show_progress(0.1, 0);
    
    * from: format SYSTEM:
    *   to: delete_recursive("/system");
    
    * from: delete SYSTEM:app/ime-mtm-stock-gingerbread.apk
    *   to: delete("/system/app/ime-mtm-stock-gingerbread.apk")
    
    * from: delete_recursive SYSTEM:app
    *   to: delete_recursive("/system/app");
    
    * from: copy_dir PACKAGE:system SYSTEM:
    *   to: package_extract_dir("system", "/system");
    
    * from: copy_dir PACKAGE:app SYSTEM:app
    *   to: package_extract_dir("app", "/system/app");
    
    * from: symlink SYSTEM:xbin/su SYSTEM:bin/su
    *   to: symlink("/system/xbin/su", "/system/bin/dumpcrash");
    *							 
    * from: symlink dumpstate SYSTEM:bin/dumpcrash
    *   to: symlink("dumpstate", "/system/bin/dumpcrash");
    
    * from: set_perm_recursive 0 0 0755 0644 SYSTEM:
    *   to: set_perm_recursive(0, 0, 0755, 0644, "/system");
    
    * from: set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
    *   to: set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
    
    * from: set_perm 0 3003 02755 SYSTEM:
    *   to: set_perm(0, 3003, 02755, "/system")
    
    * from: set_perm 0 3003 02755 SYSTEM:bin/netcfg
    *   to: set_perm(0, 3003, 02755, "/system/bin/netcfg");
    
    * from: run_program PACKAGE:installbusybox
    *   to: run_program("installbusybox");
    
    * from: run_program programToRun arg1
    *   to: run_program("programToRun", "arg1");
    
    * from: run_program programToRun arg1 arg2
    *   to: run_program("programToRun", "arg1", "arg2");
    
    * from: run_program /system/xbin/busybox --install -s /system/xbin
    *   to: run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
    
    * from: write_raw_image PACKAGE:boot.img BOOT:
    *   to: assert(package_extract_file("boot.img", "/tmp/boot.img"),
    *			write_raw_image("/tmp/boot.img", "boot"),
    *			delete("/tmp/boot.img"));
    1
    Hi All,

    I have made a flashable zip for those on a Galaxy Nexus GSM Android 4.04.

    It contains a patched email.apk and exchange.apk.

    Useful for times when you update your phone.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone