Apktool: New release?

Created on 19 Nov 2020  路  13Comments  路  Source: iBotPeaches/Apktool

Hi @iBotPeaches,

First I want to say thank you for making APKTool, it鈥檚 an amazing project that makes life easier for a lot of people out there.

I鈥檇 like to carefully ask if it would be possible to release a new version of APKTool soon. 2.4.1 is almost a year old, and since that release a lot of useful pull requests have made it into master.

If I or my team can assist in any way with preparing the new release, we鈥檇 be happy to help.

Best
Marvin

All 13 comments

I can't build mac AOSP which is the blocker at this time - https://github.com/iBotPeaches/Apktool/pull/2370#issuecomment-723967200. I try every once in awhile and cannot resolve.

If you have any ideas or why I can't seem to pull it down anymore, that would allow me to complete the new aapt/aapt2 binaries and finish the release.

Thanks for the heads-up, I wasn鈥檛 aware of this blocker until now. I鈥檒l see if there鈥檚 anything we can do.

Hi @iBotPeaches,
unfortunately I have no idea what the issue might be on your end, but I was able to pull the AOSP source on Mac today and build aapt. If it's ok for you, maybe I could provide you the compiled binaries? Or maybe you want to compare configurations with me? Although I have no idea what to look for, right now.

In case you want me to provide the binaries, can you let me know which branch of the AOSP sources I need to use, in combination with which branch from platform_frameworks_base? Just to make sure I'm not making a mistake.

Hi @peret, sounds like my environment is messed up then.

Normally, while not pretty. I just sync to master on both unix/mac at same time and use the latest master (usually you can tell which master by the frameworks_base update). It isn't pretty, but master usually has the changes we need vs waiting on the official tags from AOSP. As those tags are getting quite slow and never really match what we need.

If you wanna give it a shot with master + master from platform_frameworks_base and send mac binaries my way. I'll check them and see about just using them vs struggling to get my system to build.

Either way, I'm just going to rm-rf it all. Start a new partition and try again. See if that resolves anything.

Hmm, so yesterday I was able to compile aapt _without_ the changed framework files. When I tried today with the modifications from platform_frameworks_base, I get some compiler errors. Here's the output from make LOCAL_MULTILIB=64 USE_NINJA=false aapt:

13:40:31 ************************************************************
13:40:31 You are building on a machine with 16GB of RAM
13:40:31 
13:40:31 The minimum required amount of free memory is around 16GB,
13:40:31 and even with that, some configurations may not work.
13:40:31 
13:40:31 If you run into segfaults or other errors, try reducing your
13:40:31 -j value.
13:40:31 ************************************************************
build/make/core/soong_config.mk:179: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead..
build/make/core/soong_config.mk:180: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead..
============================================
PLATFORM_VERSION_CODENAME=S
PLATFORM_VERSION=S
TARGET_PRODUCT=sdk
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-20.1.0-x86_64-11.0.1
HOST_BUILD_TYPE=release
BUILD_ID=AOSP.MASTER
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl hardware/google/camera hardware/google/camera/devices/EmulatedCamera device/generic/goldfish device/generic/goldfish-opengl
============================================
[100% 640/640] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
error: frameworks/base/packages/Tethering/Android.bp:17:1: module "TetheringAndroidLibraryDefaults" already defined
       packages/modules/Connectivity/Tethering/Android.bp:17:1 <-- previous definition here
error: frameworks/base/packages/Tethering/Android.bp:48:1: module "TetheringApiCurrentLib" already defined
       packages/modules/Connectivity/Tethering/Android.bp:49:1 <-- previous definition here
error: frameworks/base/packages/Tethering/Android.bp:54:1: module "libtetherutilsjni" already defined
       packages/modules/Connectivity/Tethering/Android.bp:55:1 <-- previous definition here
error: frameworks/base/packages/Tethering/Android.bp:92:1: module "TetheringAppDefaults" already defined
       packages/modules/Connectivity/Tethering/Android.bp:93:1 <-- previous definition here
error: frameworks/base/packages/Tethering/Android.bp:112:1: module "InProcessTethering" already defined
       packages/modules/Connectivity/Tethering/Android.bp:114:1 <-- previous definition here
error: frameworks/base/packages/Tethering/Android.bp:125:1: module "Tethering" already defined
       packages/modules/Connectivity/Tethering/Android.bp:127:1 <-- previous definition here
error: frameworks/base/packages/Tethering/common/TetheringLib/Android.bp:16:1: module "framework-tethering" already defined
       packages/modules/Connectivity/Tethering/common/TetheringLib/Android.bp:16:1 <-- previous definition here
error: frameworks/base/packages/Tethering/common/TetheringLib/Android.bp:31:1: module "framework-tethering-srcs" already defined
       packages/modules/Connectivity/Tethering/common/TetheringLib/Android.bp:35:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/integration/Android.bp:16:1: module "TetheringIntegrationTestsDefaults" already defined
       packages/modules/Connectivity/Tethering/tests/integration/Android.bp:16:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/integration/Android.bp:43:1: module "TetheringIntegrationTestsLib" already defined
       packages/modules/Connectivity/Tethering/tests/integration/Android.bp:42:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/integration/Android.bp:50:1: module "TetheringIntegrationTests" already defined
       packages/modules/Connectivity/Tethering/tests/integration/Android.bp:52:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/integration/Android.bp:64:1: module "TetheringCoverageTests" already defined
       packages/modules/Connectivity/Tethering/tests/integration/Android.bp:66:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/privileged/Android.bp:17:1: module "TetheringPrivilegedTests" already defined
       packages/modules/Connectivity/Tethering/tests/privileged/Android.bp:28:1 <-- previous definition here
