Quick Question - Hero CDMA Q&A, Help & Troubleshooting

Can you zip back up a file into a .apk? or do i have to edit with in the .apk through 7zip?

I dont understand...There are no .zip's in any .apks

Sorry bad wording.. How do I turn the .apk file I unzipped to make it show me the files.. back into a .apk file. so I can put it back into my theme. lol Its soooo hard to word

try taking a look here?
http://forum.xda-developers.com/showthread.php?t=657759&highlight=avabox

just rename the file to xxxxxxxx.apk

troyboytn said:
just rename the file to xxxxxxxx.apk
Click to expand...
Click to collapse
Do you sign it first? or rename and sign the apk?

Did the apk disappear? If not, right click it, navigate in the pop-up menu to 7zip->open, drag the stuff you edited into its appropriate spot, close the 7zip window, and you're done! I like to resign at this point, some people say that it is not necessary. For me, it is a simple right-click to do, so I just always do it. YMMV.

You dont need too. When you modify files in the .apk all you need to do is drag the /res folder to your working folder. When you're done, drag it back. Thats it.

So, is it only necessary to sign update.zips? What is the criteria for when something must be resigned?

VinceOB said:
You dont need too. When you modify files in the .apk all you need to do is drag the /res folder to your working folder. When you're done, drag it back. Thats it.
Click to expand...
Click to collapse
Yeah but like, I unzip the apk is what im saying lol. Because if you dont unzip it you cant see the images.. then I dont know what im editing. So once im done I want to be able to turn the files back into a apk

MyDroidHax said:
Yeah but like, I unzip the apk is what im saying lol. Because if you dont unzip it you cant see the images.. then I dont know what im editing. So once im done I want to be able to turn the files back into a apk
Click to expand...
Click to collapse
All you have to do is unzip them, edit the files you want; in another window open the original apk file (one you extracted to work on) use 7zip - open archive, then drag the files you changed into the archive in the appropriate folders in the archive, close and you are done. I just push them back to the phone via adb, not sure if you would have to resign the zip, if you pulled the apk file out of a flashable zip file.

Heaterz16 said:
All you have to do is unzip them, edit the files you want; in another window open the original apk file (one you extracted to work on) use 7zip - open archive, then drag the files you changed into the archive in the appropriate folders in the archive, close and you are done. I just push them back to the phone via adb, not sure if you would have to resign the zip, if you pulled the apk file out of a flashable zip file.
Click to expand...
Click to collapse
Yeah that's how I'm doing it.. but I find it a pain lol

MyDroidHax said:
Yeah but like, I unzip the apk is what im saying lol. Because if you dont unzip it you cant see the images.. then I dont know what im editing. So once im done I want to be able to turn the files back into a apk
Click to expand...
Click to collapse
like i said, just drag and drop the /res folder. No need to unzip it.

VinceOB said:
like i said, just drag and drop the /res folder. No need to unzip it.
Click to expand...
Click to collapse
OHHHH Okay I get it now.. Sorry I didnt go back to it when you said that I thought you didn't understand me, but now I see its quite opposite.. Thanks a lot man.

Related

Resigning ROMS?

Ok so im a noob when it comes to coding. I want to replace the wallpaper that comes in some roms and from my understanding when I extract the .zip rom to replace them, I have to resign the .zip for it to work. If this is true, how do I resign them?
punkmanj said:
Ok so im a noob when it comes to coding. I want to replace the wallpaper that comes in some roms and from my understanding when I extract the .zip rom to replace them, I have to resign the .zip for it to work. If this is true, how do I resign them?
Click to expand...
Click to collapse
first make sure you grab all the signing tools (do a search and you'll find Stericson's stuff somewhere)
extract the zip of the update.zip
now in the main folder you should see META-INF
go in there and remove the three files that are not folders
now go up one level back to main folder
depending on how they packaged the update, you should see either a system or app folder
if you see system, then go into it and then into app
if you see app, then go into it
now you should see some .apks
the one you want is Launcher.apk
use 7z and open the archive
now navigate to the res/drawable folder and you should find your wallpapers in there
just use the name of a wallpaper thats in there that you dont like and replace it with the wallpaper you want
now navigate to the main directory of Launcher.apk
delete the META-INF folder
now close 7z
resign Launcher.apk
now navigate to the main folder of the update.zip
zip it all up again and resign the new .zip file
sorry if the instructions arent that clear .. its kinda late and been studying for a midterm for some time now .... PM me up if you need any more help
Stericson said:
Note, this will not work if your SDK or the path that you place this in has any spaces in the dir name!
An Example of this is c:\users\Nikki and Stephen\sdk\tools
Try to put the SDK and the contents of the zip in a dir where the names are all together and not like the one above.
Ok, so I have made a batch file that will automate the entire process of setting up to use the signing tool made by JF. This batch file will set the CLASSPATH, set the PATH, install the registries, let you sign the files manually, and let you push/pull files to the phone.
In order to use this you should have downloaded the sdk already. Simply extract all of the files into the tools dir of your sdk, and run autosign.bat follow the instructions and go through the options one by one, starting with 1 working through 4. You can however, put the contents of this zip anywhere on your computer and it will work. It is just better to put them into the tools dir of your SDK. Especially for the consideration of future versions.
Enjoy,
Stericson
Autosign .zip: http://www.fightforthepits.com/Androidstuff/signing.zip
Click to expand...
Click to collapse
there's stericson's OP in the signing made easy thread
Yeah sorry for posting I soulda did a search first. I found the Signing Made Easy post after posting this... Thanks for the quick reply Now I can start doing themes as well. Thanks again.
punkmanj said:
Yeah sorry for posting I soulda did a search first. I found the Signing Made Easy post after posting this... Thanks for the quick reply Now I can start doing themes as well. Thanks again.
Click to expand...
Click to collapse
np .. dont forget to edit your OP with "SOLVED" so mods can start cleaning up
What am I doing wrong if I get the message "java is not recognized as an internal or external command, operable program or batch file."
uansari1 said:
What am I doing wrong if I get the message "java is not recognized as an internal or external command, operable program or batch file."
Click to expand...
Click to collapse
you're missing java ... http://developers.sun.com/downloads/top.jsp .. i think you only need the jre but i always get the jdk

Help with editing apk files on MAC osX!

As the title says can someone show me how to do this strictly on a mac!
I have failed miserably at it!
All the tools are for windows..
I have the sdk for mac all set up and I can push an pull files!
but everything I edit on the mac and push to the phone crashes the phone with force closes and stuff...
-kitt050383
I came across this in a google search for the same thing. Can someone post a how-to step by step for modding .apk files with adb commands to push to the phone? Thanks in Advance.
Me as well please, been searching for a good 30 minutes now and cant find any tools to do this on a MAC, especially to edit the .9.png's
I just pull the apk and open it with BetterZip. APKs are pretty much like zip files. Then after I'm done, I sign it and push it back to the phone.
ajones7279 said:
I just pull the apk and open it with BetterZip. APKs are pretty much like zip files. Then after I'm done, I sign it and push it back to the phone.
Click to expand...
Click to collapse
So, i change the extension to .zip double click and it unzips it. Open the folder, edit the files... and then i just switch the extension back to .apk?
I dont get what you are saying.
If you're using the default archiver, you may have to change it to .zip. Since I use betterzip, I just associated the .apk extension with BetterZip so it automatically opens it like an archive. Now, extract the contents of the apk, make whatever changes you please, put the contents back into the archive, sign the apk, then push it back to the phone. I'm typing this from my Hero so I'll try to make a more detailed post when I get off.
ajones7279 said:
If you're using the default archiver, you may have to change it to .zip. Since I use betterzip, I just associated the .apk extension with BetterZip so it automatically opens it like an archive. Now, extract the contents of the apk, make whatever changes you please, put the contents back into the archive, sign the apk, then push it back to the phone. I'm typing this from my Hero so I'll try to make a more detailed post when I get off.
Click to expand...
Click to collapse
Thanks for the tip! I'll give it a shot tomorrow.
Didn't know Betterzip was out there. I'll give it a try later tonight as well.
almost there...
ok i can transform an apk to a zip and unzip for editing, but how do i change it back? i just did a bunch of editing work, and now i am stuck. please help me....
So pretty much we all want to know the same thing...
Once we get the apk open... and we change files around how do we get it back to an apk file.
anyone gonna help?
ipeench said:
So pretty much we all want to know the same thing...
Once we get the apk open... and we change files around how do we get it back to an apk file.
anyone gonna help?
Click to expand...
Click to collapse
someone did.
http://forum.xda-developers.com/showpost.php?p=5849463&postcount=6
Better Zip works great for this. Now, if there was a way to do zero compression like the APK Manager. Without that, the sounds for lock/unlock won't work.
Me too have the same problem. I think installing windows on your mac will work fine with all .exe tools. if you don't wanna do anything o your osx then you can run a virtualbox and run windows without affecting os x.
NO WAY
ajones7279 said:
I just pull the apk and open it with BetterZip. APKs are pretty much like zip files. Then after I'm done, I sign it and push it back to the phone.
Click to expand...
Click to collapse
Hi, I have tried to extract the APK with BetterZip.
I can extract files. But, XML file are like unable to open.
The image files are quite OK.
My purpose is to check out Manifest File and other XML Files.
So, if you can actually do those things after extracting with BetterZip, do let me know.
Thanks in advance.
The most useful way is install Windows via Bootcamp or Virtual Machine...
While I don't have a Mac, I should be able to help. First, rename the extension from .apk to .zip so it can be viewed and extracted from whatever archive manager you use. Doing this won't decompile the apk but it will at least let you modify the images. If you want to modify the xml's in the apk file. You can use Apktool which will decompile and recompile apk's, and sign the apk if it's a non-system app. You will also need to have JDK installed to do this.
JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Apktool: https://code.google.com/p/android-apktool/downloads/list

I Need Help Themeing on a MAC!!

can anyone sign this for me? i think i zipped everything correctly, but i use a mac so i am not sure, it has the notification bar i want (white with see through background) and a white launcher bar
http://www.zshare.net/download/75495216631b6c2e/
DrededStar87 said:
can anyone sign this for me? i think i zipped everything correctly, but i use a mac so i am not sure, it has the notification bar i want (white with see through background) and a white launcher bar
http://www.zshare.net/download/75495216631b6c2e/
Click to expand...
Click to collapse
Try this: http://www.darktremor.com/upload/changes-signed.zip
scratch that, i packaged it wrong, there is the main folder "Changes-signed" and inside of that there is a "changes" folder, then they system folder inside of that and the "framework-res.apk" folder is still a zip and not apk, it just has an alias apk file name fml
DrededStar87 said:
can anyone sign this for me? i think i zipped everything correctly, but i use a mac so i am not sure, it has the notification bar i want (white with see through background) and a white launcher bar
http://www.zshare.net/download/75495216631b6c2e/
Click to expand...
Click to collapse
I use mac too. The way you zip it is go into the folder where it is, select the contents, right-click and hit compress. It should save into archive.zip. Now, to sign it, use this amazing tool. http://forum.xda-developers.com/showthread.php?t=573498 Put the testsign.jar in Macintosh HD and put the app in the dock. Just drag the zip you want to sign onto the icon, and wait for the dot to go away under the sign app. Then, go to the folder where the original zip was, and there should be a Myzip-signed.zip. That should be a flashable zip as long as there's an update-script.
HeroMeng said:
I use mac too. The way you zip it is go into the folder where it is, select the contents, right-click and hit compress. It should save into archive.zip. Now, to sign it, use this amazing tool. http://forum.xda-developers.com/showthread.php?t=573498 Put the testsign.jar in Macintosh HD and put the app in the dock. Just drag the zip you want to sign onto the icon, and wait for the dot to go away under the sign app. Then, go to the folder where the original zip was, and there should be a Myzip-signed.zip. That should be a flashable zip as long as there's an update-script.
Click to expand...
Click to collapse
so it does not have to be an apk file? im gonna try to sign it myself
DrededStar87 said:
so it does not have to be an apk file? im gonna try to sign it myself
Click to expand...
Click to collapse
Uhh... that program is for your mac, not your phone.
HeroMeng said:
Uhh... that program is for your mac, not your phone.
Click to expand...
Click to collapse
i meant the "framework-res.apk" file because i made it an alias of the original file, but it is still a zip, i have no clue how to make it back into an apk file after unzipping it
and i used the search button but the things i found were not much help....just to let people getting ready to yell at me for not using it
DrededStar87 said:
i meant the "framework-res.apk" file because i made it an alias of the original file, but it is still a zip, i have no clue how to make it back into an apk file after unzipping it
and i used the search button but the things i found were not much help....just to let people getting ready to yell at me for not using it
Click to expand...
Click to collapse
Ok, you know what... just make a metamorph file. Metamorph is much easier.
Wait, what? You were trying to reinstall framework-res.apk? Nonononono. No. You need to write an update-script. It will put the apk in /data/app (or /sdext/app) if you install it as an apk.
HeroMeng said:
Ok, you know what... just make a metamorph file. Metamorph is much easier.
Click to expand...
Click to collapse
ummmmmm...i guess saying that i am extremely new to this is an understatement
the easiest way to do what you are talking about is to use something like 7zip or winzip to open , NOT UNZIP, the apk. Next, open up the zip you made. Now, drag the folder called res from YOUR zip into the open window of the apk. This should replace the old folder with your new one that contains all your edits. Now just close the opened apk, and you are done. Simple.
tejasrichard said:
the easiest way to do what you are talking about is to use something like 7zip or winzip to open , NOT UNZIP, the apk. Next, open up the zip you made. Now, drag the folder called res from YOUR zip into the open window of the apk. This should replace the old folder with your new one that contains all your edits. Now just close the opened apk, and you are done. Simple.
Click to expand...
Click to collapse
He has mac, like me. No 7zip.
HeroMeng said:
He has mac, like me. No 7zip.
Click to expand...
Click to collapse
But you have some sort of zip program, right?
tejasrichard said:
But you have some sort of zip program, right?
Click to expand...
Click to collapse
We have Archive Utility, straight from apple, comes with the mac.
It doesn't allow you to open without unzipping? (obviously I know nothing about macs)
tejasrichard said:
It doesn't allow you to open without unzipping? (obviously I know nothing about macs)
Click to expand...
Click to collapse
Nope. We can run Windows apps in WINE if we want....
so...what are my options people? cuz im still confused...
Re: i think i did this right...
bump.....anyone know anything?
Sent from my HERO200 using the XDA mobile application powered by Tapatalk
So here's the issue: Drededstar has unzipped the framework apks, and changed the files...now he wants to know how to turn the .zip folder into actual apk files.
Macs don't have 7zip or ANY program that lets you look into apk contents without unzipping them all the way. So, you have to unzip them. Then once you're done making the changes, you need to change them back to apk files. DOES ANYONE KNOW HOW TO CHANGE THEM BACK TO APK FILES?!!!
I have a mac too, but I do all my theming on my wife's computer...and she's probably tired of me kicking her off. If anyone knows how to do this one simple step could you please let us mac users know?!! Thanks!
as long as the file structure is right, you just have to rename the zip file to apk.

[Q] Looking for a black and white hack/mod

Just wondering if there's something I can do to simply make all my apps and/or widgets black and white?
Or I suppose if someone can lead me to a tutorial on how I can just do it myself? I can just throw them all in Photoshop and greyscale em, if someone could just point me in the right direction
adb pull each app/widget that you would like to theme. Extract the apk using 7zip, winrar, or whatever you use. I prefer 7zip because I think you have to change the file extension with winrar, and there's no point in using extra steps to achieve the same thing. Anyways, after you extract the apk, navigate to the res folder. You'll then see folders that say drawable, drawable-mdpi, or something like that. In those folders are the .png images that you can edit using photoshop. Save them with the same name in the same directory that you got in from. Now, go back to the .apk file you pulled from your phone. Open the archive (DON'T EXTRACT). Navigate to the res/drawable folders within the archive and drag and drop the edited images into the archive. Now (still in the archive) back up to META-INF folder and delete everything in there. Now, close the archive and sign the .apk. Now, you can push it back to your phone.
Or you could get better cut or adw from the market and download icon packs that meet your monochromatic needs. Seems easier than the above.
YoungSinema said:
adb pull each app/widget that you would like to theme. Extract the apk using 7zip, winrar, or whatever you use. I prefer 7zip because I think you have to change the file extension with winrar, and there's no point in using extra steps to achieve the same thing. Anyways, after you extract the apk, navigate to the res folder. You'll then see folders that say drawable, drawable-mdpi, or something like that. In those folders are the .png images that you can edit using photoshop. Save them with the same name in the same directory that you got in from. Now, go back to the .apk file you pulled from your phone. Open the archive (DON'T EXTRACT). Navigate to the res/drawable folders within the archive and drag and drop the edited images into the archive. Now (still in the archive) back up to META-INF folder and delete everything in there. Now, close the archive and sign the .apk. Now, you can push it back to your phone.
Click to expand...
Click to collapse
There is no need to ever rename any archive with winrar just goto "open with" and choose winrar and then check the box to associate winrar with apks you can do this with jars also.
Check black mod them in apps and themes I think you'll be satisfied with that.
YoungSinema said:
adb pull each app/widget that you would like to theme. Extract the apk using 7zip, winrar, or whatever you use. I prefer 7zip because I think you have to change the file extension with winrar, and there's no point in using extra steps to achieve the same thing. Anyways, after you extract the apk, navigate to the res folder. You'll then see folders that say drawable, drawable-mdpi, or something like that. In those folders are the .png images that you can edit using photoshop. Save them with the same name in the same directory that you got in from. Now, go back to the .apk file you pulled from your phone. Open the archive (DON'T EXTRACT). Navigate to the res/drawable folders within the archive and drag and drop the edited images into the archive. Now (still in the archive) back up to META-INF folder and delete everything in there. Now, close the archive and sign the .apk. Now, you can push it back to your phone.
Click to expand...
Click to collapse
You failed to mention that modifying the 9.pngs will have to be 9patched or else they will get distorted. But an easier thing to do is look in the themes section and find a theme or use an alternate Home launcher and use themes for those found in the market.
A lot of what u want to do is XML edits. U can always change icon colors. 7zip is a must use cause winrar is crap and to many steps.
unCoRrUpTeD said:
You failed to mention that modifying the 9.pngs will have to be 9patched or else they will get distorted. But an easier thing to do is look in the themes section and find a theme or use an alternate Home launcher and use themes for those found in the market.
Click to expand...
Click to collapse
Oh yeah. Thanks. I recently read that we can edit 9.pngs using photoshop if a 1px border is added to the image. Is that true? If so, it'll be easier for me that eclipse.

How to view .apk files

Can someone explain how to open a .apk folder to view the files within? Also how to convert it back again with changes made to it? I would like to open the attached folder and change the dialer tones. I tried doing this changing the files in the ui but it didn't change the tones. My belief is they are wrapped in the .so
pretty sure its not in an .so because i dont see a .so tied to that apk. it would either be tied into the smali or you could make changes to the xml to point to different sounds.
Pirateghost said:
pretty sure its not in an .so because i dont see a .so tied to that apk. it would either be tied into the smali or you could make changes to the xml to point to different sounds.
Click to expand...
Click to collapse
My apologies. I'm working with two issues one is an .so and then there is this one, which is indeed an .apk.
So can you explain how I open this?
Get 7zip for windows, install it, open apk with 7zip file manager
tomween1 said:
My apologies. I'm working with two issues one is an .so and then there is this one, which is indeed an .apk.
So can you explain how I open this?
Click to expand...
Click to collapse
studacris said:
Get 7zip for windows, install it, open apk with 7zip file manager
Click to expand...
Click to collapse
but in order to edit any of the xml you will need apk manager.

Categories

Resources