Problems importing Android studio. (Apktool)

I am trying to import a file into an android studio that I decompiled with apktool. But when I try to import a file into Android Studio, it doesn’t show anything in the Project browser. In the import process, in the first step, I selected "Create a project from existing sources." Is there any way to solve this problem? In addition, is there anyway to use a file from notepad ++ in android studio?

Thanks.

+1
android import apk apktool
source share
2 answers

apktool is a reverse engineering tool that generates source code, but not gradle build scripts, so it does not appear as a project that you can open. You have to "import from existing sources" because apktool only generates source files, and Android Studio will try to populate gradle build files.

After importing the project, you can add any files that you like in the project directory. This includes those you create from other programs, including Notepad ++. You can do this in Android Studio with Project View (Alt + 1) using Copy / Paste or Drag / Drop.

0
source share

As Daniel Souza replied, apktool is just tools to help you extract the class and manifest. If you look at the details and flow of the Android build process ( https://source.android.com/source/jack.html ), you will find that each class will be confused, packaged and placed in a .dex file (including your own classes, Android support library and other 3-way libraries).

Typically, an .apk file includes only the following file types.

  • .dex (this can be not only one if a problem with 65K methods exists)
  • (Android resolution and metadata)
  • asset (Drawable, asset folders, layout and R)

Therefore, when you used apktools and some other tools (j-soup) to do some reverse development. You can only have source files. And as a Daniel method, you can import the project into Android studio, but there can be many errors in your project.

  • R.java cannot be generated (since the entire value of the user identifier will be converted as an unqiue integer to apk., It cannot be undone as a human-readable value even if you use apktool)

  • Obfuscation of the class and variable name. Since I mentioned the apk creation process, the class and variable name will be confused after the build. Reverse engineering will be difficult to find logic inside the application, since almost all the name is renamed as (a, b, c, d, e ...)

  • Proguard problem, some applications may use advanced technologies to compile source code using a more complex logical stream (for example, Dexguard). Once reverse engineering is complete, it will be harder to find the internal logic of the application.

If this is a “simple” application, you can find out what happens in the messy code.

If this is a “complex” application that includes many libraries, it will be a disaster if you try to dig out the logic in it.

+3
source share

All Articles