[Q] Upgrading Amend Scripts to Edify - Android Software/Hacking General [Developers Only]

As Clockwork's latest recovery has removed support for Amend, certain flashable files have been broken. An example of this, is the Market 2.2.7 ZIP from here: http://forum.xda-developers.com/showthread.php?p=10024525
I figured I should take an existing Edify script as a basis to upgrade with, so I grabbed GApps 2010-12-28 from Lithid's EVO CM7 compile thread here: http://forum.xda-developers.com/showthread.php?t=886294
So looking at the structure of the files, I am confused about certain files.
Under directory: META-INF
CERT.RSA
CERT.SF
MANIFEST.MF
How are these files created and what are they used for? It looks like they were created by SignApk, which I discovered some documentation on from here: http://www.londatiga.net/it/how-to-sign-apk-zip-files/
Another odd file is update-binary located under META-INF/com/google/android, which does not exist on the Amend ZIP. Is this used to introduce special commands like a library to reference?
Comparing the two update-script files
gb-gapps-hdpi-20100128 said:
ui_print("Installing Google Apps..");
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
ui_print("Installation complete!");
unmount("/data");
unmount("/system");
Click to expand...
Click to collapse
market_2.2.7_signed_12272010 said:
assert compatible_with("0.2") == "true"
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app
set_perm_recursive 0 0 0755 0644 SYSTEM:lib
show_progress 0.1 10
Click to expand...
Click to collapse
So here is my attempt at updating the script:
As I am only pushing /system files, I only need that mount command. I am confused about permissions, should I be using the same 4 values from the Market 2.2.7 or the GApps package? Considering they both include Market.APK, I am confused why they would be different.
ui_print("Edify port of Amend Market ZIP, will it work?");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
ui_print("Installation successful!");
unmount("/system");
Click to expand...
Click to collapse
Since I modified the update-script file, I assume I need to use SignApk to generate the ZIP file to have the correct hash values.
Lastly: Can Edify push files to the SDCard similar to 'adb push'?

jerseymonkey said:
I am confused about permissions, should I be using the same 4 values from the Market 2.2.7 or the GApps package? Considering they both include Market.APK, I am confused why they would be different.
Click to expand...
Click to collapse
Here's some permissions info
// Read and write for owner, nothing for everybody else
chmod("/somedir/somefile", 0600);
// Read and write for owner, read for everybody else
chmod("/somedir/somefile", 0644);
// Everything for owner, read and execute for others
chmod("/somedir/somefile", 0755);
// Everything for owner, read and execute for owner's group
chmod("/somedir/somefile", 0750);
Click to expand...
Click to collapse
What's the difference between 0755 and 0771? 0771 gives the owner and the owners group read, write, and execute while anyone else can only read. Unless you create new users they will behave the same.
What's the difference between 0 and 1000? 1000 Sets the sticky bit which keeps the program in memory after it runs so it will start more quickly next time. Personally, I would set it at 0 so it doesn't sit in memory when I don't want it to.

Amend:
Code:
set_perm_recursive 0 0 0755 0644 SYSTEM:app
set_perm_recursive 0 0 0755 0644 SYSTEM:lib
Edify:
Code:
set_perm_recursive(0, 0, 0775, 0644, "/system/app");
set_perm_recursive(0, 0, 0775, 0644, "/system/lib");
Might also need to change "MTD" to "BML", as in:
Code:
mount("BML", "system", "/system");
(according to the leaked DK28's updater-script)
I think HTC (EVO) uses MTD.
Someone who knows, please verify this.
=]

DiGi760 said:
Here's some permissions info
Click to expand...
Click to collapse
nubecoder said:
Amend:
Might also need to change "MTD" to "BML", as in:
Code:
mount("BML", "system", "/system");
(according to the leaked DK28's updater-script)
I think HTC (EVO) uses MTD.
Someone who knows, please verify this.
=]
Click to expand...
Click to collapse
Thank you both for the permissions information. I just realized the latest GApps doesn't even include that command.
I tinkered with SignAPK today and managed to create/flash the zip without issue.
Also, the EVO works fine with MTD, did not test BML.
Lastly: Anyone know what update-binary is for? I assume it is used similar to a library as the script did not work without its presence.

How does one run another script from within the updater-script?
Previously it was:
run_program PACKAGE:check_data_app
What about Edify?

droidzone said:
How does one run another script from within the updater-script?
Previously it was:
run_program PACKAGE:check_data_app
What about Edify?
Click to expand...
Click to collapse
Here or here.
from:
Code:
run_program PACKAGE:check_data_app
to:
Code:
run_program("check_data_app");

nubecoder said:
Here or here.
from:
Code:
run_program PACKAGE:check_data_app
to:
Code:
run_program("check_data_app");
Click to expand...
Click to collapse
Thanks a lot..Those links were very useful...Never turned up in my search..

I forgot one.

nubecoder said:
I forgot one.
Click to expand...
Click to collapse
Wow..The last reference was the best! Thanks a lot!

nubecoder said:
I forgot one.
Click to expand...
Click to collapse
thanks for the info. i wanna update some of my own flashable zips but where do i get the update-binary? and i cant seem to find the notes on mtd u were talking about.

MrDevil said:
thanks for the info. i wanna update some of my own flashable zips but where do i get the update-binary? and i cant seem to find the notes on mtd u were talking about.
Click to expand...
Click to collapse
You can download any other Edify script and use it from that.
The dsixda kitchen generates it automatically when you convert the update-script.

MrDevil said:
thanks for the info. i wanna update some of my own flashable zips but where do i get the update-binary? and i cant seem to find the notes on mtd u were talking about.
Click to expand...
Click to collapse
As stated already, just use an update-binary that you can find in another zip (or use the one that comes with my amend2edify app, I think I used the one that came with the leaked DK28 Froyo update zip).
Also, if I'm not mistaken, if you are using CyanogenMod, I believe there is a different update-binary that must be used (someone confirm this please).
The notes about MTD is simply that the Epic uses BML in place of MTD, the notes are in orange up near the top of the post.
NOTE: I also compared this info with the leaked DK28 FROYO updater-script, it seems that for the samsung phones BML is used in place of MTD.
Click to expand...
Click to collapse
Here is a reference to MTD.
I haven't found anything about BML as of yet, maybe Samsung has some hidden docs somewhere...
=]

Thanks guys.
@nubecoder: yup I'm using cm will try out and post results.
Sent via homing pigeons

nubecoder said:
I forgot one.
Click to expand...
Click to collapse
Do you know the syntax of if,elif commands to be run from updater?

this might help I have not tried it yet just found it.
Sent from my unrEVOked using xda app

droidzone said:
Do you know the syntax of if,elif commands to be run from updater?
Click to expand...
Click to collapse
This might help, but it is a bit cryptic to me. I would use an assert if possible (since I've seen the syntax for them).
roscoenr said:
this might help I have not tried it yet just found it.
Click to expand...
Click to collapse
That was written with the Epic 4G in mind, I will be making some changes to it (tonight?) to attempt to be more friendly for more phones.
I did design it to be editable so if you know what to change, you can change it before saving.
=]

nubecoder said:
This might help, but it is a bit cryptic to me. I would use an assert if possible (since I've seen the syntax for them).
That was written with the Epic 4G in mind, I will be making some changes to it (tonight?) to attempt to be more friendly for more phones.
I did design it to be editable so if you know what to change, you can change it before saving.
=]
Click to expand...
Click to collapse
Indeed, this is the best resource I've seen so far
http://forum.xda-developers.com/showpost.php?p=10316302&postcount=102

I am calling run_program to run 'test.sh' from my updater-script. 'test.sh' has some output that is echoed but it doesn't show up on the output when i run my update.zip. Is there a way to show the output of a script that's called in run_program?
Thanks

zebdor44 said:
Is there a way to show the output of a script that's called in run_program?
Click to expand...
Click to collapse
To my knowledge there is not, but you could make the script output to a file, not the same, but might help.?...
=]

Related

How to create update script

I dont know how to create update script till now i used to edit some ones update script so i need a tutorial on making update script...
Update script? if you are asking for what I think you are you need to learn bash scripting. If not, you should clarify what you want when asking a question.
I think perhaps he means themes? If so, use the search key
Darkrift said:
Update script? if you are asking for what I think you are you need to learn bash scripting. If not, you should clarify what you want when asking a question.
Click to expand...
Click to collapse
If you're thinking what I'm thinking that you are thinking about what he is thinking..
the update-script file in an update.zip isn't a bash script . It sorta looks like one, but it actually contains commands that are interpreted by the recovery program.
sangeet.003 said:
I dont know how to create update script till now i used to edit some ones update script so i need a tutorial on making update script...
Click to expand...
Click to collapse
Assuming you mean update-script in an update.zip update, you will need to either look at existing update-script files for an example of the syntax, or look at the source of the recovery program in the android source
Thanks JesusFreke U got my point...
Bump
I too would like info on this. I'm wondering if its at all possible to alter the update script to install 3rd party apps into /data/app and /data/app-private. I've tried placing 3rd party apps into one of the Dude's roms(i think, can.'t remember exactly which rom it was), but I didn't install my 3rd party app. Yes, I did resign the update.
So if someone could help me with this, i would be really grateful. I'd like to make one script to load just /data and another to be included with my usual update.zip's.
I really enjoy the fact that my phone is so customizable, but those 3rd party apps make my custom themes sooooo ugly. i don't mind taking the time to pull apps and theme them, but reinstalling them is a pain. I know there is a windows utility for reinstalling apps, but I'd rather just flash /data.... is this even possible?
Anywho, if any of you "smart" guys around here could help me with this, I would be such a happy droid.
jonnybueno said:
I too would like info on this. I'm wondering if its at all possible to alter the update script to install 3rd party apps into /data/app and /data/app-private. I've tried placing 3rd party apps into one of the Dude's roms(i think, can.'t remember exactly which rom it was), but I didn't install my 3rd party app. Yes, I did resign the update.
So if someone could help me with this, i would be really grateful. I'd like to make one script to load just /data and another to be included with my usual update.zip's.
I really enjoy the fact that my phone is so customizable, but those 3rd party apps make my custom themes sooooo ugly. i don't mind taking the time to pull apps and theme them, but reinstalling them is a pain. I know there is a windows utility for reinstalling apps, but I'd rather just flash /data.... is this even possible?
Anywho, if any of you "smart" guys around here could help me with this, I would be such a happy droid.
Click to expand...
Click to collapse
update-script can put things into data, yes. Just create a data folder in your zip file and include the relevant lines in the script:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
Thank you! you sir, are a kind person. I will try this tonight and report my findings afterward!
bringing this thread back from the dead. I need help, if somebody could point to how to use set_permission and why all the symlinking toolbox and busybox (i understand busybox is not part of the regular android package) to other tools already in bin. Also, maybe pointers of what the tools in bin do and if i could remove them after including busybox since they're already in busybox anyway
how about removing a file?
would it be 'remove system:app:mms.apk'
would that work?
gwydionwaters said:
how about removing a file?
would it be 'remove system:app:mms.apk'
would that work?
Click to expand...
Click to collapse
Nope but I think
"delete SYSTEM:app/Mms.apk"
update-script
gwydionwaters said:
how about removing a file?
would it be 'remove system:app:mms.apk'
would that work?
Click to expand...
Click to collapse
what he said:
delete SYSTEM:app/Mms.apk
delete SYSTEM:app/Mms.odex
if you're really interested just grab any ROM available on xda and started learning the commands .. it's really rather simplistic
right on, thanks guys. i'll download some other roms as well and have a look through.
Maybe someone can halp me with correct command for sript. I need to copy one file (for example photo.ipg) into ext (root) partition whilst flshing update.zip. Files is in update.zip/photo.jpg. I have try put it into system/sd, but after flash files wont copy.
im trying remove certain apps from /data/app then install other apps on the /system/app
but im having trouble in removing apps from /data/app
mount("MTD", "data", "/data");
delete("/data/app/someapp.apk"); ?? not sure about deleting apps, i think this is wrong.
unmount("/data");
Is that the even the correct way to mount it? because that works with the /system
Any help would be greatly appreciated.
Ubuntu only
Wrong section btw, just have to say it. I am on Ubuntu 10.04 LTS and I just use terminal:
Code:
gedit update-script
Once you do that your newly created file will pop up, the put what ever you want in it and save it. The file will be in your home folder. this is what mine looks like:
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
Then create these folders, each one inside of the other:
Code:
META-INF
root of update zip >
Code:
com
>
Code:
google
>
Code:
android
Then place your update-script in the android folder, and also create the system or data folder in root of update.zip
If it's not compressed into a zip file already than you will need to select all the folders, right click and select compress, then compress as zip. After compressing into zip you will need to sign it. I'm not going to get into signing and all that because there is tons of info on xda for signing roms
in other thread and if someone still looking:
update-script syntax - A guide for ROM devs, modders, and themers
Code:
http://forum.xda-developers.com/showthread.php?t=641223
Thanks to TylTru for the gift
hey!, I have a problem when I try to flash the update.zip (AOSP compiled for HTC Desire), I get the following error:
E: Can't chown/mod /system/keyspa.sh
(No such file or directory)
E:Failure at line 14:
set_perm 0 0 06755 SYSTEM:keyspa.sh
Installation aborted
anybody knows the reason?
Thanks in advance..
jm0077 said:
hey!, I have a problem when I try to flash the update.zip (AOSP compiled for HTC Desire), I get the following error:
E: Can't chown/mod /system/keyspa.sh
(No such file or directory)
E:Failure at line 14:
set_perm 0 0 06755 SYSTEM:keyspa.sh
Installation aborted
anybody knows the reason?
Thanks in advance..
Click to expand...
Click to collapse
does /system/keyspa.sh exist?

[Tool] Update.zip Creator

original thread here:
http://forum.xda-developers.com/showthread.php?t=1248486
just thought i would post it for those that want to create flashable zips. sorry if this isn't the right section.
DOWNLOAD:
Rar archive
Windows installer
credits:
benzyniarz1
Jordan,
Tried this on my Win7 box and I keep getting error status 6?
What am I doing wrong?
When do you get the error? Running the program or when trying to create the zip?
The program runs on my Win 7 64bit setup. But I haven't tried to create a zip yet.
Have you tried right clicking on the file and changing the Compatibility to something like Win XP?
Truckerglenn said:
When do you get the error? Running the program or when trying to create the zip?
The program runs on my Win 7 64bit setup. But I haven't tried to create a zip yet.
Have you tried right clicking on the file and changing the Compatibility to something like Win XP?
Click to expand...
Click to collapse
It runs and creates the zip just fine. When I try to flash it with cwm it comes up with error 6 and fails.
SNadler said:
It runs and creates the zip just fine. When I try to flash it with cwm it comes up with error 6 and fails.
Click to expand...
Click to collapse
Sorry I haven't been able to reply. There should be two cwm options or whatever. The type like edify or amend or something hold on ill look at uot
Sent from my SAMSUNG-SGH-I997 using xda premium
Ok there's amend and edify
Sent from my SAMSUNG-SGH-I997 using xda premium
Nvm I know what it is
Sent from my SAMSUNG-SGH-I997 using xda premium
Ok. its the updater-script. U have to create a script.
Sent from my SAMSUNG-SGH-I997 using xda premium
JordanElliott said:
Ok. its the updater-script. U have to create a script.
Sent from my SAMSUNG-SGH-I997 using xda premium
Click to expand...
Click to collapse
I am using edify....
Here is the one I made that does not work so you can maybe se where I went wrong and the program I was trying to make a .zip
I have it running in /system/app by restoring it from TB and also by means of ADB push but wanted to learn how to use this tool.....
Thanks!
SNadler said:
I am using edify....
Here is the one I made that does not work so you can maybe se where I went wrong and the program I was trying to make a .zip
I have it running in /system/app by restoring it from TB and also by means of ADB push but wanted to learn how to use this tool.....
Thanks!
Click to expand...
Click to collapse
here is what you do. go to meta-inf folder in your update.zip. and drag updater-script from the folder and right click. edit it with notepad++ and hit ctrl+a and copy this
ui_print("HERE U CAN PUT WHATEVER YOU WANT");
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
ui_print("Installing");
package_extract_dir("system", "/system");
ui_print("Unmounting system...");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Installation complete!");
here is notepad++
JordanElliott said:
here is what you do. go to meta-inf folder in your update.zip. and drag updater-script from the folder and right click. edit it with notepad++ and hit ctrl+a and copy this
ui_print("HERE U CAN PUT WHATEVER YOU WANT");
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
ui_print("Installing");
package_extract_dir("system", "/system");
ui_print("Unmounting system...");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Installation complete!");
Click to expand...
Click to collapse
Thanks I will try it in the AM.
This will need to be used every time I run the program then to use it for programs that go into the /system/app folder correct?
SNadler said:
Thanks I will try it in the AM.
This will need to be used every time I run the program then to use it for programs that go into the /system/app folder correct?
Click to expand...
Click to collapse
Well if u want copy what I pasted directly into zip updater creater or whatever
Sent from my SAMSUNG-SGH-I997 using xda premium
JordanElliott said:
Well if u want copy what I pasted directly into zip updater creater or whatever
Sent from my SAMSUNG-SGH-I997 using xda premium
Click to expand...
Click to collapse
Tried it and it still came up with error 6?
SNadler said:
Tried it and it still came up with error 6?
Click to expand...
Click to collapse
Idk then bro. I haven't tried the prohrar
Sent from my SAMSUNG-SGH-I997 using xda premium
JordanElliott said:
Idk then bro. I haven't tried the prohrar
Sent from my SAMSUNG-SGH-I997 using xda premium
Click to expand...
Click to collapse
Thanks anyway, I just took another and swapped the program i wanted to use with the one in it and that was just as easy.......

edited build.prop; phone can only boot into recovery mode and download mode

