[Q] Modify "updater-script" - Sprint Samsung Galaxy S III

Does anyone know how to modify the "updater-script" that is within the following file path: cm-10-20120818-NIGHTLY-d2spr.zip\META-INF\com\google\android
I just want to modify one line within the updater-zip. I tried using notepad plus by copying the "updater-zip", modifying the line I wanted to and then copying and pasting back into the CM-10 update zip (in the above mentioned file path), but I get errors. I think its an issue with file "signing" or the fact the original update-script is packed "compressed", and when I edit it, it compress's the file.
The reason I am doing this is I want to be able to dual boot my stock rom and the C10 nightlies. The current procdure allows for CM9 only but in the link below a developer found a work around where he calls for updating the script - he does not explain how to do so (I am new to to this). See link below to see what I mean:
http://forum.xda-developers.com/showpost.php?p=28906564&postcount=49
Is there an easy fix for this? Can this be done on the phone. I want to avoid having to deal with "apk signing" etc. Thanks!

i imagine ur errors are when you install?
Try mine https://dl.dropbox.com/s/6gzr055iyb1v6hp/updater-script?dl=1 you probly just got a typo somewhere. Make sure u delete .txt from my attachment as it will probly be added when you DL it. Same goes for the one ur editing. Notepad adds .txt. make sure ur deleting the extension. Mine worked perfect so if it doesn't post the error u get in recovery.
and this can be done on the phone I use root explorer but u have to unzip, edit then rezip the entire cm10 file. Easier to hit the PC and use 7zip or even windows explorer.

billard412 said:
Try mine https://dl.dropbox.com/s/6gzr055iyb1v6hp/updater-script?dl=1 you probly just got a typo somewhere. Make sure u delete .txt from my attachment as it will probly be added when you DL it. Same goes for the one ur editing. Notepad adds .txt. make sure ur deleting the extension. Mine worked perfect so if it doesn't post the error u get in recovery.
and this can be done on the phone I use root explorer but u have to unzip, edit then rezip the entire cm10 file. Easier to hit the PC and use 7zip or even windows explorer.
Click to expand...
Click to collapse
This worked perfectly Billiard. I can now dual boot CM 10 and also revert back to my normal TW rom with a simple reboot. Thanks again !

Related

Request: change lockscreen

