这是indexloc提供的服务,不要输入任何密码
Skip to content

aapt: Bump to 15.0.0.23 #23671

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

aapt: Bump to 15.0.0.23 #23671

wants to merge 3 commits into from

Conversation

birhburh
Copy link

@birhburh birhburh commented Mar 8, 2025

It seems that after #21562 aapt couldn't properly parse resources.arsc provided with android-35 platform
Updated it to 15.0.0.23
Fixes #21666
Didn't checked myself but probably also:
Fixes #22712
Fixes #22667


using CXXFLAGS+=" -fPIC -std=gnu++2b" because it used in base/libs/androidfw/Android.bp and fails with strange template errors on previous versions

Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must have been a ton of effort.
Thank you a lot for your contribution.

I assume you have already done local/on-device testing,
but for anyone else reading this who may want to test this before it is merged I will leave instructions below.


(This is a pre-written, saved reply.)
If you want to test this PR please download the appropriate DEB package(s)
from the build artifacts of the associated PR's latest CI run.
Screenshot_20240619_232413

After downloading the build artifact, make sure to unzip and un-tar it.

Detailed instructions, if needed.

# finding out what architecture you need
# architecture is just below the TERMUX_VERSION
termux-info

# e.g.
# [...]
# TERMUX_MAIN_PACKAGE_FORMAT=debian
# TERMUX_VERSION=0.118.0
# TERMUX__USER_ID=0
# Packages CPU architecture:
# aarch64
# [...]

# =======================

# make sure `unzip` and `tar` are installed using
pkg install unzip tar

# unzip the artifact (if you have a different architecture this might be arm, i686 or x86_64 instead)
unzip debs-aarch64-*.zip

# untar the artifact
tar xf debs-aarch64-*.tar

# You should now have a debs/ directory in your current working directory
# Install the packages from the local source using
pkg install -- ./debs/*.deb

# to clean up, you can remove the debs/ directory, .tar file and .zip file
rm -rfi debs debs-aarch64-*.zip debs-aarch64-*.tar

@birhburh
Copy link
Author

birhburh commented Mar 8, 2025

Ok, will fix and check arm and i686 fails tomorrow

@Biswa96
Copy link
Member

Biswa96 commented Mar 8, 2025

I was planning to replace the files in the aapt directory with https://github.com/termux/android-build-tools project.

@birhburh
Copy link
Author

birhburh commented Mar 8, 2025

@Biswa96
It will be really awesome!
But probably will be a burden to catchup with AOSP changes in the future
Better then the current process of course

@Biswa96
Copy link
Member

Biswa96 commented Mar 8, 2025

But probably will be a burden to catchup with AOSP changes in the future

I am sending simple patches to upstream, for example https://android-review.googlesource.com/c/platform/frameworks/native/+/3526633 and will try to simplify the maintenance.

@MohammedKHC0
Copy link
Contributor

Any update??

Btw thanks for your work guys. I really appreciate it.

@birhburh
Copy link
Author

@MohammedKHC0
Currently you can download artifacts as described in this comment
I tested that it works on armv7 and aarch64 now
Unzip it on your computer or on device and
And install needed deb package using:

apt install PATH_TO_DEB

on your device

@Anonymous2716
Copy link

Anonymous2716 commented Mar 16, 2025

the command aapt2 of aarch64 arch artifact gives:

CANNOT LINK EXECUTABLE "aapt2": cannot locate symbol "png_sig_cmp" referenced by "/data/data/com.termux/files/usr/lib/libandroid-fw.so"...

@twaik
Copy link
Member

twaik commented Apr 18, 2025

the command aapt2 of aarch64 arch artifact gives:

CANNOT LINK EXECUTABLE "aapt2": cannot locate symbol "png_sig_cmp" referenced by "/data/data/com.termux/files/usr/lib/libandroid-fw.so"...

Probably the branch should be rebased against current master.

@MohammedKHC0
Copy link
Contributor

the command aapt2 of aarch64 arch artifact gives:

CANNOT LINK EXECUTABLE "aapt2": cannot locate symbol "png_sig_cmp" referenced by "/data/data/com.termux/files/usr/lib/libandroid-fw.so"...

Is this fixed?

@MohammedKHC0
Copy link
Contributor

@twaik @birhburh Sorry for the ping but is there is any work begining done?
Also please tell me if there is anyway i can help. Aapt is really needed at many IDEs for Android.

@birhburh
Copy link
Author

@MohammedKHC0
Will try to fix it today

@birhburh
Copy link
Author

birhburh commented May 24, 2025

Fixed this linking error, but it segfaults now at startup, will continue tomorrow

@birhburh
Copy link
Author

birhburh commented Jun 29, 2025

@MohammedKHC0

Last commit should fix aapt2
It works for me on waydroid
at least no segfault on start and it shows help
Will test on real devices and update this comment: works on arm64 device, works on arm32 device
I think, rerun of CI needed for new artifacts

If you don't want to wait for new artifacts
Clone my repo (or fetch this pr branch for this repo) and run for arm64:

./scripts/run-docker.sh ./build-package.sh aapt -i

aapt, aapt2, aidl deb files will be in the output dir

also don't forget to install dependencies:

apt install fmt libc++ libexpat libpng libzopfli zlib

probably only for arm32 build:
also I should link this libraries statically or add them as dependencies but for now you also need:
apt install libprotobuf abseil-cpp

works on clean termux install on arm32 just with apt install PATH_TO_AAPT; apt install PATH_TO_AAPT2

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