error: frameworks/base/packages/Tethering/apex/Android.bp:17:1: module "com.android.tethering" already defined
       packages/modules/Connectivity/Tethering/apex/Android.bp:17:1 <-- previous definition here
error: frameworks/base/packages/Tethering/apex/Android.bp:29:1: module "com.android.tethering.key" already defined
       packages/modules/Connectivity/Tethering/apex/Android.bp:30:1 <-- previous definition here
error: frameworks/base/packages/Tethering/apex/Android.bp:35:1: module "com.android.tethering.certificate" already defined
       packages/modules/Connectivity/Tethering/apex/Android.bp:36:1 <-- previous definition here
error: frameworks/base/packages/Tethering/apex/Android.bp:40:1: module "com.android.tethering.inprocess" already defined
       packages/modules/Connectivity/Tethering/apex/Android.bp:41:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/unit/Android.bp:18:1: module "TetheringCommonTests" already defined
       packages/modules/Connectivity/Tethering/tests/unit/Android.bp:18:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/unit/Android.bp:37:1: module "TetheringTestsDefaults" already defined
       packages/modules/Connectivity/Tethering/tests/unit/Android.bp:40:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/unit/Android.bp:76:1: module "TetheringTestsLib" already defined
       packages/modules/Connectivity/Tethering/tests/unit/Android.bp:78:1 <-- previous definition here
error: frameworks/base/packages/Tethering/tests/unit/Android.bp:84:1: module "TetheringTests" already defined
       packages/modules/Connectivity/Tethering/tests/unit/Android.bp:87:1 <-- previous definition here
error: frameworks/base/core/xsd/vts/Android.bp:44:1: unrecognized module type "vts_config"
error: frameworks/base/apex/extservices/Android.bp:15:1: module "com.android.extservices" already defined
       packages/modules/ExtServices/apex/Android.bp:15:1 <-- previous definition here
error: frameworks/base/apex/extservices/Android.bp:21:1: module "com.android.extservices-defaults" already defined
       packages/modules/ExtServices/apex/Android.bp:21:1 <-- previous definition here
error: frameworks/base/apex/extservices/Android.bp:30:1: module "com.android.extservices.key" already defined
       packages/modules/ExtServices/apex/Android.bp:30:1 <-- previous definition here
error: frameworks/base/apex/extservices/Android.bp:36:1: module "com.android.extservices.certificate" already defined
       packages/modules/ExtServices/apex/Android.bp:36:1 <-- previous definition here
error: frameworks/base/StubLibraries.bp:130:18: unrecognized property "jdiff_enabled"
error: frameworks/base/StubLibraries.bp:192:18: unrecognized property "jdiff_enabled"
error: frameworks/base/apex/extservices/testing/Android.bp:15:1: module "test_com.android.extservices" already defined
       packages/modules/ExtServices/apex/testing/Android.bp:15:1 <-- previous definition here
13:40:54 soong bootstrap failed with: exit status 1

#### failed to build some targets (33 seconds) ####

Looks to me like AOSP might have moved some module definitions to different files, but in platform_frameworks_base, they are also still defined, leading to duplicate definitions. Unfortunately, I have no idea what these files/modules are 馃槄 Would it be safe to just remove the definitions from frameworks/base? Have you encountered this before?

I was 47k commits behind on master on platform_frameworks_base. I updated it @peret

Ok, here are the binaries I built:
https://www.dropbox.com/s/niqk6okds5k69a1/aapt_64?dl=0
https://www.dropbox.com/s/dlb5cf1jmpog5rt/aapt2_64?dl=0

I haven't tested them yet, so please let me know whether they work for you :)

@peret - Initial mac tests passed. Going to get my other binaries updated and mainline this and do some additional tests. Thanks again.

Same error on my end, just a few repos that will refuse to clone even individually.

Hi @peret - Do you mind building them again? I had to slip a fix into frameworks_base, just pull latest master on my fork.

Ugh... sorry, I think now I messed my repo up by doing another repo sync and I'm getting duplicate module definitions again. Could you update your fork once more? 馃槵

@peret done

@iBotPeaches Ok, thanks! I built the binaries again with the latest fork and updated the files in my Dropbox. The links from my earlier comment should still be valid and lead you to the new binaries. Here they are once more:
https://www.dropbox.com/s/niqk6okds5k69a1/aapt_64?dl=0
https://www.dropbox.com/s/dlb5cf1jmpog5rt/aapt2_64?dl=0

I'll have a new release out before Christmas. Thanks for the jump start. My mac still has same 499 error, so guess I'll have to seriously dig into that. Since it makes no sense.

Closing as we are on pace again.

Was this page helpful?
0 / 5 - 0 ratings