Sign inSign up

fr3akyphantom/droid-builder

By fr3akyphantom

•Updated 12 months ago

Image
3

50K+

fr3akyphantom/droid-builder repository overview

⁠Droid Builder - One Image To Build Them All

⁠Standalone Docker Container based upon Updated Ubuntu Bionic 18.04 LTS for Building Android ROMs or Recovery Projects

Actions Status Container Builder Platform License Latest Commit Docker Pulls

⁠Available Tags of the Docker Image

Bionic-based Image Info and It's Size: Image Tag Docker Image Size (bionic) MicroBadger Layers

Focal-based Image Info and It's Size: Image Tag Docker Image Size (focal) MicroBadger Layers

⁠Get the Image

You might want to start the bash environment as root user by running sudo -s.

Now, you have choose on which platform you want to build. You got Bionic Beaver (18.04.4 LTS) and Focal Fossa (20.04 LTS).

Pull the image of by running the following command.

# If you want only bionic, run this ---
docker pull fr3akyphantom/droid-builder:bionic
# But if you want focal, run this instead ---
docker pull fr3akyphantom/droid-builder:focal

⁠Run the Container

Set TAG as "bionic" or "focal", according to your specified needs.

docker run --privileged --rm -i \
  # optionally set/change the name/hostname of the container
  --name docker_droid-builder --hostname droid-builder \
  -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) \
  # mount working directory as volume, '/home/builder' must be the Container's mount path
  -v "$HOME:/home/builder:rw,z" \
  # mount ccache volume too, host machine must have $HOME/.ccache folder if ccache is not installed
  -v "$HOME/.ccache:/srv/ccache:rw" \
  fr3akyphantom/droid-builder:${TAG} \
  /bin/bash

⁠Start the Build

When this Image runs as the droid-builder Container, You won't need to install any other softwares.

Check the Dockerfile⁠ to know more detail about installed packages.

When Docker Container is started, run the following commands...

# Change directory to any sub-folder (name as you like)
mkdir -p ${PROJECT_DIR} && cd ${PROJECT_DIR}

# Set your github usename and email, required by repo binary
git config --global user.email $GitHubMail
git config --global user.name $GitHubName
git config --global color.ui true

# Initialize the repo here to begin
repo init --depth 1 -q -u https://github.com/${DEMO_ORG}/${DEMO_MANIFEST}.git -b ${MANIFEST_BRANCH}

# sync the repo with maximum connections
# wait for the whole repo to be downloaded
repo sync -c -q --force-sync --no-clone-bundle --no-tags -j$(nproc --all)

# clone the specific device trees
git clone https://github.com/${DEMO_USER}/${DEVICE_REPONAME} device/${VENDOR}/${CODENAME}
# and other dependent repos too, if you need.

# Start the Build Process
export ALLOW_MISSING_DEPENDENCIES=true
source build/envsetup.sh
lunch ${BUILD_LUNCH}

# you can now delete the .repo folder if you need more space,
# but it is not recommended for multi-build or shared projects

# build only recovery image or make full ROM/otapackage
make -j$(nproc --all) recoveryimage || make -j$(($(nproc --all) / 2)) otapackage
⁠Well, there you have it!

Do away with your imagination.

Tag summary

Content type

Image

Digest

sha256:c9eb8023f…

Size

514.2 MB

Last updated

12 months ago

docker pull fr3akyphantom/droid-builder