You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Apktool 2.3.3-dirty重新编译APK失败问题求助

Fixing Apktool Rebuild Failure for RAR APK on Kali Linux

Let’s tackle this rebuild failure head-on—your error logs point to two key issues: an outdated Apktool version and compatibility problems with the aapt (Android Asset Packaging Tool) binary. Here’s how to fix it step by step:

1. Upgrade Apktool to the Latest Stable Version

Your current Apktool version (2.3.3-dirty) is several years old and lacks proper support for newer Android SDK versions (your APK targets SDK 27). Outdated versions often struggle with resource building and binary compatibility.

Follow these commands to upgrade:

# Uninstall the old version first
sudo apt remove -y apktool

# Download the latest Apktool script and jar file
wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.8.2.jar

# Make files executable and move to system path
chmod +x apktool apktool_2.8.2.jar
sudo mv apktool /usr/local/bin/
sudo mv apktool_2.8.2.jar /usr/local/bin/apktool.jar

# Verify the upgrade
apktool --version

You should see 2.8.2 (or the latest stable version) as output.

2. Fix aapt Compatibility Issues

The error log shows Apktool couldn’t extract its built-in aapt binary and fell back to your system’s version, which crashed with exit code 134 (SIGABRT, usually from version mismatches).

Install a Compatible aapt Version

# Install the system aapt package
sudo apt install -y aapt

# If you need a specific version for SDK 27, install the matching build-tools
sudo apt install -y android-sdk-build-tools-27.0.3

# Add the build-tools path to your environment (so Apktool finds the right aapt)
export PATH=$PATH:/usr/lib/android-sdk/build-tools/27.0.3/

Install 32-bit Compatibility Libraries (If Needed)

Kali is 64-bit by default, but older aapt binaries are often 32-bit. Install these libraries to avoid crashes:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y libc6:i386 libncurses5:i386 libstdc++6:i386

3. Clean and Rebuild

Old build caches can cause unexpected failures. Clear them before rebuilding:

# Delete the existing build folder in your decompiled APK directory
rm -rf RAR_v5.60.build56/build

# Recompile the APK
apktool b RAR_v5.60.build56

4. Fallback: Re-Decompile the APK

If the rebuild still fails, try re-decompiling the original APK to ensure no files were corrupted during the first decompile:

# Force overwrite the existing decompiled directory
apktool d -f RAR_v5.60.build56.apk
# Now rebuild again
apktool b RAR_v5.60.build56

These steps should resolve the resource building errors you’re seeing. The core issue was almost certainly outdated tooling—Apktool and aapt versions need to match the SDK level of the APK you’re modifying.

内容的提问来源于stack exchange,提问作者Saptarshi Mondal

火山引擎 最新活动