AOSP 5.1 ROM Compiled for the Moto E

It’s been a few weeks since the release of Android 5.1 and XDA Senior Member percy_g2 has … more

CutCalc: A Calculator for Mechanical Engineers

Mechanical and mechatronics engineers may want a handy app to calculate data for … more

Google Play Music Customizations – XDA Xposed Tuesday

If Cyanogen Inc. has its way, you won’t be forced into the Google … more

Sony Xperia Z3 Lollipop Framework Ported to CM12

Android 5.0 for Xperia has a unique look and feel. You don’t have to get a Sony … more
Post Reply Subscribe to Thread Email Thread

[DEV] Docker template for building CyanogenMod

16th February 2014, 01:03 PM |#1  
OP Senior Member
Thanks Meter: 80
 
120 posts
Join Date:Joined: Oct 2009
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 staging/cm-12.1
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-cya...r/CHANGELOG.md

Any feedback is welcome. Enjoy!
Last edited by michael_ch; 31st March 2015 at 10:29 PM. Reason: New release - create your own build of CyanogenMod 12.1 now!
The Following 35 Users Say Thank You to michael_ch For This Useful Post: [ View ]
 
 
18th February 2014, 12:06 PM |#2  
Senior Member
Flag Pune
Thanks Meter: 597
 
502 posts
Join Date:Joined: Sep 2012
Donate to Me
More
Quote:
Originally Posted by michael_ch

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!!!!
The Following 4 Users Say Thank You to Nihar For This Useful Post: [ View ]
18th February 2014, 12:32 PM |#3  
android.zealot.fervor's Avatar
Senior Member
Flag ★◢↿MUSCAT↾◣★
Thanks Meter: 1,530
 
1,314 posts
Join Date:Joined: Nov 2013
More
Awesome !!! Thanks a lot OP
18th February 2014, 12:33 PM |#4  
Dark Wraith's Avatar
Senior Member
Flag Bangalore
Thanks Meter: 700
 
252 posts
Join Date:Joined: Feb 2013
Donate to Me
More
Quote:
Originally Posted by michael_ch

Docker template for building CyanogenMod


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..
The Following 2 Users Say Thank You to Dark Wraith For This Useful Post: [ View ]
18th February 2014, 12:34 PM |#5  
Akhilendra Gadde's Avatar
Recognized Contributor
Flag Mumbai
Thanks Meter: 1,758
 
840 posts
Join Date:Joined: Oct 2012
More
Wow. This is superb. ! This will really reduce our most of the work. Thanks op
The Following User Says Thank You to Akhilendra Gadde For This Useful Post: [ View ]
18th February 2014, 12:44 PM |#6  
OP Senior Member
Thanks Meter: 80
 
120 posts
Join Date:Joined: Oct 2009
Quote:
Originally Posted by Dark Wraith

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...

Quote:
Originally Posted by Dark Wraith

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?

Quote:
Originally Posted by Dark Wraith

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...
18th February 2014, 12:48 PM |#7  
Dasmikko's Avatar
Senior Member
Thanks Meter: 30
 
204 posts
Join Date:Joined: Jun 2010
More
I get this error when running
"./build.sh"

./build.sh: 10: ./build.sh: docker: not found
18th February 2014, 12:51 PM |#8  
OP Senior Member
Thanks Meter: 80
 
120 posts
Join Date:Joined: Oct 2009
Quote:
Originally Posted by Dasmikko

I get this error when running
"./build.sh"

./build.sh: 10: ./build.sh: docker: not found

Well. You will need to install Docker, of course, see https://www.docker.io/gettingstarted/#h_installation.

Sorry, I thought it's clear. But I will update the post accordingly...
18th February 2014, 01:06 PM |#9  
Dilesh Perera's Avatar
Senior Member
Flag Colombo
Thanks Meter: 807
 
1,329 posts
Join Date:Joined: May 2012
More
very interesting. will try

ubuntu 32 bit not works for this???
Last edited by Dilesh Perera; 18th February 2014 at 01:14 PM.
18th February 2014, 01:18 PM |#10  
Dasmikko's Avatar
Senior Member
Thanks Meter: 30
 
204 posts
Join Date:Joined: Jun 2010
More
Quote:
Originally Posted by michael_ch

Well. You will need to install Docker, of course, see https://www.docker.io/gettingstarted/#h_installation.

Sorry, I thought it's clear. But I will update the post accordingly...

Works now
Post Reply Subscribe to Thread

Tags
build, compile, cyanogenmod, docker
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes