[TOOL][GUI][Reverse engineer] Decompile APK to JAR Full Decompile :: One Click - Android Software Development

Reverse engineer "Perfect software" , managed to convert apk to a jar file and decompile it using JD(via dex2jar)
The program uses 3 tools (apktool.jar, dex2jar.bat, jad.exe)
I've updated all lib/scripts ,apktool.jar 1.5.2, dex2jar 0.0.9.15
in attach you will find
Fragment.apk I've tested with this tool and works fully !!,look on OutPut_Fragment.zip to see the result
Download:
DeCompileAPK.zip
To Start
Works on Windows7/8
1. Scan dir for “apk” file or look for the file with “APK File Directory”.
Scan has a “subfolders” flag ,in the “Options” tab.
2. Double click on the found file it will be transferred to the “APK File Directory”.
3. Write or look for the output directory. Leaving this line empty will put all
the project output files under the directory “OutPut” where this program is executed.
If there is an output directory name, a directory “OutPut_” + APK file name
will be created.
3. Press the Decompile KEY.
4. All Dos messages will be seen in the “Decompile OutPut” panel.
5. It will be shown also in the “Edit log” panel.
6. The log can be edited and printed.
7. A java file editor is included. Scan project files, Scan any directory or open any file.
NOTE : USE ONLY ENGLISH CHARACTERS FOR FILE NAMES !
Credit and Thanks !
Tool Dev Website: http://www.limelect.com/android/

Reversed for new stuff

anyone tell us how it works with him?

codexc said:
anyone tell us how it works with him?
Click to expand...
Click to collapse
no download link to test

Related

Build Cab File of an app