So, I was trying to get Google Wallet to work on my VZW rooted Galaxy S3. I edited three lines in my build.prop. Specifically, my edits were
Code:
ro.product.model=Galaxy Nexus
ro.product.name=yakju
ro.product.device=maguro
They had been suggested on another site as a way to allow the installation of Google Wallet. In hindsight, probably shouldn't have gone with that advice. I did not perform a nandroid backup via CWM before starting, but did back up build.prop on my computer.
I rebooted my phone, and the phone got past the first Samsung logo, and then the Samsung Galaxy S3 screen, and went to a black screen after that. None of the buttons do anything, and the LED does nothing. Removing the battery is the only way to get back to a powered-off state from which I can re-enter the boot cycle. I can enter both recovery mode and download mode, and if I plug my phone into my computer at the black-screen point after normal boot, I can access the phone via adb.
So here's the real problem. I need to replace my build.prop with the backed-up version. In order to modify build.prop in the first place, I found that adb remount failed (I think I got permission denied or something), so after pulling build.prop, editing it, and saving it locally on the computer (using Ubuntu 10.04 LTS), I pushed the file to /mnt/sdcard/ so as not to encounter permission problems. I found that entering adb shell and going to su did not allow me to switch out the edited file, as I got a cross-device error. So in the phone I entered ES File Explorer (in which I enabled root explorer, and which I had previously used to remount the file system as read-write), and switched out the build.prop with my edited version.
Obviously, I cannot use my ES File Explorer trick to replace build.prop now that the phone is not working. So I try using adb shell. I again encounter the remount issue:
Code:
[email protected]:/Onyx/adiv/android-sdk-linux_x86/platform-tools$ ./adb remount
remount failed: Operation not permitted
I saw elsewhere that the same can be accomplished via adb shell with su. So I try, and get this far:
Code:
[email protected]:/ $ su
Segmentation fault
Definitely not good. Having now realized the error of my ways in not creating a nandroid before messing things up, I think, hey, I can make a nandroid now, pull the backup to my computer, and replace the build.prop in the backup, figure out how to update the MD5 sum, and recover from the modified backup. So I backup in CWM (recall that I can still enter recovery mode), pull the recovery, and take a look.
First I notice that the folder under clockworkmod/backup/ is quite oddly named 1970-01-30.22.07.14. I don't expect this to be a huge issue. I need to edit the system component, which I see seems to be distributed between system.ext4.tar.a (1.0 gb), system.ext4.tar (0 bytes), and system.ext4.tar.b (136.1 mb). I'm unable to unpack any of these three, as they don't seem to be packed like normal tarballs. And this is where I hit a dead-end for this method.
A third option which I admit I haven't fully explored is throwing the original build.prop in an update.zip and flashing that via recovery, and I haven't explored that option fully because I really have no idea what the inside of an update.zip looks like, or how I would go about building my own, and the few guides I looked at for building my own update.zip focused on either installing custom roms or installing apps, not replacing individual system files.
Any advice on where to go from here? I'd really rather not have to do a factory restore and re-apply root and re-install my apps and reconfigure everything and all that jazz, but if that's the only option I have, it's not like it's the end of the world--I can at least pull my data off the device using adb.
To summarize:
What I need to accomplish:
Replace my modified build.prop with the original build.prop that I backed up
Obstacles:
su in adb shell no longer appears to be working due to a "segmentation fault".
adb remount does not work, as the "Operation [is] not permitted."
I can't seem to unpack the system component of the nandroid backup, which has the wrong date.
How I thought I might fix it:
Use adb to push the new build.prop file and get it in its correct spot.
Edit a backup created by clockwork mod to have the correct build.prop and flash the backup via recovery.
Throw the correct build.prop in an update.zip file and install via recovery.
Any suggestions, ideas, or tips?
If I have to use option 3, does anybody have any tips as to building the update.zip? (Don't worry, if that's what I have to do, I'll do my due diligence and read up on update.zips and look through a few example update.zips)
Thanks,
Adiv
Stock build.prop in a convenient zip file. Enjoy.
Vorfidus said:
Stock build.prop in a convenient zip file. Enjoy.
Click to expand...
Click to collapse
Thanks! Will post back when I have results.
EDIT:
It seems the update-script in the zip file you provided was written in Amend, which is no longer supported--since 3.0, Android uses Edify. CWM throws an error accordingly. However, what you have provided is pretty much all I need to put together a new update.zip (I hope) with the correct scripting language.
adiv.paradise said:
Thanks! Will post back when I have results.
EDIT:
It seems the update-script in the zip file you provided was written in Amend, which is no longer supported--since 3.0, Android uses Edify. CWM throws an error accordingly. However, what you have provided is pretty much all I need to put together a new update.zip (I hope) with the correct scripting language.
Click to expand...
Click to collapse
I replaced update-script with updater-script. I then spent roughly two hours or so trying to find an update-binary that worked on the GS3 US variants. I have included the new update.zip file, with the update-binary inside. After switching to updater-script (written in Edify), and using the correct updater-binary, I finally got the updater-script to run. And I got as far as injecting the new build.prop. I get the following error:
Code:
assert failed: package_extract_file("build.prop","/system/build.prop")
E:Error in /sdcard/update.zip
(Status 7)
Installation aborted.
Here is my updater-script:
Code:
ui_print(" Mounting system...");
assert(mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system"));
set_progress(0.100000);
ui_print(" Deleting old build.prop...");
delete("/system/build.prop");
set_progress(0.400000);
ui_print(" Injecting build.prop....");
set_progress(0.410000);
assert(package_extract_file("build.prop","/system/build.prop"));
set_progress(0.800000);
ui_print(" build.prop successfully injected!");
ui_print(" unmounting /system...");
assert(unmount("/system"));
set_progress(1.000000);
ui_print(" Done! Yay!");
I'll try the package_extract_dir command as well, but my experience thus far has been that it probably won't make a difference.
Anybody have any quick tips on getting the build.prop to actually inject? My hunch is that this is coming back to the difficulties I had with mounting /system as -rw.
OH GOOD LORD I HAVE DONE IT!
Switching to package_extract_dir did the trick.
For posterity, I'm uploading the final update.zip, and I'm posting here my updater-script:
Code:
ui_print(" Mounting system...");
assert(mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system"));
set_progress(0.100000);
ui_print(" Deleting old build.prop...");
delete("/system/build.prop");
set_progress(0.400000);
ui_print(" Injecting build.prop....");
set_progress(0.410000);
assert(package_extract_dir("system","/system"));
set_progress(0.800000);
ui_print(" build.prop successfully injected!");
ui_print(" unmounting /system...");
assert(unmount("/system"));
set_progress(1.000000);
ui_print(" Done! Yay!");
Hopefully, I never again do something like this without first performing a nandroid backup :/
So I guess my half done update zip did it. I knew I missed something haha.
Sent from my SCH-I535 using xda app-developers app
adiv.paradise said:
OH GOOD LORD I HAVE DONE IT!
Switching to package_extract_dir did the trick.
For posterity, I'm uploading the final update.zip, and I'm posting here my updater-script:
Code:
ui_print(" Mounting system...");
assert(mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system"));
set_progress(0.100000);
ui_print(" Deleting old build.prop...");
delete("/system/build.prop");
set_progress(0.400000);
ui_print(" Injecting build.prop....");
set_progress(0.410000);
assert(package_extract_dir("system","/system"));
set_progress(0.800000);
ui_print(" build.prop successfully injected!");
ui_print(" unmounting /system...");
assert(unmount("/system"));
set_progress(1.000000);
ui_print(" Done! Yay!");
Hopefully, I never again do something like this without first performing a nandroid backup :/
Click to expand...
Click to collapse
So if I lost my build.prop (Idk how, don't ask) flashing this in cwm will restore it?
Probably. The only thing you might run into is there's a line in the updater script that deletes the current build.prop before injecting the new one. If there is no current build.prop, it might throw an error. If it does, just delete that line from the script, repackage the zip, and flash from cwm.
Help my tablet - ramos w30 can not boot after edited build.prob
Hi all,
Please help me, after i edited file build.prob, my tablet (ramos w30) can not boot, it stop at logo.
Now i get origin file build.prob from another tablet and i want recopy to tablet to sovle this case.
I dont know way to make file update.zip with file build.prob thus please help me.
This is my origin build.prob , hope to get your update.zip from you
Thank you billion time.
jo_blow421 said:
So if I lost my build.prop (Idk how, don't ask) flashing this in cwm will restore it?
Click to expand...
Click to collapse
Tank you
thaibao1269 said:
Hi all,
Please help me, after i edited file build.prob, my tablet (ramos w30) can not boot, it stop at logo.
Now i get origin file build.prob from another tablet and i want recopy to tablet to sovle this case.
I dont know way to make file update.zip with file build.prob thus please help me.
This is my origin build.prob , hope to get your update.zip from you
Thank you billion time.
Click to expand...
Click to collapse
Sorry I never responded to this... That's what happens when you comment on an old thread.
I can't put together an update.zip for you, or rather, I won't. I'm not an update.zip factory to which you can place an order for an update.zip that will magically solve all your problems. Particularly for a device I don't have. However, I have in this thread laid out all the groundwork you'll need to do it yourself. You'll need to acquire a working build.prop for your device (using any other will brick your device), an update-binary specific to your device (you can't use the one in my update.zip, that's for the Verizon GS3), and then you'll need to change the update script that was discussed in detail here. For one, the memory addresses will be different, so for example mmcblk0p14 will be different for your device, and the directory structure might be different as well. You'll need to do some research and dig around in my update.zip to see how it was done.
Error on sideloading
adiv.paradise said:
OH GOOD LORD I HAVE DONE IT!
Switching to package_extract_dir did the trick.
For posterity, I'm uploading the final update.zip, and I'm posting here my updater-script:
Code:
ui_print(" Mounting system...");
assert(mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system"));
set_progress(0.100000);
ui_print(" Deleting old build.prop...");
delete("/system/build.prop");
set_progress(0.400000);
ui_print(" Injecting build.prop....");
set_progress(0.410000);
assert(package_extract_dir("system","/system"));
set_progress(0.800000);
ui_print(" build.prop successfully injected!");
ui_print(" unmounting /system...");
assert(unmount("/system"));
set_progress(1.000000);
ui_print(" Done! Yay!");
Hopefully, I never again do something like this without first performing a nandroid backup :/
Click to expand...
Click to collapse
I am trying to sideload my LG g2 (LS980) with this update.zip. Obviously I have modified the build.prop file inside it. But when sideloading i get the following error. E: footer is wrong
E: Signature verification failed
Do you know why this happen?
Anoop S S said:
I am trying to sideload my LG g2 (LS980) with this update.zip. Obviously I have modified the build.prop file inside it. But when sideloading i get the following error. E: footer is wrong
E: Signature verification failed
Do you know why this happen?
Click to expand...
Click to collapse
Same Error here, i only have Chance to recover my build.prop from update via sideload or directly from sdcard. Thanks for any hints.
Dude need help also. i have Lenovo A328, when i edited my build.prop i forgot to change the permisssions and then i rebooted it. unfortunately it ends up in black screen. and i cant seem to fix the problem using update.zip. it always says INSTALLATION ABORTED.
Guys, you need to realize that a solution for the Verizon GS3 (sch-i535) is not going to work for any other model--the firmware is different, the memory layouts are different, and the binaries involved are different. You can't just stick in a build.prop for your own phone. You need to find an update-binary or updater-binary or whatever that works with your specific model, do research on the memory layout used in your phone, edit the injection script accordingly (that means actually learning a bit of Edify, you can't just do a search-replace to make it work, you actually need to understand what the script is doing if you want any chance of building a proper script), and use the correct build.prop. It's going to take some legwork. Also, keep in mind that I found my solution about two and a half years ago--Android has gone through I think 3 or 4 significant revisions since then--I think my phone was still on ICS (4.0) at the time, we've since had 4.1, 4.2, 4.3, 4.4, and now 5.0 if you're on that. Things may have changed, and my solution may no longer work, even for the VZW GS3.
Alcatel 4011x bootloop after editing build.prop. Need script file
Help me (im newbie) can you guys make a update.zip for me.
My phone is alcatel one touch glory 2S pro (4011x). Please make me a update.zip to inject my backup build.prop. my phone bootloop because I did not change the permission I guess :what:
sorry for my grammar because english is not my native langguage
Ps: i cant use adb because i dont have a pc
Please help me I really need a script that can inject this build.prop

Can someone help me with my update.zip?

im trying to make one for this:
http://forum.xda-developers.com/showthread.php?t=2078587
I followed this tutorial:
http://forum.xda-developers.com/showthread.php?t=1721680
I attached what I've done.. I dont understand why it doesn't do anything
Google 'how to make cwm flashable zip' and get this: http://forum.xda-developers.com/showthread.php?t=1721680
cschmitt said:
Google 'how to make cwm flashable zip' and get this: http://forum.xda-developers.com/showthread.php?t=1721680
Click to expand...
Click to collapse
oh thanks
Its scary you have a mod topic but couldn't Google for an answer...
Sent from my SAMSUNG-SGH-T989 using xda app-developers app
PJcastaldo said:
Its scary you have a mod topic but couldn't Google for an answer...
Sent from my SAMSUNG-SGH-T989 using xda app-developers app
Click to expand...
Click to collapse
because i tried a tutorial and it didn't work.. so I was hoping someone could just help me out but the link that was posted was different and much more straight forward however that too did not work
The problem would be that on Skyrocket the /system partition is mmcblk0p24 not mmcblk0p2.
Damn lucky you didn't brick when flashing this, because mmcblk0p2 in one of the secondary bootloaders!
Code:
run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/system");
package_extract_dir("system", "/system");
run_program("/sbin/unmount", "/dev/block/mmcblk0p2", "/system");
ui_print("Enjoy! ALL OF YOU WATER HAS BEEN EVAPORATED!!!!");
ui_print("Project Evaporation By Guitarboarder28");
A safer method for mounting system is to mount it using the generic partition name, which is more cross-device independent because you aren't mounting a specific block device (mmcblk0p24 isn't the /system partition on every device.)
You also might need to set the correct permission on system apps or other executables in the package.
Code:
ui_print("Flash something...");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Done!");
cschmitt said:
The problem would be that on Skyrocket the /system partition is mmcblk0p24 not mmcblk0p2.
Damn lucky you didn't brick when flashing this, because mmcblk0p2 in one of the secondary bootloaders!
Code:
run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/system");
package_extract_dir("system", "/system");
run_program("/sbin/unmount", "/dev/block/mmcblk0p2", "/system");
ui_print("Enjoy! ALL OF YOU WATER HAS BEEN EVAPORATED!!!!");
ui_print("Project Evaporation By Guitarboarder28");
Click to expand...
Click to collapse
oh boy lol that would have sucked. Thank you for the help
So this should work right?
when I try to flash it immediately fails
Guitarboarder28 said:
So this should work right?
when I try to flash it immediately fails
Click to expand...
Click to collapse
seccontacts.apk cant be a folder, you r trying to inject something into an apk, but your method is wrong, the apk should be already modded and added to the zip with the correct paths setup in the zip and the updater script.
just add the ogg file in the apk, add the apk in the zip into the system/app folder
so did you ever finish the zip?

Flashable zip not flashing correctly

I've searched and searched for this and can't find any related thread that has solved my problem. So please forgive me if I'm asking this question without having found the answer on my own.
I'm trying to create a flashable zip. The file is clearing-cache-v3.sh and I want it pushed to /system/etc/init.d/clearing-cache-v3.sh. I want to make the file executable after it's pushed to that directory. In the zip file I already have these two folders:
META-INF
system
Within that system folder I placed the file I'm pushing in this zip as /system/etc/init.d/clearing-cache-v3.sh. Below is the updater-script.
Code:
ui_print("");
ui_print("Clear DNS Cache");
show_progress(0.500000, 0);
ui_print("");
ui_print("*******************");
ui_print("*******************");
ui_print("Clearing DNS Cache");
ui_print("*******************");
ui_print("*******************");
run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/system");
package_extract_dir("system", "/system");
set_perm(0, 0, 06755, "/system/etc/init.d/clearing-cache-v3.sh");
run_program("/system/etc/init.d/clearing-cache-v3.sh");
run_program("/sbin/unmount", "/dev/block/mmcblk0p2", "/system");
ui_print("");
ui_print("All Done!");
show_progress(0.100000, 0);
The problem I'm having is that the file isn't being pushed to /system/etc/init.d. It's just not going there. When I flash this file it doesn't give me an error or anything either. It's just not pushing the file to where it belongs. What am I doing wrong?
You have the placing wrong. You gave meta-inf folder and system folder, inside that system folder in the zip should be /etc/init.d what you have by putting a system folder inside the other system folder is what's wrong.
Sent from my SM-G386T1 using Tapatalk
Blu8 said:
You have the placing wrong. You gave meta-inf folder and system folder, inside that system folder in the zip should be /etc/init.d what you have by putting a system folder inside the other system folder is what's wrong.
Click to expand...
Click to collapse
What do you mean? I have the meta-inf folder and system folder in the zip. Attached is the file that I've been having issues with. Can you expound on what you mean about what I did wrong.
Forget what I said before, the way you worded it confused me. It doesn't flash correctly because you forgot that you have to end the updater script with an empty line.
Sent from my SM-G386T1 using Tapatalk
Blu8 said:
Forget what I said before, the way you worded it confused me. It doesn't flash correctly because you forgot that you have to end the updater script with an empty line.
Sent from my SM-G386T1 using Tapatalk
Click to expand...
Click to collapse
I tried to add a blank line at the end of the updater script and then I saved it, recreated the zip, and flashed and it still made no difference. In fact, if I add a blank line at the end of the file, save it, then reopen the updater-script, that blank line is gone. Why is that?
Could be what you're using to make it. Try something else, but if it is getting rid of that blank line when you save it its not going to work.
Sent from my SM-G386T1 using Tapatalk
Blu8 said:
Could be what you're using to make it. Try something else, but if it is getting rid of that blank line when you save it its not going to work.
Sent from my SM-G386T1 using Tapatalk
Click to expand...
Click to collapse
I just used a different text editor to put the line at the end. This time when I flashed it it said "Error executing updater binary". Prior to this I wasn't getting any errors.
Sorry I really don't know what to tell you, maybe start from scratch?
Sent from my SM-G386T1 using Tapatalk
Blu8 said:
Sorry I really don't know what to tell you, maybe start from scratch?
Sent from my SM-G386T1 using Tapatalk
Click to expand...
Click to collapse
Figured it out. I took the updater-script from another zip file that I've flashed recently that I knew worked and modified that. Below is the final updater script that worked perfectly for me:
Code:
ui_print(" Flashing Google Services fix... ");
ui_print(" ");
show_progress(0.99, 30);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
package_extract_dir("system", "/system");
set_perm(0, 0, 0755, "/system/etc/init.d/FixGSv3.sh");
show_progress(1.0, 1);
unmount("/system");
ui_print("----------------------------------------------");
ui_print("| Done!!! |");
ui_print("----------------------------------------------");
ui_print(" ");

Categories

Resources