Extracted code from apk showing a number of java code errors

121 views Asked by At

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!

1

There are 1 answers

1
AmiguelS On

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.