0

I recently read about the concept of reverse engineering and wanted to try it.

So I downloaded an apk and extracted it source code by using

apktool, dex2jar and jd-gui

Every thing went on smoothly and I extracted the resource as well as java files successfully. However the problem arose when I tried to import this project in android studio.

Initially it was showing a number resource files related errors which I corrected by changing the dependencies of the project but now I am getting all these weird errors in java files.

The errors include "not a statement', 'variable not initialized' etc.

Kindly Help. Thanks in Advance!

Emil
  • 2,786
  • 20
  • 24
Twinkle
  • 21
  • 1
  • The question is way too broad, please strip it down to single, well described issues. – m02ph3u5 Aug 21 '15 at 10:24
  • I am sorry if I am not being specific but my problem is based on a specific project that I was doing. Precisely, I wanted an error free complete code from the source apk as it was not obfuscated but didn't get one. I used the standard tools mentioned in good tutorials. So I just wanted to know the reason for the same and If we can actually get complete code by de-compiling or not. – Twinkle Aug 21 '15 at 10:41
  • This is called **stealing**. Find yourself a good **attorney**. – Phantômaxx Aug 21 '15 at 11:12
  • @FrankN.Stein I am just trying to experiment with the concept of reverse engineering. I hope that is not a crime!! – Twinkle Aug 22 '15 at 06:28
  • Not if you do that with YOUR apk files. If you do that with other people's code, IT IS.. – Phantômaxx Aug 22 '15 at 07:11
  • @FrankN.Stein Ok. Got it. I just downloaded a random apk from web and did the experiment. I am not going to use that extracted code to build my own new app. – Twinkle Aug 22 '15 at 07:30

1 Answers1

0

I have extracted code from apk before myself, and the results I got were similar to yours. I got most of the code, but not all of it and not with all of the formatting. Numerical constants were missing and the the "if, while, for" instructions were faulty. I don't know if this always happens, I did it only once, but I managed to figure out the rest of the code by what this processes gave me in the begging.

AmiguelS
  • 805
  • 2
  • 10
  • 28
  • I also checked the apk if obfuscation of code has been done but found no trace of proguard :( Did you check for obfuscated code? – Twinkle Aug 21 '15 at 10:16