i love the modaco custom rom but would like to add the lockscreen from drizzys custom rom. (or any plain android looking lockscreen)
is there a way to extract the files i need and simply replacing them in the MRC? i guess its just an html file or something like that to replace, right?
I guess this is the HTCLockScreen.apk and .odex but since it's a system app, it cannot be installed or unistalled, and overwirting the apk in the system/app folder doesn't do anything.
If someone knows how to do it I will be very interested too.
im not sure if it will work but you can download my rom go to
system/framework
grab com.htc.resource.apk
now adb push com.htc.framework.apk /system/framework/
then reboot!
steps:
adb remount
adb push com.htc.framework.apk /system/framework/
adb shell
reboot
then if your phone loops then it didnt work, but if you go straight to you home screen then it should be fine!
good luck
"im not responsible for any wipes that you will have to do if you phone loops"
piflechien said:
I guess this is the HTCLockScreen.apk and .odex but since it's a system app, it cannot be installed or unistalled, and overwirting the apk in the system/app folder doesn't do anything.
If someone knows how to do it I will be very interested too.
Click to expand...
Click to collapse
its not in the lockscreen!
its in the framework!
Or you could do what I did, pull com.htc.resources.apk from the phone, extract it with 7zip edit the .png files in res/drawable-land-480x320/ and res/drawable-port-480x320/ then zipped it and built the apk using apkbuilder.
Then push it to the phone, as usual make backups.
soulehmoo said:
Or you could do what I did, pull com.htc.resources.apk from the phone, extract it with 7zip edit the .png files in res/drawable-land-480x320/ and res/drawable-port-480x320/ then zipped it and built the apk using apkbuilder.
Then push it to the phone, as usual make backups.
Click to expand...
Click to collapse
Thank you very much.
It works perfectly.
BR. Simemu
Thx it worked perfectly
I just pushed com.htc.resources.apk into the /system/framework folder.
Now is it also possible to change the notification bar with a similar method ?
I love the one from your Rom Drizzy Drake Rogers.
They are in framework-res.apk
A few jpg and png named status* in res/drawable-480x320/
Same method should apply.
As usual, would be smart to back up.
Edit: When I get some time off I may have a day messing with these files see about some different coloured UI's etc.
for me this does not work
what ive done is:
1. get the com.htc.resources.apk
2. extract it with rar
3. changed the mentioned png files
4. then i put them back into the archive (apk file, renamed as a zip file)
5. renamed the zip back to its original name
6. put the file as mentioned to the correct folder
there is no change.. is it a MUST to use apk builder, if yes, how to use that bat?
felikz said:
for me this does not work
what ive done is:
1. get the com.htc.resources.apk
2. extract it with rar
3. changed the mentioned png files
4. then i put them back into the archive (apk file, renamed as a zip file)
5. renamed the zip back to its original name
6. put the file as mentioned to the correct folder
there is no change.. is it a MUST to use apk builder, if yes, how to use that bat?
Click to expand...
Click to collapse
reboot and see if that works!
yes i did that, its not the case..
did you guys do it my way, or did you use adk builder?
Yeah use apk builder. Should work.
Edit: you sure its named right and in the right place?? It should have overwritten your old one.
and how to use apk builder??
okay, i signed the new apk with this http://www.anddev.org/signing_your_apk-application_for_release_keytooljarsigner-t3069.html
but that didnt work (the sign process worked, but then the hero looped)..
can anyone please tell how to sign the apk with apkbuilder??
Did you sign the .apk or the .png ????
Sorry...but i didn´t got a solution...i´m standing in front of the same problem like you
easier method here
http://forum.xda-developers.com/showthread.php?t=536271
no need to bother with apk builder with this method.
boomshaker said:
Did you sign the .apk or the .png ????
Sorry...but i didn´t got a solution...i´m standing in front of the same problem like you
Click to expand...
Click to collapse
signed the apk
soulehmoo said:
easier method here
http://forum.xda-developers.com/showthread.php?t=536271
no need to bother with apk builder with this method.
Click to expand...
Click to collapse
also this does not work for me --> phone loop
any idea, what i could do wrong? i am using windows paint (windows 7) to edit the files.. then i put the edited png files back into archive (thus, overwrite the files there) and push that apk file again back to its path.. after phone reboot the phone goes into endless loop
soulehmoo said:
Or you could do what I did, pull com.htc.resources.apk from the phone, extract it with 7zip edit the .png files in res/drawable-land-480x320/ and res/drawable-port-480x320/ then zipped it and built the apk using apkbuilder.
Then push it to the phone, as usual make backups.
Click to expand...
Click to collapse
I want to change my lockscreen, it all seems to make sense apart from editing the .png files..
What am I supposed to be changing in the files? Maybe I missed something, but that doesn't seem to have been explained
pookie1 said:
I want to change my lockscreen, it all seems to make sense apart from editing the .png files..
What am I supposed to be changing in the files? Maybe I missed something, but that doesn't seem to have been explained
Click to expand...
Click to collapse
tha background image of your lockscreen can be changed easily in the phone settings, but if you wanna change the other parts of the lockscreen, then you need to do it like told here ;-)
felikz said:
also this does not work for me --> phone loop
any idea, what i could do wrong? i am using windows paint (windows 7) to edit the files.. then i put the edited png files back into archive (thus, overwrite the files there) and push that apk file again back to its path.. after phone reboot the phone goes into endless loop
Click to expand...
Click to collapse
common guys, just a feedback!

Merging Flashable ZIPs

Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
PSULightingGuy said:
Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
Click to expand...
Click to collapse
i think you need to edit the meta file and the xml file, but this can be done though.
PSULightingGuy said:
Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
Click to expand...
Click to collapse
what is the full name of the .xml file you see?
the recovery reads a file called update-script or updater-script inside the zip file META-INF/com/google/android/ directory. you memorize that directory path after messing with enough zip files!
that file tells the recovery what actions to take with which files. for list of very basic commands for this update-script file, i have a guide - http://forum.sdx-developers.com/android-2-1/creating-an-update-zip-list-of-commands/
it is possible to merge update.zip files but its important to understand their structure and how the commands are executed.
also signing .zip files is a whole different topic...
hopefully this helps get you going in the correct direction!
joeykrim said:
what is the full name of the .xml file you see?
the recovery reads a file called update-script or updater-script inside the zip file META-INF/com/google/android/ directory. you memorize that directory path after messing with enough zip files!
that file tells the recovery what actions to take with which files. for list of very basic commands for this update-script file, i have a guide - http://forum.sdx-developers.com/android-2-1/creating-an-update-zip-list-of-commands/
Click to expand...
Click to collapse
Since all the files have this could you copy and paste the codes inside them into one file?
Sent from my PC36100 using XDA App
chandlerw88 said:
Since all the files have this could you copy and paste the codes inside them into one file?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
You would want to read up a little bit and make sure you understand the commands, but yes. You do not want to copy the entire set of commands, just the particular needed lines. Often you don't need to change anything because the script may just say copy this entire system directory and everything in it will go.
Sent from my PC36100 using XDA App
It's pretty basic.
Move all the files into the same zip delete everything in meta-inf except the update script.
Adjust the script accordingly, pay attention to syntax or better yet just look at all the individual scripts and put them together, then remove dupes
As for zip signing..
This is what you need
http://forum.xda-developers.com/showthread.php?t=666441
OK, thanks! This has all helped a lot and I think I nailed the basics that I was shooting for, just haven't been able to test yet since no need to re-flash a working ROM.
My next question is, would there be a way to force files INSIDE an APK? Trying to add a different battery meter (have the images) to framework-res.apk and would love to do that from a boot script... Ideas?
PSULightingGuy said:
OK, thanks! This has all helped a lot and I think I nailed the basics that I was shooting for, just haven't been able to test yet since no need to re-flash a working ROM.
My next question is, would there be a way to force files INSIDE an APK? Trying to add a different battery meter (have the images) to framework-res.apk and would love to do that from a boot script... Ideas?
Click to expand...
Click to collapse
yes, its called 7-zip and its your new best friend in this battle. heres how i learned.
i started ripping apart the things that i liked, including roms themselves. now find an update zip that has the files inside the folders that you will need to add, and you can then recycle that update zip. here it is plain and simple:
1.use 7zip to VIEW; NEVER UNZIP the files(forget about windows zips)
2.check what folder the apps you will be putting in belong in
3.put them in their corresponding folders(some apps are tricky when you need to install their libs too and you dont know it)
4.erase the 3 bottom files in your meta-inf folder
5.resign the rom
6.verify the sign(look for the new certs)
7.move to sd
8.flash rom
9.have a pop,beer, or w/e your vice.(my fave is cherry coke)
if you need help getting started feel free to pm. you dont know who i am, but ive been thru this process many times.
​
Actually, that's not quite what I'm talking about... I want a flashable zip that will add certain images (the battery meter) to the INSIDE of a .apk file that already exists on the device. Not sure if it's possible, but if so, I'd love to know... If not, I'll try pulling the .apk and using 7-zip...

Unzipping and zipping apk files?

I unzipped a apk file to change some of the images in the drawable-hdpi folder, how do I zip it back into an apk file to reinstall it on my phone. Or can I flash the zip file? I dunno how that would work...
Sent from my HTC Vision using XDA App
Can you get another copy of the apk?
If you can then the best thing to do is use winRAR or 7zip to open/explore the apk just like with a .zip file. That way you never unzip it and don't run into that issue. Using those allows you to delete and add files. You can also do the same thing on your phone using root explorer or something similar.
As far as correcting what you've done already (assuming you can't get a copy of that apk) I've completely forgotten since I never have to do it. I know if you look on the android sdk's site you can find the answer though.
adamtheindien said:
I unzipped a apk file to change some of the images in the drawable-hdpi folder, how do I zip it back into an apk file to reinstall it on my phone. Or can I flash the zip file? I dunno how that would work...
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
An apk is just a zip file with the apk extension, once you zip it up change it from a .zip to a .apk
Sent from my T-Mobile G2 using XDA App
i changed what i wanted and rezipped, changed the extension, tried to install it, says problem parsing the package?
adamtheindien said:
i changed what i wanted and rezipped, changed the extension, tried to install it, says problem parsing the package?
Click to expand...
Click to collapse
It can also depend on which APK (system vs non-system) and which images (.9 images can be tricky to replace if you don't know what you are doing). Sometimes, you also need to re-sign the APK, depending on what you modified (there are tools to re-sign in the SDK or you can use something like APK Manager).
You should try the opening the APK directly in WinRAR/7-zip and replacing the images method. In my experience, if you are just replacing simple images, you usually don't have to re-sign when doing this (it leaves the existing signature intact).
ok i mainly just replaced images and and edited a couple. i dont know how to use all that adbsdkwhatever stuff.... -_- i know i should but im too lazy. so i dunno how to re sign it...
all im trying to do is edit the quick search bar images. maybe i dont have to do this if there is somewhere to find themed search bars?
If you can then the best thing to do is use winRAR or 7zip to open/explore the apk just like with a .zip file.
Click to expand...
Click to collapse
If your using winRAR click and drag stuff works if its one or two files.
If its a lot of images or a large file like framework-res.apk (I'm thinking your search bar might be in there if I'm not mistaken) then you'll want to make a new ZIP archive with "store" compression (uncompressed pretty much).
(also you shouldn't need to resign the framework-res.apk)
I haven't tested 7zips click and drag but the same principals apply. If its bigger files being recompiled Winrar tends to compress it a bit and sometimes it causes bootloops.
That being said, don't forget to nandroid
82_Z28 said:
If your using winRAR click and drag stuff works if its one or two files.
If its a lot of images or a large file like framework-res.apk (I'm thinking your search bar might be in there if I'm not mistaken) then you'll want to make a new ZIP archive with "store" compression (uncompressed pretty much).
(also you shouldn't need to resign the framework-res.apk)
I haven't tested 7zips click and drag but the same principals apply. If its bigger files being recompiled Winrar tends to compress it a bit and sometimes it causes bootloops.
That being said, don't forget to nandroid
Click to expand...
Click to collapse
Well from my experience, 7zip handles the task like a champ. I've taken every image out and put others back in with no issues. The downside is that some apps set certain dependencies in the .xml files so if you delete the wrong things it won't install and if it does, all you get is a fc all day. In that case it helps to know how to convert the xml binary to something readable (unless you're a king a hex editing).

save as apk?

hi not sure if this is the right place for this or not but i've got a question on apk files
I've made some changes to an apk file but not sure how to compress it back to an apk file.
is it as simple as compressing as a zip then renaming it to apk?
take care
denti said:
hi not sure if this is the right place for this or not but i've got a question on apk files
I've made some changes to an apk file but not sure how to compress it back to an apk file.
is it as simple as compressing as a zip then renaming it to apk?
take care
Click to expand...
Click to collapse
Use 7zip (7z.exe to be exact)
Copy it to a folder make a subfolder inside,
Put ur apk contents in subfolder
Open notepad, copy and paste these 3 lines
Save as script.bat in folder with 7z.exe
cd subfoldername
..\7z.exe -tzip archivename.apk "*" -mx0
Exit
Change subfoldername to name of subfolder to the name of subfolder u created ofc lmao
And archive name to sign.. mx0 is best for loadin, mx9 is compression, use signapk to sign if its not a system file
If the "..\7z" don't wotk 4 u use full path in quotes, example
"%userprofile%\desktop\foldername"
Is the same as: (vista)
"C:\users\username\desktop\foldername"
And: (xp)
C:\documents and settings\username\desktop\foldername"
Or use apk manager lol I prefermymethod personally, n fyi, googles ur friend
Should get to know it
thank you doug.
i did google it but found bunch of different programs and thought that there might be a simpler way of doing it rather than getting a program just to compress
denti said:
thank you doug.
i did google it but found bunch of different programs and thought that there might be a simpler way of doing it rather than getting a program just to compress
Click to expand...
Click to collapse
Ye no worries just hope it helped sorry if the post seemed rushed had like 5min left 2 my break when I origionally replyed lmao n this methods rather simple cuz when used correct its more or less drag n drop n run, zip is generated in folder with 7z.exe n 7z performs flawlessly
APKs are basically a zip file with an MD5 signature embedded in them. There are apk generators on market if you copy directory to sdcard is prolly easiest to start with specially with the processing power of this phone.
In Windows compressed folders work fine if you just enable viewing file extensions and change between zip and apk
or hold left shift key as you right click apk file in windows.
Now click open with...
and choose browse for application
Choose your favorite zip app or windows compressed folders
Next to last check always use box so checkmark is visible
Finally click OK
Now no need to modify extensions
Sent from my SGH-T989 using Xparent Green Tapatalk

7-zip cant modify files

I am looking to modify my phone.apk to change the color of a few buttons and the android guy that shows up when in a call. I have done this in the past and it seemed like then it was as simple as deleting the files in 7-zip and replacing with the file I wanted. Am I missing something or is it not that simple. Every time I try to move a file or delete it its says "not Implimented" or un supported compression method. I know how to push and pull files through adb so if I could just get the .png images where I want them then I would be all set. I have looked everywhere but cant seem to come up with a solution.
Thanks Jason
PS. the files are from another rom I am simply trying to use them in my current rom so the .png file should not be corrupt or broken.
You can't edit apk's with any zip extractors
Sent from my Incredible using xda premium
Albinoman said:
You can't edit apk's with any zip extractors
Sent from my Incredible using xda premium
Click to expand...
Click to collapse
Not true, regular image files can (should) be able to be draged out, edited, and droped back in an apk using 7-zip.
nighthawklude99 said:
I am looking to modify my phone.apk to change the color of a few buttons and the android guy that shows up when in a call. I have done this in the past and it seemed like then it was as simple as deleting the files in 7-zip and replacing with the file I wanted. Am I missing something or is it not that simple. Every time I try to move a file or delete it its says "not Implimented" or un supported compression method. I know how to push and pull files through adb so if I could just get the .png images where I want them then I would be all set. I have looked everywhere but cant seem to come up with a solution.
Thanks Jason
PS. the files are from another rom I am simply trying to use them in my current rom so the .png file should not be corrupt or broken.
Click to expand...
Click to collapse
My guess would be that the apk was decompiled at some point before, but not recompiled right, or with the right program. Which phone.apk are you having issues with, the one on your phone or the one your pulling the pngs from?
I am having problems with the phone.apk I pull from my phone with adb, with the phone.apk that is in the original rom, and the phone.apk that is in a nanadroid back up. The rom I am running is anthem 3.3. I am starting to think that there is a problem with 7-zip on my computer. Is there a setting I need to change? I have even ran 7-zip as administrator to see if that helped.
nighthawklude99 said:
I am having problems with the phone.apk I pull from my phone with adb, with the phone.apk that is in the original rom, and the phone.apk that is in a nanadroid back up. The rom I am running is anthem 3.3. I am starting to think that there is a problem with 7-zip on my computer. Is there a setting I need to change? I have even ran 7-zip as administrator to see if that helped.
Click to expand...
Click to collapse
Sounds like your install of 7z may be messed up. I just tried it to make sure something didnt change in an update and it works fine for me still with default configuration.

Categories

Resources