Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External zipalign conflicts W/ embedded zipalign | 64bit + 32bit Linux #51

Open
Morsmalleo opened this issue Sep 9, 2023 · 3 comments

Comments

@Morsmalleo
Copy link

Morsmalleo commented Sep 9, 2023

G'day @patrickfav, sorry to bother you mate, but I've been coming across this issue for a while now, and I've only just managed to figure why the problem was arising today.

a problem I've noticed is that when the user installs zipalign from the Command Line using package management tools such as apt or pacman, the external zipalign package in the users PATH, and the embed zipalign version that comes with Uber APK Signer, seems to conflict with each other, resulting in the error below

Error: Command failed: java -jar "/home/kali/AhMyth/AhMyth-Server/app/app/Factory/sign.jar" -a "/home/kali/AhMyth/Output/Ahmyth.apk"
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
could not execute zipalign
Run with '--debug' parameter to get additional information.

removing the zipalign package installed from the Command Line allows the signer to run it's embedded version of zipalign which fixes the problem, However if a path to a zipalign executable is not explicitly specified, then it should use the package version installed via the Command Line if it's available (which it should since it's automatically added to the users PATH variable at installation time), otherwise it should fall back to the embedded version if the PATH check for zipalign returns null according to the screenshot below (correct me if I'm wrong).

However both the external zipalign package and the embedded zipalign conflict with each other regardless of the external version being declared in the PATH variable

IMG_20230909_155257

The Uber APK Signer version I'm utilising is v1.2.1

Edit

Just tested the same scenario with a 32bit Kali Linux VM and the same problem happened for some reason, external zipalign conflicts with embedded zipalign unless external package is removed.

@Morsmalleo Morsmalleo changed the title External zipalign conflicts W/ embedded zipalign | 64bit Linux External zipalign conflicts W/ embedded zipalign | 64bit + 32bit Linux Sep 10, 2023
@patrickfav
Copy link
Owner

Hi,

I'm sure you read the README that 32bit linux is not supported by the embedded zipalign, so if the tool does not pick your external version correctly, it won't work. If you have problem setting it via PATH have you tried providing the location via --zipAlignPath ?

@Morsmalleo
Copy link
Author

Hi,

I'm sure you read the README that 32bit linux is not supported by the embedded zipalign, so if the tool does not pick your external version correctly, it won't work. If you have problem setting it via PATH have you tried providing the location via --zipAlignPath ?

Ahh no I have not tried that yet, and yes I read that zipalign must be set in the users PATH variable for 32bit Linux, but I have not tried using --zipAlignPath yet, but then again if it's set in the users PATH variable for 32bit Linux for some reason I get the same error stated above in the initial issue post, I'll double check to see if I've set it wrong, and I'll also try using --zipAlignPath as well, I'll write back here asap

@patrickfav
Copy link
Owner

But full disclaimer: I've never tested the tool on a 32bit Linux machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants