Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,130 Members 52,929 Now Online
XDA Developers Android and Mobile Development Forum

[TOOL] APK_OneClick - decompile & disassemble APKs

Tip us?
 
amroush_1800
Old
(Last edited by amroush_1800; 2nd February 2013 at 10:35 PM.) Reason: Update FEBRUARY 2013
#1  
Junior Member - OP
Thanks Meter 153
Posts: 14
Join Date: Nov 2010
Thumbs up [TOOL] APK_OneClick - decompile & disassemble APKs

A tool package to decompile & disassemble APKs (android packages).

FEATURES
- All features are integrated into the right-click menu of Windows.
- Decompile APK classes to Java source codes.
- Disassemble APK to smali code and decode its resources.
- Install APK to phone by right-click.
- Recompile APK after editing smali code and/or resources.
During recompile:
- Optimize png images
- Sign apks
- Zipalign
REQUIREMENTS
Java Runtime Environment (JRE) must be installed.










HOW TO INSTALL THE PACKAGE
* Extract the attached archieve to hard disk.
* Open the extracted folder.
* double-click 'shellext-add.cmd'

HOW TO UNINSTALL THE PACKAGE
* Run shellext-remove.cmd & you are done.

ITEMS ADDED TO RIGHT-CLICK CONTEXT MENU
APK
Browse Java Code of APK
Disassemble APK and Decode Resources
Install APK to Phone
Folder
Recompile APK from Disassembly

HOW TO DISASSEMBLE APK
Suppose you want to disassemble yourapp.apk, all you have to do is:
* right-click 'yourapp.apk' file
* select -> 'Disassemble APK and Decode Resources'

A folder named 'yourapp-disasm' will be created in the same folder as
the apk. It will contain the smali disassembly and decoded resources .
You can modify the smali code and/or resources inside that folder.

For instant access to methods and fields and for better understanding
of the smali disassembly, you can browse the hierarchy of reconstructed
Java source code in the JD-GUI Java Decompiler. The Java source codes
will be displayed like a Java project in IDE.
* right-click 'yourapp.apk' file
* select -> 'Browse Java Code of APK'

HOW TO RECOMPILE APK FROM DISASSEMBLY
To assemble, sign and zipalign to a new APK, wether you modified the
source code and/or resources or not:
* right click 'yourapp-disasm' folder
* select -> 'Recompile APK from Disassembly'

HOW TO INSTALL APK TO PHONE
To install a non-system apk from pc (keeping its data if it was already
installed on the phone)
* connect android phone to pc via usb cable
* right-click an APK in windows explorer
* select -> 'Install APK to Phone'

NOTES ABOUT SYSTEM APKS
Manufacturer's framework files:
Standard framework is embedded into apktool, so you don't need to do
anything for most apk files. But some manufacturers, for example HTC,
add their own framework files and use them in system apps. Apktool
needs these framework files to decode and build apks. To use apktool
against such apps, you must pull framework from a device and
install/register it to apktool.
for a solution see, http://code.google.com/p/android-apk...FrameworkFiles

META-INF dir in resulting apk:
This dir contains apk signatures mostly and after modifying apk it is
no longer has valid signatures. you have to be careful when putting a
recompiled system apk back on your device. Pushing that new apk to your
phone will result in Force Closes (FCs).
for a solution see, http://code.google.com/p/android-apktool/wiki/FAQ

TOOLS INCLUDED
* android-apktool 1.3.2 by Brut.all - http://code.google.com/p/android-apktool/downloads/list
* dex2jar-0.0.7.7-SNAPSHOT - http://code.google.com/p/dex2jar/downloads/list
* jd-gui-0.3.3.windows - http://java.decompiler.free.fr/?q=jdgui#downloads

HOW TO UPDATE INCLUDED TOOLS
* Peroidically check for updates to the included tools.
* Web links are provided also inside the 'tools' folder.
* When an update is available, download and extract it to the
corresponding folder inside the 'tools' folder.

PACKAGE UPDATE v3 - AUGUST 2012
* android-apktool 1.4.3
* dex2jar-0.0.9.9
* Added Recompile from source feature

PACKAGE UPDATE v4 - JANUARY 2013
* android-apktool 1.5.1
* dex2jar-0.0.9.12-a
* jd-gui-0.3.5.windows
* Modified: names of menu items for more clarity
* Added: optimize png images, sign and zipalign during recompiling.
* Added: Install APK to Phone

PACKAGE UPDATE v4.1 - 27 JANUARY 2013
* Fixed: package fails to install properly when APK extension is currently assigned to another app.
* Fixed: minor fixes when selecting 'Recompile APK from Disassembly'

PACKAGE UPDATE v4.2 - 2 FEBRUARY 2013
* Updated: android-apktool 1.5.2
* Fixed: the install and uninstall scripts have become more UAC friendly.

Enjoy
amroush_1800
Attached Files
File Type: zip Apk_OneClick.zip - [Click for QR Code] (4.88 MB, 7598 views)
File Type: rar Apk_OneClick.v3.rar - [Click for QR Code] (5.26 MB, 1908 views)
File Type: zip Apk_OneClick.v4.zip - [Click for QR Code] (9.58 MB, 536 views)
File Type: zip Apk_OneClick.v4.1.zip - [Click for QR Code] (9.58 MB, 818 views)
File Type: zip Apk_OneClick.v4.2.zip - [Click for QR Code] (5.97 MB, 13914 views)
The Following 142 Users Say Thank You to amroush_1800 For This Useful Post: [ Click to Expand ]
 
oriundus
Old
#2  
Member
Thanks Meter 23
Posts: 47
Join Date: Jul 2010
Hi amroush_1800, thanks for sharing this tool ! Thumbs up !
The Following User Says Thank You to oriundus For This Useful Post: [ Click to Expand ]
 
amroush_1800
Old
#3  
Junior Member - OP
Thanks Meter 153
Posts: 14
Join Date: Nov 2010
Quote:
Originally Posted by oriundus View Post
Hi amroush_1800, thanks for sharing this tool ! Thumbs up !
If you like it, hit the big THANKS button
The Following 3 Users Say Thank You to amroush_1800 For This Useful Post: [ Click to Expand ]
 
specialex
Old
#4  
specialex's Avatar
Senior Member
Thanks Meter 60
Posts: 245
Join Date: Jun 2010
gonna try it
The Following User Says Thank You to specialex For This Useful Post: [ Click to Expand ]
 
PapaDocta
Old
#5  
PapaDocta's Avatar
Senior Member
Thanks Meter 83
Posts: 1,235
Join Date: Jun 2004
nice tool.. i just wish it could decompile classes.dex
The Following User Says Thank You to PapaDocta For This Useful Post: [ Click to Expand ]
 
amroush_1800
Old
#6  
Junior Member - OP
Thanks Meter 153
Posts: 14
Join Date: Nov 2010
Quote:
Originally Posted by PapaDocta View Post
nice tool.. i just wish it could decompile classes.dex
classes.dex will be decompiled into smali & java source code.
The Following 2 Users Say Thank You to amroush_1800 For This Useful Post: [ Click to Expand ]
 
PapaDocta
Old
#7  
PapaDocta's Avatar
Senior Member
Thanks Meter 83
Posts: 1,235
Join Date: Jun 2004
I tried decompiling a framework.jar but it will only shows the content of the jar but not the classes.dex inside also extracted the classes.dex and tried opening it but it won't show anything..


Quote:
Originally Posted by amroush_1800 View Post
classes.dex will be decompiled into smali & java source code.


Sent from my Desire HD using XDA App
The Following User Says Thank You to PapaDocta For This Useful Post: [ Click to Expand ]
 
amroush_1800
Old
#8  
Junior Member - OP
Thanks Meter 153
Posts: 14
Join Date: Nov 2010
Quote:
Originally Posted by PapaDocta View Post
I tried decompiling a framework.jar but it will only shows the content of the jar but not the classes.dex inside also extracted the classes.dex and tried opening it but it won't show anything..


* Rename framework.jar to framework.apk
* Right-click framework.apk and select 'Decompile APK'
The Following User Says Thank You to amroush_1800 For This Useful Post: [ Click to Expand ]
 
DirkStorck
Old
#9  
DirkStorck's Avatar
Senior Member
Thanks Meter 345
Posts: 1,988
Join Date: Sep 2009
Location: Mainz
If I run shellext-add.cmd I get 5 times.

ERROR: Access Denied (in original: FEHLER: Zugriff verweigert)

I am running Win 7.

Could you please help?

Thanks!
Samsung SG5 (G900F) Rom: AllianceROM v4.1
Backup Phone:
Samsung SG3 Rom: temasek v82
 
PapaDocta
Old
#10  
PapaDocta's Avatar
Senior Member
Thanks Meter 83
Posts: 1,235
Join Date: Jun 2004
Quote:
Originally Posted by amroush_1800 View Post
* Rename framework.jar to framework.apk
* Right-click framework.apk and select 'Decompile APK'
thanks.. that worked

The Following User Says Thank You to PapaDocta For This Useful Post: [ Click to Expand ]
Tags
tool
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes