Last active
August 23, 2019 14:09
-
-
Save pagdot/919e7a7d8300aa2c5a8b008952e7d6d2 to your computer and use it in GitHub Desktop.
Script to build adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgver=29.0.2 | |
tag=platform-tools-$pkgver | |
export CC = gcc | |
export CXX = g++ | |
export CFLAGS = | |
export CXXFLAGS = | |
export LDFLAGS = | |
export PLATFORM_TOOLS_VERSION = | |
#get arch files | |
git clone -b packages/android-tools --single-branch https://git.archlinux.org/svntogit/community.git | |
sed '/^link("adb/q' community/trunk/generate_build.rb > gen_adb_build.rb | |
chmod +x gen_adb_build.rb | |
#get sources | |
_boringssl_commit=`curl https://android.googlesource.com/platform/external/boringssl/+/refs/tags/$tag/BORINGSSL_REVISION?format=TEXT | base64 -d` | |
git clone -b $tag --single-branch https://android.googlesource.com/platform/system/core | |
git clone -b $tag --single-branch https://android.googlesource.com/platform/system/extras | |
git clone https://boringssl.googlesource.com/boringssl | |
PLATFORM_TOOLS_VERSION="$pkgver" LDFLAGS='-Wl,-z,relro,-z,now' ./gen_adb_build.rb > build.ninja | |
cd core | |
patch -p1 < ../community/trunk/fix_build_core.patch | |
cd ../boringssl | |
git reset --hard $_boringssl_commit | |
mkdir -p build && cd build && cmake -GNinja ..; ninja crypto/libcrypto.a | |
cd ../.. | |
echo $PWD | |
ninja |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment