[Q] Update.zip basics - Android Q&A, Help & Troubleshooting

I have managed to create simple "update.zip" files. From what I understand, the text script "updater-script" uses commands found in a binary file, "update-binary". The way I understand it, if I use a command like "ui_print()" then this command is present inside that binary file. As I have copied this binary file off something else, I have no idea what is inside of it. Is there a way to either make this binary file, or obtain a "generic" binary file that has all its commands listed/documented?
Many thanks

In truth I couldn't tell you how to make it, I think few have. I would ask at the aroma thread being the created did.
But being its rather complicated I would suggest just pulling the latest one from a ROM on your device or use the one that comes with the latest gapps or aroma package.
If you want to know more about updater-script commands,edify, see here
http://forum.xda-developers.com/showthread.php?t=2290009
Sent from my Nexus 7 using XDA Premium 4 mobile app

demkantor said:
In truth I couldn't tell you how to make it, I think few have. I would ask at the aroma thread being the created did.
But being its rather complicated I would suggest just pulling the latest one from a ROM on your device or use the one that comes with the latest gapps or aroma package.
If you want to know more about updater-script commands,edify, see here
http://forum.xda-developers.com/showthread.php?t=2290009
Sent from my Nexus 7 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Thanks for all the pointers.

Related

Creating .zip files in Android command line

Hi guys,
Couldn't find the answer to this anywhere but I noticed in the newer releases of busybox there's no 'zip' command anymore. I'm running busybox 1.19 on my Incredible.
I have been using this command to create different bootanimation.zip files from my phone but am wondering if there is an alternative command I can use from within Android. I've tried tar -cvzf but I believe tar archives/compresses the files differently and renaming the extensions to .zip does not work.
Any ideas besides using an actual PC to do what I want to do?
Thanks,
Zebdor
Sent from my Incredible using XDA App
There are apps out there such as AndroZip, that essentially creates zip files.
If you are doing this for an app, there are built in zip classes in Java.
java.util.zip.*;
Edit: Just realized you asked for it to be command line. I will keep looking!
Yeah, I used to use 'zip -0r ...' to zip up a folder but for some reason the busyboxes I've tried downloading don't come with the zip command anymore...
I'm looking through the BusyBox source...
Does it have to be .zip? I mean there are plenty of others to choose from such as tar, gz, bz.
I can't find anything on the website why it is left out.
Best of luck
travmanx said:
I'm looking through the BusyBox source...
Does it have to be .zip? I mean there are plenty of others to choose from such as tar, gz, bz.
I can't find anything on the website why it is left out.
Best of luck
Click to expand...
Click to collapse
I was thinking of using tar and gz but every tutorial I've read says Android requires the bootanimation to be in .zip format uncompressed. I even tried tarballing it as bootanimation.tar but it didn't work...
did anyone ever find an answer to this?
im currently trying to find a portable binary for just zip (or something like busybox that includes zip) because im trying to automate creation of a cwm zip ON an android device during the installation of another cwm zip
iXNyNe said:
did anyone ever find an answer to this?
im currently trying to find a portable binary for just zip (or something like busybox that includes zip) because im trying to automate creation of a cwm zip ON an android device during the installation of another cwm zip
Click to expand...
Click to collapse
This seems to work fine: https://code.google.com/p/zip-for-android/people/[email protected]
I thought I was crazy...
I have surely been missing the zip command too... I just got done downloading and about to reboot into recovery to install...
Zarchiver is a free app in the market that i use to.make boot animation zips and any other kind of zip on my Android device.

[Q] What is the difference between flashing and installing an apk?

Sometimes.. you see apps on xda.. that are required to be flashed.. and are in the form of zip files. Now how are these different from apk files with their regular installation? is it something to do with giving these apps you flash a deeper level permission? if so.. if your rooted can't you just give those apps those permissions after a normal install?
Usually making them flashable is just easier for some and if you were to extract the .apk from the zip and install it from sdcard it would work the same. Sometimes the app may require extra libs that are flashed at the same time as the app so they are bundled together as a zip. Or possibly it is being flashed to system for whatever reason and can't be done this way installed through os.
There are lots of varying reasons why it may be a .zip but you could also install it probably any way you'd like (including pushing with adb) if you want to know what's in the .zip just extract its contents, if you want to know what happens when you flash it look at the updater-script
Sent from my Nexus 4 using xda premium
Thank you!
demkantor said:
Usually making them flashable is just easier for some and if you were to extract the .apk from the zip and install it from sdcard it would work the same. Sometimes the app may require extra libs that are flashed at the same time as the app so they are bundled together as a zip. Or possibly it is being flashed to system for whatever reason and can't be done this way installed through os.
There are lots of varying reasons why it may be a .zip but you could also install it probably any way you'd like (including pushing with adb) if you want to know what's in the .zip just extract its contents, if you want to know what happens when you flash it look at the updater-script
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Thank you..! I have one more question.. in some cases.. you are instructed to "copy apk's to system\app folder with a file manager with root permissions and then reboot" ... why this? does this produce the same effect as flashing it?
I guess it depends on the app, but it may only function properly as a system app, and yes it would be just as possible to flash it through recovery or push with adb to get the same effect
Sent from my Nexus 4 using xda premium
Thank you again!
demkantor said:
I guess it depends on the app, but it may only function properly as a system app, and yes it would be just as possible to flash it through recovery or push with adb to get the same effect
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
hey, thanx alot!
rjspark89 said:
hey, thanx alot!
Click to expand...
Click to collapse
And if it's an system app, or framework it's better to flash via Recovery
thanks!
superdragonpt said:
And if it's an system app, or framework it's better to flash via Recovery
Click to expand...
Click to collapse
thanks this is valuable info for a newbie..! any more imp tips related to my question is should know?
rjspark89 said:
thanks this is valuable info for a newbie..! any more imp tips related to my question is should know?
Click to expand...
Click to collapse
Yes
DON'T let you battery go all the way down.
This way it will lst longer (no Joke)

[Q] Superuser update

Simple question...
I'm developing a custom ROM and I got the idea to update the SuperUser apk and the binaries so I've downloaded the .zip and got the su binary and the app, but it has other files...
Should I replace all the files that has in that .zip to my custom ROM?
Thanks in advance and happy new year!
Read the update-script and do as it says...
Sent from my Nexus 4 using Tapatalk
SMillerNL said:
Read the update-script and do as it says...
Sent from my Nexus 4 using Tapatalk
Click to expand...
Click to collapse
Thank you for replying, but how I can do the permissions and the symlink part?
Happy new year!
If you're doing it in dsixda's kitchen then it will do it for you, otherwise you have to do it in your own update-script
XxPixX said:
If you're doing it in dsixda's kitchen then it will do it for you, otherwise you have to do it in your own update-script
Click to expand...
Click to collapse
Is there a way to do without it?
Trying to not using Kitchen at all.
manudo said:
Is there a way to do without it?
Trying to not using Kitchen at all.
Click to expand...
Click to collapse
To add the set permissions part and symlinks park you can use the following commands in your updater-script (These references here and here will also be helpful):
To set permissions:
Code:
set_perm(uid, gid, mode, "filepath1", "filepath2");
Example:
Code:
set_perm(0, 0, 06755, "/system/xbin/su");
To set symlinks:
Code:
symlink("filepath", "filepathyouwanttolinkto");
Example:
Code:
symlink("/system/xbin/su", "/system/bin/su");
Let me know if you still have questions I'll be happy to answer them.
shimp208 said:
To add the set permissions part and symlinks park you can use the following commands in your updater-script (These references here and here will also be helpful):
To set permissions:
Code:
set_perm(uid, gid, mode, "filepath1", "filepath2");
Example:
Code:
set_perm(0, 0, 06755, "/system/xbin/su");
To set symlinks:
Code:
symlink("filepath", "filepathyouwanttolinkto");
Example:
Code:
symlink("/system/xbin/su", "/system/bin/su");
Let me know if you still have questions I'll be happy to answer them.
Click to expand...
Click to collapse
Thanks, that commands I have to enter them in Linux Terminal?
manudo said:
Thanks, that commands I have to enter them in Linux Terminal?
Click to expand...
Click to collapse
These are the commands that you add to the updater-script file found in your custom ROM's flashable .zip file. The commands are not entered in terminal. If you need me to explain this further just let me know.
shimp208 said:
These are the commands that you add to the updater-script file found in your custom ROM's flashable .zip file. The commands are not entered in terminal. If you need me to explain this further just let me know.
Click to expand...
Click to collapse
Ok, so, let me get this straight...
When I download a update package it comes with an updater script with few commands written in it.
All I have to do is copy and paste every command to the updater-script file in my custom ROM folder, for any change I make to the ROM.
manudo said:
Ok, so, let me get this straight...
When I download a update package it comes with an updater script with few commands written in it.
All I have to do is copy and paste every command to the updater-script file in my custom ROM folder, for any change I make to the ROM.
Click to expand...
Click to collapse
This is correct, plus any resources included in the .zip package. It's essential that you preserve the directory structure of the .zip package in your custom ROM .zip package in order for the updater-script to execute properly. For example if the updater package .zip includes a /system folder your custom ROM .zip package must include the /system folder with the resources from the updater .zip package as well as whatever resources your custom ROM needs. Let me know if you need me to clarify or explain this further.
shimp208 said:
This is correct, plus any resources included in the .zip package. It's essential that you preserve the directory structure of the .zip package in your custom ROM .zip package in order for the updater-script to execute properly. For example if the updater package .zip includes a /system folder your custom ROM .zip package must include the /system folder with the resources from the updater .zip package as well as whatever resources your custom ROM needs. Let me know if you need me to clarify or explain this further.
Click to expand...
Click to collapse
Yeah, I have to place the other files in the directory as the update zip is, example:
update.zip/system/app/
rom/system/app
manudo said:
Yeah, I have to place the other files in the directory as the update zip is, example:
update.zip/system/app/
rom/system/app
Click to expand...
Click to collapse
That is correct, you got it! To answer the question in your signature I would stay away from using a name like Splenda while it is a clever idea, but it's best to avoid trademarks when branding your custom ROM.
shimp208 said:
That is correct, you got it! To answer the question in your signature I would stay away from using a name like Splenda while it is a clever idea, but it's best to avoid trademarks when branding your custom ROM.
Click to expand...
Click to collapse
Thank you for your help and your opinion, I'll build it tomorrow.
Are you kidding me? I can have issues with trademarks if I name a custom ROM like that?
Ha, the worst case scenario is that I'm in a court because of naming Splenda a custom ROM. Doesn't seem possible.
manudo said:
Thank you for your help and your opinion, I'll build it tomorrow.
Are you kidding me? I can have issues with trademarks if I name a custom ROM like that?
Ha, the worst case scenario is that I'm in a court because of naming Splenda a custom ROM. Doesn't seem possible.
Click to expand...
Click to collapse
While I doubt the Splenda company would personally come hunting through the XDA forums to come after you it's still proper practice to not use trademarked names or copyright trademarks in your projects. Besides you never know what kind of popularity and exposure your ROM may get. Looking at your modified signature if you named your ROM "Splenda ROM" that would be questionable. However if you named it Jelly Bean sweetened with Splenda then I believe that falls under fair use context (Full disclosure: I am not a lawyer and as such any opinion of mine that reflects legal matters should not be taken a official legal advice).
shimp208 said:
While I doubt the Splenda company would personally come hunting through the XDA forums to come after you it's still proper practice to not use trademarked names or copyright trademarks in your projects. Besides you never know what kind of popularity and exposure your ROM may get. Looking at your modified signature if you named your ROM "Splenda ROM" that would be questionable. However if you named it Jelly Bean sweetened with Splenda then I believe that falls under fair use context (Full disclosure: I am not a lawyer and as such any opinion of mine that reflects legal matters should not be taken a official legal advice).
Click to expand...
Click to collapse
Splenda ROM sounds great, but it's basically the same thing.
Chill dude, I'm not taking your advice.
Gotta email Splenda company, I hope they don't take it as a joke.
Sent from my XT1034 using XDA Premium 4 mobile app
SU Binary
I am using ODIN Rom and when I run SuperSU I get msg " The SU Binary needs to be updated. Continue?" I do so and get..
a question to use "Normal" or TWRP/CWM. I am using PHILZ. It says the SuperSU will attempt to reboot your device into TWRP or CWM. and it does nothing. So I then restart and select normal, it tell me the install failed ande reboot and try again.
Nothing seems to work, what am i missing?
Israel
Download the latest SuperUser.zip and flash it trough recovery by yourself.
http://download.chainfire.eu/372/SuperSU/UPDATE-SuperSU-v1.86.zip
Gesendet von meinem GT-N8010 mit Tapatalk 2

[Tutorial] How to mod files for Safestrap Alpha

I was just gonna make this little tutorial to take some work off of The actual Dev for the Project(Beastmode) thanks again for your work brother
In his newest alpha release of safe strap we're able to replace the stock rom slot with a 4.3 Touchwiz ROM, I have seen people report that they have flashed certain roms without having to do any modification, but this is a safety precaution.
First you will need your rom of choice, in this tutorial I'm using N3BULA.
Download the rom and extract the contents to a folder on your pc or phone, PC is much easier, but you can edit on your phone as well
The files you need to edit are under META-INF/COM/GOOGLE/ANDROID that's actually the only files
Im using his modified files from the dev thread for comparison.
First we'll open the Aroma-Config
http://forum.xda-developers.com/attachment.php?attachmentid=2650078&stc=1&d=1395786107
Pardon the crude screen shot method but this will show you the changes and where they are.
Modified is on the left and Stock that came with the rom is on the right. Make the Changes and save
Next is Updater-Script
Same crude method of screen shot
http://forum.xda-developers.com/attachment.php?attachmentid=2650086&stc=1&d=1395786357
you can see where the two differ, so just edit that out as well.
Left is modified, Right is stock
Save Changes
Edit 3/26 you can also delete boot.img in zip
Make sure these files are on external sd card as well as the rom, boot into recovery, always make a nandroid backup, wipe and flash.\
This is the first time I have made a tutorial, so if its rough around the edges please excuse my forum newbness
if I missed anything definitely feel free to add, and once again A HUGE THANK YOU BEASTMODE.
Hopefully in a few hours or days these edits wont be needed.
how do we go about putting them into the rom zip file?
You edit them in the rom zip file... extract the rom and it moves as a zip, my case was it downloaded to storage sdcard (internal). I extracted it to ext sdcard and then went in and edited it. It still remains a zip
Sent from my SCH-I605 using Tapatalk
Easy way is to use 7 zip. Extract the ROM and make the changes. Now right click on original ROM and select open archive. From there u can place the modded files. Now the ROM.zip is still flashable.
Sent from my LG-VS980 using xda app-developers app
of course as soon as i posted it, i figured it out, unfortunately i can't get alliance to work afterwards, it installs but doesn't boot
I'm using alliance atm on safestrap. Don't mod anything. Just choose the stock kernel when you get to that point in the installer.
So glad to see you post that.!!! Been talking to a guy about it for about 2 hrs about it now, I actually told him it should work as long as agni wasn't chosen, thanks for clarification
Sent from my SCH-I605 using Tapatalk
I tried and unedited version of alliance and it tripped Knox and I had to odin anyone got an edited version with out kernel that they know works
Sent from my SCH-I605 using Tapatalk
In my nebula zip I have a file on the root called boot.img should I delete this file as well?
Sent from my SCH-I605 using Tapatalk
It wouldn't hurt. The script edits disregard it but just to be safe you can
Sent from my SCH-I605 using Tapatalk
I don't get it I edited the zips and then when i try to flash in recovery it just says failed? it doesn't give me a specific reason. This is for n3bula rom. But i extracted using winrar, deleted boot.img, changed the aroma config and updated zip using wordpad, zipped the rom and it doesn't seem to work. is there something i'm doing wrong?
HerroMoto said:
I don't get it I edited the zips and then when i try to flash in recovery it just says failed? it doesn't give me a specific reason. This is for n3bula rom. But i extracted using winrar, deleted boot.img, changed the aroma config and updated zip using wordpad, zipped the rom and it doesn't seem to work. is there something i'm doing wrong?
Click to expand...
Click to collapse
After you deleted the boot.img there is no point in editing the rest. I used 7zip to unzip and rezip and have not had any problems yet. Winrar might be causing problems for all i know as i never use it. I'm not around my pc for the most part atm but i haven't had any problems flashing 4 or 5 roms with just deleting the boot.img.
roflcoptersoisoi said:
After you deleted the boot.img there is no point in editing the rest. I used 7zip to unzip and rezip and have not had any problems yet. Winrar might be causing problems for all i know as i never use it. I'm not around my pc for the most part atm but i haven't had any problems flashing 4 or 5 roms with just deleting the boot.img.
Click to expand...
Click to collapse
I ended up fixing it. I tried doing it through winrar and from root explorer on my phone. The way I got it to work was actually downloading the aroma-config file and uodater-script file from the development thread that beast mode provided and changed those. He happened to use nebula as well so everything is working great
Sent from my SCH-I605 using Tapatalk
Ive tried n3bula alliance and jediwiz(?) And all have worked out for me need some time to work SS!! Lol
Sent from my SCH-I605 using Tapatalk
So I have to delete stuff in the updater script and the boot.img correct? I opened the updater script in notepad and it looked nothing like that..
trying to install Jett rom and im not sure what will happen when I delete that kernel line..
already deleted boot.img
Just delete the boot.img nothing else
Sent from my SCH-I605 using Tapatalk
hggadm3 said:
Just delete the boot.img nothing else
Sent from my SCH-I605 using Tapatalk
Click to expand...
Click to collapse
Excellent. Thank you!!!
Sorry for the dumb question but what do I do if the rom of choice isn't showing up on the root of my extSD?
EDIT:
Nevermind, to anyone who saw my last post(s), I'm an idiot .
Ran through Odin, re-rooted, re-installed Safestrap, now installing N3bula Rom.
Hope all goes well. And sorry for any inconvenience!
Hope my donation helped out some Beastmode!

help!!!

i have made rom for my s duos using xda kitchenn but i get status 1 error when i flash the rom
i have searched a lot but i can't find satisfied answer
can any one help me solve this error?
i'm using this guide
http://forum.xda-developers.com/showthread.php?t=1801690
Vaibhav Chauhan said:
i have made rom for my s duos using xda kitchenn but i get status 1 error when i flash the rom
i have searched a lot but i can't find satisfied answer
can any one help me solve this error?
i'm using this guide
http://forum.xda-developers.com/showthread.php?t=1801690
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2230733
Status 1 Error:
"Well this is one of the most rarest error that a person can get...but with my experience I came to know that this occurs because you don't have correct permissions set. Use correct perms in updater-script and done "
Grab another rom that is the same base you are using and look at the META-INF/com/google/android folder which contains the updater script and binary to use as your reference points. Compare and contrast yours with that one.
es0tericcha0s said:
http://forum.xda-developers.com/showthread.php?t=2230733
Status 1 Error:
"Well this is one of the most rarest error that a person can get...but with my experience I came to know that this occurs because you don't have correct permissions set. Use correct perms in updater-script and done "
Grab another rom that is the same base you are using and look at the META-INF/com/google/android folder which contains the updater script and binary to use as your reference points. Compare and contrast yours with that one.
Click to expand...
Click to collapse
can i use another rom's updater script in my rom which has same base??
Should be able to. Wouldn't hurt to look at the differences though so then you can understand what things affect the install to help build knowledge.
es0tericcha0s said:
Should be able to. Wouldn't hurt to look at the differences though so then you can understand what things affect the install to help build knowledge.
Click to expand...
Click to collapse
i tried to replace updater script but not working
i also have tried to compare set perms but i am unable to find fault in it
@es0tericcha0s
please tell me what to do??
Sorry, that was my main idea. Are you getting the same error code? Did you unzip and re-zip the rom? If so, you should use an archive manager like 7zip to move the update script into the zip without needing to unzip the whole thing, otherwise you'll break the signature on the rom and have to re-sign it.
es0tericcha0s said:
Sorry, that was my main idea. Are you getting the same error code? Did you unzip and re-zip the rom? If so, you should use an archive manager like 7zip to move the update script into the zip without needing to unzip the whole thing, otherwise you'll break the signature on the rom and have to re-sign it.
Click to expand...
Click to collapse
actually i am using android kitchen to make the rom
and when i use the cosmic rom's updater script in it the status 1 error was solved
but it stuck on boot animation
@es0tericcha0s
my stuck on bootloops can you tell me how to logcat?
Vaibhav Chauhan said:
@es0tericcha0s
my stuck on bootloops can you tell me how to logcat?
Click to expand...
Click to collapse
Not all phones have adb access while in a bootloop. But to do so you would need adb set up on your computer, change directories to the adb folder (or if it's enabled globally, then where ever), and type:
adb logcat
You'll want to save it somewhere like:
http://pastebin.com/
and upload the link.
I am not skilled at reading logcats, so not sure if I can be of any more help after that.
If you don't have adb set up already, then just use this one: http://forum.xda-developers.com/showthread.php?t=2317790

Categories

Resources