STAY HOME! STAY SaVE

Techies Net
  • Home
  • Software
    • Dotiny
  • Web & App Development
    • Website Builder
    • App Development
  • Request Review
  • Advertise
  • Mobile App
  • Contact Us

How To Get Source Code (JAVA & XML) From An Android APK File[Video]

12/11/2014

126 Comments

 
Did you ever think is it possible to edit an APK file or change the way it works? Or maybe change its design & look? No? The answer is yes, It is possible to break the code. Today I am going to show you some tricks through which you can extract the source code from the exiting Android  APK files. 
Java Source Code
The Android APK files are compressed files which consist of Java files, Xml file and some other necessary files. So first we need to extract them. The source code will be extracted in two files separately Java & Xml. The procedure for this shown below. This procedure is not so very easy. It is a tricky process, you will need some tools to perform this process. Follow the steps below after successfully installing that tools. You will also need an .apk file which you want to edit or extract. 

Steps To Extract Source Code (JAVA & XML) From An Android APK File

Pre -Requisites
First of all you need to download the following things as stated under:
  • Dex2Jar or from here (For JAVA Code)
  • Java Decompiler  or from here (For JAVA Code)
  • APK TOOL or from here
  • APK Install or from here
Steps to Extract Source Code (Java)
  • Extract all the pre - requistics files.
  • Download your apk file and paste it on your desktop.
  • Rename your application (.apk to .zip) i.e. (ex: techiesnet.apk to techiesnet.zip)
  • Now extract the techiesnet.zip file.
Extracting Techies Net.zip file
Extracting Techies Net
  • Open the Techies Net folder, there you will find the classes.dex file.
Classes.dex file
  • Copy the classes.dex file and paste it in Dex2jar folder.
Classes.dex file
  • Now open the command prompt (Run -> Cmd -> Enter). There locate the cmd to your folder (ex: cd C:\Users\Shoeb Ahmad Fareed\Desktop\dex2jar-0.0.9.15)
  • Enter a command "dex2jar classes.dex"  -> Enter
  • Automatically classes_dex2jar.jar file will be created.
Classes.jar file
  • Now to go to Jd-Gui folder (Dex Compiler) -> Open jd-gui.exe
  • Go to File -> Open File and Locate the classes_dex2jar.jar file from Dex2jar folder
  • All the source will be displayed. Go to File -> Save all sources
  • By this you will get the source code of your application
Jar to source code (DexCompiler)
Steps To Extract XML Files
  • Create a XML folder on desktop. In that folder paste Apk tool, Apk install and android apk (techiesnet.apk) in that folder. (See the screenshot below)
Extracting XML files
  • Now open command prompt -> Locate your XML folder using the command "cd C:\Users\Shoeb Ahmad Fareed\Desktop\XML" -> Enter
  • There write the command "apktool d Techiesnet.apk" -> Enter
  • (Note: Replace Techiesnet with your application name)
  • Once all the process is completed. A folder with your application name will be created containing All the XML files.
cmd
  • As now you have got both android source code (java) and (XML). Combine them, and you can easily import the folder in your Android Development Tools using your Android_Manifest.xml file.
  • We think, you enjoyed the topic. Please let us know if you have queries.
Android Developer Tools

Author : Shoeb Ahmad Fareed

Shoeb Ahmad Fareed
Designation: Founder & CEO
Bio: A Technology Leninist who believe success can be only be achieved if one has a practical implementation knowledge. He is a Computer Science Engineer, a professional blogger and a debugger.

Share This Post




126 Comments
marc
26/11/2014 10:06:03 am

Hi!
thank you for this tutorial...
but i got a question...at the end of the process, i got xml and java, but how can i combine them with the manifest?

how can i build a new project, so building an app?
(i'm using eclipse)

Reply
salman
23/3/2016 08:11:21 pm

DId you get an answer yet ?

Reply
lavan
17/5/2016 08:18:41 pm

DId you get an answer yet ?

Reply
ponnu link
14/1/2017 04:50:42 pm

how to combine xml & java code???

Reply
Waqas Munir link
6/12/2014 03:11:39 pm

I need your help buddy. I have got the xml and java files but I do not how to combine them and how to open them in android developer tools to edit. I want to ad admob in my files. I have bought a software to make apps but that software does not allow interstitial ads. I want to edit code and make it possible. Can you please tell me how to open these files and edit them in eclipse?

Reply
sariputra
9/12/2014 05:38:17 am

Did any body got solution for 2 comments???

Reply
Waqas Munir
14/12/2014 03:00:37 pm

not yet.

Syed Sadrul Ullah Sahad
20/6/2015 04:43:45 am

just create a new project in Eclipse and try to copy the needed code only

Lux link
5/6/2016 05:06:51 pm

A good dev never buys any software, he cracks the fuck out of it

Reply
Girmay
12/1/2015 02:36:44 pm

wow!!!
that was incredible for your precious time and soon you will make it full ...I like it alot thax buddy

Reply
Avi
4/3/2015 04:13:35 am

I couldn't extract the xml file.Whenever i try to extract it's some error

Reply
sonali link
21/9/2015 03:56:24 pm

same problem..even i couldn't extract the xml files while entering apktool d appname.apk it shows the error "apktool is not recognised as an internal or external command"

Reply
Kamel_912
11/1/2016 07:03:12 am

after you decompress the apktool and apk install
get the files out from the folders to the xml folderwith the apk

Peter
6/3/2015 10:23:27 pm

Did any body got solution for 2 comments??? pls we have same problem

Reply
chakibovic
28/3/2015 03:44:11 pm

i don't think this will work on java phone

Reply
kintu
30/3/2015 04:18:59 am

Plz tell me how to extract .xml file from .apk ?
Please send me apktool and apkinstall.zip file on my email id.

Reply
habib
23/9/2015 02:34:19 pm

send me your email id and your cellphone number

Reply
Jazz
1/4/2015 08:48:44 am

It dint created source zip file after all the command operations. I have created folder inside the Music. Does it have a problem with that ?

Reply
Floresca
21/4/2015 05:35:06 am

Hi! Can you please help me with my problem, I couldn't get the xml because of this error

I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
2)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more

Reply
Vikki
2/6/2015 12:03:28 pm

I got this too, followed all the step exactly, through the written and video tutorials, also how do you combine the files to put them in android studio/eclipse

Reply
kunal
30/6/2015 11:00:31 am

dear that file is old apktool so download apktool_2.0.0 from google
that will work

Reply
Sérgio link
12/6/2016 11:16:49 pm

Thank you so much, it works now!

LENEMOD
20/10/2016 02:14:54 am

thanks worked nice

Himanshu
22/2/2017 03:12:39 pm

I tried doing the same but still getting the errors. What shall I do ?

Saad
11/9/2015 08:59:08 pm

I am also face same problem

Reply
sonali link
21/9/2015 04:06:58 pm

can u plz tell mi how u can wrote that command "apktool d appname.apk"

Reply
Sam
21/11/2015 09:21:38 am

Use --no-res option

apktool --no-res d app.apk

Sam
21/11/2015 09:22:39 am

Use --no-res option

apktool --no-res d app.apk

Reply
robin
5/5/2016 11:15:40 am

using apktool --no-res d app.apk
xml and java file extracting simultaneously
is correct or not

Edwin
17/2/2016 03:55:09 pm

download apktool_2.0.3.jar and rename to apktool.jar and replace the old one in the XML folder and run the cmd.

Reply
sana
2/5/2015 10:09:28 am

i have same problem as Floresca have....

Reply
Shoeb Ahmad Fareed - Admin
8/5/2015 01:47:47 pm

Every body please follow our video tutorial if you are facing problems in extracting code using the written steps.

Reply
Alexander
8/5/2015 08:59:58 pm

I could extract XML files correctly but then I have the same problem as "Floresca" with other apks. I follow the correct instructions every time. Is it possible that some apks XMLs files cannot be extracted???

Or is there another way to extract???

Thanks in advanced Mr. Shoeb Ahmad Fareed

Reply
maylean link
7/7/2015 05:51:24 am

Great tutorial, thanks

Reply
deepak borade
14/7/2015 05:10:27 am

superb blog.it work

Reply
Pradip Mhase
15/7/2015 09:10:43 am

Great blog. it works. guys who have get error those guys download apktool_2.0.0 from google. & rename it to apktool. it works.

Reply
sandeep
26/7/2015 10:27:10 am

i have got both the java and xml file,but i am not able to combine them using andriod studio.plz help me.give me suggestions.

Reply
Ali Hamza
26/7/2015 06:35:58 pm

I did as it is but i didn't get XML files. instead of it i get only one folder with name "smali"
Kindly help me to solve this problem
Thank You

Reply
Ekrem
15/12/2015 07:29:03 pm

i got same smali files, did u fix it ,
if yes
can u please send me what did u do
ekremozdemir99@gmail.com

Reply
shamili
4/8/2015 05:31:25 am

Thank you so much

Reply
Amit link
22/8/2015 05:42:21 pm

thanks....

Reply
Sushant
20/9/2015 07:51:06 pm

Hi All,

I could not extract java file because of below error.
I am getting this error after executing "dex2jar classes.dex
" command.

Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Please help me on extracting java file.
Thanks in advance :-)

Reply
Matthias
8/10/2015 03:35:11 am

Hello,

i have here a App which i want to decompile for a very Little Change.
But i am not able to create the XML files. The tool produces a error.

Can i send you the App and , if you want, can you try it please ?

Thamks
Matthias

Reply
raj
12/10/2015 08:36:38 pm

when i write commad in command prompt it says " 'dex2jar' is not recognized as an interal or external command.....plz reply me

Reply
Anurag
27/6/2016 07:50:56 pm

Use the command
d2j-dex2jar classes.dex

Reply
shah
9/2/2017 03:56:37 am

i was having the same problem.
but now i have resolved this . to resolve this you have to find the dex2jar.bat file name . as for example i found it as d2j-dex2jar.bat then replace your command as d2j-dex2jar classes.dex and then press enter . then you can easily create classes dex file . try this it will resolve ut problem

Reply
Hani Khan
13/10/2015 11:16:59 pm

Really nice tutorial and helpful. Only missing piece is that if you are using this solution in 2015, please download the latest APKTOOL jar

Reply
agus link
22/10/2015 08:45:23 am

How to Recompling it?

Reply
tavy
2/11/2015 11:55:55 pm

Great tutorial, thanks a lot !
does anyone know how to rebuild him in eclipse ?

Reply
jaydeep more link
4/11/2015 10:55:47 am

thanks brother

Reply
codingwap link
8/11/2015 08:20:11 am

package net.adxmi.android;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebView;
import android.widget.FrameLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import net.adxmi.android.b.a.i.a.i;
import net.adxmi.android.b.a.j.b.f;
import net.adxmi.android.b.a.j.b.l;
import net.adxmi.android.b.a.j.j;
import net.adxmi.android.b.a.j.k;
import org.apache.http.util.EncodingUtils;

public class AdBrowser
extends Activity
implements net.adxmi.android.b.a.e.d.b, net.adxmi.android.b.a.i.a.b.c, net.adxmi.android.b.a.i.a.b.g, net.adxmi.android.b.a.j.a.a, l, net.adxmi.android.b.a.j.c, j
{
protected net.adxmi.android.b.a.e.g.c a;
protected net.adxmi.android.b.a.i.a.b b;
protected k c;
private RelativeLayout d;
private net.adxmi.android.b.a.j.b e;
private net.adxmi.android.b.a.j.d f;
private net.adxmi.android.b.a.e.a.b.a g;

protected void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
n();
this.d = new RelativeLayout(this);
this.d.setBackgroundColor(-1);
AdBrowser localAdBrowser = this;
this.g = new net.adxmi.android.b.a.e.a.b.a(localAdBrowser, this, this.a);
RelativeLayout.LayoutParams localLayoutParams1 = new RelativeLayout.LayoutParams(-1, -1);
if ((this.a.d() & 0x10) != 0) {
try
{
boolean bool = (this.a.d() & 0x20) != 0;
this.f = new net.adxmi.android.b.a.j.d(this, this.a.j(), this, bool);
this.f.setId(2);
net.adxmi.android.b.a.j.a.b.a().a(this);
RelativeLayout.LayoutParams localLayoutParams3 = new RelativeLayout.LayoutParams(-1, -2);
localLayoutParams3.addRule(10);
this.d.addView(this.f, localLayoutParams3);
localLayoutParams1.addRule(3, 2);
}
catch (Throwable localThrowable1) {}
}
if ((this.a.d() & 0x8) != 0) {
try
{
this.e = new net.adxmi.android.b.a.j.b(this, this);
this.e.setId(4);
RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-1, -2);
localLayoutParams2.addRule(12);
this.d.addView(this.e, localLayoutParams2);
localLayoutParams1.addRule(2, 4);
}
catch (Throwable localThrowable2) {}
}
this.b = new net.adxmi.android.b.a.i.a.b(localAdBrowser, this.g, this.a.d(), this, this.a.k(), this.a.l(), 0, this.a.h(), this);
this.b.a(this);
this.b.getCurrentView().setId(3);
this.d.addView(this.b.getCurrentView(), localLayoutParams1);
setContentView(this.d);
a();
String str = this.a.n();
if ((this.a.m() == 2) && (str != null)) {
this.b.postUrl(this.a.o(), EncodingUtils.getBytes(str, "BASE64"));
} else {
this.b.loadUrl(this.a.o());
}
}

private void n()
{
try
{
this.a = ((net.adxmi.android.b.a.e.g.c)getIntent().getSerializableExtra("aca5522945c72310f9f22b333c68f2b3"));
if (this.a == null)
{
finish();
return;
}
}
catch (Throwable localThrowable) {}
}

public void a(String paramString) {}

public void a(WebView paramWebView, String paramString, Bitmap paramBitmap)
{
try
{
if ((this.e != null) && (this.b != null))
{
this.e.setBackEnable(this.b.canGoBack());
this.e.setForwardEnable(this.b.canGoForward());
}
}
catch (Throwable localThrowable) {}
}

public void a(WebView paramWebView, int paramInt, String paramString1, String paramString2)
{
try
{
if ((this.e != null) && (this.b != null))
{
this.e.setBackEnable(this.b.canGoBack());
this.e.setForwardEnable(this.b.canGoForward());
}
}
catch (Throwable localThrowable) {}
}

public void a(WebView paramWebView, String paramString)
{
try
{
if ((this.e != null) && (this.b != null))
{
this.e.setBackEnable(this.b.canGoBack());
this.e.setForwardEnable(this.b.canGoForward());
}
}
catch (Throwable localThrowable) {}
}

void a()
{
net.adxmi.android.b.b.k.g localg = net.adxmi.android.b.b.k.g.a(this);
int i = localg.a(34);
int j = localg.a(34);
FrameLayout.LayoutParams localLayoutParams = new FrameLayout.LayoutParams(i, j);
this.c = new k(this);
this.c.setOnClickListener(new a(this));
if (this.a != null) {
switch (this.a.c())
{
case 1:
localLayoutParams.gravity = 51;
break;
case 2:
localLayoutParams.gravity = 83;
break;
case 3:
localLayoutParams.gravity = 53;
break;
case 4:
localLayoutParams.gravity = 85;
break;
default:
this.c.setVisibility(8);
}
}
addContentView(this.c, localLayoutParams);
this.c.bringToFront();
}

public boolean onKeyDown(int paramInt, K

Reply
Haider Anjum
9/11/2015 03:12:48 am

"dex2jar command is not recognized "
how to get rid of this error?

Reply
PRINCE
14/1/2016 05:29:11 pm

Even im facing the same problem.
Someone please HELP!!!!!!!

Reply
Ajay Singh Chouhan link
9/2/2016 03:45:00 pm

please check this command:-
bash dex2jar

akhil
20/5/2016 03:28:38 pm

install java

Reply
Bharath
16/11/2015 03:24:06 am

i got java files but in xml am getting apktool is not recognixed as an internal or external command,operable program or batch file...pls give me suggestions wat to do wit this

Reply
Theron
3/12/2015 02:40:34 pm

I got the same thing - 'Java' is not recognized as an internal or external command, operable program or batch file - after I got a different error message from below. Everything worked just fine for the Java files extract why would the XML file extract be more difficult???

Reply
Adminstrator - Shoeb Ahmad
3/12/2015 03:07:06 pm

Java is not installed in your computer (i.e JAVA JDK)

You can download it from here -
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Theron
4/12/2015 01:13:24 am

I finished the first part of the tutorial where you extract the Java files and I had JAVA installed on my computer and I used the jd-gui.exe to open up everything and input the appropriate information into that and that area needed to use JAVA. I uninstalled and reinstalled JAVA and still receive the same message, so I am at a standstill again. Thanks

tech clans
29/12/2016 11:58:44 pm

https://www.youtube.com/watch?v=Qi_caqy3nLY

Reply
Theron
3/12/2015 01:42:54 pm

I input the apktool d (file name).apk and get apktool: command not found. I had watched the youtube video multiple times and did everything again from scratch 5 times.
Also, once you change the .apk file to .zip, unzip, if you notice in the files, for me it is under the res folder, all of my XML files are there, hundreds of them. So does that mean I do not have to do the XML part of this equation because when you unzip the file all of the files are there???

Also, how do you combine the Java and XML??
Thank you.

Reply
Adminstrator - Shoeb Ahmad
3/12/2015 03:02:02 pm

Dear Theron,

First of all please read this carefully -

Create a XML folder on desktop. In that folder paste Apk tool folder, Apk install and android apk (techiesnet.apk) in that folder.

Later navigate to that folder (for ex: cd C:\Users\Shoeb Ahmad Fareed\Desktop\XML" -> Enter
There write the command "apktool d Techiesnet.apk" -> Enter)

From there the command will work.

Reply
Theron
3/12/2015 03:10:13 pm

These are the same steps that you state above in the tutorial or are they different steps with different files added to the XML folder? If they are the same steps as above in the tutorial then I have redone this 10 times already and now I get the other prompt about Java is not recognized by internal or external command…

I am at a loss of doing this, but my guess is I already have the XML files when I unzipped the renamed .zip file from the .apk file as all of my XML files are in the res folder, so I am still not sure.

Hema Rangaswamy
2/11/2016 10:42:18 pm

i am getting the error as apktool_2.2.1 not recognized as internal or external command . i downloaded the apktool from the mentioned site "https://ibotpeaches.github.io/Apktool/ ."can i know hw to resovle the issue ?

Nikesh link
21/1/2017 01:02:49 pm

i had done first step.
in the second step at last in the command prompt i was seeing unable to acess the apk file.

Please help me in solving my problem.

vee
5/12/2015 10:01:00 pm

free source code android canyon
May be useful for all of us

http://www.vellisya.com/download-gratis-source-code-aplikasi-android/

Reply
Ashraf
6/12/2015 04:14:12 pm

hi bro, while i enter the command "dex2jar classes.dex" to create java source code it shows "Could not reserve enough space for object heap" plzz help to solve

Reply
Soe Myint
10/12/2015 09:07:01 pm

Hi, Please help me. In the cmd the ERR like ----
C:\Users\User>cd C:\Users\User\Desktop\New folder\dex2jar-0.0.9.15

C:\Users\User\Desktop\New folder\dex2jar-0.0.9.15>dex2jar classes.dex
'java' is not recognized as an internal or external command,
operable program or batch file.
----
Please tell me, what wrong with this.

Reply
Kamel_912
11/1/2016 06:27:31 am

Good Work

Reply
Muhammad Umer link
24/1/2016 06:47:42 pm

i tried to unzip java files by doing the same procedure as mentioned above but when i open classes.jar file to decompiler it didn;t show any java file please help me how i do it .

Reply
Kumar
30/1/2016 12:55:20 pm

Its really good task.. Thanks for the info. Mr.Adminstrator - Shoeb Ahmad..

But, you said - "As now you have got both android source code (java) and (XML). Combine them, and you can easily import the folder in your Android Development Tools using your Android_Manifest.xml file."

If you tell steps to combine process of java and XML and to import to android studio, will be great and meaning to create this topic will be full filled..

thanks in advance..

Reply
pim
2/2/2016 10:04:27 am

thank you very much ..... this WORK100%.....

Reply
Fahad
10/2/2016 11:33:44 am

Can i convert an playstore app.apk to source files?

Reply
danny
13/2/2016 05:39:14 pm

how to import xml and .java source in android studio?

Reply
vikas
1/3/2016 04:00:54 pm

getting exception while decompiling xml files

I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
2)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more

plz help.................

Reply
Chandan Sharma
5/3/2016 08:49:15 pm

Try below command

java -jar apktool.jar d -f -r apkfilename.apk

Reply
timis
2/4/2016 06:43:09 pm

if you have this error, please download apktool_2.0.3.jar

Reply
jagadeesh
14/3/2016 10:35:46 pm

apkinstall is not downloading from the link you specified

Reply
Basheer ALMOMANI
15/3/2016 02:18:21 am

tha'ts great thank you

Reply
jc
5/4/2016 02:43:14 pm

: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
2)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more
help please

Reply
Roman link
15/4/2016 08:51:59 pm

how to combine ? i don't know :/ can i create new android project then copy them to it ?

Reply
shubham
5/5/2016 02:48:32 pm

gd gui is not working
on my laptop so i can't see all source of decoded file

Reply
robin
6/5/2016 11:40:51 am

apk tool new version download and extract code
but simultaneously java and xml extracting
is correct

Reply
veera
17/5/2016 09:03:59 pm

how to get Name of layout in java.like.,
setContentView(R.layout.activity_main); but out put is
setContentView(2130503040);

Reply
tester
20/5/2016 12:12:07 pm

it is extracting all xm and java files including all libraries java and xml file with some other raw/useless files

how exactly we can pick the exact own java and xml files from them?

Reply
Luc link
5/6/2016 05:08:24 pm

Haven't tried, my bad, but those all this work with .xapk files too?

Reply
Deep Rathod
7/6/2016 11:36:21 am

thanks for tuts.. but i have one question if i have project with single java file like main activity then i was extract that apk then how it generate muliple file instead of single file so how can possible those code is usable..

Reply
SuryaKumar
8/6/2016 09:37:46 am

after running dex2jar classes.dex ,directly .dex files are opening ,but jar file is not generating in particular folder

Reply
tester
8/6/2016 03:40:12 pm

how to get rid from these

1) findViewById(2131493060)
2) setContentView(2130903083)
3) for (;;)

and get exact id's and layout files names
and why every for loop is converted to for (;;) it should be with real contents and every break,return,continue statements change its positions and below codes becomes unreachable...

please give its solution if someone has

Reply
John
15/7/2016 04:56:56 pm

Hi, I am trying to decompile .apk file by follwing the above steps. When I save my test.apk file as test.apk.zip and then unzip it, I do not find classes.dex file. Please suggest.

Reply
seen
22/7/2016 10:13:58 am

Nice Job.....

Reply
john kennady
9/8/2016 01:05:17 am

thank u sir,

Reply
Mike
22/8/2016 07:46:06 am

download apktool_2.0.3.jar and rename to apktool.jar and replace the old one in the XML folder and run the cmd.

Reply
supriya
17/9/2016 12:13:14 am

how to get Name of layout in java.like.,
setContentView(R.layout.activity_main); but out put is
setContentView(2130503040);

Reply
Dayanand Sharma
22/9/2016 01:15:39 am

i have got both the java and xml file,but i am not able to combine them using andriod studio.plz help me.give me suggestions.

Reply
SIDDHARTH SONI
30/9/2016 02:07:46 pm

I HAVE PROBLEM WHEN I EXXTRACTING XML FILE
HERE SHOWING ERROR IN APKTOOL JAR FILE. PLEASE HELP ME

Reply
Szabolcs link
2/12/2016 04:35:49 pm

I'm still unable to understood how can we import this result into Eclipse or Android Studio and get a working file structure.

I can't import anything, but only read most of it using Notepad. I'm sure that wasn't your intention... we hoped to get a manageable file structure. I missed something?

Reply
szabolcs
2/12/2016 04:48:45 pm

And why all files have "smali" extension instead of "java"?

Reply
Szabolcs
2/12/2016 05:09:06 pm

yeah, i found out that:

There is no tool available to decompile back to .java files and most probably it won't be any. There is an alternative, which is using dex2jar to transform the dex file in to a .class file, and then use a jar decompiler (such as the free jd-gui) to plain text java. The process is far from optimal, though, and it won't generate working code, but it's decent enough to be able to read it.

exactly what i mentioned above. So don't bother with any import, thats why is also missing from that youtube video. If you are a programmer just try to understand the code you require using a simple Notepad text editor...

Reply
afds link
9/3/2018 01:59:44 pm

asdfa

Reply
kelani nupur
27/12/2016 03:16:37 pm

I have perform all above step..and get java code.
but xml file not generated..i have even download latest apktool_2.0.3.jar file. bt its not working... i'm getting error message "Input file name_of_apk.apk was not found or was not readable.)

Reply
szabolcs
28/12/2016 03:59:44 pm

read above comments, this method wont generate any working codes

Reply
pravin
9/1/2017 10:30:28 pm

i am having error that is ----java' is not recognized as an internal or external command operable program or batch file. windows 7

please help me what should i do!!

Reply
Boobaalan
11/1/2017 11:10:58 am

When iam extracting file using APKtool its shows eception in main thread main brut.androidlib.Androidlibexception

Reply
Ambuj Pandey
1/2/2017 06:20:11 pm

I gota problem
==>> " C:\Users\PANDEY\Desktop\xml>apktool d d.apk
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
2)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more ".
Please help me

Reply
waqas
19/3/2017 04:38:13 pm

your "apktool.jar" file is too old Download the latest one from this link "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.2.2.jar" . After downloading delete the old one and replace the new one and rename it to "apktool" and then try the command "apktool d appName.apk".. hope it works.

Reply
vignesh link
6/2/2017 12:10:20 pm

Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more .
<a href="http://www.bestandroidtrainingchennai.in/">Android Training</a>

Reply
abrar
8/3/2017 03:36:28 pm

sir i need to know the last thing u said "combine both xml and java files ". i have completed all steps and i want to combine both xml and Java files and then import resulting files into android studio.. sir plz help ... i m waiting for ur answer..

Reply
sam link
8/5/2017 03:38:16 pm

I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more

Reply
teja link
6/6/2017 06:35:48 pm

after using apktool command ,as shown in video i got one directory but with only one folder in it that is smali folder.
but did't get the remaining folder.
I tried with 3 apps and got the same result.

Reply
bijay link
28/6/2017 08:48:12 am

its not working...the system cannot find the path specified.

Reply
James link
21/1/2018 11:56:43 pm

I got exactly the same error in Windows 8 while trying to export decision tree digraph using tree.export_graphviz! Then I installed GraphViz

Reply
James link
21/1/2018 11:59:01 pm

I followed the below steps which resolved my issue:

Right click on My PC >> click on "Change Settings" under "Computer name, domain, and workgroup settings"
It will open the System Properties window; Goto 'Advanced' tab >> click on 'Environment Variables' >> Under "System Variables" >> select 'Path' and click on 'Edit' >> In 'Variable Value' field, put a semicolon (;) at the end of existing value and then include the path of its installation folder (e.g. ;C:\Program Files (x86)\Graphviz2.38\bin) >> Click on 'Ok' >> 'Ok' >> 'Ok'
Restart your PC as environment variables are changed

Reply
MOD Apk link
22/1/2018 12:00:51 am

Replacing forward(/) slash with backward(\) slash will do the job. The folder separator in Windows is \ not /

Reply
Android Apk link
22/1/2018 12:02:00 am

Just leave out the "dot-slash" ./:

Reply
Akash
27/1/2018 05:24:39 pm

What if there is two .dex file in apk zip?

Reply
Arul link
5/2/2018 08:15:12 pm

how to hook android apk file. Any Idea.

Reply
oussama
3/3/2018 02:58:11 pm

i found fichier.smali not fichier.xml how can i get xml

Reply
parthipan
3/3/2018 08:00:46 pm

Thanks for tutorial.but the dex2jar classes.dex file does not created

Reply
Allcrackedapk link
5/3/2018 12:09:13 pm

You cannot get the source code if the developer did not published it. If its published u can get the repo link and fetch from there or download it from where it has been published.

Still if u want the source code u can decompile the apk file ,but it will not yield the readable code every time.

Or u can ask the developer if he can share the code, if he agrees then u r good to go.

Reply
Allcrackapk link
15/3/2018 12:37:20 pm

hey techies bro can you plz help me out to create an webview app for my site allcrackapk.com , I want to create and app like acmarket, plz help me

Reply
hostgator discount code link
12/9/2018 10:58:01 pm

helpful data on points that bounty are intrigued on for this magnificent post.

Reply
Anurag
3/3/2019 07:23:12 pm

I have tried all the commands but while doing this i got this error on command

apktool d <filename>.apk

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more

Reply
Atharva link
7/4/2019 11:58:40 pm

HELP
Error: Unable to access jarfile C:\Users\Atharva Muraskar\Desktop\XML\\apktool.jar

Reply
tony lee
24/5/2019 07:39:30 am

everything works fine but i need to know how to import them in Android Studio to make a apk file again

Please help me...

Reply
Digital Marketing Agency in Cheshire link
20/12/2019 10:23:31 pm

Hivemind makes sure you never go unnoticed. We provide solutions ranging from brand naming and conceptualisation to custom graphic design flyers for events and media promotion.

Reply



Leave a Reply.

    Get Updates Via Email

    Enter Email Address

    7:00 AM - 9:00 AM IST

    Blog Sponsors


    Category

    All
    Apps
    Camera
    Cars Bikes
    Cloud
    Computers
    Earn Easy Money
    Education
    Entertainment
    Fun
    Games
    How To
    Innovation
    Mobile
    News Internet
    News Internet47f3cea023
    News Internet769585a1ca
    News Of Internet
    News Of Internet
    SmartBand
    Smartwatch
    Software
    Technology

    Archives

    January 2019
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    December 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012
    July 2012
    June 2012
    May 2012
    April 2012
    March 2012
    February 2012
    January 2012
    December 2011
    November 2011
    October 2011
    September 2011
    August 2011
    July 2011
    June 2011
    May 2011
    April 2011
    March 2011
    February 2011

Contact Us

Email: support@techiesnet.com

Stay Connected

Download Our Mobile App 

Techies Net Mobile App
Copyright © 2011-2019 Techies Net | Our Logo | Advertise | Careers | Donate Us | All Right Reserved.
All the trademarks are sole property of their respective owners.

Powered By HostChef.In

  • Home
  • Software
    • Dotiny
  • Web & App Development
    • Website Builder
    • App Development
  • Request Review
  • Advertise
  • Mobile App
  • Contact Us