Coder Social home page Coder Social logo

android-sdk-tools's People

Contributors

lzhiyong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-sdk-tools's Issues

common.cc:41:10: fatal error: config.h: No such file or directory ?

Hello, I have followed the different steps but have a error with ninja

pi@raspberry4:~/android-sdk-tools/src/protobuf/build $ ninja -j$(nproc --all)
[1/179] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.o
FAILED: CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.o
/usr/bin/c++ -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -I. -I../src -std=c++11 -MD -MT CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.o -MF CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.o.d -o CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.o -c ../src/google/protobuf/stubs/common.cc
../src/google/protobuf/stubs/common.cc:41:10: fatal error: config.h: No such file or directory
   41 | #include "config.h"
      |          ^~~~~~~~~~
compilation terminated.
[4/179] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/stringprintf.cc.o
ninja: build stopped: subcommand failed.

C and CXX compiler identification is unknown

When running
python build.py --ndk=android_sdk/ndk/23.1.7779620 --abi=arm64-v8a

I'm getting the following error

-- Android: Selected Clang toolchain 'aarch64-linux-android-clang' with GCC toolchain ''
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:18 (project):
  The CMAKE_C_COMPILER:

    android_sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86/bin/clang

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.
  
  CMake Error at CMakeLists.txt:18 (project):
  The CMAKE_CXX_COMPILER:

    android_sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86/bin/clang++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

In the android_sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/ there is no linux-x86 just linux-x86_64

I ran export CC=android_sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/bin/clang and one for CXX but resulted in the same error.

Can't build on Fedora 37

I'm trying to build aapt2 locally. Could you please try to find out what's wrong for me?

I first cloned this repo using git clone, then ran python3 get_source.py --tags platform-tools-33.0.3. That took a while but failed shortly before the end with something like "unknown tag", so I cd'd into a submodule and ran git tag. That didn't show platform-tools-33.0.31, so I manually checked out the submodule revisions mentioned online on GitHub in all submodules. After that, running git status in the android-sdk-tools folder showed "nothing to commit, working tree clean". I used git 2.39.1 btw.

Anyway, after that I ran python3 build.py --ndk=/var/lib/android/linux/SDK/ndk/25.1.8937393/ --abi=arm64-v8a --build=build/arm64-v8a --protoc=/home/jkhon/Downloads/protoc-21.12/bin/protoc and that failed. This got printed out in red:

CMake Error at src/abseil-cpp/CMake/Googletest/DownloadGTest.cmake:23 (message):
  CMake step for googletest failed: 1
Call Stack (most recent call first):
  src/abseil-cpp/CMakeLists.txt:158 (include)

and here's CMake's log files:
CMakeOutput.log
CMakeError.log

Any idea what could be wrong? CMake apparently is at version 3.25.2 for me.

I need help!

Hello sir! Actually, I'm not reporting a issue, I need help!

I don't have a PC at the moment, but I want to keep developing on my phone. I've been trying to build one APK on ubuntu-20.04 (in proot-distro) using the openjdk-11-jdk, gradle and cmdline-tools (from the official Android Developer's website) since last month, but everytime failing when the task :app:mergeDebugResources runs. After some research I found that the aapt2 (also some other binaries) in build-tools which is downloaded by the sdkmanager is not compatible in my arm aarch64 phone. Thus, after searching a lot, I got to your repo. By the way, I don't know much how to use your repo to build the tools for my architecture (I will be helpful if you provide those for me).

Now I need the full instruction on how to successfully build an APK using Gradle, Java 8/11 and other necessary commandline tools in Termux. https://t.me/masterjavaofficial

x86_64 and armeabi-v7a prebuilt support

Hi @lzhiyong

Thanks for this project - trying to compile for armv7 locally at the moment, but have stumbled upon issues with Ninja getting into a CMake configuration loop (the cache remains dirty, even after 100 tries).

Would you mind adding x86_64 & armeabi-v7a prebuilts as well to the latest release?

34.0.0

hey, first of all. thanks you for supporting arm arch6.. i´ve developing using android studio on my android phone and tablet thanks to your work. for a couple of mounths.

i want to know if you're planning to update for de 34.0.0 version for arm too.

aidl相关问题。

打包FBlackBox/BlackBox项目的时候因为所以到了aidl而报错,有什么解决方法吗?

Screenshot_2022-05-09-20-28-40-515_com termux
Screenshot_2022-05-09-20-28-38-978_com termux
Screenshot_2022-05-09-20-28-37-198_com termux
Screenshot_2022-05-09-20-28-35-601_com termux
Screenshot_2022-05-09-20-28-33-791_com termux
Screenshot_2022-05-09-20-28-31-015_com termux
Screenshot_2022-05-09-20-28-29-078_com termux
Screenshot_2022-05-09-20-28-16-063_com termux
Screenshot_2022-05-09-20-28-23-214_com termux
Screenshot_2022-05-09-20-28-26-639_com termux
Screenshot_2022-05-09-20-27-10-049_com termux
Screenshot_2022-05-09-20-27-04-346_com termux

build-toos/aapt2 issue with gradle in android termux

If we use gradle build tools in termux (android) to build android apps,
android-sdk build-tools/<version>/aapt2 is unused
cause android gradle plugin (AGP) will auto download and use aapt2 from https://maven.google.com/web/m_index.html#com.android.tools.build:aapt2
and that will produce an error in termux
because downloaded file contains executable for linux and not compatible for termux

current solution:

  • use maven local repository in all build.gradle
  • convert all jar file in ~/.gradle/cache/modules-2/files-1/ to maven local repository format by using this script (without finalizedBy)
  • run gradle cacheToMavenLocal
  • replace executable aapt2 in .m2/repository/com/android/tools/build/aapt2/< version >/aapt2-< version >.jar (downloaded by AGP from here ) with aapt2 provided by termux
  • and rebuild gradle assembleDebug

Adb and fastboot

Adb and fastboot doesn't work on nonrooted device,
Can you add option to provide custom fd from java?

Does not work on asahi Linux

I have downloaded on Asahi Linux but every binary file gives me core dumped
I have downloaded the file android-sdk-tools-static-aarch64.zip

(missing: BISON_EXECUTABLE), (_FPHSA_FAILURE_MESSAG, (FIND_PACKAGE_HANDLE_STANDARD_ARGS)E),

I get Error executing

NDK_TOOLCHAIN=$TOOLCHAIN                                          cmake -G 'Ninja' \                                                    -DCMAKE_C_COMPILER=$NDK_TOOLCHAIN/bin/aarch64-linux-android30-clang \
    -DCMAKE_CXX_COMPILER=$NDK_TOOLCHAIN/bin/aarch64-linux-android30-clang++ \
    -DCMAKE_SYSROOT=$NDK_TOOLCHAIN/sysroot \
    -DCMAKE_BUILD_TYPE=Release \                                      ..                                                            
ninja -j16

Where is my $TOOLCHAIN ​​located on the path

export NDK=~/androidtools/android-ndk-r23
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-aarch64

  ~/sdk-tools/build ./build.sh                             
-- Version: 7.1.3                                                 -- Build type: Release
-- CXX_STANDARD: 11
-- Required features: cxx_variadic_templates
CMake Deprecation Warning at src/pcre/dist2/CMakeLists.txt:101 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
                                                                  
-- Found Readline: /data/data/com.termux/files/usr/include
-- Could not find OPTIONAL package Editline
--
--
-- PCRE2-10.37 configuration summary:
--
--   Install prefix .................. : /usr/local
--   C compiler ...................... : /data/data/com.termux/files/home/androidtools/android-ndk-r23/toolchains/llvm/prebuilt/linux-aarch64/bin/aarch64-linux-android30-clang
--   C compiler flags ................ :  -fcolor-diagnostics -fPIC -Wno-attributes -std=gnu11
--
--   Build 8 bit PCRE2 library ....... : ON
--   Build 16 bit PCRE2 library ...... : OFF
--   Build 32 bit PCRE2 library ...... : OFF
--   Enable JIT compiling support .... : OFF
--   Use SELinux allocator in JIT .... : IGNORE
--   Enable Unicode support .......... : ON
--   Newline char/sequence ........... : LF
--   \R matches only ANYCRLF ......... : OFF
--   \C is disabled .................. : OFF
--   EBCDIC coding ................... : OFF
--   EBCDIC coding with NL=0x25 ...... : OFF
--   Rebuild char tables ............. : OFF
--   Internal link size .............. : 2
--   Parentheses nest limit .......... : 250
--   Heap limit ...................... : 20000000
--   Match limit ..................... : 10000000
--   Match depth limit ............... : MATCH_LIMIT
--   Build shared libs ............... : OFF
--   Build static libs ............... : ON
--   Build pcre2grep ................. : ON
--   Enable JIT in pcre2grep ......... : ON
--   Enable callouts in pcre2grep .... : ON
--   Enable callout fork in pcre2grep. : ON
--   Buffer size for pcre2grep ....... : 20480
--   Build tests (implies pcre2test .. : ON
--                and pcre2grep)
--   Link pcre2grep with libz ........ : ON
--   Link pcre2grep with libbz2 ...... : ON
--   Link pcre2test with libeditline . : Library not found
--   Link pcre2test with libreadline . : ON
--   Support Valgrind .................: OFF
--   Use %zu and %td ..................: AUTO
--
-- Symbol prefix:
-- ===========================================================================
--
-- Configuration
--   Prefix ..................... /usr/local
--   Build type ................. Release
--   Shared libraries ........... OFF
--   Character type ............. char (UTF-8)
--
--   Build documentation ........ OFF
--   Build examples ............. ON
--   Build fuzzers .............. OFF
--   Build tests ................ ON
--   Build tools (xmlwf) ........ ON
--   Build pkg-config file ...... ON
--   Install files .............. ON
--
--   Features
--     // Advanced options, changes not advised
--     Attributes info .......... OFF
--     Context bytes ............ 1024
--     DTD support .............. ON
--     Large size ............... OFF
--     Minimum size ............. OFF
--     Namespace support ........ ON
--
--   Entropy sources
--     getrandom ................ 1
--     syscall SYS_getrandom .... 1
--     libbsd ................... OFF
--     /dev/random .............. ON
--
-- ===========================================================================
CMake Deprecation Warning at src/zopfli/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- JsonCpp Version: 1.9.4
-- ZSTD VERSION: 1.5.0
-- CMAKE_INSTALL_PREFIX: /usr/local
-- CMAKE_INSTALL_LIBDIR: lib
-- ZSTD_LEGACY_SUPPORT not defined!
-- ZSTD_MULTITHREAD_SUPPORT is enabled
CMake Deprecation Warning at src/lz4/build/cmake/CMakeLists.txt:37 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at src/brotli/CMakeLists.txt:5 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Build type is 'Release'
-- Compiler is not EMSCRIPTEN
-- generate cpp file /data/data/com.termux/files/home/sdk-tools/src/base/tools/aapt2/Configuration.pb.cc
-- generate head file /data/data/com.termux/files/home/sdk-tools/src/base/tools/aapt2/Configuration.pb.h
-- generate cpp file /data/data/com.termux/files/home/sdk-tools/src/base/tools/aapt2/Resources.pb.cc
-- generate head file /data/data/com.termux/files/home/sdk-tools/src/base/tools/aapt2/Resources.pb.h
-- generate cpp file /data/data/com.termux/files/home/sdk-tools/src/base/tools/aapt2/ResourcesInternal.pb.cc
-- generate head file /data/data/com.termux/files/home/sdk-tools/src/base/tools/aapt2/ResourcesInternal.pb.h
CMake Error at /data/data/com.termux/files/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find BISON (missing: BISON_EXECUTABLE)
Call Stack (most recent call first):
  /data/data/com.termux/files/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /data/data/com.termux/files/usr/share/cmake-3.22/Modules/FindBISON.cmake:306 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  build-tools/aidl.cmake:1 (find_package)
  build-tools/CMakeLists.txt:3 (include)


-- Configuring incomplete, errors occurred!
See also "/data/data/com.termux/files/home/sdk-tools/build/CMakeFiles/CMakeOutput.log".
See also "/data/data/com.termux/files/home/sdk-tools/build/CMakeFiles/CMakeError.log".
ninja: error: loading 'build.ninja': No such file or directory



Help

When i compile Android-12 aapt source code then it can run on android version 5,6,7,8,... devices or not??

could you please add apksigner in build-tools?

The apksigner tool, available in revision 24.0.3 and higher of the Android SDK Build Tools, lets you sign APKs and confirm that an APK's signature will be verified successfully on all versions of the Android platform supported by that APK.

In Android project build work flow, zipalign and apksigner is necessary.

could you please add apksigner in build-tools?

Adreno OpenCL SDK installation

I have downloaded OpenCL Adreno gpu SDK already in my device
But can I install OpenCL Adreno gpu SDK via termux ?
Please help me..
Device MI 10T
Os Android 11
In my mobile already available OpenCL 2.0 driver
But I want to increase my OpenCL gpu performance
Can I install OpenCL Adreno gpu SDK via termux ?

issue with Android gradle plugin 4.*

I got this error with Android gradle 4.0.1:
Unknown Option : aapt2 :
'--no-proguard-location-reference'
But when i changed the gradle classpath to 3.6.4
The build successfully done
.
Any solution for this.

Failed to link AAPT2 with libcrypto

Hello,

I'm trying to build AAPT2. But the build fails at the linking stage with the following error :

ld: error: undefined symbol: aes_hw_encrypt
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_encrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_wrap_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_wrap_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 19 more times

ld: error: undefined symbol: vpaes_encrypt
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_encrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_wrap_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_wrap_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 19 more times

ld: error: undefined symbol: aes_hw_decrypt
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_decrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_unwrap_key_inner) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_unwrap_key_inner) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 16 more times

ld: error: undefined symbol: vpaes_decrypt
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_decrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_unwrap_key_inner) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_unwrap_key_inner) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 16 more times

ld: error: undefined symbol: aes_hw_set_encrypt_key
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_set_encrypt_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(CTR_DRBG_init) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 3 more times

ld: error: undefined symbol: vpaes_set_encrypt_key
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_set_encrypt_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(CTR_DRBG_init) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 3 more times

ld: error: undefined symbol: aes_hw_set_decrypt_key
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_set_decrypt_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(boringssl_fips_self_test) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_init_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a

ld: error: undefined symbol: vpaes_set_decrypt_key
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_set_decrypt_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(boringssl_fips_self_test) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_init_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a

ld: error: undefined symbol: aes_hw_ctr32_encrypt_blocks
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_ctr128_encrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_ctr128_encrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 7 more times

ld: error: undefined symbol: vpaes_ctr32_encrypt_blocks
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_ctr128_encrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_ctr128_encrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 7 more times

ld: error: undefined symbol: aes_hw_cbc_encrypt
>>> referenced by bcm.c
>>>               bcm.c.o:(AES_cbc_encrypt) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(boringssl_fips_self_test) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_init_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 3 more times

ld: error: undefined symbol: bn_mul_mont
>>> referenced by bcm.c
>>>               bcm.c.o:(BN_mod_mul_montgomery) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(bn_mod_mul_montgomery_small) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a

