Hax4us / Apkmod

Apkmod can decompile, recompile, sign APK, and bind the payload with any legit APP
GNU General Public License v3.0
730 stars 98 forks source link

"file () does not exist" when decompiling #142

Closed Miepee closed 3 years ago

Miepee commented 3 years ago

Problem description I'm getting [!] file () does not exist when trying to decompile an apk.

Steps to reproduce

  1. Download an apk and try to decompile it with apkmod -d <apk> Here's an attachment to demonstrate it (sorry for the font): image

Expected behavior Since the file exists, it should not error.

Additional information

  1. Post output of command termux-info
    Termux-info Output
Application version:
0.117
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.org/apt/termux-main/ stable main
# game-repo (sources.list.d/game.list)
deb https://packages.termux.org/apt/termux-games games stable
# science-repo (sources.list.d/science.list)
deb https://packages.termux.org/apt/termux-science science stable
Updatable packages:
apt/stable 2.3.11-5 aarch64 [upgradable from: 2.3.6]
ca-certificates/stable 1:2021-10-26-0 all [upgradable from: 20210525]
command-not-found/stable 1.66 aarch64 [upgradable from: 1.62]
coreutils/stable 9.0 aarch64 [upgradable from: 8.32-7]
curl/stable 7.80.0 aarch64 [upgradable from: 7.77.0-3]
dash/stable 0.5.11.5 aarch64 [upgradable from: 0.5.11.3]
debianutils/stable 5.5 aarch64 [upgradable from: 4.11.2]
dialog/stable 1.3-20210621-0 aarch64 [upgradable from: 1.3-20210530-0]
diffutils/stable 3.8 aarch64 [upgradable from: 3.7-3]
ed/stable 1.17-4 aarch64 [upgradable from: 1.17]
gawk/stable 5.1.1 aarch64 [upgradable from: 5.1.0-1]
gpgv/stable 2.3.3 aarch64 [upgradable from: 2.3.1-1]
grep/stable 3.7-1 aarch64 [upgradable from: 3.6]
gzip/stable 1.11-3 aarch64 [upgradable from: 1.10-4]
less/stable 590 aarch64 [upgradable from: 563]
libandroid-support/stable 28-2 aarch64 [upgradable from: 28]
libc++/stable 23b-3 aarch64 [upgradable from: 21d-1]
libcurl/stable 7.80.0 aarch64 [upgradable from: 7.77.0-3]
libgnutls/stable 3.6.16 aarch64 [upgradable from: 3.6.15-3]
libgpg-error/stable 1.43 aarch64 [upgradable from: 1.42]
libidn2/stable 2.3.2 aarch64 [upgradable from: 2.3.0-2]
libnettle/stable 3.7.3 aarch64 [upgradable from: 3.7.2]
libnghttp2/stable 1.46.0 aarch64 [upgradable from: 1.43.0]
libssh2/stable 1.10.0 aarch64 [upgradable from: 1.9.0-2]
libtirpc/stable 1.3.2 aarch64 [upgradable from: 1.3.1]
lsof/stable 4.94.0-1 aarch64 [upgradable from: 4.94.0]
nano/stable 5.9 aarch64 [upgradable from: 5.7]
openssl/stable 1.1.1l aarch64 [upgradable from: 1.1.1k-2]
pcre/stable 8.45 aarch64 [upgradable from: 8.44-1]
termux-keyring/stable 2.3 all [upgradable from: 1.9]
termux-tools/stable 0.149 all [upgradable from: 0.130]
Android version:
7.0
Kernel build information:
Linux localhost 4.1.18-g1b717f5 #1 SMP PREEMPT Tue Dec 4 14:20:03 CST 2018 aarch64 Android
Device manufacturer:
HUAWEI
Device model:
BLN-L21

  1. Post version apkmod -v

    4.0

  2. Attach Original Apk file.

    https://github.com/AM2R-Community-Developers/AM2R-Autopatcher-Android/blob/main/data/android/AM2RWrapper.apk

Miepee commented 3 years ago

I just checked the readme, apparently the proper command is apkmod -d -i <apk>. That fixed the issue, so I'll close this. Was this changed recently? I can't see the changes in the help prompt from apkmod. Even the example in there still uses apkmod -b instead of apkmod -b -i

Hax4us commented 3 years ago

I just checked the readme, apparently the proper command is apkmod -d -i <apk>. That fixed the issue, so I'll close this. Was this changed recently? I can't see the changes in the help prompt from apkmod. Even the example in there still uses apkmod -b instead of apkmod -b -i

Ahh nice catch, i forget to edit help prompt sorry for that :)

Miepee commented 3 years ago

No problem. Would've been a bit more helpful if apkmod would've properly complained if -i is not given, something akin to "-i parameter missing, no input file specified" or something along those lines.