[DEV] Docker template for building CyanogenMod

Search This thread

michael_ch

Senior Member
Oct 27, 2009
230
209
Docker template for building CyanogenMod

Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.

Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.

NOTE: You will need to install Docker to proceed: https://www.docker.io/gettingstarted/

How to run:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./run.sh

How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
repo sync
source build/envsetup.sh
brunch <device codename>      # example: brunch grouper

Download:

Github URL: https://github.com/stucki/docker-cyanogenmod

ChangeLog:

see https://github.com/stucki/docker-cyanogenmod/blob/master/CHANGELOG.md

Questions and Answers:

see http://xdaforums.com/android/help/qa-docker-template-building-cyanogenmod-t3173025

Any feedback is welcome. Enjoy!
 
Last edited:

Nihar

Senior Member
Sep 13, 2012
505
596
Pune
Docker template for building CyanogenMod

Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.

Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.

How to build:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./build.sh

How to run:
Code:
cd docker-cyanogenmod
./run.sh

How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
source build/envsetup.sh
breakfast <device codename>   # example: breakfast grouper
brunch <device codename>      # example: brunch grouper

Download:

Github URL: https://github.com/stucki/docker-cyanogenmod

ChangeLog:
Code:
2014-02-16

* Initial release

Any feedback is welcome. Enjoy!

seems interesting!!!!
 

Dark Wraith

Senior Member
Feb 18, 2013
250
1,022
Bangalore
Docker template for building CyanogenMod


:good: nice.......
You missed one point though .....
Code:
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
and you can incorporate this in your code
Code:
RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && sudo apt-get install oracle-java6-installer

This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..

There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..:(,,,anyways keep up the good work..:)
 

michael_ch

Senior Member
Oct 27, 2009
230
209
:good: nice.......
You missed one point though .....
Code:
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
32bit libraries are installed on the system. Just try it out, I successfully built images for i9100 and grouper without specifying this line...

and you can incorporate this in your code
Code:
RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && sudo apt-get install oracle-java6-installer
Again, I don't get those errors. Anyone else encountering these problems?

This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..

There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..:(,,,anyways keep up the good work..:)
Thank you! I will do my best... ;)
 

michael_ch

Senior Member
Oct 27, 2009
230
209
So does this create a local_manifest.xml(which is needed) for you if you're trying to build for an unsupported device
Nope, the manifest is created by running the "breakfast" command. Check the 1st post for more info.

I have also used this box to successfully build an image for the Motorola Moto G. As this is not part of the CyanogenMod project yet, I had to install the manifest using the steps described on the following Github page: https://github.com/razrqcom-dev-team/android_local_razrqcom

Code:
# see https://github.com/razrqcom-dev-team/android_local_razrqcom
mkdir .repo/local_manifests
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
curl -L -o .repo/local_manifests/msm8226.xml -O -L https://raw.github.com/razrqcom-dev-team/android_local_razrqcom/msm8226-kk/msm8226.xml
curl -L -o .repo/local_manifests/vendor.xml -O -L https://raw.github.com/razrqcom-dev-team/android_local_razrqcom/msm8226-kk/vendor.xml

# after that, sync all repositories
repo sync

# start building falcon (that's the codename for the Moto G)
source build/envsetup.sh
brunch falcon

Kudos for this goes to @dhacker29 and his team!
 
Last edited:

Negan

Recognized Themer/ Retired Forum Moderator
Nope, the manifest is created by running the "breakfast" command. Check the 1st post for more info.

I have also used this box to successfully build an image for the Motorola Moto G. As this is not part of the CyanogenMod project yet, I had to install the manifest using the steps described on the following Github page: https://github.com/razrqcom-dev-team/android_local_razrqcom

Ok well maybe I'll give it a whirl then. I was trying to build beanstalk for the n3 and I init the repo referencing the cm repo I already had synced, then sunced repo etc. When I tried breakfast there was no option to choose my device.
So by using this tool and following your directions will it allow me to do so then?

sent from my JEDI ELITE Note 3

for best xda results, click to enlarge ?
 
  • Like
Reactions: desalesouche

koolkunz

Senior Member
May 13, 2013
910
1,272
Is this only cyanogenmod restricted or we can use on other ROMs also?

Sent from my GT-I9100 using XDA Premium 4 mobile app
 

michael_ch

Senior Member
Oct 27, 2009
230
209
So by using this tool and following your directions will it allow me to do so then?
This is not a tool, it is just a script which creates a virtual machine with all that is needed for building CyanogenMod.

Is this only cyanogenmod restricted or we can use on other ROMs also?
Looking at the build requirements for OmniROM, I think it will also work for other ROMs: http://docs.omnirom.org/Setting_Up_A_Compile_Environment

In case that something is missing, just update the Dockerfile and run build.sh to rebuild the image.
 

koolkunz

Senior Member
May 13, 2013
910
1,272
This is not a tool, it is just a script which creates a virtual machine with all that is needed for building CyanogenMod.


Looking at the build requirements for OmniROM, I think it will also work for other ROMs: http://docs.omnirom.org/Setting_Up_A_Compile_Environment

In case that something is missing, just update the Dockerfile and run build.sh to rebuild the image.

OK..thanks...I wanna build omni

Sent from my GT-I9100 using XDA Premium 4 mobile app
 

nikunj.baheti@gmail.com

Senior Member
Aug 7, 2013
313
49
mumbai
Docker template for building CyanogenMod

Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.

Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.

NOTE: You will need to install Docker to proceed: https://www.docker.io/gettingstarted/

How to build:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./build.sh

How to run:
Code:
cd docker-cyanogenmod
./run.sh

How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
source build/envsetup.sh
breakfast <device codename>   # example: breakfast grouper
brunch <device codename>      # example: brunch grouper

Download:

Github URL: https://github.com/stucki/docker-cyanogenmod

ChangeLog:
Code:
2014-02-16

* Initial release

Any feedback is welcome. Enjoy!

bro can this be used to make unofficial ports too???
 

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    Docker template for building CyanogenMod

    Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
    Docker is a rather new software to automate the deployment of applications inside a software container.

    Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.

    NOTE: You will need to install Docker to proceed: https://www.docker.io/gettingstarted/

    How to run:
    Code:
    git clone https://github.com/stucki/docker-cyanogenmod.git
    cd docker-cyanogenmod
    ./run.sh

    How to build CyanogenMod for your device:
    Code:
    repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
    repo sync
    source build/envsetup.sh
    brunch <device codename>      # example: brunch grouper

    Download:

    Github URL: https://github.com/stucki/docker-cyanogenmod

    ChangeLog:

    see https://github.com/stucki/docker-cyanogenmod/blob/master/CHANGELOG.md

    Questions and Answers:

    see http://xdaforums.com/android/help/qa-docker-template-building-cyanogenmod-t3173025

    Any feedback is welcome. Enjoy!
    4
    Docker template for building CyanogenMod

    Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
    Docker is a rather new software to automate the deployment of applications inside a software container.

    Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.

    How to build:
    Code:
    git clone https://github.com/stucki/docker-cyanogenmod.git
    cd docker-cyanogenmod
    ./build.sh

    How to run:
    Code:
    cd docker-cyanogenmod
    ./run.sh

    How to build CyanogenMod for your device:
    Code:
    repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
    repo sync
    source build/envsetup.sh
    breakfast <device codename>   # example: breakfast grouper
    brunch <device codename>      # example: brunch grouper

    Download:

    Github URL: https://github.com/stucki/docker-cyanogenmod

    ChangeLog:
    Code:
    2014-02-16
    
    * Initial release

    Any feedback is welcome. Enjoy!

    seems interesting!!!!
    2
    Docker template for building CyanogenMod


    :good: nice.......
    You missed one point though .....
    Code:
    BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
    and you can incorporate this in your code
    Code:
    RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
    RUN add-apt-repository ppa:webupd8team/java
    RUN apt-get update && sudo apt-get install oracle-java6-installer

    This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..

    There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..:(,,,anyways keep up the good work..:)
    2
    FYI: I've pushed another update which is necessary after CyanogenMod now requires "maven" to build.
    2
    New Release v0.3.0

    Hey folks! I just published a new release of the box. Now is a good time to create your own build of the upcoming CyanogenMod 12.1:

    Code:
    repo init -u git://github.com/CyanogenMod/android.git -b staging/cm-12.1
    repo sync -j 16
    source build/envsetup.sh
    make clean
    brunch <device codename>      # example: brunch grouper

    Have fun!