30095

Android studio import problems. (Apktool)

Question:

I have been trying to import a file to android studio that I decompiled using apktool. But when I try to import the file to Android studio it does not show anything on the "Project" browser. While in the import process, in the first step, I chose "Create project from existing sources". Is there anyway to fix this problem? Also, is there anyway to use in android studio a file from notepad++?

Thanks.

Answer1:

apktool is a reverse engineering tool that generates the source, but not the gradle build scripts, which is why it does not show up as a project you can open. You have to "import from existing sources" because apktool only generates the source files and Android Studio will attempt to fill in the gradle build files.

Once you import the project, you can add any files you like to your project's directory. This includes ones that you generate from other programs including Notepad++. You can do this in Android Studio with from Project View (Alt+1) with Copy/Paste or Drag/Drop .

Answer2:

As Daniel Souza replied, apktool is just a tools to help you to extract the class and manifest. If you look into the detail and the flow of the Android build process (<a href="https://source.android.com/source/jack.html" rel="nofollow">https://source.android.com/source/jack.html</a>), you will know every class will be obfuscated, packed and put it into the .dex file(include your own classes, android support library and other 3-party libraries).

Normally, the .apk file only included the following types of file.

<ol><li>.dex files (it might be not only one if the problem of 65K methods exists)</li> <li>manifest( Android permission and features meta-data)</li> <li>asset (Drawable, asset folders, layout and R)</li> </ol>

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

<ol><li>

R.java cannot be generated (since all the custom id value will be converted to be a unqiue integer in the apk., this cannot be reversed as human-readable meaning even you use the apktool)

</li> <li>

Obfuscated class and variable name. As I mentioned the process of how the apk built, the class and variable name will be obfuscated after building. Reverse engineering will be difficult to findout the logic inside the application since almost all the name are renamed as (a,b,c,d,e...)

</li> <li>

Proguard problem, some application might use advanced technologies to compile the source code using more complex logic flow ( like Dexguard did). After you finish reverse engineering, it will be more difficult to findout the inside logic in the application.

</li> </ol>

If it is a "Simple" application, you might be able to find out what happen in the obfuscated code.

If it is a "Complex" application including a lot of libraries, it will be disaster if you are trying to dig out the logic inside it.

Recommend

  • JavaFX Transparent Cursor using WritableImage
  • git attribute using filter smudge/clean to process .cpp files through shell script not finding filen
  • No OQGraph in my MariaDB?
  • error: cast from 'Foo*' to 'unsigned int' loses precision
  • Manifest merger failed, minSdkVersion 1 cannot be smaller than version 4 declared in library
  • cheap stereo vision camera + opencv [closed]
  • Is getTimezoneOffset() stable during daylight saving transition?
  • Expo Linear Gradient transparent is showing up blackish
  • How to change type datatable column [duplicate]
  • xamarin.android adding client certificate
  • java string index out of bound exception
  • wordpress posts_orderby filter with custom table in plugin
  • lateral cell space tableview Swift
  • Android How to call a method multiple times with a delay between them
  • how can I access to a hashed key stored by spring redis session using RedisTemplate?
  • how to make all possible power set(or subset) from arrayList objects?
  • How to set title name of the pdf. While viewing the Document(New Tab)
  • Count of values within specified range of value in each row using data.table
  • Calling UDF on Dataframe with Serialization Issue
  • Display standard razor/mvc 3 validation messages displayed in another language
  • get all files in git diff in intellij
  • Can't access web service when connected to the network :: HTTP 407
  • When i select a Textfield the keyboard moves over it
  • Refresh JSF component after custom javascript Ajax call
  • Calling a flash ExternalInterface in swiffyobject
  • Load php page results into div with ajax with link?
  • Delete a ListItem by clicking the ImageView within the ListItem
  • How to display converted time zones in a 'generic week' (Sunday thru Saturday)?
  • How can i move Clearcase dyamic/snapshot views to another host (Linux)
  • Can I read another applications memory?
  • Floating parent div grows to hypothetical width of floating child div
  • Google Spreadsheet Script to Blink a range of Cells
  • Unable to create Access token grant type in wso2 API manager store to test API
  • reshape/remould data frame to create normalized bar chart and pie chart
  • How to integrate angular2-material (alpha 8.2) with angular2-Quickstart app
  • read part of h5 dataset python
  • Send array to next viewcontroller iOs xcode [duplicate]
  • Comma decimal separator is ignored by ASP.NET MVC model binder
  • Running R's aov() mixed effects model from Python using rpy2
  • How to check if object is null in Java?