Home > Search converters: apk to xap
Tool to inspect a XAP (Windows Phone app) file. A Java decompiler turns a.class file back into a.java file. While decompiled code is not perfect (no comments. Can we convert a html file to XAP (Windows application) file? Update Cancel. A d by Snowflake. Namely.apk for Android,.ipa for iOS and of course.xap for Windows Phone. NOTE: The zip file you uploading must have an 'index.html' file. Can we convert a.class file to a.java file?
Conversion of apk file format to xap file format beta
Search for apk to xap converter or software able to handle these file types.
Bookmark & share this page with others:
Conversion of Android apk packages to Windows Phone xap application format.
There is no way how you could directly convert Android installation package (.apk) to Microsoft Windows Phone or Microsoft Silverlight application package file (.xap), which is what users looking for apk to xap conversion want. You simply cannot convert apps meant for different platforms, via some kind of apk to xap converter app and you certainly can't run apk files on windows phone.
With that said a lot of developers provide apps for multiple platforms, so just check if the Android app is also available for Windows Phone or in desktop version based of Silverlight. The only other option would be a job for a program, i.e. to port the Android app for Windows.
Updated: April 15, 2019
Unfortunately, there is no detailed software record in the database for this conversion.
This conversion entry was verified by us and conversion from apk to xap was flagged as wrong or not possible.
Usually this happens when the conversion would try to convert different types of data between each other, such as audio to image, or it can't be done because incompatibility between programs, caused by closed file formats, very limited support or by other problems.
Usually this happens when the conversion would try to convert different types of data between each other, such as audio to image, or it can't be done because incompatibility between programs, caused by closed file formats, very limited support or by other problems.
If you find entry that you feel is flagged as bad wrongly, please tell us in the discussion form below with as much as information as possible so we can fix it.
Additional links: Open apk file, Open xap file
APK
An apk file extension is used for Google Android application packages for Android based devices. apk files are basically a renamed zip files, used to install apps to Android smart phones.
Files with apk file extension were also found in older GameSpy Arcade service for multiplayer gaming.
Files with apk file extension might also be found as projects from Active Tutor authoring tool by 4C Soft.
An apk file extension is related to the Microsoft Train Simulator and used for its packaged activity files. An apk files also uses Quake 2 first person action shooter computer game.
Files with apk file extension may also be application packages for Asustor ADM operating system. Not to be confused with Android files.
XAP
Files with xap file extension are mainly related to Windows Phone apps and Microsoft Silverlight installation resource files. Used for Silverlight apps.
![Windows Phone Xap File Decompiler Java Windows Phone Xap File Decompiler Java](/uploads/1/2/6/8/126881009/740022508.jpg)
Files with xap extension are used by Microsoft XACT program for one of its default file types. It is a document project saved in a text file format.
Files with xap file extension might also be potentially found as old scripts for Xbox 360 video console. Not related to later Silverlight or XACT packages.
Back to conversion search
Active2 months ago
The hard drive on my laptop just crashed and I lost all the source code for an app that I have been working on for the past two months.All I have is the APK file that is stored in my email from when I sent it to a friend.
Is there any way to extract my source code from this APK file?
Jeroen Vannevel36k1818 gold badges8585 silver badges144144 bronze badges
Frank BozzoFrank Bozzo6,04366 gold badges2121 silver badges2929 bronze badges
21 Answers
Simple way: use online tool http://www.javadecompilers.com/apk, upload apk and get source code.
Procedure for decoding .apk files, step-by-step method:
Step 1:
- Make a new folder and copy over the .apk file that you want to decode.
- Now rename the extension of this .apk file to .zip (e.g. rename from filename.apk to filename.zip) and save it. Now you can access the classes.dex files, etc. At this stage you are able to see drawables but not xml and java files, so continue.
Step 2:
- Now extract this .zip file in the same folder (or NEW FOLDER).
- Download dex2jar and extract it to the same folder (or NEW FOLDER).
- Move the classes.dex file into the dex2jar folder.
- Now open command prompt and change directory to that folder (or NEW FOLDER). Then write
d2j-dex2jar classes.dex
(for mac terminal or ubuntu write./d2j-dex2jar.sh classes.dex
) and press enter. You now have the classes.dex.dex2jar file in the same folder. - Download java decompiler, double click on jd-gui, click on open file, and open classes.dex.dex2jar file from that folder: now you get class files.
- Save all of these class files (In jd-gui, click File -> Save All Sources) by src name. At this stage you get the java source but the .xml files are still unreadable, so continue.
Step 3:
Now open another new folder
- Put in the .apk file which you want to decode
- Download the latest version of apktool AND apktool install window (both can be downloaded from the same link) and place them in the same folder
- Open a command window
- Now run command like
apktool if framework-res.apk
(if you don't have it get it here)and next apktool d myApp.apk
(where myApp.apk denotes the filename that you want to decode)
now you get a file folder in that folder and can easily read the apk's xml files.
Step 4:
It's not any step, just copy contents of both folders(in this case, both new folders) to the single one
and enjoy the source code...
This is an alternative description - just in case someone got stuck with the description above. Follow the steps:
- download
apktool.bat
(orapktool
for Linux) andapktool_<version>.jar
from http://ibotpeaches.github.io/Apktool/install/ - rename the jar file from above to
apktool.jar
and put both files in the same folder - open a dos box (
cmd.exe
) and change into that folder; verify that a Java Environment is installed (for Linux check the notes regarding required libraries as well) - Start:
apktool decode [apk file]
Intermediate result: resource files,AndroidManifest.xml
- unzip APK file with an unpacker of your choiceIntermediate result:
classes.dex
- download and extract
dex2jar-0.0.9.15.zip
from http://code.google.com/p/dex2jar/downloads/detail?name=dex2jar-0.0.9.15.zip&can=2&q= - drag and drop
classes.dex
ontodex2jar.bat
(or enter<path_to>dex2jar.bat classes.dex
in a DOS box; for Linux usedex2jar.sh
)Intermediate result:classes_dex2jar.jar
- unpack
classes_dex2jar.jar
(might be optional depending on used decompiler) - decompile your class files (e.g. with JD-GUI or DJ Decompiler)Result: source code
Note: it is not allowed to decompile third party packages; this guide is intended to recover personal source code from an APK file only; finally, the resulting code will most likely be obfuscated
Braiam3,62599 gold badges3636 silver badges6666 bronze badges
TrinimonTrinimon12.6k99 gold badges3535 silver badges5757 bronze badges
While you may be able to decompile your
APK
file, you will likely hit one big issue: Java Decompiler Exe
it's not going to return the code you wrote. It is instead going to return whatever the compiler inlined, with variables given random names, as well as functions given random names. It could take significantly more time to try to decompile and restore it into the code you had, than it will be to start over.
Sadly, things like this have killed many projects.
For the future, I highly recommend learning a Version Control System, like CVS, SVN and git etc.
For the future, I highly recommend learning a Version Control System, like CVS, SVN and git etc.
and how to back it up.
user6408711
Ryan GoolerRyan Gooler1,79611 gold badge1010 silver badges1414 bronze badges
There is also a new application on the Play Store with which it is possible to decompile an apk (system applications too) and view the source code right on your smartphone. It saves the files to your SD card so you can view it on your computer too. It does not require root or something else.
Just install and have fun. I think this is the easiest way to decompile an app.
CilencoCilenco2,7941212 gold badges5353 silver badges108108 bronze badges
apktool is the best thing you can try. I have saved some xml with it, but honestly I don't know how it will work with the .java code.
I would recommend you to have a code repository even if your are the only coder. I've been using Project Locker for my own projects. It gives you free svn and git repos.
Nikunj Paradva3,84622 gold badges2222 silver badges4040 bronze badges
MacarseMacarse63.3k4040 gold badges160160 silver badges224224 bronze badges
These two articles describe how to combine the use of
apktool
and dex2jar
to take an APK
file and create an Eclipse project that can build and run it.Basically you:
- Use
apktool
to get the resource files out of the apk - Use
dex2jar
to get a jar file that contains the classes in a format that Eclipse will like. - Create an Eclipse project point it at the resource files and the new jar file
- Open the jar file with a zip utility and delete the existing resources
- Open the jar file with
JDGui
to view the source code - Take whatever source code you need from
JDGui
, stick it in a class inside Eclipse and modify it - Delete that class from the jar file (so you don't have the same class defined multiple times)
- Run it.
user6408711
Tom HennenTom Hennen2,23766 gold badges2727 silver badges3939 bronze badges
apktool will work. You don't even need to know the keystore to extract the source code (which is a bit scary). The main downside is that the source is presented in Smali format instead of Java. Other files such as the icon and main.xml come through perfectly fine though and it may be worth your time to at least recover those. Ultimately, you will most likely need to re-write your Java code from scratch.
You can find apktool here. Simply just download apktool and the appropriate helper (for Windows, Linux, or Mac OS). I recommend using a tool such as 7-zip to unpack them.
Ryan BergerRyan Berger7,97866 gold badges3939 silver badges5454 bronze badges
There are a few ways to do this:
- Use the 'Profile or Debug APK' feature in Android Studio 3.0.It allows you to open and explore APKs in Android Studio. Classes are decompiled into smali. Resources are not extracted and things like 'Go to Definition', 'Find All References' and debugging don't work without the source code (android studio 3.0 canary 9). Some additional smali features might work with smalidea.
- Use jadx.Jadx decompiles the code in a given APK to java source files.
- Use apktool.Apktool is a command line tool which extracts resources and decompiles code into smali for a given apk. You can recompile using apktool also. Here's an example of it in action:
7,48233 gold badges3434 silver badges4545 bronze badges
May be the easy one to see the source:
In Android studio 2.3,
You will see it's source code.
Build -> Analyze APK -> Select the apk that you want to decompile
.You will see it's source code.
Link for reference:
https://medium.com/google-developers/making-the-most-of-the-apk-analyzer-c066cb871ea2
SKKSKKhttps://medium.com/google-developers/making-the-most-of-the-apk-analyzer-c066cb871ea2
94333 gold badges2222 silver badges4646 bronze badges
I'll show you other way to decompile the .apk files.
You can follow the first 2 steps from 'prankul garg'. So you have another opportunities:
Step 3':
Download the 'JD-GUI', thats easy to found this one.Open your .jar file in 'jd-gui.exe'. (File > Open file > 'found your .jar file'). After this procedure, you can save all resources in a .zip file.
So,
1st - You have to rename the .apk file to .zip
2nd - You have to decode .dex file (if you want, decode the .apk file to dex2jar, that's possible)
3rd - You have to decode .jar file with JD-GUI
Franklin HirataFranklin Hirata
Below ONLINE tool:
it do ALL by one click: decompiled .java files + resources + xml (in one .zip file) with very good decompiler (jadx return java code in places/functions where other compiles return comments inside function like 'unable to decompile' or some android assembler/machine code)
Vadim Kotov5,38877 gold badges3636 silver badges4949 bronze badges
Kamil KiełczewskiKamil Kiełczewski20.2k88 gold badges9393 silver badges115115 bronze badges
This site https://www.apkdecompilers.com/ did it automatically.
I tried the site mentioned in the accepted answer first but that didn't work for me.
M. Usman KhanM. Usman Khan4,69211 gold badge4040 silver badges5050 bronze badges
I personally recommend Show Java Android App to get the source code. You can download it from play store or from here
CodeloverCodelover
Apktool for reverse engineering 3rd party, closed, binary Android apps.
It can decode resources to nearly original form and rebuild them after making some modifications.
It makes possible to debug smali code step by step. Also it makes working with an app easier because of project-like file structure and automation of some repetitive tasks like building apk, etc.
Biswajit KarmakarBiswajit Karmakar7,56233 gold badges2828 silver badges3636 bronze badges
apktool is THE way to go.Online apktool service exists as well: http://www.javadecompilers.com/apktool
Some limitations, obviously, exist due to the service ‘online nature’: you may extract and research assets and the manifest file, but it is impossible to recompile the application at the moment.
Still, this is a no-hassle way to 'open' the android application.
Andrew RukinAndrew Rukin
You can try DexPatcher. It even integrates with Android Studio. It uses Apktool and Dex2Jar internally.
You can use those tools independently as well.Apktool decompiles apk, and extracts .dex files, which can further be converted to jar using Dex2Jar. Jar can be decompiled by using JD-GUI. You can see the Java code with the help of that tool. Although the similarity of decompiled code to the actual code cannot be guaranteed. There are some advanced code obfuscation tools available in the market, which mess up the code to make it difficult to decompile / understand. eg. Proguard
Lakshmikant DeshpandeLakshmikant DeshpandeYou can use those tools independently as well.Apktool decompiles apk, and extracts .dex files, which can further be converted to jar using Dex2Jar. Jar can be decompiled by using JD-GUI. You can see the Java code with the help of that tool. Although the similarity of decompiled code to the actual code cannot be guaranteed. There are some advanced code obfuscation tools available in the market, which mess up the code to make it difficult to decompile / understand. eg. Proguard
54011 gold badge66 silver badges2323 bronze badges
Android studio offers you to analyse any apk file.
1 - From build menu choose analyse apk option and select apk file.2 - This will result in you the classes.dex file and other files.3 - Click on classes.dex which will give you the list of folders, packages, libraries and files.4 - From and android studio settings install a plugin called 'Dex to Jar' 5 - click on any activity file of your extracted project and choose dex to jar from the build menu.
This will result in you the actual code of your java file.
Cheers.
Rohit PatilRohit Patil
The simplest way is using Apk OneClick Decompiler. That is 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.
You can download it from this link Apk OneClick Decompiler
Enjoy that.
Masoud MokhtariMasoud Mokhtari1,33811 gold badge77 silver badges2727 bronze badges
I found the following as the simplest method:
- Rename your app.apk to app.zip (Change extension from apk to zip)
- Extract the zip file into a folder
- Use JADX tool to read the source code, present in classes.dex file.
Masood AnwarMasood Anwar
There's an app for that and generally takes just a few clicks and you are done.https://github.com/Nuvolect/DeepDive-Android
- Select Apps, under 'Installed Apps' select your app. If it is notthere you can load the APK.
- Select 'Extract APK'
- Select 'Unpack APK'
- Select 'Decompile with Jadx'. This can take a few seconds or a few minutes depending on the speed of your device
After that you can browse the source code, download it to another computer with elFinder or search through it using Lucene.
In addition to Jadx it has CFR and Fernflower decompilers.
MobileMateoMobileMateo
based on your condition, if your android apk:
Choice1: using online service
such as:
using www.javadecompilers.com
goto:
- http://www.javadecompilers.com/apk
- Note: internally using Jadx
to auto decode from apk to java sourcecode
steps:
upload
apk file + click Run
+ wait some time + click Download
to get zip + unzip ->sources/com/{yourCompanyName}/{yourProjectName}
is your expected java source code
Choice2: decompile/crack by yourself
use related tool to decompile/crack by yourself:
use jadx
/jadx-gui
convert apk
to java sourcecode
download jadx-0.9.0.zip then unzip to got
bin/jadx
, then:- command line mode:
- in terminal run:
jadx-0.9.0/bin/jadx -o output_folder /path_to_your_apk/your_apk_file.apk
- output_folder will show decoded
sources
andresources
sources/com/{yourCompanyName}/{yourProjectName}
is your expectedjava sourcecode
- in terminal run:
- GUI mode
- double click to run
jadx-0.9.0/bin/jadx-gui
(Linux'sjadx-gui.sh
/ Windows'sjadx-gui.bat
) - open
apk
file - it will auto decoding -> see your expected java sourcecode
save all
orsave as Gradle project
- double click to run
eg:
the main method of
3 steps
:apk/app to dex
dex to jar
jar to java src
detailed explanation:
Step1: apk/app to dex
use tool (
FDex2
/DumpDex) dump/hook out (one or multiple) dex
file from running appsteps:
prepare environment
- a
root
ed android- real phone
- or emulator
- here using ChineseNox App Player夜神安卓模拟器
- install your android apk
- to the phone or emulator
- installed Xposed Installer
- install
FDex2
/DumpDex into XPosed and enable it- Note: need restart Xposed to make FDex2 work
- FDex2 download address, Chinese:
- 链接: https://pan.baidu.com/s/1lTF8CN96bxWpFwv7J174lg 提取码: 3e3t
- install your android apk to phone/emulator
dump out dex
from running app
- run
FDex2
then click your apk name to enable later to capture/hook out dex - (in phone/emulator) run your app
- find and copy out the dump out whole apk resources in
/data/data/com/yourCompanyName/yourProjectName
- in its root folder normally will find several
dex
file
- in its root folder normally will find several
Step2: dex to jar
use tool (
dex2jar
) convert (the specific, containing app logic) dex
file to jar
filedownload dex2jar got dex-tools-2.1-SNAPSHOT.zip, unzip got
dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh
, thensh dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh -f your_dex_name.dex
eg:
Step3: jar to java src
use one of tools:
- Procyon
- GUI tool based on procyon:
- some others:
convert
jar
to java src
for from jar to java src converting effect:
Jadx
>Procyon
>CRF
>>JD-GUI
Windows Exe Decompiler
so recommend use:
Jadx
/jadx-gui
steps:
- double click to run
jadx-gui
- open
dex
file File
->save all
eg:
exported java src:
More detailed explanation can see my online ebook Chinese tutorial:
- 安卓应用的安全和破解
- tutorial's source code on github: crifan/android_app_security_crack: 安卓应用的安全和破解
5,04911 gold badge1919 silver badges1616 bronze badges
protected by Community♦Jun 2 '11 at 5:18
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?