Jump to content

Editing APK


Recommended Posts

Guest TroutT20
Posted

I'm wondering if anyone has a good tutorial or resource for editing APKs, and software needed. I'm assuming I need Java, and the Android SDK installed for starters, but I'm not sure there to go from there.

I mainly want to create some custom themes for LeoGinger / MIUI / CM7 but need to edit the framework-res.apk. I've attempted to use tools off XDA like "Edit APK", but it always fails on saving the APK.

I have almost all of the art work done for 3 themes, all more directed at supporting the ACER Liquid A1 / E, so now its just this last step to getting it done.

Any help or direction would be much appreciated.

Guest Delnar_Ersike
Posted

Normally, editing an apk would require you to disassemble the apk, make changes to the apk, reassemble the apk, then sign the apk. However, framework-res.apk is an exception when using custom ROMs: with a tool like 7-zip, open framework-res.apk as a zip file. Extracting and replacing files is as simple as dragging and dropping images from the opened .apk to a file manager (ie. explorer.exe) or vice versa. Most of the stuff you want to edit is located in the /res folder inside the apk, and /drawable-hdpi-v4 inside that.

Guest HustlinDaily
Posted

Yeah that is one way.

If it is a non market app AND you are rooted, then use NinjaMorph. Great UI, super easy to use.

Guest Delnar_Ersike
Posted (edited)
Then just re-zip and change to a .apk?

It's hard to explain, but don't unzip it, change it, then re-zip it. Open it with your archive manager's file manager (I recommended 7-zip in case yours doesn't have one), then drag 'n' drop from there. To extract a file or folder, select it within the archive manager's file manager and drag it into your normal file manager's window. To replace an existing file or folder with a modified one, select the modified file or folder in your normal file manager, then drag it into your archive manager's file manager's window (wow, that's a mouthful).

The advantage of this method is that should you ever flash another ROM to your device, you'll still have the modified framework-res.apk file (provided you don't delete it from your computer after you've applied it), which means you'll only ever need to replace all the default files once.

As for an alternative to NinjaMorph, you could always try MetaMorph.

Edited by Delnar_Ersike
Guest TroutT20
Posted

That makes sense. I'm used to using WinRar, but I'll get 7zip and take a couple cracks at it when I get home.

Guest TroutT20
Posted

Is there any special way I should push it back to the phone for testing?

Guest barmyman
Posted
Is there any special way I should push it back to the phone for testing?

nope, everything as usuall

Guest TroutT20
Posted

Stuck in a boot loop after first couple of tests :D

Guest Splux
Posted
Stuck in a boot loop after first couple of tests :D

What is it you are trying to do?

Edit the framework? ;)

I'm just curious B)

Guest TroutT20
Posted
What is it you are trying to do?

Edit the framework? B)

I'm just curious :D

Trying to edit the drawable-hdpi images. No matter what I do, the phone is stuck in a boot loop, attempted on 2 different roms so far. LeoGinger and T&L.

Guest Splux
Posted
Trying to edit the drawable-hdpi images. No matter what I do, the phone is stuck in a boot loop, attempted on 2 different roms so far. LeoGinger and T&L.

Just a stupid question... are you sure you are doing everything as you should do it? :D

Maybe I should try, just for fun... Usually I have nothing to do anyway =D

Guest TroutT20
Posted

Sure, do you just want the hdpi-drawable folders? Probably should include a copy of my framework as well.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.