I believe you can, just like you could build any Android based system with this container. So it's not limited to building CyanogenMod, even if that's the only thing that I've done with it...@michael_ch can I build Cyanogenmod with another Device and Kernel tree than the CM one?
repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
sudo -i
As far as I know, Ubuntu 16.04 ships only with OpenJDK 8, however you require the older version 7 to build CyanogenMod 13.0.
Thanks for your feedback. As far as I remember, I took the manual approach via rsync /etc/skel because someone reported an issue on hosts running Redhat Linux. Could not verify this, so I just added it. However, I'm fine with reverting that again (on Debian & Ubuntu, I would actually prefer "adduser" over "useradd").Great to have a ready-to-go docker image for building! Was just about to do one myself, but first took a look around (just didn't want to reinvent the wheel...). One thing though, it's not necessary to rsync /etc/skel to the home of cmbuild. If you call useradd with the switch -m, /home/cmbuild will get created by useradd including the copying of the skeleton files. You can even take it a step further and add your scripts like startup.sh and folders to /etc/skel before doing the useradd, then you don't need to do the permission fixing in the end (just as an idea).
EDIT: And you're missing vim in your image (just my favourite command line editor...)
Thanks for your feedback. As far as I remember, I took the manual approach via rsync /etc/skel because someone reported an issue on hosts running Redhat Linux. Could not verify this, so I just added it. However, I'm fine with reverting that again (on Debian & Ubuntu, I would actually prefer "adduser" over "useradd").
Looking forward to your pull requests!
Greetings, Michael
I see. Yes, SELinux is difficult to master. Although I know some ways to get it to behave, I don't use it and disable it normally completely. But this issue is two years old, so something may has changed since then. So it's worth to try that out again to see if it's still an issue.This is the issue where that problem was reported: https://github.com/stucki/docker-cyanogenmod/issues/6
build@4d67d7db6d74:~/android$ breakfast hltetmo
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:245: *** Can not locate config makefile for product "cm_hltetmo". Stop.
Device hltetmo not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_samsung_hltetmo
Default revision: cm-14.1
Checking branch info
Default revision cm-14.1 not found in android_device_samsung_hltetmo. Bailing.
Branches found:
cm-11.0-old
cm-11.0
cm-12.0
cm-12.1
stable/cm-11.0
stable/cm-12.0-YNG3C
stable/cm-12.0-YNG4N
Use the ROOMSERVICE_BRANCHES environment variable to specify a list of fallback branches.
build/core/product_config.mk:245: *** Can not locate config makefile for product "cm_hltetmo". Stop.
build/core/product_config.mk:245: *** Can not locate config makefile for product "cm_hltetmo". Stop.
** Don't have a product spec for: 'cm_hltetmo'
** Do you have the right repo manifest?
Well, this won't work because apparently, nobody has created a cm-14.1 branch for your device so far:
Well, this won't work because apparently, nobody has created a cm-14.1 branch for your device so far:
https://github.com/CyanogenMod/android_device_samsung_hltetmo/branches
This is not an issue of the Docker image btw. The port for your device is simply missing because nobody worked on it so far.
(Actually, the link is wrong anyway because CyanogenMod has just been rebranded to "LineageOS": https://github.com/LineageOS/android_device_samsung_hltetmo/branches)
Just read the post again and see that he links to a different Github repository. Also the branch name is different.I'm currently running a Lineage OS 14.1 ROM on my Note 3 located here:
https://xdaforums.com/galaxy-note-3/development/android-7-0-cm14-trader418-unofficial-t3459973
I was just trying to see if I could build one myself, but haven't been able to yet.
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./run.sh
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
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!
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
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
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