Editing apk files - EVO 4G Q&A, Help & Troubleshooting

I have been trying to edit an apk file, basically change some pngs. But after iam done I can't install it anymore. Why is that?
I used 7z to open the apk archive and replaced a few pngs. I put the apk on the sdcard, open to install, goes thru installing then fails. Any help would be appreciated.
Sent from my PC36100 using Tapatalk

dont you have to sign it again or something.. did you keep the same file names for the pngs?

I kept the same file names and sizes. Do I need to sign them?
jasongthang said:
dont you have to sign it again or something.. did you keep the same file names for the pngs?
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk

just delete all the stuff in the META-INF folder, make edits, rezip, and resign. easy

What's the easiest way to sign an apk?
dkdude36 said:
just delete all the stuff in the META-INF folder, make edits, rezip, and resign. easy
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk

soulassasin187 said:
What's the easiest way to sign an apk?
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
You need an apk signing tool. Basically, you put the modified apk, in the signer folder, without the meta-inf folder, and run a quick command, your signed apk is then spit out. I'll attach the one I use when I get back to my laptop.
Hey... I think this thing makes phone calls too!

Here is the APK Signing Tool that I use.
Just unzip it somewhere, put the apk in the auto sign folder, open a command prompt to the folder, and run sign.bat, it should run you through it. There's a read me file in there, read it in case I forgot something.
Also, when editing market apps, they need to be resigned, but if ur editing built in app from the system, they do not. The HTC signature needs to remain intact on those.

Worked perfectly. Thank you.
JTNiggle said:
Here is the APK Signing Tool that I use.
Just unzip it somewhere, put the apk in the auto sign folder, open a command prompt to the folder, and run sign.bat, it should run you through it. There's a read me file in there, read it in case I forgot something.
Also, when editing market apps, they need to be resigned, but if ur editing built in app from the system, they do not. The HTC signature needs to remain intact on those.
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk

Related

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).

[Transition Animation] [StarBurst] MotoBlur

These are the transition animations from MotoBlur.
I was unable at this point to find where the screen rotation animations are but I'll keep investigating.
the framework-res file is for PhantomHacker's Starburst ROM v1.3
You can just push the file via adb or Root Explorer (?).
I have also attached the transition animations stand-alone. They need to be injected in framework-res.apk/res/anim and they are compatible with all ROM releases.
Hi
Where do we push the framework-res file to?
mandie7312 said:
Where do we push the framework-res file to?
Click to expand...
Click to collapse
/system/framework/
Thanks
krazyflipj said:
/system/framework/
Click to expand...
Click to collapse
Thanks so much
how would i go about injecting this into another rom. any instructions anywhere?
jok3sta said:
how would i go about injecting this into another rom. any instructions anywhere?
Click to expand...
Click to collapse
Go to system/framework and look for you Framework-res.apk and send it to your pc with bluetooth (Thats what I do) then open your framework-res.apk with winrar or 7zip (I use winrar) with framwork-res.apk open navigate to "res" folder open it then look for "anim" folder and open it now from the anim folder that you downloaded from OP open it then drag and drop it to the "anim" folder that you have previously open in Winrar its going to ask you to overwrite the files click ok or yes then close winrar, then send it back to the phone tru bluetooth, now with root explores copy it to system/framework reboot and you are done, you will get FC's but reboot and everythin will be ok.
Hope it helps.
lokko21 said:
Go to system/framework and look for you Framework-res.apk and send it to your pc with bluetooth (Thats what I do) then open your framework-res.apk with winrar or 7zip (I use winrar) with framwork-res.apk open navigate to "res" folder open it then look for "anim" folder and open it now from the anim folder that you downloaded from OP open it then drag and drop it to the "anim" folder that you have previously open in Winrar its going to ask you to overwrite the files click ok or yes then close winrar, then send it back to the phone tru bluetooth, now with root explores copy it to system/framework reboot and you are done, you will get FC's but reboot and everythin will be ok.
Hope it helps.
Click to expand...
Click to collapse
I read somewhere that whe modifying an apk i will have to sign it.. Is that the case here as well?
Tapatalkin' it from my Epic Touch 3g
jok3sta said:
I read somewhere that whe modifying an apk i will have to sign it.. Is that the case here as well?
Tapatalkin' it from my Epic Touch 3g
Click to expand...
Click to collapse
You don't sign system apk's.
Just push it to system/framework and reboot.
Bah, double post.
AvatarOfFrost said:
You don't sign system apk's.
Just push it to system/framework and reboot.
Click to expand...
Click to collapse
Kool thanks
Tapatalkin' it from my Epic Touch 3g
Thanks, looking forward to trying this out in a bit!
You can't just open an .apk. It has to be de-compiled, edited, then re-compiled. Just fyi so you don't get an FC fest
Sent from my SPH-D710 using xda premium
SAShady said:
You can't just open an .apk. It has to be de-compiled, edited, then re-compiled. Just fyi so you don't get an FC fest
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Depends on what you're doing. I've opened system .apks such framework, settings, systemui, etc. for graphic changes for years with no issues.
.....
Vegasden said:
Depends on what you're doing. I've opened system .apks such framework, settings, systemui, etc. for graphic changes for years with no issues.
.....
Click to expand...
Click to collapse
In assuming the anim.zip is an xml, which does need a decompile/compile method. Dropping pngs into an apk is one thing, not so with xmls. The are other xmls in the apk that need to populate based on things in the apk, including other xmls.
Sent from my SPH-D710 using xda premium
works like a charm, thanks OP. (used 7zip to replace res/anim with anim.zip)
cant wait til you get your hands on those rotation animations. maybe this could help but i bet youve already seen this:
http://hotfile.com/dl/122984343/f518479/motoblurframework.zip.html
couldnt find anything to point to the xml that covers rotation animations
Vegasden said:
Depends on what you're doing. I've opened system .apks such framework, settings, systemui, etc. for graphic changes for years with no issues.
.....
Click to expand...
Click to collapse
+1000000
Sent from my SPH-D710 using xda premium
squshy 7 said:
In assuming the anim.zip is an xml, which does need a decompile/compile method. Dropping pngs into an apk is one thing, not so with xmls. The are other xmls in the apk that need to populate based on things in the apk, including other xmls.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
I haven't looked but on htc's it was a folder that could be replaced and I've done it several times with 7zip and had no issues.
Sent from my SPH-D710 using xda premium
Tiffany84 said:
I haven't looked but on htc's it was a folder that could be replaced and I've done it several times with 7zip and had no issues.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
it is the same i did it on one of my batt mods the closed the .zip and flashed and all was ok
squshy 7 said:
In assuming the anim.zip is an xml, which does need a decompile/compile method. Dropping pngs into an apk is one thing, not so with xmls. The are other xmls in the apk that need to populate based on things in the apk, including other xmls.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
You don't need to decompile and recompile unless you are modifying the CONTENTS of the xml. In this case you are simply replacing them.
I believe the transition animations are in blur-res.apk or moto-res.apk.
Sent from my SPH-D710 using xda premium

Customizing graphics (maybe noobish question)

Less than an hour ago I decided to skin my statusbar. What I do is open SystemUI.apk with 7zip, extract everything from drawable folders and modify them. Now, I've got a question. Is it enough to replace png files in apk with modded ones, or I should somehow sign the apk file?
Thanks in advance.
Sent from nowhere
tajimura said:
Less than an hour ago I decided to skin my statusbar. What I do is open SystemUI.apk with 7zip, extract everything from drawable folders and modify them. Now, I've got a question. Is it enough to replace png files in apk with modded ones, or I should somehow sign the apk file?
Thanks in advance.
Sent from nowhere
Click to expand...
Click to collapse
Good question! I'm also interested in this.
Can't remember well whether it will work without resigning but I always sign the system apk / user apk after doing any modification.
Unsign apk normally get installed when it is placed at system/app but will not work when put it at sd-ext/app_s.
ckpv5 said:
Can't remember well whether it will work without resigning but I always sign the system apk / user apk after doing any modification.
Unsign apk normally get installed when it is placed at system/app but will not work when put it at sd-ext/app_s.
Click to expand...
Click to collapse
Got it. One more question - which tool do you use for signing?
Sent from nowhere
tajimura said:
Got it. One more question - which tool do you use for signing?
Sent from nowhere
Click to expand...
Click to collapse
Auto-sign for signing on PC and Signapktic (from Market) for signing on the phone.
ckpv5 said:
Auto-sign for signing on PC and Signapktic (from Market) for signing on the phone.
Click to expand...
Click to collapse
Thanks for the answers, now going to try that all
Sent from nowhere
Search for "apk tool" here on xda and you'll have what you need for theming and signing and more.
via xda app
System apps are NEVER signed.
If you don't extract (just open in 7zip or winrar) you can just drag new images in. If prompted for compression level, Choose "store". When finished, simply close the file with the x.
Only if you want to change xml files, need you decompile
Sent from my HTC Desire using Tapatalk
rootSU said:
System apps are NEVER signed.
If you don't extract (just open in 7zip or winrar) you can just drag new images in. If prompted for compression level, Choose "store". When finished, simply close the file with the x.
Only if you want to change xml files, need you decompile
Sent from my HTC Desire using Tapatalk
Click to expand...
Click to collapse
Umm, I thought that I have to sign it with "platform" key...
BTW, which PNG is responsible for statusbar background? The closest one I found is "statusbar_bg_tile", 1x1 black image. I want to use gradient background, and have created one full background image and one 9-patch, but dunno what to do - simply replace statusbar_bg_tile with statusbar_bg/statusbar_bg.9 or also modify some xml? In statusbar.xml I can't find any reference to statusbar_bg_tile PNG.
Sent from nowhere

Recompile apks

Everywhere i look redirects to apkmanager.. Which is not working for me.. Can someone tell me the manual way to recompile an apk.. Or an alternative to apk manager...
Sent from my SPH-D710 using XDA Premium App
What apps are you trying to mod?
What OS?
agat63 said:
What apps are you trying to mod?
What OS?
Click to expand...
Click to collapse
I got it figured out, was trying to mod Blend ICS apps.. need de-odexed ones..
Ok new question.. This is obviously my first time figuring out how to put these back together... heres my issue: Im using the multi-tool the app im adjusting is mms.apk.. after I extract and edit the images in the res folder I choose option 3 to zip it up and then 5 to zip align and then it creates the new unsigned apk, which I then rename to Mms.apk ... when I dump it onto my phone it doesnt have the icon in astro, it looks like the white icon with the gear on it.. when i try to install it gives a parsing error... I assume its because its a system file and I need to adb it onto the phone.. but why isnt it showing up with the original mms icon? and then secondly.. I cant get multitool to adb push to my galaxy s2 it just says waiting on device.. is there something I need to do besides usb debugging and connect it to the computer? sorry for all the noobness.. gotta start somewhere right?
Oh also Im using fireworks to edit the png's and exporting them back and i noticed when i sent it back out it was like 29kb so I image export and optimized down to 2kb does that even matter?
You can't dump unsigned app into your phone.
I never workred with tool you mentioned but I think you should have sign option there.
Or you just drug modified images and xml files from that unsigned app into your original one.
It has the option to have signed or unsigned ... both ways result in the same issue...
As I said try to drag modded files and png's into original app and try to flash that.
agat63 said:
As I said try to drag modded files and png's into original app and try to flash that.
Click to expand...
Click to collapse
Ok trying..
Worked like a charm.. Makes me wonder what the point of apk manager is at all? Just 7zip unzip.. Edit and rezip...
Sent from my SPH-D710 using XDA Premium App
You can't edit xml files if you just unzip them. You have to decompile them in order to be able to edit them.

Changing USER APPS ICONS! HELP

Can any experts help me with my little problem on changing icons on user applications, not the system apps icons because i was able to do that manually..
I had successfully changed all the icons of installed user applications on my SGY.
What i did was open it with WinRar and go to res / drawable ldpi (36x36) or mdpi (48x48) or hdpi (72x72) folder & replaced each icons there with proper file name and size..
After i finished it, i copied all modified apps to sd card and tried to install it one by one, but it says "applications not installed"..
And now i wonder what's wrong with what i did? I was able to replace the icons in system apps manually using the method which i used with this one but this one fails!
Any suggestions or instructions?
Any help would be much appreciated! Thank you!!!
After Editing You Have To Sign The App And Then Install It..
Try Zipsigner app... Might help...
Sent from my HTC Sensation 4g with Beats Audio
I've tried that method before too, when I was modding widgets, and it just doesn't work. What worked for me though was same method, but had it signed again with this little tool I found here in xda. I'll link you later when I get on desktop.
Sent from my GT-S5360 using xda premium
Silvane said:
I've tried that method before too, when I was modding widgets, and it just doesn't work. What worked for me though was same method, but had it signed again with this little tool I found here in xda. I'll link you later when I get on desktop.
Sent from my GT-S5360 using xda premium
Click to expand...
Click to collapse
what is the tool name???
Silvane said:
I've tried that method before too, when I was modding widgets, and it just doesn't work. What worked for me though was same method, but had it signed again with this little tool I found here in xda. I'll link you later when I get on desktop.
Sent from my GT-S5360 using xda premium
Click to expand...
Click to collapse
Yeah, i totally forgot that there was a signing thing when modifying apks..
And Sir, can you please give me the link of that "little tool" you're talking about when you get back in your PC? Thanks so much!
Thank you to all who responded! I appreciate you all! Cheers!
I couldn't find the thread I found it from anymore so I can't link the source. But I attached the sign tool which I still have.
Basically you get the apk right. Rename it to zip, extract, delete META-INF folder and then replace whatever images you wanted. Zip it back up, rename back to apk.
To sign, extract the zip included here to a folder. Copy paste the modified apk to the root directory of the sign tool. Make sure only one apk file is in the folder. Run sign.bat and press any button when prompted.
If it signed successfully just install the apk, making sure you have the original one uninstalled.
On a side note, if you want to update the app to a newer version through the market, it will not work. You will have to uninstall the modded one, install from the market and then do the process above again if you still want to modify it.
There are other signing tools too, ones that could sign multiple apk's simultaneously but for some reason they've never worked for me. But you're free to try. Google for 'em.
I have tried this method manytimes
and it works everytime
are you replacingonly the icon in the app apk or any other files to
you have to sign the apk after modding
use the tool given by silvane
if the 7zip method dont work for you
you can use apktool to decompile and recompile the apk and then sign it
you are ready to go
Thanks @Silvane and @deadlylocker as well as others for helping me..
@Silvane: I already downloaded that "autosign" app this morning but i didn't know (phil. time) that it is necessary to delete the meta-inf folder while modding apks before i saw your post so i appreciate your effort of giving instructions! Thanks so much!
No problem.
Sent from my GT-S5360 using xda premium

Categories

Resources