[TUTORIAL]How to unpack/repack .apk files

Status
Not open for further replies.
Search This thread

strunkie

Senior Member
Dec 8, 2010
134
76
not usefull, watch the framework-res.apk file.
You dont get all things.

or you need to make a converter for resources.arsc to :)
 

pinky059

Senior Member
Oct 8, 2010
522
156
Baltimore
Samsung Galaxy S20
When using an acrhive manager such as WinRAR to extract the files, that's great and all if you are just going to replace/add/modify existing images. But, for .xml's, you have to use something that decodes them or uncompresses them from the binary format they are in.

Trust me, I have been creating Icon zips for a few months now and in order to edit .xml values, I have found it a MUST to have APK Tool or APK manager installed on the machine.

Simply unzipping and then zipping back up doesn't do anything unless you are not editing any resources (.xmls, values, smali, etc.)
 

daisun

Senior Member
Mar 16, 2010
214
40
For those still interested in editing apks on OS X without unpacking and hence without resigning I have found something that works!

muCommander! Just rename the .apk to .zip and browse it using muCommander just like you would using WinRar! Just tested it, I was able to add and remove files without resigning. The modified apk installed on my phone without a problem!

As for editing xml values you can simply copy the xml file out and edit it using your favourite editor and then copy them back in.

Hope I was able to help some OS X users.

/edit By the way, this method (WinRar or muCommander) also works for editing update.zip. This means you can customise the rom (add/remove system apks, change the boot animation etc) before you flash it.
 
Last edited:

despotovski01

Inactive Recognized Developer
Jan 1, 2011
1,522
2,133
Skopje
For those still interested in editing apks on OS X without unpacking and hence without resigning I have found something that works!

muCommander! Just rename the .apk to .zip and browse it using muCommander just like you would using WinRar! Just tested it, I was able to add and remove files without resigning. The modified apk installed on my phone without a problem!

As for editing xml values you can simply copy the xml file out and edit it using your favourite editor and then copy them back in.

Hope I was able to help some OS X users.

/edit By the way, this method (WinRar or muCommander) also works for editing update.zip. This means you can customise the rom (add/remove system apks, change the boot animation etc) before you flash it.

Thanks for the tut! I don't have a Mac to test it, but it sounds good. Would you mind if I add it to my tutorial with your credit, of course? :)
 

YoungSinema

Senior Member
Jun 14, 2010
556
100
Lancaster, CA
Wait! Does this just do what 7zip can do, but with more steps? Not to be rude, but...

I second everything Liquid said, and also OP I like how you listen to the criticism without arguing. I wish you the best of luck and hope you can expand this into something more useful.
 

Rydah

Inactive Recognized Contributor
Oct 4, 2008
5,514
2,084
Southern California
For those still interested in editing apks on OS X without unpacking and hence without resigning I have found something that works!

muCommander! Just rename the .apk to .zip and browse it using muCommander just like you would using WinRar! Just tested it, I was able to add and remove files without resigning. The modified apk installed on my phone without a problem!

As for editing xml values you can simply copy the xml file out and edit it using your favourite editor and then copy them back in.

Hope I was able to help some OS X users.

/edit By the way, this method (WinRar or muCommander) also works for editing update.zip. This means you can customise the rom (add/remove system apks, change the boot animation etc) before you flash it.

Gee golly, been needing this. Kinda like 7-zip then? Hope they add apk support.

Sent From My HTC Evo 4G Using Tapatalk On The Now Network From Sprint.
 

blackdog7

Senior Member
Mar 29, 2008
597
142
Budapest
Jesus, what the hell is this program? And it must be installing it? Why didn't make a simple script for this renaming process. Example a batch-script.:confused::confused::confused:
 

LiquidSolstice

Inactive Recognized Developer
Jan 17, 2008
5,182
5,181
Jesus, what the hell is this program? And it must be installing it? Why didn't make a simple script for this renaming process. Example a batch-script.:confused::confused::confused:

Really? You're insulting the program because it needs installing and it's too complicated for you?

Why are you asking "what the hell" this program is? It's pretty damn clear in the OP. Maybe this isn't for you if you can't do the simple reading required to find that out.
 
  • Like
Reactions: blackdog7

blackdog7

