Commit 01cc9b76 authored by beuc's avatar beuc

SDK-2.2: new build, API 8

parent 2cc746b1
wd/
8.04/
8.04-template.tar.gz
8.04-template.tar.gz
8.04/
\ No newline at end of file
FROM ubuntu:8.04
MAINTAINER Sylvain Beucler <[email protected]>
COPY dependencies.sh /usr/src/dependencies.sh
RUN /usr/src/dependencies.sh
RUN useradd android -m -s /bin/bash
USER android
ENV HOME=/home/android
RUN mkdir /home/android/wd/
WORKDIR /home/android/wd/
#COPY repo.sh /home/android/repo.sh
#RUN /home/android/repo.sh
CMD /bin/bash
.PHONY: all docker-template
all: docker-template
docker build -t android-rebuilds:sdk-2.2-dl dl/
docker build -t android-rebuilds:sdk-2.2 .
if [ ! -e wd/ ]; then mkdir wd/; fi
chown 1000:1000 wd/
cp -a dl.sh build.sh wd/
docker run -v "$$(pwd)/wd:/home/android/wd" android-rebuilds:sdk-2.2-dl /home/android/wd/dl.sh
docker run -v "$$(pwd)/wd:/home/android/wd" android-rebuilds:sdk-2.2 /home/android/wd/build.sh
docker-template:
if [ -z "$$(docker image list -q ubuntu:8.04)" ]; then \
$(MAKE) 8.04-template.tar.gz; \
docker image import 8.04-template.tar.gz ubuntu:8.04; \
fi
8.04-template.tar.gz:
debootstrap --arch i386 --keyring ./ubuntu-archive-keyring-2008.03.04.gpg hardy 8.04/ http://old-releases.ubuntu.com/ubuntu/
tar -czf 8.04-template.tar.gz -C 8.04/ .
rm -rf 8.04-template/
Reboot your kernel with
vsyscall=emulate
to support old system images (old libc).
#!/bin/bash -ex
VERSION='2.2_r1'
#VERSION='2.2.3_r2.1' # depends on itself (prebuilt/sdk/8/)
BUILD_VARIANT='eng'
#~/bin/repo init --quiet -u https://android.googlesource.com/platform/manifest -b android-$VERSION
#~/bin/repo sync --quiet --current-branch -j4
nproc() {
grep -w ^processor /proc/cpuinfo | wc -l
}
export USER=$(whoami)
# https://android.googlesource.com/platform/sdk/+/master/docs/howto_build_SDK.txt
export BUILD_NUMBER="${BUILD_VARIANT}.${VERSION}"
# https://source.android.com/setup/build/building#initialize
. build/envsetup.sh
# https://source.android.com/setup/build/building#choose-a-target
lunch sdk-${BUILD_VARIANT}
# https://source.android.com/setup/build/building#build-the-code
# dist: https://groups.google.com/forum/?fromgroups=#!topic/android-building/Y0xduZPWtUs
# sdk_repo: build/core/main.mk:259: *** The 'sdk' target may not be specified with any other targets. Stop.
make -j$(nproc) sdk showcommands dist
#make -j$(nproc) win_sdk showcommands dist # TODO
# build/core/product_config.mk:199: *** No matches for product "sdk_arm64". Stop:
#make -j$(nproc) PRODUCT-sdk_arm64-sdk showcommands dist
#make -j$(nproc) PRODUCT-sdk_x86_64-sdk showcommands dist
#ls -lh \
# out/host/linux-x86/sdk/android-sdk_${BUILD_NUMBER}_linux-x86.zip \
# out/dist/android-sdk_${BUILD_NUMBER}_linux-x86.zip
ls -lh \
out/host/linux-x86/sdk/android-sdk_${BUILD_VARIANT}.android_linux-x86.zip \
out/dist/android-sdk_${BUILD_VARIANT}.android_linux-x86.zip
# useful?
# out/target/product/generic/sdk-symbols-eng.android.zip
#!/bin/bash -ex
# Configuration
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/00InstallRecommends
# clean-up non-free sources
cat <<EOF > /etc/apt/sources.list
deb http://old-releases.ubuntu.com/ubuntu/ hardy main universe
deb http://old-releases.ubuntu.com/ubuntu/ hardy-updates main universe
deb http://old-releases.ubuntu.com/ubuntu/ hardy-security main universe
#deb http://old-releases.ubuntu.com/ubuntu/ hardy-backports main universe
EOF
#dpkg --add-architecture i386
apt-get update
echo 'dash dash/sh boolean false' | debconf-set-selections
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure --pri=high dash
# Java
# Your version is: java version "1.6.0_35".
# The correct version is: 1.5.
#apt-get install -y openjdk-6-jdk
apt-get -y install wget
debconf-set-selections <<'EOF'
sun-java5-jdk shared/accepted-sun-dlj-v1-1 boolean true
EOF
# amd64
#wget --quiet http://old-releases.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/sun-java5-jdk_1.5.0-22-0ubuntu0.8.04_amd64.deb
#wget --quiet http://old-releases.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/sun-java5-jre_1.5.0-22-0ubuntu0.8.04_all.deb
#wget --quiet http://old-releases.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/sun-java5-bin_1.5.0-22-0ubuntu0.8.04_amd64.deb
#wget --quiet http://old-releases.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/sun-java5-demo_1.5.0-22-0ubuntu0.8.04_amd64.deb
#checksumfile=$(mktemp)
#cat <<'EOF' > $checksumfile
#a5c1c162cdcf7fe9e3188d0ac081a983179a6defacc85d344c87ae298ea0e28 sun-java5-jdk_1.5.0-22-0ubuntu0.8.04_amd64.deb
#89866c3c359e71a14d90a6e851c9a09b941a768359fa1e3fdb973c7a8f850f5d sun-java5-jre_1.5.0-22-0ubuntu0.8.04_all.deb
#c63b41410819740ee64d255a7198e666c536dfa14dcf50bd816a3318dacac88e sun-java5-bin_1.5.0-22-0ubuntu0.8.04_amd64.deb
#5fa084a550371fa8b761144513138cad5f6c60ed53e361674eb02be814f71c9a sun-java5-demo_1.5.0-22-0ubuntu0.8.04_amd64.deb
#EOF
# i386
wget --quiet http://old-releases.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/sun-java5-jdk_1.5.0-22-0ubuntu0.8.04_i386.deb
wget --quiet http://old-releases.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/sun-java5-jre_1.5.0-22-0ubuntu0.8.04_all.deb
wget --quiet http://old-releases.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/sun-java5-bin_1.5.0-22-0ubuntu0.8.04_i386.deb
wget --quiet http://old-releases.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/sun-java5-demo_1.5.0-22-0ubuntu0.8.04_i386.deb
checksumfile=$(mktemp)
cat <<'EOF' > $checksumfile
daf602b142c1125eb65126c6bfd416e6d56cb17a98e755a881251646abfc3240 sun-java5-jdk_1.5.0-22-0ubuntu0.8.04_i386.deb
89866c3c359e71a14d90a6e851c9a09b941a768359fa1e3fdb973c7a8f850f5d sun-java5-jre_1.5.0-22-0ubuntu0.8.04_all.deb
632ae901139246b829d2493b94f22a030f35dac604bb27d71f4b4bc3355695a5 sun-java5-bin_1.5.0-22-0ubuntu0.8.04_i386.deb
2e9a98d504831e7f9abee71a77c70e8c1de7b5d335dad540fe30311e3ff0e287 sun-java5-demo_1.5.0-22-0ubuntu0.8.04_i386.deb
EOF
sha256sum -c $checksumfile || exit 1
rm -f $checksumfile
dpkg -i \
sun-java5-jdk_1.5.0-22-0ubuntu0.8.04_i386.deb \
sun-java5-jre_1.5.0-22-0ubuntu0.8.04_all.deb \
sun-java5-bin_1.5.0-22-0ubuntu0.8.04_i386.deb \
sun-java5-demo_1.5.0-22-0ubuntu0.8.04_i386.deb \
|| true
apt-get -y -f install
# https://source.android.com/setup/build/initializing
apt-get install -y git-core gnupg flex bison gperf build-essential zip \
curl zlib1g-dev libc6-dev libncurses5-dev \
x11proto-core-dev libx11-dev libreadline5-dev libz-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc unzip
#ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
# Repo
apt-get install -y curl ca-certificates git-core libcurl4-openssl-dev
# Note: neither python2.6 nor python3.1 are supported, need to rebuild Python 2.7
#!/bin/bash -ex
VERSION='2.2_r1'
#VERSION='2.2.3_r2.1'
~/bin/repo init --quiet -u https://android.googlesource.com/platform/manifest -b android-$VERSION
~/bin/repo sync --quiet --current-branch -j4
rm -rf prebuilt/sdk/{5,6,7,8,tools}/
# $ grep -r 'LOCAL_SDK_VERSION := ' . | grep -v current$
# ./packages/experimental/BugReportSender/Android.mk:LOCAL_SDK_VERSION := 4
rm -f prebuilt/sdk/4/android.jar
curl https://android-rebuilds.beuc.net/dl/prebuilts/sdk/4/android.jar \
> prebuilt/sdk/4/android.jar
rm -f prebuilt/sdk/4/framework.aidl
curl https://android-rebuilds.beuc.net/dl/prebuilts/sdk/4/framework.aidl \
> prebuilt/sdk/4/framework.aidl
FROM ubuntu:trusty-20190122
MAINTAINER Sylvain Beucler <[email protected]>
COPY dependencies.sh /usr/src/dependencies.sh
RUN /usr/src/dependencies.sh
RUN useradd android -m -s /bin/bash
USER android
RUN mkdir /home/android/wd/
WORKDIR /home/android/wd/
COPY repo.sh /home/android/repo.sh
RUN /home/android/repo.sh
CMD /bin/bash
#!/bin/bash -ex
# Configuration
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/00InstallRecommends
# clean-up non-free sources
# AFAICS we need to update the base image as of 2018-11-20 as it's already partially upgraded
cat <<EOF > /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ trusty main universe
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main universe
#deb http://security.ubuntu.com/ubuntu/ trusty-security main universe
#deb http://archive.ubuntu.com/ubuntu/ trusty-backports main universe
EOF
apt-get update
# Repo
apt-get install -y curl ca-certificates git python
#!/bin/bash -ex
#sudo apt-get install curl ca-certificates git python
mkdir ~/bin/
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
# avoid prompts and errors
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global color.ui true
Source:
http://old-releases.ubuntu.com/ubuntu/pool/main/u/ubuntu-keyring/ubuntu-keyring_2008.03.04.tar.gz
ubuntu-keyring-2008.03.04/keyrings/ubuntu-archive-keyring.gpg
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment