Skip to content

Instantly share code, notes, and snippets.

@slavanap
Created June 29, 2019 13:40
Show Gist options
  • Save slavanap/9f99c94a16b6df5a935b101da7e834a8 to your computer and use it in GitHub Desktop.
Save slavanap/9f99c94a16b6df5a935b101da7e834a8 to your computer and use it in GitHub Desktop.
Lineage OS dockerfile (WIP)
FROM ubuntu:bionic
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq && apt-get install -qqy --no-install-recommends \
bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev \
liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc \
zip zlib1g-dev \
ca-certificates wget unzip python \
simg2img openjdk-8-jdk
RUN cd /root \
&& wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip \
&& unzip platform-tools-latest-linux.zip \
&& rm platform-tools-latest-linux.zip \
&& mkdir -p ~/bin ~/android/lineage \
&& curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo \
&& chmod a+x ~/bin/repo \
&& cd ~/android/lineage \
&& export PATH="$HOME/bin:$HOME/platform-tools:$PATH" \
&& repo init -u https://github.com/LineageOS/android.git -b lineage-15.1 \
&& git config --global user.email "napadovskiy@gmail.com" \
&& git config --global user.name "Vyacheslav Napadovsky"
RUN mkdir ~/android/system_dump/ \
&& cd ~/android/system_dump/ \
&& wget https://bigota.d.miui.com/V8.1.1.0.MALMIDI/land_global_images_V8.1.1.0.MALMIDI_20161108.0000.00_6.0_global_4eaca72155.tgz \
&& md5sum land_global_images_V8.1.1.0.MALMIDI_20161108.0000.00_6.0_global_4eaca72155.tgz | grep 4eaca7215544290cb4bbe67c97391a6c \
&& tar xvf land_global_images_V8.1.1.0.MALMIDI_20161108.0000.00_6.0_global_4eaca72155.tgz \
&& simg2img land_global_images_V8.1.1.0.MALMIDI_20161108.0000.00_6.0_global/images/system.img ./system.img \
&& mkdir system \
&& rm -r land_global_images_V8.1.1.0.MALMIDI_20161108.0000.00_6.0_global*
WORKDIR /root/android/lineage
ENV PATH="/root/bin:/root/platform-tools:$PATH"
RUN repo sync
RUN . build/envsetup.sh && breakfast land
# . build/envsetup.sh && cd ~/android/system_dump/ && mount system.img system/ && cd ~/android/lineage/device/xiaomi/land && ./extract-files.sh ~/android/system_dump/ && umount ~/android/system_dump/system/
RUN . build/envsetup.sh && croot && brunch land
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment