[TUTORIAL]How to unpack/repack .apk files

Status
Not open for further replies.
Search This thread

despotovski01

Inactive Recognized Developer
Jan 1, 2011
1,522
2,133
Skopje
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. ;)
 
Last edited:

Brut.all

Inactive Recognized Developer
Jul 27, 2009
1,471
353
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.
 

despotovski01

Inactive Recognized Developer
Jan 1, 2011
1,522
2,133
Skopje
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.
Yes, it works. I've tried it myself.
 
  • Like
Reactions: joe well

LiquidSolstice

Inactive Recognized Developer
Jan 17, 2008
5,182
5,181
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.
 

despotovski01

Inactive Recognized Developer
Jan 1, 2011
1,522
2,133
Skopje
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.

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.
 

LiquidSolstice

Inactive Recognized Developer
Jan 17, 2008
5,182
5,181
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".

:)
 

despotovski01

Inactive Recognized Developer
Jan 1, 2011
1,522
2,133
Skopje
: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".

:)

Thanks for your suggestions. :)
 

daisun

Senior Member
Mar 16, 2010
214
40
Since we're on the topic of opening apks. Does anyone know a good program which can open the apk without unpacking, similar to winrar, but for OSX? I've searched high and low but every program I find simply extracts the files.
 

LiquidSolstice

Inactive Recognized Developer
Jan 17, 2008
5,182
5,181
Since we're on the topic of opening apks. Does anyone know a good program which can open the apk without unpacking, similar to winrar, but for OSX? I've searched high and low but every program I find simply extracts the files.

You open it with WinRAR, edit, and then repackage by saving the archive, and change the .zip to .apk when you do (if it asks).
 

Cellulah

Senior Member
Dec 17, 2009
186
38
What is the advantage of doing this over using the terrific program APK Edit created by Anoniem100?
 

HD2_addict

Member
Feb 21, 2010
47
5
Since we're on the topic of opening apks. Does anyone know a good program which can open the apk without unpacking, similar to winrar, but for OSX? I've searched high and low but every program I find simply extracts the files.

Have you tried Keka file archiver for OS X? It's a 7-zip port. It could work, but I'm not sure because there's no mention of the .apk format.
Link --> http://www.kekaosx.com/en/
 

daisun

Senior Member
Mar 16, 2010
214
40
You open it with WinRAR, edit, and then repackage by saving the archive, and change the .zip to .apk when you do (if it asks).

That method works perfectly under Windows and is the method I use personally. However, I would also like to perform the same thing under OSX (on my Macbook).


Have you tried Keka file archiver for OS X? It's a 7-zip port. It could work, but I'm not sure because there's no mention of the .apk format.
Link --> http://www.kekaosx.com/en/

Thanks for the suggestion. I just tried it, it seems to only compress and decompress files it doesn't allow me to browse them without decompression.

BetterZip comes close, I can browse the contents without decompressing but I can't modify the contexts.

There must be something out there that can do what WinRar does on Windows but on OSX!
 
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 :)