0

Hello I extracted source code from APK file (USB2COM.apk) I used Procedure for decoding .apk files is found in Link: Is there a way to get the source code from an APK file? but my problem is don't know how to import that code in eclipse because my src folder is unusual? What is java file in Src folder ? (I am an android beginner)

Please help me

Thank you

Src

  • Com
  • Slickdevlabs
  • a.java
  • b.java
  • . . .
  • x.java
Community
  • 1
  • 1
mari
  • 11
  • 1
  • 1

2 Answers2

2

The information about variable and class names is lost when compiling java source code, the compiler replaces the names you write. Often the code is also obfuscated during the compiling process. When you decompilie it again, you end up with lots of classes and variables that just got assigned a random name by the decompiler, and often still very obfuscated code that is almost impossible to read. That's just what happend to the files in your source folder. The decompiler you used named the .java files it generated alphabetically from A-Z. You may be able to tell the original names of the files by their content.

To import them to eclipse you can just create a new java project and copy everything form the decompiled src folder to the projects src folder

Gumbo
  • 1,716
  • 1
  • 15
  • 22
1

Apk Studio is your friend. It decompiles your .apk and creates the project you can reuse in Eclipse and AS. Its available on Linux and Windows.

Apk Studio

OBL
  • 367
  • 1
  • 4
  • 13
  • Can you please explain how? apk studio creates `.smali` files. I didn't get any option to export it as an AS or Eclipse project. You can edit those files in Apk studio itself and rebuild the modified app. – Sourav Ghosh Feb 01 '18 at 18:09