Hey Guys!
How can i Build a cab for my programs in vs2005 or have i to use another tool to do this?
thanks SciLor
WinCe cab manager does the job.
its not free though.
but its worth it
isnt there another tool i can use?
look in the Visual studio's help file on making an installer..i cant remember now but i did create a cab once..btw which version of VS do u use
This is from My VS 2008 Pro Documentation
This section describes creating CAB files for distributing ATL and MFC controls over the Internet. If you need more information about CAB files, see the Cabinet File Reference in the Windows SDK documentation (in MSDN Library/Setup and System Administration/Setup/Setup API/Overview/Cabinet Files).
To create a CAB file:
Create an INF file.
Run the CABARC utility.
Creating an INF File
The INF file is a text file that specifies the files (such as DLLs or other OCXs) that need to be present or downloaded for your control to run. An INF file allows you to bundle all the needed files in one compressed CAB file. By default, files with the same version numbers as existing files on the user's hard disk will not be downloaded. For more information about INF files and their options, including how to create platform-independent INF files, see About INF Files and Using INF Files in the Windows SDK documentation (in MSDN Library/Setup and System Administration/Setup/Setup API/Overview/Setup Applications).
As an example, the following INF will be used to create a CAB file for the ATL Polygon control. You can build POLYGON.DLL by downloading the ATL POLYGON sample files from the Visual C++ CD and building a MinSize version. If you build a MinSize version of the Polygon control, you need one additional DLL, ATL.DLL. Since ATL.DLL needs to be registered before POLYGON.DLL, put the ATL.DLL first in the INF file:
Copy Code
; Sample INF file for POLYGON.DLL
[version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
polygon.dll=polygon.dll
atl.dll=atl.dll
; needed DLL
[atl.dll]
file-win32-x86=thiscab
FileVersion=2,00,0,7024
DestDir=11
RegisterServer=yes
[polygon.dll]
file-win32-x86=thiscab
clsid={4CBBC676-507F-11D0-B98B-000000000000}
FileVersion=1,0,0,1
RegisterServer=yes
; end of INF file
This INF specifies that ATL.DLL with the given version needs to be installed on the system. If ATL.DLL doesn't exist already on the system, it will be downloaded from the CAB file created with this INF. "thiscab" is a keyword meaning the CAB containing this INF. You can also download a needed DLL from an HTTP location by specifying an absolute or relative path, for example:
Copy Code
file-win32-x86=http://example.microsoft.com/mydir/NEEDED.DLL
The keyword "file-win32-x86" identifies the platform as x86 specific.
You can get the version number of a file by clicking the right mouse button on the file in Windows Explorer. Select Properties from the list that appears, then select the Version tab on the dialog box that appears. You will sometimes need to insert an extra 0 in the file version. For example, the version number for the ATL.DLL is shown as 2.00.7024 in the dialog box. This becomes 2, 00, 0, 7024 in the INF file.
The "DestDir" is where the directory where the file will be loaded: 11 specifies the system directory WINDOWS/SYSTEM or WINNT/SYSTEM32; 10 specifies the windows directory, WINDOWS or WINNT. If no DestDir is specified (typical case), code is installed in the fixed OCCACHE directory.
The "clsid" is the CLSID of the control to be installed.
Once you have created an INF file, run the CABARC utility (available in the Mssdk\Bin directory) to create the CAB file. You should run CABARC in the directory that contains your source files. On the command line, put the source files in the order they appear in the INF and the INF file last. For example, to make a CAB file for the Polygon control from the INF above, use the following command:
Copy Code
C:\MSSDK\BIN\CABARC -s 6144 POLYGON.CAB ATL.DLL POLYGON.DLL POLYGON.INF
The POLYGON.CAB file contains a compressed version of ATL.DLL and POLYGON.DLL along with the information needed to extract them in the POLYGON.INF file.
For an example of how to parse and extract component files from CAB files, see the CabView sample in the MSDN Online Code Center at http://msdn.microsoft.com/visualc/downloads/samples.asp (select the CabView link).
The DLL files you need to include with an MFC control are MSVCRT.DLL, MFC42.DLL, and OLEPRO32.DLL.
Running the CABARC Utility
The CABARC utility is available in the Mssdk\Bin directory. For example:
Copy Code
C:\MSSDK\BIN\CABARC -s 6144 n MYCTL.CAB NEEDED1.DLL NEEDED2.DLL MYCTL.OCX MYCTL.INF
CABARC creates a CAB file called MYCTL.CAB.
You should run CABARC in the directory that contains your source files (the INF, OCX, and DLL files). The files to be archived in the CAB file should be listed on the command line in the same order they are listed in the INF file. In the example above, the INF file should list NEEDED1.DLL first, then NEEDED2.DLL, and then MYCTL.OCX.
The -s option reserves space in the cabinet for code signing. The n command specifies that you want to create a CAB file. For a list of CABARC commands and options, type CABARC alone on the command line:
Copy Code
C:\MSSDK\BIN\CABARC
Click to expand...
Click to collapse
I found an older version of this online:
http://www.aperitto.com/content/view/14/159/
I have version 2.0 and it works great without registering the copy. Look into it
I can't find the original setup I used... sorry, I will keep looking... but I've heard good things about SPB's installatation creator
http://www.spbsoftwarehouse.com/products/ezsetup/index.html?en
It is easy with VS 2008 there you can create a CAB Builder

[HOWTO] Modify any DLL or EXE Files you want!!

Hello!
Now I found a way to Edit DLL, EXE, MUI and all other files for WM5 and WM6!
I ever had problems with the Signature in the Files bur now i have the Solution!
In This package i attached, there is a UnSigner, Signer, Editor and the Certificate for the Phone!
Step1:
First you must Unsign the file you want to edit!
Just go into the Unsign dir and drop the file over UnSigner.exe.
A DOS-Window will popup for a short time, the file is now unsigned!​Step2:
Now you can edit the file! I placed the reshacker into the package...​
Step3:
If you edited the file successfully, you must sign it again!
Go into the Sign dir and open siggner.exe. Then choose the file you edited and take the "SDKSamplePrivDeveloper" Certificate.
Press "Start sign process" and close it​
Viola, now your file is Modified and signed!!!
thx 4 tools in one place.
Method is rather..known, but good.
Hi,
thanks for your good work.
wfg
starbase64
thx nice works i need that
great software suite thanks
i tried this but still cant copy into the \windows\ directory, i can copy from from \windows\ dir tho
thx 4 share.....
gh0st- said:
i tried this but still cant copy into the \windows\ directory, i can copy from from \windows\ dir tho
Click to expand...
Click to collapse
I have not figured this out myself eather, i read "everywhere" to use activesync, but how do i copy a file trough activesync?
schreda said:
Hello!
Now I found a way to Edit DLL, EXE, MUI and all other files for WM5 and WM6!
I ever had problems with the Signature in the Files bur now i have the Solution!
In This package i attached, there is a UnSigner, Signer, Editor and the Certificate for the Phone!
Step1:
First you must Unsign the file you want to edit!
Just go into the Unsign dir and drop the file over UnSigner.exe.
A DOS-Window will popup for a short time, the file is now unsigned!​Step2:
Now you can edit the file! I placed the reshacker into the package...​
Step3:
If you edited the file successfully, you must sign it again!
Go into the Sign dir and open siggner.exe. Then choose the file you edited and take the "SDKSamplePrivDeveloper" Certificate.
Press "Start sign process" and close it​
Viola, now your file is Modified and signed!!!
Click to expand...
Click to collapse
THANKS! Your pakage was very helpful to me and the two certificate cab's did it for me. Now i can translate my M2D into Swedish.
ToddeSwe
i want to modify a dll file
hi, I want to modify a dll file called invdb32.dll in this file an option is block i want to open it, any body help me?
[email protected]
good job! thanx dude
Is there a way we can view the images instead of a bunch of numbers and stuff? BTW great job man! Thank you!
Thanks for sharing
Is this can work with Windows vista
modify the manilla2d exe with this to support animated weather other than rain???
Can i use this to change the Samsung Omnia Menu to different programs being shown? Instead of TouhPlayer Kinoma?
I was able to unsign, modify and then sign a DLL file. But when I opened it in PE Explorer to check it, it gives me errors that the file is now too long. Take it you can't make additions, only changes?
EDIT: Here's the exact error I'm receiving, not sure if it's fixable or not;
03.01.2009 21:03:04 : EOF Extra Data From: 0008C400h (574464)
03.01.2009 21:03:04 : Length of EOF Extra Data: 00001948h (6472) bytes.
03.01.2009 21:03:04 : EOF Position: 0008DD48h (580936)
03.01.2009 21:03:04 : Error! (Step: Examining Exports)
03.01.2009 21:03:04 : Errors detected! Opening file in SAFE MODE...
03.01.2009 21:03:04 : Done.
the original file showed the following;
03.01.2009 21:02:25 : EOF Position: 0008C400h (574464)
03.01.2009 21:02:25 : Done.
converting dll to VGA
hi, i need expert help from any of you to kindly convert this enclosed dll file to VGA 191dpi for my Raphael. this file is part of PHM ppc Plus to enable clibboard in SIP. thanks in advance for your help
MEditor: Simplicity
Hi guys,
I've decided to make it quite a bit easier. Just open up the attached .zip
file, extract the MEditor to Program Files, and double-click Install Context
Menus.reg (confirm if a warning pops up).
Now, to edit a dll, mui, or exe file, just right-click on it and press Edit with
ResHacker. Once you're done editing, just save the file, close ResHacker,
and it'll take care of re-signing the file for you
How it works
I didn't mean to make this post a big deal, but I'd just like to explain how this
thing works. I've added the necessary registry files for adding or removing
(if you choose) the Context Menus for "Edit with ResHacker". It calls
C:\Program Files\MEditor\open.bat, which opens a batch window (do not
close it until you're done editing, it will close itself) that removes the
readonly, archive, system, and hidden attributes off the file, then unsigns it,
then opens ResHacker.exe to edit it. When you close ResHacker.exe, it
automatically signs the file and adds the readonly and system attributes
(hidden and archive aren't necessary). Not very complicated if you think
about it, but it's what I use
smotrs said:
I was able to unsign, modify and then sign a DLL file. But when I opened it in PE Explorer to check it, it gives me errors that the file is now too long. Take it you can't make additions, only changes?
Click to expand...
Click to collapse
Same problem. Internal adresses are being messed up. Tried expanding array in IDA and adding complimentary bits in HEX Editor. No luck. This has to be possible right? Shifting the entire code a few bits as to add a few characters here and there? Please someone, this is driving me nuts.
Help On exrtacting the *.dll file from windows folder
Hello has any one been able to remove the file from the windows folder tried resco and total commander but in vain ..
Awaitin help...

What software do I need to decompile a apk?

I need a program to decompile a apk for cm7, to make a rom and my question is what program do I need? from already thank :laugh:
frixed said:
I need a program to decompile a apk for cm7, to make a rom and my question is what program do I need? from already thank :laugh:
Click to expand...
Click to collapse
Try this guide: http://forum.xda-developers.com/showthread.php?t=1989533
you mean like extracting the files from apk file...........you can always use 7zip or winrar
it will extract the file in it like as if unzipping any file.....there you will find the xml files and any media and metadata folder dont know what else
you can use ApkMultiTool to decompile, edit, sign and install apks
apktool & the likes will generate smali code, which is a real mess. Here's how you should proceed to get readable java sources from an apk (for educational purposes only!)
Use apktool only to extract the /res folder from an apk
Extract the classes.dex from your apk (either with an archive manager or in terminal with the following command) :
Code:
unzip yourapp.apk classes.dex
Download dex2jar, put your classes.dex in the same folder and cd to it, then :
Code:
bash d2j-dex2jar.sh classes.dex
Download JD-GUI, put it in the same folder as dex2jar & classes.dex and cd to it, then :
Code:
./jd-gui classes.dex.dex2jar.jar /[COLOR="Green"]/or whatever the generated .jar file's name is[/COLOR]
This will open the jd-gui IDE with all the java sources of your apk, hit source/export all sources (or something like that, I don't remember exactly)
Add the /res folder you extracted with apktool to the /src folder you extracted with dex2jar/jd-gui and import the whole thing as existing Android code into Eclipse
There you go, you now have a full eclipse project out of an apk, the decompilation might have generated a few errors in the code during the process though, you'll need to fix them to be able to rebuild the apk.

[Utility][Tool]baksmali/smali

- What is baksmali/smali?
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
The names "smali" and "baksmali" are equivalents of "assembler" and "disassembler" respectively.
- Author of the tool
JesusFreke
- Why we need it?
Android apk and jar files will include java classes to execute certain functionality. With baksmali, you will be able to disassemble the java classes into editable form (smalis) so you can do your editing and modding involving java script. Once you done changing, you need to assemble all classes to a readable form for android, i.e, classes.dex and here comes the role of assembler (Smali).
Since we have apk manager, do we still need this tool?
Yes and No!!! Because some apk managers even if they do support jar files but once they decompile smalis, they will remove some lines (.line, .parameter, ...etc) which are in my opinion are useful to locate some codes. So the choice is yours.
- What does this tool do?
Simply it baksmali classes.dex of android apk and jar files into editable form (smalis) to do your changes; then assemble it back (smali).
- Will it affect apk and jar original signature?
No, it will preserve original signature.
- Got problem?
During assembling (smali), you may got error message. You can check log file to locate what is wrong that make the manager stop assembling the file or post the log file for developers to look into it.
- What are the steps to work with this tool?
Run Baksmali_tool.bat file, this will create all needed folders in the first run.
1. Put android apk or jar file in "put-file-here" folder. If Current-file status is set to None, then either you need to set a file in option #3 or you forget putting valid file in "put-file-here" folder.
2. When Current-file status is set to your file, you can disassemble its classes.dex by option #1.
3. Classout folder with name of file project will be created in "project" folder; make your changes there.
4. If finished your changes, assemble classout folder by option #2.
5. If everything is OK, a new file will be created in "finish" folder with tag (Modded_) in its name, push it to your device by option #3 if it was system apk or jar; and if it was non system apk file, install it by option #4.
- Latest stable version
Latest stable baksmali/smali version: 2.2.2 (30.10.2017)
baksmali v. 2.2.2 - Download (bitbucket.org)
smali v. 2.2.2 - Download (bitbucket.org)
baksmali/smaly previous versions - Download (bitbucket.org)
- Latest beta version
Latest beta baksmali/smali version:
- Changelog
baksmali/smali wiki and changelog (github)
- Where can I download latest source code?
You can visit
baksmali/smali source page (github)
and you can download the latest smali and baksmali code versions.
- Special Thanks to XDA Portal Team
Special thanks to XDA Portal Team for featuring this utility
XDA Portal Team
..
hi m8,
thanks for this nice tool
will try it next time I make a new theme
sent from my G-Note
great work majd keep it up
no credit to the author of smali/baksmali? :/
iBotPeaches said:
no credit to the author of smali/baksmali? :/
Click to expand...
Click to collapse
I think the authers are these guys ([email protected], [email protected], JesusFr.. @gmail.com) from project page.. aren't they??? if so I will update OP
majdinj said:
I think the authers are these guys ([email protected], [email protected], JesusFr.. @gmail.com) from project page.. aren't they??? if so I will update OP
Click to expand...
Click to collapse
Yes, thats the same person. I'd just put JesusFreke, as thats his username.
Version 1.1 is online
version 1.2 is online
some bugs fixed
Grate dev, Great tool...tnx majdini:fingers-crossed:
What a great idea to simplify life ^^.
Thanks majdinj.
majdinj said:
Backsmali / Smali Manager​
What is Backsmali / Smali?
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
The names "smali" and "baksmali" are equivalents of "assembler" and "disassembler" respectively.
Why we need it?
Android apk and jar files will include java classes to execute certain functionality. With backsmali, you will be able to disassemble the java classes into editable form (smalis) so you can do your editing and modding involving java script. Once you done changing, you need to assemble all classes to a readable form for android, i.e, classes.dex and here comes the role of assembler (Smali).
Since we have apk manager, do we still need this tool?
Yes and No!!! Because some apk managers even if they do support jar files but once they decompile smalis, they will remove some lines (.line, .parameter, ...etc) which are in my opinion are useful to locate some codes. So the choice is yours.
What does this tool do?
Simply it backsmali classes.dex of android apk and jar files into editable form (smalis) to do your changes; then assemble it back (smali).
Will it affect apk and jar original signature?
No, it will preserve original signature.
Got problem?
During assembling (smali), you may got error message. You can check log file to locate what is wrong that make the manager stop assembling the file or post the log file for developers to look into it.
What are the steps to work with this manager?
Run Backsmali_tool.bat file, this will create all needed folders in the first run..
1. Put android apk or jar file in "put-file-here" folder. If Current-file status is set to None, then either you need to set a file in option #3 or you forget putting valid file in "put-file-here" folder.
2. When Current-file status is set to your file, you can disassemble its classes.dex by option #1.
3. Classout folder with name of file project will be created in "project" folder; make your changes there.
4. If finished your changes, assemble classout folder by option #2.
5. If everything is OK, a new file will be created in "finish" folder with tag (Modded_) in its name, just rename it to its original name and push it to your device; don't forget to fix permissions as well.
If backsmali and smali code are outdated, what to do?
Just visit codes owner page, and download the latest smali and backsmali code versions and put them in "tools" folder (make sure to rename them to baksmali and smali without version number)
Future development?
Feel free to report any bugs or suggestion to improve upcoming releases :good:
Download
- Backsmali-Manager_v1.2 @ 11/June/2013 (The most recent one)
- Backsmali-Manager_v1.1 @ 7/June/2013 (old)
- Backsmali-Manager_v1 @ 6/June/2013 (old)
Change-log:
@ 11/June/2013 (v1.2):
- Fixed bug of file path in Read Log option.
- Fixed number 10 file that was not shown in Set Current-file option.
@ 7/June/2013 (v1.1):
- Deleting the folder and file in project and finish folder of same project name before backsmali or smali (no more overlapping :fingers-crossed.
- Added Read log file functionality in the main menu.
- Ability to open classout folder after backsmali.
- Ability to open finish folder after smali.
- Ability to renamed finished modded file to its original name.
- Neat smali and compression processing (i.e, hidden processing ).
- Fixed set Current-file option to visualize only apk and jar files.
@ 6/June/2013 (v1.0):
- First release of Backsmali / smali manager
Click to expand...
Click to collapse
i don't know how to start editing this smali file
badagila said:
i don't know how to start editing this smali file
Click to expand...
Click to collapse
Editing smali means to modify your jar or apk file to do certain new function, check the second thread in my signature in OP... you will find a lot editing tutorials of smalis of some android apps :laugh:
majdinj said:
Editing smali means to modify your jar or apk file to do certain new function, check the second thread in my signature in OP... you will find a lot editing tutorials of smalis of some android apps :laugh:
Click to expand...
Click to collapse
ok dude thanks
Hi, your work is featured here: http://ajqi.com/baksmali-smali-manager-windows-tool/
Keep it up!
VERY NICE!
Good Work..
I dont know much about smali backsmali.. but one confusion..
Is this tool also applicable if the files (apks or jars) we want to modify are odexed?
OJ said:
Good Work..
I dont know much about smali backsmali.. but one confusion..
Is this tool also applicable if the files (apks or jars) we want to modify are odexed?
Click to expand...
Click to collapse
No, actually classes.dex are made from the odex files.
If files are odexed, then there will be no classes.dex in apks or jar files. That's why it won't be applicable then
Version 1.3 is online
Change log:
- Added adb push finished file to device system partition (for system files).
- Ability to choose whether to reboot device after pushing files to device.
- Added adb install finished apk (for non-system files).
- Adjustable Java heap memory size.
- Adjustable finished file compression level.
- Updated Smali and Backsmali codes (date 15/6/2013).
@ 23/June/2013 (v1.4):
- Added Pull apk or jar From Android Device to the main menu.
- Added zipaligning process during Smali (better RAM management).
- Fixed apk installing process (added signing process step for installing apk process).
- Added direct link to this xda page in update option.
- More script polishing...
@ 29/June/2013 (v1.5-FINAL):
- Fixed adb remount bug for some ROMs in push option.
- Baksmali argument is updated; now you can choose whether to baksmali with x argument (retain .line, .parameter, .prologue, and .local) or b argument (remove .line, .parameter, .prologue, and .local).
Hi,
i've XP&Backsmali / Smali Manager v1.5 and i want baksmali framework.jar but i got error message(attachment)
I think wrong is slash (should be a backslash)
the same error is after i select 1(baksmali*)and then x and Y or
--------------------------------------------------------------and then b and Y
*baksmali or backsmali?

[SCRIPT] Quickly Convert *.java To *.smali Code

Most of us often want to add custom functionality to an existing apk and know how to do it in java, but don't know the exact dex/smali syntax. Trying to add this, there, test, error, debug, fix & hopefully getting it to work is common. To solve all of that trouble, I bring you this.
I made these little scripts to add an extension to Windows explorer shell for doing a task most people couldn't just do this easy. So now can just write your functionality in java, right-click the file & click Convert To *.smali and tada! You have the dex/smali compatible code which you can then paste it into your apk smali file.
Installation:
Download the attachment & extract the archive.
Run install.cmd as Administrator to install Windows Explorer shortcut.
You can also darg-n-drop files on convert.cmd to convert them.
Nice bro :thumsup:
Thank you very much. This is exactly what I need
Thanks for the information..
I would like you to help me with this issue since I do not want to work the conversion
it not work
where is the converted smali jfile?
Hello.
I click the right button of mouse and click the Convert to*.smali.
But I didn't the converted file.
could you lend me a hand?
vaibhavpandeyvpz said:
Most of us often want to add custom functionality to an existing apk and know how to do it in java, but don't know the exact dex/smali syntax. Trying to add this, there, test, error, debug, fix & hopefully getting it to work is common. To solve all of that trouble, I bring you this.
I made these little scripts to add an extension to Windows explorer shell for doing a task most people couldn't just do this easy. So now can just write your functionality in java, right-click the file & click Convert To *.smali and tada! You have the dex/smali compatible code which you can then paste it into your apk smali file.
Installation:
Download the attachment & extract the archive.
Run install.cmd as Administrator to install Windows Explorer shortcut.
You can also darg-n-drop files on convert.cmd to convert them.
Click to expand...
Click to collapse
Can you please update this. I tried running it on windows 10 and after that I don’t see the right click convert to smali
It's not working on Windows 10....Any updates on it?

Categories

Resources