ThisIsLibra / AndroidProjectCreator

Convert an APK to an Android Studio Project using multiple open-source decompilers
https://maxkersten.nl/projects/androidprojectcreator/
GNU General Public License v3.0
368 stars 72 forks source link

Something went wrong with the I/O during the decompilation #28

Closed kozmotronik closed 2 years ago

kozmotronik commented 2 years ago

Hi, I tried to decompile an apk in my home folder. But whatever output I have given, it gives the same error:

ismail@localhost:~> java -jar AndroidProjectCreator.jar -decompile fernflower base.apk ./himtec-apc [+]AndroidProjectCreator 1.5.2-stable [developed by Max 'Libra' Kersten info@maxkersten.nl or @Libranalysis on Twitter] [+]Decompiling the APK to a temporary location (/home/ismail/library/temp/c6369f3e-512c-45d8-9c00-8143a3a9d42f) [+]Calling APKTool to decompile the AndroidManifest.xml and the application resources [+]Decompling JAR with APKTOOL [+]An error has occurred, therefore AndroidProjectCreator has shut down. The error message is given below. Something went wrong with the I/O during the decompilation. Check the permissions of the output directory and try again. [+]For additional details, see the stack traces of the used tools above.

After giving that error, the the output directory himtec-apc is deleted everytime. The apk and the output directory is in the same directory as AndroidProjectCreator.jar. AndroidProjectCreator version is 1.5.2-stable. Am I doing something wrong?

ThisIsLibra commented 2 years ago

Hello kozmotronik,

Could you provide information such as your Java version and if you installed the tools before you used the decompile command?

Cheers, Max

kozmotronik commented 2 years ago

Hi, sorry for the late response. Here is the Java information on my machine:

openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-suse-1.3-x8664)
OpenJDK 64-Bit Server VM (build 11.0.15+10-suse-1.3-x8664, mixed mode)

What tools we are talking about to be installed before?

ThisIsLibra commented 2 years ago

The required tools are tools such as APKTool, which is where your log shows the error. On the project page on my website, you can find the installation notes. In short, use "-compactInstall" to install all tools. Once that completes successfully, you can run the decompilation command as issued in the original post.

In short, APC is a wrapper for existing tools. If it cannot execute those tools, an error will occur. If you do not install them, they are not present, hence the error.

This should likely solve your problem. Let me know if it does.

Cheers, Max

ThisIsLibra commented 2 years ago

Closing this issue as there's no further response after the likely answer has been provided.

UX0l0l commented 1 year ago

I have all the required installed and it still gave me that error.

Tried with sudo as well, same output.



[+]Decompiling the APK to a temporary location (/home/youn/Downloads/AndroidProjectCreator/library/temp/2ee3e19d-6c0a-4d02-93e0-0566377a655b)
[+]Calling APKTool to decompile the AndroidManifest.xml and the application resources
[+]Decompling JAR with APKTOOL
I: Using Apktool v2.8.1-62-c07e4a92-SNAPSHOT on com.telestar.voicechangeip_v99.apk
I: Loading resource table...
I: Decoding file-resources...
I: Loading resource table from file: /home/youn/.local/share/apktool/framework/1.apk
I: Decoding values */* XMLs...
I: Decoding AndroidManifest.xml with resources...
I: Copying raw classes.dex file...
I: Copying raw classes2.dex file...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

[+]Decompilation finished
[+]Calling APKTool to obtain the SMALI code
[+]Decompling JAR with APKTOOL
I: Using Apktool v2.8.1-62-c07e4a92-SNAPSHOT on com.telestar.voicechangeip_v99.apk
I: Copying raw resources...
I: Copying raw manifest...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

[+]Decompilation finished
[+]Decompling JAR with DEX2JAR
[+]Something went wrong during the removal of /home/youn/Downloads/AndroidProjectCreator/decompile/.

[+]An error has occurred, therefore AndroidProjectCreator has shut down. The error message is given below.

Something went wrong with the I/O during the decompilation. Check the permissions of the output directory and try again.

[+]For additional details, see the stack traces of the used tools above.