• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Installing edited .apk files

lewa

Member
Mar 14, 2010
76
2
Why: There's some programs that I love using, but since all programmers aren't graphic designers (and I happen to enjoy graphic design), I just want to change some of the .png files and reinstall the apk.

The technical stuff:

I put the edit .apk in the tools folder, run a cmd from there, and:\
Code:
adb push program.apk /data/app
I then go to the file in Android Mate, and tap it, and try to install it.

But when I try to install it, Android Mate says "Application did not install." So there must be an error with it. I figure it's something obvious, like a signing issue. Ideas?
 
Why: There's some programs that I love using, but since all programmers aren't graphic designers (and I happen to enjoy graphic design), I just want to change some of the .png files and reinstall the apk.

The technical stuff:

I put the edit .apk in the tools folder, run a cmd from there, and:\
Code:
adb push program.apk /data/app
I then go to the file in Android Mate, and tap it, and try to install it.

But when I try to install it, Android Mate says "Application did not install." So there must be an error with it. I figure it's something obvious, like a signing issue. Ideas?

If you extracted the .apk, you need to repack it and resign it.

However i found the easiest way to replace image files in an .apk is to not extract and simply open it with 7-Zip or WinRAR.
 
Upvote 0
adb install whatever.apk
LOL thanks.

You should share these newly designed apps with the rest of us. That is of course the apps you are using were free and not paid. I love a new GUI on a good app.

Okay, I definitely will :) Yeah, nothing better than a fresh GUI, quite happifying. Getting excited about re-skinning Cestos (best game ever). I've fallen in love with the flat style it came with, but would equally love a more realistic looking version. And the text they used looks terrible. Glad it was on images so I can fix that.

At some point I might want to set up screenshot capabilities...
 
Upvote 0
I downloaded Cestos to see if i could replace some of the image files.

It worked for me, but i wasn't able to just replace them. I did have to resign it.

Here's what did (i'm simplifying it a bit under the assumption you have a pretty good idea of what you're doing already).

1. Replace the images in the original .apk file.
2. Open the "META-INF" folder and delete all three files: CERT.RSA, CERT.SF, and MANIFEST.SF
3. Resign it (I use the resigning tool here: General ROM FAQ - Android Central Forums )
 
Upvote 0
When I went in and edited some live wallpapers I renamed the .apk to .zip, navigated to the file in 7-zip file manager, right click and select Open Inside. This way you don't have to worry about resigning the .apk and can get at the .png image files to edit or replace them. The only other thing I learned is that the image you are putting in the old ones place is that it must have the exact same properties. I even renamed my new .png file to the file name I was replacing. It is actually really easy.

Here is a sample of what I did to the live wallpaper NeuralNetwork(NSFW) http://www.megaupload.com/?d=F3GHJFZ0
When in settings select the dark background and it will change the background.
 
Upvote 0
Been fooling around with this whole concept of changing some of the graphics too but when i try to reinstall through "adb install whatever.apk" it is saying can not find "whatever.apk" to install. I've tried putting the file in tools folder and other folders and tried directing adb to the file also with no luck....also the apk will not reinstall through my backup manager does that mean it isn't resigned right or will it have to be installed through adb?

Edit: Figured out how to get it to find the apk but now says "install failed update incompatible" any ideas? I just wanted to change the htc battery widget to blue to match sense-able0,7 rom lol. I also tried just opening with the 7zip but it still makes me resign it...
 
Upvote 0
So I tried and tried to edit the htc battery widget to make it blue...could not get it to work even with all the great help on here...so finally I downloaded another battery widget from the market...edited the png image from green to blue resigned and it installed perfectly...i'm curious as to why the same process didn't work with the htc battery widget? does it have something to do with them signing their apk's differently? anyway thanks for all the help in this thread and love having a blue batter widget to go with the great sense-able 2.0 rom...
 
Upvote 0
opened the apk in winrar and copied the green color bar for the battery to my desktop, then opened with paintbrush and recolored it to blue and then dropped the new png image back into winrar file to replace the original. resigned the apk then installed through astro backup...couldn't believe it was that easy after messing with the htc app for 3 days lol...
 
Upvote 0
IT WORKED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Here's a blue battery widget for anyone who's interested: com_geekyouup_android_widgets_battery-signed.apk (58 KB)

Of course, you gotta uninstall the old one first.

Here's my documented process for editing an apk:
1: Pull .apk from /data/app/
2: Open with 7zip or whatever, edit the files you want, and put them back into the file. Don't unzip and zip it. Just drop the files back into the apk.
3: Re-sign it.
4: adb install
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones