iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
20.21k stars 3.59k forks source link

[BUG]:brut.common.BrutException: could not exec (exit code = 2): [/tmp/brut_util_Jar... #3281

Closed seisdr closed 1 year ago

seisdr commented 1 year ago

apktool 2.8.1 openjdk 17.0.8 2023-07-18 OpenJDK Runtime Environment (build 17.0.8+7-Ubuntu-122.04) OpenJDK 64-Bit Server VM (build 17.0.8+7-Ubuntu-122.04, mixed mode, sharing) ARM64

root@localhost:~/apkshit# rm -rf ''$'\001''0'$'\263''+@U,@8'" base
root@localhost:~/apkshit# ls
apktool  apktool.jar  base.apk                                                                  root@localhost:~/apkshit# ./apktool  d base.apk
I: Using Apktool 2.8.1 on base.apk                                                              I: Loading resource table...                                                                    I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /root/.local/share/apktool/framework/1.apk                 I: Regular manifest package...
I: Decoding file-resources...                                                                   I: Decoding values */* XMLs...                                                                  I: Baksmaling classes.dex...                                                                    I: Baksmaling classes2.dex...                                                                   I: Copying assets and libs...                                                                   I: Copying unknown files...                                                                     I: Copying original files...
I: Copying META-INF/services directory                                                          root@localhost:~/apkshit# ./apktool  b base                                                     I: Using Apktool 2.8.1                                                                          I: Checking whether sources has changed...                                                      I: Smaling smali folder into classes.dex...                                                     I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...                                           I: Checking whether resources has changed...
I: Building resources...                                                                        brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [/tmp/brut_util_Jar_136609866613319683764249673358812010099.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 29, --version-code, 50303, --version-name, 5.3.3, --no-version-vectors, -F, /tmp/APKTOOL6941719478898088844.tmp, -e, /tmp/APKTOOL6223043661875450378.tmp, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/apkshit/base/res, -M, /root/apkshit/base/AndroidManifest.xml]                                                   W: /tmp/brut_util_Jar_136609866613319683764249673358812010099.tmp: 1: ELF: not found            W: /tmp/brut_util_Jar_136609866613319683764249673358812010099.tmp: 19: Syntax error: "(" unexpected                                                                                             root@localhost:~/apkshit# ls
''$'\001''0'$'\263''+@U,@8'   apktool   apktool.jar   base   base.apk                           root@localhost:~/apkshit#

In case the output is unreadable I posted it Here it didn't compile it back , and there's a empty file been created ''$'\001''0'$'\263''+@U,@8

iBotPeaches commented 1 year ago

Would probably need the sample that caused this to investigative further.

Other crash I believe is this one - https://github.com/iBotPeaches/Apktool/issues/2811 due to architecture mismatch on aapt blobs.

Closing.

balram8264 commented 5 months ago

Building resources... brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [/tmp/brut_util_Jar_60400309652398256481809718281653677281.tmp, compile, --dir, /sdcard/Download/d20240522-20178-11jqob/original/res, --legacy, -o, /sdcard/Download/d20240522-20178-11jqob/original/build/resources.zip]

Please help for this error

skfer0000 commented 3 months ago

L3MON build apk problem java version "1.8.0_421"installed Apktool 2.9.3 - a tool for, installed Problem please solve bro

11/08/2024, 17:35:40 => ERROR | Build Failed - Build Command Failed - Command failed: java -jar "/L3MON/app/factory/apktool.jar" b "/L3MON/app/factory/decompiled" -o "/L3MON/assets/webpublic/build.apk" brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [/tmp/brut_util_Jar_32459787794602761227985970890269075383.tmp, compile, --dir, /L3MON/app/factory/decompiled/res, --legacy, -o, /L3MON/app/factory/decompiled/build/resources.zip] W: /tmp/brut_util_Jar_32459787794602761227985970890269075383.tmp: 4: Syntax error: Unterminated quoted string