Package Details: android-apktool 2.9.3-1

Git Clone URL: https://aur.archlinux.org/android-apktool.git (read-only, click to copy)
Package Base: android-apktool
Description: a tool for reengineering Android apk files
Upstream URL: https://github.com/iBotPeaches/Apktool
Licenses: Apache-2.0
Submitter: TamCore
Maintainer: muflone
Last Packager: muflone
Votes: 240
Popularity: 0.53
First Submitted: 2010-10-25 15:09 (UTC)
Last Updated: 2024-02-06 01:08 (UTC)

Dependencies (3)

Sources (2)

Latest Comments

1 2 3 4 5 6 .. 8 Next › Last »

frankspace commented on 2024-02-11 00:10 (UTC)

I did a careful comparison between the Arch and Artix jdk-openjdk and gradle packages, and as far as I can tell, they are identical. The only explanation I can come up with is that somehow makechroopkg from Arch's devtools somehow works differently from mkchrootpkg from Artix's artools-pkg. And as to that, I haven't the vaguest idea how.

I did figure out that the tests were failing for me in part because /usr/lib/jvm/java-21-openjdk/lib/libawt_xawt.so depends, per ldd, on a bunch of libraries that aren't named as dependencies, in particular libxext, libxrender, and libxtst; and installing those did partially solve some of the problems. But then the tests started failing because, as far as I can tell, it wants access to the X server and can't get it, generating the error "java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable", which the internet proved completely unhelpful about solving. After doing a lot of irritating install-random-stuff and eventually using Xvfb to generate some kind of headless display situation that I don't understand, gradle would announce that the build succeeded than then proceed to hang forever. I give up, I'm not clever enough to comprehend what in tarnation is going on here, although it if has something to do with needing a running X server for some asinine reason, I guess that would make some kind of twisted sense.

So I just don't get it, but adding "-x test" to the end of the gradle build line to simply skip the tests entirely works perfectly for me.

muflone commented on 2024-01-02 19:07 (UTC)

the default JVM for Arch Linux is jdk-openjdk, so if you had to change this then your repositories have different packages at least.

I don't know what else is changed in Artix

frankspace commented on 2024-01-02 13:19 (UTC)

Thanks! I did explicitly specify installing jdk-openjdk into the chroot. It still fails for me, although it does compile fine by simply passing makepkg at the command line. I'm on artix, but given how few packages are involved, I can't imagine what difference that should make. There may not be anything you can do to fix my problem at your end, but would you have any idea where I should even start looking? Thank you!

muflone commented on 2024-01-02 11:29 (UTC)

@frankspace all my packages are always built in clean chroot using devtools and also this one build fine, I've just tested it again right now.

make sure to use jdk-openjdk to build

frankspace commented on 2024-01-02 02:24 (UTC)

I had no problem with version 2.9.0, but attempting to compile 2.9.1 in a chroot fails:

> Task :brut.apktool:apktool-lib:test

brut.androlib.aapt1.BuildAndDecodeTest > classMethod FAILED
    java.lang.UnsatisfiedLinkError at BuildAndDecodeTest.java:58

brut.androlib.aapt1.LargeIntsInManifestTest > checkIfLargeIntsAreHandledTest FAILED
    java.lang.NoClassDefFoundError at LargeIntsInManifestTest.java:51
        Caused by: java.lang.ExceptionInInitializerError at NativeLibraries.java:-2

brut.androlib.aapt1.SkipAssetTest > checkControl FAILED
    java.lang.NoClassDefFoundError at SkipAssetTest.java:74
        Caused by: java.lang.ExceptionInInitializerError at NativeLibraries.java:-2

brut.androlib.aapt1.SkipAssetTest > checkIfEnablingSkipAssetWorks FAILED
    java.lang.NoClassDefFoundError at SkipAssetTest.java:57
        Caused by: java.lang.ExceptionInInitializerError at NativeLibraries.java:-2

brut.androlib.decode.DecodeKotlinTest > classMethod FAILED
    java.lang.NoClassDefFoundError at DecodeKotlinTest.java:50
        Caused by: java.lang.ExceptionInInitializerError at NativeLibraries.java:-2

brut.androlib.decode.MissingDiv9PatchTest > assertMissingDivAdded FAILED
    java.lang.NoClassDefFoundError at MissingDiv9PatchTest.java:55
        Caused by: java.lang.ExceptionInInitializerError at NativeLibraries.java:-2

128 tests completed, 6 failed

> Task :brut.apktool:apktool-lib:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':brut.apktool:apktool-lib:test'.
> There were failing tests. See the report at: file:///build/android-apktool/src/Apktool-2.9.1/brut.apktool/apktool-lib/build/reports/tests/test/index.html

(Checking that file yielded nothing but a list of the six tests that failed, so it wasn't helpful.)

At a guess, I tried installing java-commons-lang and java-commons-lang3, neither of which had any effect.

hamelg commented on 2023-11-11 14:59 (UTC)

@muflone The error was that it couldn't find the javadoc command. JDK binaries were missing in my current Java environment. I installed the correct openjdk package to resolve the error.

patlefort commented on 2023-11-07 03:10 (UTC)

@muflone: Thanks for the clarification. Also I solved my problem, I forgot to set the locale when executing builds inside my container and that particular file contains a special unicode character.

muflone commented on 2023-11-06 21:31 (UTC)

@patlefort

the apktool-install-linux-r04-brut1.tar.bz2 file contains only two files: apktool which is a bash script used to execute the built java software and aapt (Android Asset Packaging Tool) which is NOT installed nor executed by this package

so definitively the archive is used only for the bash script which executes apktool.jar

In the next updates I'll try to remove this script and the apktool-install-linux-r04-brut1.tar.bz2

muflone commented on 2023-11-06 20:15 (UTC)

@hamelg and @patlefort what Java version are you using? Here builds fine in chroot

hamelg commented on 2023-11-06 18:54 (UTC)

Here, it fails with another error.

> Task :brut.j.common:javadoc FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':brut.j.common:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/home/xxxxxx/.cache/yay/android-apktool/src/Apktool-2.9.0/brut.j.common/build/tmp/javadoc/javadoc.options'