ld: error: undefined symbol: gcm_init_v8
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(CRYPTO_gcm128_init_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 2 more times

ld: error: undefined symbol: gcm_ghash_v8
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 7 more times

ld: error: undefined symbol: gcm_gmult_v8
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 7 more times

ld: error: undefined symbol: gcm_init_neon
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(CRYPTO_gcm128_init_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 2 more times

ld: error: undefined symbol: gcm_ghash_neon
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 7 more times

ld: error: undefined symbol: gcm_gmult_neon
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(aes_ctr_set_key) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 7 more times

ld: error: undefined symbol: sha256_block_data_order
>>> referenced by bcm.c
>>>               bcm.c.o:(SHA224) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(SHA224) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(SHA256) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 13 more times

ld: error: undefined symbol: sha512_block_data_order
>>> referenced by bcm.c
>>>               bcm.c.o:(SHA384) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(SHA384) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced by bcm.c
>>>               bcm.c.o:(SHA512) in archive /data/data/com.termux/files/home/sdk-tools/cmake/lib/libs/libcrypto.a
>>> referenced 20 more times

I built boringssl successfully. Running nm to find symbol
sha512_block_data_order in libcrypto.a give the following output :

$ nm libcrypto.a | grep sha512_block_data_order
                U sha512_block_data_order

It's undefined in the library. Could you help me fix this?

I just wanted to build AAPT2. So I built all the required libraries one by one and put them in a single folder libs.

Failing to link `-lpthread`

Problem

When I try to link every static library against aapt2 it fails with the error below. In another issue, I saw someone else having the same issue, but I don't know which file you refer to, to change -lpthread to -lc.

Error

FAILED: bin/build-tools/aapt2
: && /mnt/p/Files/Coding/Java/revanced/aapt2-build-script/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++ --sysroot=/mnt/p/Files/Coding/Java/revanced/aapt2-build-script/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -fcolor-diagnostics -fPIC -Wno-attributes -std=gnu++2a -O3 -DNDEBUG  -static build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/Main.cpp.o build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/cmd/Command.cpp.o build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/cmd/Compile.cpp.o build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/cmd/Convert.cpp.o build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/cmd/Diff.cpp.o build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/cmd/Dump.cpp.o build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/cmd/Link.cpp.o build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/cmd/Optimize.cpp.o build-tools/CMakeFiles/aapt2.dir/__/src/base/tools/aapt2/cmd/Util.cpp.o  -o bin/build-tools/aapt2  build-tools/liblibaapt2.a  cmake/liblibandroidfw.a  cmake/liblibincfs.a  cmake/liblibselinux.a  cmake/liblibsepol.a  cmake/liblibutils.a  cmake/liblibcutils.a  cmake/liblibziparchive.a  cmake/liblibbase.a  cmake/libliblog.a  src/protobuf/cmake/libprotoc.a  src/protobuf/cmake/libprotobuf.a  src/expat/libexpat.a  src/boringssl/crypto/libcrypto.a  src/boringssl/ssl/libssl.a  src/pcre/libpcre2-8.a  -lc++_static  -ldl  src/fmtlib/libfmt.a  -lm  src/boringssl/crypto/libcrypto.a  -lpthread && :
ld: error: unable to find library -lpthread

WASM support

Hello

Have you considered to provide a wasm version of android sdk/ndk?

More Info

How can CMakeLists.txt(AAPT2) be adjusted to be used in an Android Project? Can I execute aapt2 through the shared library as aapt2 binary can't be executed directly through runtime.exe(), it may produce errors for API 28 and above.

I tried using the CMakeList.txt in an android project - https://github.com/rupesh-kumar-lpu/AAPT2_Android
No issues with Gradle sync but NDK issues come up while building APK.

Thanks

Provide Dockerfile

I've been running into issues building (during cmake even) this locally on docker (with x86 host mac/linux).
Would you be able to provide the Dockerfile that you used :)?

Thanks for your effort!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.