3 months ago I assembled an attachment. No data bases and nothing. There is nothing easy. The project itself is lost. Now I need to somehow make a couple of changes in the project to replace the text, etc. I don’t know what to do?

I really need your help

  • app is on google play? - ermak0ff
  • No, I did not put it there but I have to today - elik
  • i have apk only - elik
  • or it is possible to decompile something and take my data from there and copy paste to create a new project - elik

1 answer 1

To carry out such actions you will need:

  • dex2jar
  • Java decompiler
  • ApkTool

Next, perform the following steps:

  1. Download dex2jar and extract it to a folder, for example С:\Decompile .
  2. We download Java Decompiler (for example, JD-GUI) and extract files for convenience in the same folder as dex2jar.
  3. We download apktool and apktool-install-windows-r04-brut1.tar.bz2 and extract the files already in the system folder. The default is C:\Windows . (Do not forget to download the second archive)
  4. We take the necessary apk файл and put it in the folder with dex2jar and Java Decompiler .
  5. Open the Command Prompt (Windows Command Handler) in the above folder (In the folder over the empty space while holding the Shift button, press the right mouse button and select the Windows Command Handler).
  6. dex2jar <ваш apk файл> command dex2jar <ваш apk файл> and if everything went well, the file <название вашего файла>.apk.dex2jar.jar will appear in the same folder
  7. Run jd-gui and open the file obtained in the previous step. (On Windows 7 open with administrator rights and with compatibility Windows XP SP3)
  8. Select the menu item File-Save All Source s and save.
  9. Extract the resulting zip archive.
  10. We place the resulting folder in the src folder (you must first create it). (To get something like this structure С:\Decompile\<название вашего файла>\src\com\android )
  11. Again, on the command line, enter the command apktool d <название вашего файла>.apk <название вашего файла> , where <название вашего файла>.apk package name, <name of your file> is a folder for decompiling.

If everything is good, then the specified folder will contain source files in two formats (java and smali), resources and AndroidManifest.xml files, apktool.yml

This will get the source code. True, after decompiling, there are errors in the code, for example, instead of true and false, 1 and 0 are respectively.

  • I did the apk winrar and opened it. I found everything I need, now it remains to find the gradle file where I add libraries through compile. Don't know the path to it? - elik
  • Generally for that you need the development environment to return the disassembled apk; The received code, for example, must be transferred to the Eclipse IDE (File-Import) IDE in the folder with the project, having previously changed the PROJECT NAME </ name> PROJECT NAME in the third line to the desired name, in the .project file. This is due to the fact that if I remember correctly, gradle is in the android studio build system. If eclipse is used without gradle, then antenna is a preprocessor for java. - Legionary
  • Or, alternatively, if you need gradle, return the decompiled project to the android Studio: you decompile with the apk-tool, then go to the "Open an existing Android Studio project" studio and specify the path to the directory of the decompiled application. - Legionary