Senior Member
Mar 29, 2008
597
142
Budapest
Really? You're insulting the program because it needs installing and it's too complicated for you?

Why are you asking "what the hell" this program is? It's pretty damn clear in the OP. Maybe this isn't for you if you can't do the simple reading required to find that out.

What did you say? I didn't write, that I don't know how it's work. I said I can creating for the renaming process a very simple batch script. Like so:
Put this line in a file and renaming it to rename.bat or whatever:
Code:
ren %1 *.zip
Then execute simple "rename.bat whatever.apk"
Why did despotovski01 create for this an installable program?
I cannot understand this.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 142
    Hey guys!
    I've made another tutorial. This one is about unpacking and repacking .apk files. This tutorial was made for people who don't want to mess with Command Prompt, or for those who want to do it in graphical user interface.
    -------------------------------------------------
    Requirements:
    -An archive manager, such as WinZip, WinRar, or Power Archiver, that is capable of extracting and making .rar archives
    -Formatter (it's a program made by me) - click here to download it. Mirror: http://www.mediafire.com/?5a74bjg475er75d
    -------------------------------------------------
    Tutorial:
    Just follow the steps and you will learn how to unpack/repack .apk file in no time!

    How to unpack .apk files:
    1. Open Formatter (I assume you already have it downloaded and installed on your computter)
    2. Click the "Choose File" button and choose your apk file. Then, in the first text box, enter ".rar" (without quotes). After that, enter your desired name for your .rar archive and click the big "Rename!" button
    FormatterScreenshot2.png

    3. Go to the folder where your .apk file was. You should see a .rar archive, named by the name you entered in Formatter. Extract it with your archive manager

    How to repack .apk files:
    1. Compress the extracted files in a .rar archive (compress them normally like any other archive)
    2. Open Formatter
    3. Choose the .rar archive you made a minute ago
    4. Set the format to .apk
    5. Set the name to whatever you want
    6. Click the big "Rename!" button
    FormatterScreenshot1.png

    -------------------------------------------------
    Mac OS X users: follow this tutorial (special thanks to daisun):
    daisun said:
    For those still interested in editing apks on OS X without unpacking and hence without resigning I have found something that works!

    muCommander! Just rename the .apk to .zip and browse it using muCommander just like you would using WinRar! Just tested it, I was able to add and remove files without resigning. The modified apk installed on my phone without a problem!

    As for editing xml values you can simply copy the xml file out and edit it using your favourite editor and then copy them back in.

    Hope I was able to help some OS X users.

    /edit By the way, this method (WinRar or muCommander) also works for editing update.zip. This means you can customise the rom (add/remove system apks, change the boot animation etc) before you flash it.
    -------------------------------------------------
    That was about it. If you have any problems or questions, feel free ask me. Hitting the "Thanks" button is very appreciated. Feel free to click it if I helped you. ;)
    6
    Why to use special application just to change an extension of some apk file? o_O I think it's much easier to:

    • Choose to open all *.apk files with archive tool. Then set "apk" as extension of output file when compressing.
    • or disable "hide extension of known files" feature in Windows and change file extensions normally - by renaming them.

    Also does above tutorial really work? I mean .apk files are zip archives, not rar and I doubt Android can open rar archives.
    4
    Erm, no offense, but this is a bit dim.

    You don't need any special programs to check out what's going in an apk. In fact, you don't even need to rename the apk, you can just open the apk using WinRAR or 7Zip, both will handle it just fine.

    If you really need renaming, just uncheck "Hide known extensions" in the Explorer options.

    This is just a really convoluted and ultimately uneccessary way of doing this.
    3
    I made the tut like this because I didn't know you can hide known extensions in Windows Explorer. I know you can open the apk with every archive manager.

    :X You knew how to build a program that had to do with file extensions but you didn't know about hiding known extensions? It's been around since XP (at least), man.

    I'm sorry, I'm not trying to antagonize you. It's a decent effort, I just think it's a bit overkill. Might be a good idea to paint the tutorial in a different way, such as "If you don't want all your extensions showing all the time (which is what the "hide extensions" option would do if disabled), use my guide for those one-off times where you need to rename them".

    :)
    2
    Extremely useful app and instructions, thanks very much for this, now time to play :)