diff options
| author | Starfish <starfish@kaffeemitkoffein.de> | 2022-12-29 20:28:20 +0100 |
|---|---|---|
| committer | Starfish <starfish@kaffeemitkoffein.de> | 2022-12-29 20:28:20 +0100 |
| commit | 9b464b7b43b40e6392bf2505b1fcb19ca229410a (patch) | |
| tree | 95990b721f63e957321df809d71ef73569c064e4 | |
| parent | 58707277a5c27f451d2d1e0a78bd576e08e3fc09 (diff) | |
| download | SDK-Rebuild-9b464b7b43b40e6392bf2505b1fcb19ca229410a.tar.gz SDK-Rebuild-9b464b7b43b40e6392bf2505b1fcb19ca229410a.tar.bz2 SDK-Rebuild-9b464b7b43b40e6392bf2505b1fcb19ca229410a.zip | |
1st commit
| -rw-r--r-- | README.md | 69 | ||||
| -rw-r--r-- | sdk-12.0.0_r19/README.md | 33 | ||||
| -rw-r--r-- | sdk-12.0.0_r19/build.sh | 29 | ||||
| -rw-r--r-- | sdk-12.0.0_r19/dependencies.sh | 28 | ||||
| -rw-r--r-- | sdk-12.0.0_r19/download.sh | 14 | ||||
| -rwxr-xr-x | sdk-12.0.0_r19/patch.sh | 35 | ||||
| -rw-r--r-- | sdk-12.1.0_r27/README.md | 33 | ||||
| -rw-r--r-- | sdk-12.1.0_r27/build.sh | 30 | ||||
| -rw-r--r-- | sdk-12.1.0_r27/dependencies.sh | 28 | ||||
| -rw-r--r-- | sdk-12.1.0_r27/download.sh | 14 | ||||
| -rwxr-xr-x | sdk-12.1.0_r27/patch.sh | 35 | ||||
| -rw-r--r-- | sdk-13.0.0_r10/README.md | 56 | ||||
| -rw-r--r-- | sdk-13.0.0_r10/build.sh | 34 | ||||
| -rw-r--r-- | sdk-13.0.0_r10/dependencies.sh | 28 | ||||
| -rw-r--r-- | sdk-13.0.0_r10/download.sh | 14 | ||||
| -rw-r--r-- | sdk-13.0.0_r18/README.md | 61 | ||||
| -rw-r--r-- | sdk-13.0.0_r18/build.sh | 35 | ||||
| -rw-r--r-- | sdk-13.0.0_r18/dependencies.sh | 28 | ||||
| -rw-r--r-- | sdk-13.0.0_r18/download.sh | 14 |
19 files changed, 617 insertions, 1 deletions
@@ -1,2 +1,69 @@ -# SDK-Rebuilds +# Android-SDK-Rebuilds + +Rebuild Android(tm) SDK from source +=================================== + +You can build all SDKs up to Android 10 (api level 29) from the build scripts found (there)[https://gitlab.com/android-rebuilds/auto]. + +For Android 12 (api 31), 12L (api 32) and 13 (api 33) you can use the build scripts from here. + +For Android 11 (api 30), the build-receipe should be very similiar (if not identical) to Android 12 (api 31), but this was not tested. + +For the sake of simplicity, the build recipes here *do **not** use docker*. + +All scripts have been written from scratch and support a build-chain on a modern, up-to-date OS (Ubuntu 22.04.1 LTS and Linux Mint 21). + +If you do not want to mess up your main production machine, use a VM. + +This repository includes the build receipes in the corresponding folders. + +The build scripts have been tested on Ubuntu 22.04.1 LTS and Linux Mint 21. + +The sdk for Windows was **not** tested for all versions/revisions, but only for some of them, but it *should* work. + +Notice for Android 13 +--------------------- + +The recipe for Android 13 (api 33) builds the sdk but does NOT build a system image; but don't worry and read the Readme.md inside that folder for how to also build a system image for Android 13. + + +Prerequisites +============= + +You need approx. 300 MB of free disk space (100 MB for the source of each sdk version, and an other 200 MB for the build process and the output). + +I monitored the builds and they used up to 26 GB of RAM. Therefore, I recommend at least 32 GB of RAM. Lower specs might work, but are untested. It is commonly asserted that sdk builds fail when you have less than 16 GB of free RAM. + +You should build on a (virtual) machine running either Ubuntu 22.04.1 LTS or Linux Mint 21. + +You have to download approx. 100 GB of source code, and the 1st build usually take a couple of hours, depending on your machine. So take your time and consider to get a coffee. + +How to build +============ + +Install git: +sudo apt update +sudo apt install git + +Install repo tool: +sudo apt install repo + +Should your distro not have it, you can get the repo tool from (here)[https://android.googlesource.com/tools/repo]. It is a single script file, so no compiling is necessary. It needs the python-is-python3 symlink package installed to work, *or* a manually set symlink from 'python' to 'python3'. + +Clone **this** repository locally: +git clone https://codeberg.org/Starfish/Android-SDK-Rebuilds + +cd into the local copy and desired sdk folder and follow the instructions in the README.md file there. + +Before building, please carefully read the README.md in the corresponding folder first! + +Last words +========== + +I am an app dev, not a package builder. The time I am willing to spend on rebuilding the sdk is limited. I am lucky when I get the sdk compiled, and that is also the point when I stop any investigations. Take care! + +Footnote +======== + +Microsoft Windows is a trademark of the Microsoft group of companies. Android is a trademark of Google LLC. diff --git a/sdk-12.0.0_r19/README.md b/sdk-12.0.0_r19/README.md new file mode 100644 index 0000000..4d2b6a6 --- /dev/null +++ b/sdk-12.0.0_r19/README.md @@ -0,0 +1,33 @@ +VERSION='12.0.0_r19' +==================== + +Notes +----- + +- patch.sh is necessary to fix outdated syntax in a py script file. Without that, the build will break at the very end. +- simultaneous builds of win and linux sdk may fail. Default is linux only. If desired, edit build.sh and change the settings. + +All commands need to be executed from the sdk folder! + +Build receipe +------------- + +1) Install dependencies (you will be asked for root password to install packages): + +./dependencies.sh + +2) Download the source code: + +./download.sh + +3) Apply patches to make the build work: + +./patch.sh + +4) Compile the sdk: + +./build.sh + +When the build finishes sucessfully, you get a list of the important generated sdk files. + +Have fun! diff --git a/sdk-12.0.0_r19/build.sh b/sdk-12.0.0_r19/build.sh new file mode 100644 index 0000000..84731c7 --- /dev/null +++ b/sdk-12.0.0_r19/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Caution: VERSION needs to be identical in all scripts in this directory, +# otherwise the build will not work. +VERSION='12.0.0_r19' +BUILD_VARIANT='eng' +export USER=$(whoami) +export BUILD_NUMBER="${BUILD_VARIANT}.${VERSION}" +. build/envsetup.sh +lunch sdk-${BUILD_VARIANT} +make -j$(nproc) sdk dist sdk_repo +# make -j$(nproc) win_sdk dist sdk_repo + +# list the result files +# --------------------- +# +# optional, the windows sdk, disabled by default (see above) +# ls -lah /out/dist/android-sdk_${BUILD_NUMBER}_windows.zip + +# the sdk + +ls -lah out/dist/android-sdk_${BUILD_NUMBER}_linux-x86.zip + +# the parts of the sdk + +ls -lah out/dist/sdk-repo*.zip +ls -lah out/dist/sdk-symbols-${BUILD_NUMBER}.zip +ls -lah out/dist/repo*.xml + diff --git a/sdk-12.0.0_r19/dependencies.sh b/sdk-12.0.0_r19/dependencies.sh new file mode 100644 index 0000000..2d2d1d8 --- /dev/null +++ b/sdk-12.0.0_r19/dependencies.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Installs necessary packages. Some of them might be obsolete for new builds. +# + +# Notes: +# - the master branch of AOSP comes with a brebuilt version of OpenJDK, so +# no need to install it with apt. +# +# Notes about the repo tool: +# +# - The repo tool is available from debian repos. Although you may get warned +# that a new version of repo is available when starting sync later, this +# usually can be safely ignored. +# +# - should you really need the latest repo version of if your distro does +# not have it, you can get the repo tool from here: +# https://android.googlesource.com/tools/repo +# It is a single script filem, no compiling is necessary. +# +# - repo needs the python-is-python3 symlink package installed to work or a +# manual symlink that 'python' is 'python3'. Without it, repo will not +# work! + +sudo apt install git gnupg flex bison gperf build-essential zip curl \ +zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5-dev \ +libncurses5 libx11-dev lib32z1-dev libgl1-mesa-dev \ +libxml2-utils xsltproc unzip rsync python3 python-is-python3 tofrodos repo diff --git a/sdk-12.0.0_r19/download.sh b/sdk-12.0.0_r19/download.sh new file mode 100644 index 0000000..7b7f683 --- /dev/null +++ b/sdk-12.0.0_r19/download.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# You can go to https://android.googlesource.com/platform/manifest/+refs and +# to check for the latest version/revision. +# +# Usually, different revisions (e.g._r19) work more or less out of the box +# without the need to change the build skripts. +# +# Caution: VERSION needs to be identical in all scripts in this directory, +# otherwise the build will not work. + +VERSION='12.0.0_r19' +repo init -u https://android.googlesource.com/platform/manifest -b android-$VERSION --depth=1 +repo sync --current-branch -j4 diff --git a/sdk-12.0.0_r19/patch.sh b/sdk-12.0.0_r19/patch.sh new file mode 100755 index 0000000..d16b2d5 --- /dev/null +++ b/sdk-12.0.0_r19/patch.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# need to patch a py script using outdated syntax not compatible with python3 + +if [ ! -f "development/build/tools/mk_sources_zip.py.bak" ]; then + cp development/build/tools/mk_sources_zip.py development/build/tools/mk_sources_zip.py.bak +fi + +sed -i '77 s/"""/ print/' development/build/tools/mk_sources_zip.py +sed -i '94 s/except /except (/' development/build/tools/mk_sources_zip.py +sed -i '94 s/:/):/' development/build/tools/mk_sources_zip.py + +sed -i '250 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '251 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '252 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '253 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '254 c\# removed' development/build/tools/mk_sources_zip.py + +sed -i '62 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '63 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '64 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '65 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '66 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '67 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '68 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '69 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '70 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '71 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '72 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '73 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '74 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '75 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '76 c\# removed' development/build/tools/mk_sources_zip.py + + diff --git a/sdk-12.1.0_r27/README.md b/sdk-12.1.0_r27/README.md new file mode 100644 index 0000000..8f08fee --- /dev/null +++ b/sdk-12.1.0_r27/README.md @@ -0,0 +1,33 @@ +VERSION='12.1.0_r27' +==================== + +Notes +----- + +- patch.sh is necessary to fix outdated syntax in a py script file. Without that, the build will break at the very end. +- simultaneous builds of win and linux sdk may fail. Default is linux only. If desired, edit build.sh and change the settings. + +All commands need to be executed from the sdk folder! + +Build receipe +------------- + +1) Install dependencies (you will be asked for root password to install packages): + +./dependencies.sh + +2) Download the source code: + +./download.sh + +3) Apply patches to make the build work: + +./patch.sh + +4) Compile the sdk: + +./build.sh + +When the build finishes sucessfully, you get a list of the important generated sdk files. + +Have fun! diff --git a/sdk-12.1.0_r27/build.sh b/sdk-12.1.0_r27/build.sh new file mode 100644 index 0000000..649963a --- /dev/null +++ b/sdk-12.1.0_r27/build.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Caution: VERSION needs to be identical in all scripts in this directory, +# otherwise the build will not work. + +VERSION='12.1.0_r27' +BUILD_VARIANT='eng' +export USER=$(whoami) +export BUILD_NUMBER="${BUILD_VARIANT}.${VERSION}" +. build/envsetup.sh +lunch sdk-${BUILD_VARIANT} +make -j$(nproc) sdk dist sdk_repo +# make -j$(nproc) win_sdk dist sdk_repo + +# list the result files +# --------------------- +# +# optional, the windows sdk, disabled by default (see above) +# ls -lah /out/dist/android-sdk_${BUILD_NUMBER}_windows.zip + +# the sdk + +ls -lah out/dist/android-sdk_${BUILD_NUMBER}_linux-x86.zip + +# the parts of the sdk + +ls -lah out/dist/sdk-repo*.zip +ls -lah out/dist/sdk-symbols-${BUILD_NUMBER}.zip +ls -lah out/dist/repo*.xml + diff --git a/sdk-12.1.0_r27/dependencies.sh b/sdk-12.1.0_r27/dependencies.sh new file mode 100644 index 0000000..2d2d1d8 --- /dev/null +++ b/sdk-12.1.0_r27/dependencies.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Installs necessary packages. Some of them might be obsolete for new builds. +# + +# Notes: +# - the master branch of AOSP comes with a brebuilt version of OpenJDK, so +# no need to install it with apt. +# +# Notes about the repo tool: +# +# - The repo tool is available from debian repos. Although you may get warned +# that a new version of repo is available when starting sync later, this +# usually can be safely ignored. +# +# - should you really need the latest repo version of if your distro does +# not have it, you can get the repo tool from here: +# https://android.googlesource.com/tools/repo +# It is a single script filem, no compiling is necessary. +# +# - repo needs the python-is-python3 symlink package installed to work or a +# manual symlink that 'python' is 'python3'. Without it, repo will not +# work! + +sudo apt install git gnupg flex bison gperf build-essential zip curl \ +zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5-dev \ +libncurses5 libx11-dev lib32z1-dev libgl1-mesa-dev \ +libxml2-utils xsltproc unzip rsync python3 python-is-python3 tofrodos repo diff --git a/sdk-12.1.0_r27/download.sh b/sdk-12.1.0_r27/download.sh new file mode 100644 index 0000000..44264d0 --- /dev/null +++ b/sdk-12.1.0_r27/download.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# You can go to https://android.googlesource.com/platform/manifest/+refs and +# to check for the latest version/revision. +# +# Usually, different revisions (e.g._r19) work more or less out of the box +# without the need to change the build skripts. +# +# Caution: VERSION needs to be identical in all scripts in this directory, +# otherwise the build will not work. + +VERSION='12.1.0_r27' +repo init -u https://android.googlesource.com/platform/manifest -b android-$VERSION --depth=1 +repo sync --current-branch -j4 diff --git a/sdk-12.1.0_r27/patch.sh b/sdk-12.1.0_r27/patch.sh new file mode 100755 index 0000000..d16b2d5 --- /dev/null +++ b/sdk-12.1.0_r27/patch.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# need to patch a py script using outdated syntax not compatible with python3 + +if [ ! -f "development/build/tools/mk_sources_zip.py.bak" ]; then + cp development/build/tools/mk_sources_zip.py development/build/tools/mk_sources_zip.py.bak +fi + +sed -i '77 s/"""/ print/' development/build/tools/mk_sources_zip.py +sed -i '94 s/except /except (/' development/build/tools/mk_sources_zip.py +sed -i '94 s/:/):/' development/build/tools/mk_sources_zip.py + +sed -i '250 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '251 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '252 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '253 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '254 c\# removed' development/build/tools/mk_sources_zip.py + +sed -i '62 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '63 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '64 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '65 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '66 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '67 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '68 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '69 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '70 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '71 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '72 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '73 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '74 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '75 c\# removed' development/build/tools/mk_sources_zip.py +sed -i '76 c\# removed' development/build/tools/mk_sources_zip.py + + diff --git a/sdk-13.0.0_r10/README.md b/sdk-13.0.0_r10/README.md new file mode 100644 index 0000000..17cb2b9 --- /dev/null +++ b/sdk-13.0.0_r10/README.md @@ -0,0 +1,56 @@ +VERSION='13.0.0_r10' +==================== + +IMPORTANT +--------- +The SDK 33 (android version 13), contrary to previous versions, does NOT include +an system image anymore. + +You will notice a significantly reduced source tree, a smaller output sdk-zip-file +and will experience a much shorter build time. This is, because the build receipe +does not generate a system image. + +This is ok, because you do not really need it (unless you use a VM instead of a +real device) for development. + +But do not worry, you still can build it! But not from the sdk source tree! + +Simply follow the instructions here to create a system image: +https://source.android.com/docs/setup/create/gsi#building-gsis + +You need to pull a different source tree. + +For the most up-to-date android 13, the branch to use is "android13-gsi". + +I have tested building it with the same build environent like for the sdk, and +it works without any issues! + + +Notes +----- + +- simultaneous builds of win and linux sdk may fail. Default is linux only. If desired, edit build.sh and change the settings. +- the build.sh differs significantly to previous versions, because building +conscrypt will run in multiple issues and result in (unrecoverable) errors unless +some additional modules are built from source. + +All commands need to be executed from the sdk folder! + +Build receipe +------------- + +1) Install dependencies (you will be asked for root password to install packages): + +./dependencies.sh + +2) Download the source code: + +./download.sh + +3) Compile the sdk: + +./build.sh + +When the build finishes sucessfully, you get a list of the important generated sdk files. + +Have fun! diff --git a/sdk-13.0.0_r10/build.sh b/sdk-13.0.0_r10/build.sh new file mode 100644 index 0000000..7537aa9 --- /dev/null +++ b/sdk-13.0.0_r10/build.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Caution: VERSION needs to be identical in all scripts in this directory, +# otherwise the build will not work. +VERSION='13.0.0_r10' +BUILD_VARIANT='eng' +export USER=$(whoami) +export BUILD_NUMBER="${BUILD_VARIANT}.${VERSION}" +# needed, because otherwise conscrypt build will fail. ART and some other +# dependencies need to be built from source. +export ART_MODULE_BUILD_FROM_SOURCE=true +export MODULE_BUILD_FROM_SOURCE=true + +. build/envsetup.sh +lunch sdk-${BUILD_VARIANT} +make -j$(nproc) sdk dist sdk_repo +# make -j$(nproc) win_sdk dist sdk_repo + +# list the result files +# --------------------- +# +# optional, the windows sdk, disabled by default (see above) +# ls -lah /out/dist/android-sdk_${BUILD_NUMBER}_windows.zip + +# the sdk + +ls -lah out/dist/android-sdk_${BUILD_NUMBER}_linux-x86.zip + +# the parts of the sdk + +ls -lah out/dist/sdk-repo*.zip +ls -lah out/dist/sdk-symbols-${BUILD_NUMBER}.zip +ls -lah out/dist/repo*.xml + diff --git a/sdk-13.0.0_r10/dependencies.sh b/sdk-13.0.0_r10/dependencies.sh new file mode 100644 index 0000000..2d2d1d8 --- /dev/null +++ b/sdk-13.0.0_r10/dependencies.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Installs necessary packages. Some of them might be obsolete for new builds. +# + +# Notes: +# - the master branch of AOSP comes with a brebuilt version of OpenJDK, so +# no need to install it with apt. +# +# Notes about the repo tool: +# +# - The repo tool is available from debian repos. Although you may get warned +# that a new version of repo is available when starting sync later, this +# usually can be safely ignored. +# +# - should you really need the latest repo version of if your distro does +# not have it, you can get the repo tool from here: +# https://android.googlesource.com/tools/repo +# It is a single script filem, no compiling is necessary. +# +# - repo needs the python-is-python3 symlink package installed to work or a +# manual symlink that 'python' is 'python3'. Without it, repo will not +# work! + +sudo apt install git gnupg flex bison gperf build-essential zip curl \ +zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5-dev \ +libncurses5 libx11-dev lib32z1-dev libgl1-mesa-dev \ +libxml2-utils xsltproc unzip rsync python3 python-is-python3 tofrodos repo diff --git a/sdk-13.0.0_r10/download.sh b/sdk-13.0.0_r10/download.sh new file mode 100644 index 0000000..d5d51e2 --- /dev/null +++ b/sdk-13.0.0_r10/download.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# You can go to https://android.googlesource.com/platform/manifest/+refs and +# to check for the latest version/revision. +# +# Usually, different revisions (e.g._r19) work more or less out of the box +# without the need to change the build skripts. +# +# Caution: VERSION needs to be identical in all scripts in this directory, +# otherwise the build will not work. + +VERSION='13.0.0_r10' +repo init -u https://android.googlesource.com/platform/manifest -b android-$VERSION --depth=1 +repo sync --current-branch -j4 diff --git a/sdk-13.0.0_r18/README.md b/sdk-13.0.0_r18/README.md new file mode 100644 index 0000000..45b115f --- /dev/null +++ b/sdk-13.0.0_r18/README.md @@ -0,0 +1,61 @@ +VERSION='13.0.0_r18' +==================== + +NOTE +---- + +The build receipe is identical to 12.0.0_r10, only the VERSION is different. + +IMPORTANT +--------- +The SDK 33 (android version 13), contrary to previous versions, does NOT include +an system image anymore. + +You will notice a significantly reduced source tree, a smaller output sdk-zip-file +and will experience a much shorter build time. This is, because the build receipe +does not generate a system image. + +This is ok, because you do not really need it (unless you use a VM instead of a +real device) for development. + +But do not worry, you still can build it! But not from the sdk source tree! + +Simply follow the instructions here to create a system image: +https://source.android.com/docs/setup/create/gsi#building-gsis + +You need to pull a different source tree. + +For the most up-to-date android 13, the branch to use is "android13-gsi". + +I have tested building it with the same build environent like for the sdk, and +it works without any issues! + + +Notes +----- + +- simultaneous builds of win and linux sdk may fail. Default is linux only. If desired, edit build.sh and change the settings. +- the build.sh differs significantly to previous versions, because building +conscrypt will run in multiple issues and result in (unrecoverable) errors unless +some additional modules are built from source. + +All commands need to be executed from the sdk folder! + +Build receipe +------------- + +1) Install dependencies (you will be asked for root password to install packages): + +./dependencies.sh + +2) Download the source code: + +./download.sh + +3) Compile the sdk: + +./build.sh + +When the build finishes sucessfully, you get a list of the important generated sdk files. + +Have fun! diff --git a/sdk-13.0.0_r18/build.sh b/sdk-13.0.0_r18/build.sh new file mode 100644 index 0000000..78e384e --- /dev/null +++ b/sdk-13.0.0_r18/build.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Caution: VERSION needs to be identical in all scripts in this directory, +# otherwise the build will not work. + +VERSION='13.0.0_r18' +BUILD_VARIANT='eng' +export USER=$(whoami) +export BUILD_NUMBER="${BUILD_VARIANT}.${VERSION}" +# needed, because otherwise conscrypt build will fail. ART and some other +# dependencies need to be built from source. +export ART_MODULE_BUILD_FROM_SOURCE=true +export MODULE_BUILD_FROM_SOURCE=true + +. build/envsetup.sh +lunch sdk-${BUILD_VARIANT} +make -j$(nproc) sdk dist sdk_repo +# make -j$(nproc) win_sdk dist sdk_repo + +# list the result files +# --------------------- +# +# optional, the windows sdk, disabled by default (see above) +# ls -lah /out/dist/android-sdk_${BUILD_NUMBER}_windows.zip + +# the sdk + +ls -lah out/dist/android-sdk_${BUILD_NUMBER}_linux-x86.zip + +# the parts of the sdk + +ls -lah out/dist/sdk-repo*.zip +ls -lah out/dist/sdk-symbols-${BUILD_NUMBER}.zip +ls -lah out/dist/repo*.xml + diff --git a/sdk-13.0.0_r18/dependencies.sh b/sdk-13.0.0_r18/dependencies.sh new file mode 100644 index 0000000..2d2d1d8 --- /dev/null +++ b/sdk-13.0.0_r18/dependencies.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Installs necessary packages. Some of them might be obsolete for new builds. +# + +# Notes: +# - the master branch of AOSP comes with a brebuilt version of OpenJDK, so +# no need to install it with apt. +# +# Notes about the repo tool: +# +# - The repo tool is available from debian repos. Although you may get warned +# that a new version of repo is available when starting sync later, this +# usually can be safely ignored. +# +# - should you really need the latest repo version of if your distro does +# not have it, you can get the repo tool from here: +# https://android.googlesource.com/tools/repo +# It is a single script filem, no compiling is necessary. +# +# - repo needs the python-is-python3 symlink package installed to work or a +# manual symlink that 'python' is 'python3'. Without it, repo will not +# work! + +sudo apt install git gnupg flex bison gperf build-essential zip curl \ +zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5-dev \ +libncurses5 libx11-dev lib32z1-dev libgl1-mesa-dev \ +libxml2-utils xsltproc unzip rsync python3 python-is-python3 tofrodos repo diff --git a/sdk-13.0.0_r18/download.sh b/sdk-13.0.0_r18/download.sh new file mode 100644 index 0000000..092c76a --- /dev/null +++ b/sdk-13.0.0_r18/download.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# You can go to https://android.googlesource.com/platform/manifest/+refs and +# to check for the latest version/revision. +# +# Usually, different revisions (e.g._r19) work more or less out of the box +# without the need to change the build skripts. +# +# Caution: VERSION needs to be identical in all scripts in this directory, +# otherwise the build will not work. + +VERSION='13.0.0_r18' +repo init -u https://android.googlesource.com/platform/manifest -b android-$VERSION --depth=1 +repo sync --current-branch -j4 |
