[BUG] [-] zipalign: symbol lookup error
A-Unix opened this issue · comments
Information
- Apktool Version (
apktool -2.9.1
) - - Operating System ( Linux ) -
- APK From? (Other) -
- Java Version (
11
) -
Stacktrace/Logcat
[*] Rebuilding apk with ```abc``` as /tmp/d20231231-119197-mcvihu/output.apk
[*] Aligning /tmp/d20231231-119197-mcvihu/output.apk
[-] zipalign: symbol lookup error: zipalign: undefined symbol: _ZN11zip_archive6WriterD2Ev
Error: Unable to align apk with zipalign.
Steps to Reproduce
apktool d netflix.apk
apktool b netfix.apk
Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks
that live in /system/framework
or /system/priv-app
)
APK
If this APK can be freely shared, please upload/attach a link to it: Link
Questions to ask before submission
- Have you tried
apktool d
,apktool b
without changing anything? No, I did something with manifest of original apk. - If you are trying to install a modified apk, did you resign it? Couln't even rebuild it.
- Are you using the latest apktool version? Yes, its 2.9.1
We don't have zipalign bundled, so this must be a different tool. Closing.
Okay, however, I'm still writing the solution here to help people who will be searching for a solution to this error.
To fix this error, enter these commands:
nano /etc/apt/sources.list
Then you will see something like this:
- Add this line in the file:
deb http://ftp.de.debian.org/debian buster main
and comment out any other line that is not in the comment, you can use#
to comment out a line, after making changes, your file should look like this:
- After that, hit
CTRL+X
,Y
,ENTER
in the same sequence I wrote. - Now, update your system using
apt update
- After the update is done, run this command:
apt --purge remove zipalign -y
, this removes all files of zipalign from the system. - Now install the zipalign again using
apt install zipalign -y
. - After installation, type
zipalign
. You will see the result :)
Edit 1: After you install the Zipalign, you will need to prevent it from auto upgrading as that will result into the same error you faced earlier and came here to find a fix to issue. To prevent it from upgrading, just type this command in your terminal: apt-mark hold zipalign
. Then you also need to comment out that debian repo line using #
, and remove the #
from kali repo line to update your system using kali official repo. After making the changes your file should look like this:
After that, save the changes to file and exit, now you need to update your system again using apt update
and then you'll be good to go.