Hello
I want to build unoffical CyanogenMod 12 rom for my phone...
I installed Ubuntu 14.04 LTS and download repo and installed jdk and git-core.
Now what should I do for getting CyanogenMod Source?
Would you please give me some help?
Sent from my SHW-M250S using XDA Free mobile app
Follow the below steps
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Code:
sudo apt-get update
sudo apt-get install openjdk-7-jdk
java -version
you should see something like this
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
Click to expand...
Click to collapse
Code:
sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
mkdir ~/bin
curl h**ps://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
replace h**ps with https
Code:
sudo nano ~/.bashrc
now copy following in the last of bashrc
Code:
export PATH=~/bin:$PATH
reboot your pc
now
Code:
mkdir cm12
cd cm12
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
repo sync
Rich Village said:
Hello
I want to build unoffical CyanogenMod 12 rom for my phone...
I installed Ubuntu 14.04 LTS and download repo and installed jdk and git-core.
Now what should I do for getting CyanogenMod Source?
Would you please give me some help?
Sent from my SHW-M250S using XDA Free mobile app
Click to expand...
Click to collapse
k2wlxda said:
Follow the below steps
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Code:
sudo apt-get update
sudo apt-get install openjdk-7-jdk
java -version
you should see something like this
Code:
sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
mkdir ~/bin
curl h**ps://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
replace h**ps with https
Code:
sudo nano ~/.bashrc
now copy following in the last of bashrc
Code:
export PATH=~/bin:$PATH
reboot your pc
now
Code:
mkdir cm12
cd cm12
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
repo sync
Click to expand...
Click to collapse
Thank you so much!!
Related
Here is a quick guide on how to set up aosp build envirnoment and download the source, there are video's below the guide
This guide is for Ubuntu, Xubuntu, Kubuntu and Lubuntu.
Setting up Build envirnoment
You will need python, git, java jdk, build packages
Python: (chekking version)
Code:
python --version
Git:
Code:
sudo apt-get install git-core
Java jdk6:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
The build packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils
Downloading the source
Installing Repo:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Installing repo client:
Code:
cd ~/Desktop
mkdir ics
cd ics
Code:
CM9:
repo init -u git://github.com/CyanogenMod/android.git -b ics
ICS:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
Downloading the source:
Code:
repo sync
Appreciate the work, but there are loads of guides like this, and this is the initial part that is already covered by android.com and wiki.cyanogenmod.com
Add something more, and it'ld be better
cdesai said:
Appreciate the work, but there are loads of guides like this, and this is the initial part that is already covered by android.com and wiki.cyanogenmod.com
Add something more, and it'ld be better
Click to expand...
Click to collapse
just wanted to share this here had some free time.
RafayelG said:
just wanted to share this here had some free time.
Click to expand...
Click to collapse
Then start getting more deep, as you are free!
cdesai said:
Then start getting more deep, as you are free!
Click to expand...
Click to collapse
ye but no phone atm and exams start next week made the video's yesterday evening.
RafayelG said:
ye but no phone atm and exams start next week made the video's yesterday evening.
Click to expand...
Click to collapse
Yea i know how it feels, the same here, best of luck for the exams
Since there isn't any clear tutorial or guide on how to build CM7 EpicMTD from source, I put a simple to use script for anyone.
Either manually follow the script. Or copy and paste the code into a sh file. Execute.
Code:
#!/bin/sh
# EpicMTD CM7 Download and Compile script
# VERSION 1.1
# Install packages for Ubuntu/Debian
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
# 64 bit OS only (comment the next line if you are on 32 bit)
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
# Create directories
mkdir ~/bin
mkdir ~/android
mkdir ~/android/system
# Download CyanogenMod Repo
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j6
# Create EpicMTD local manifest
echo '# Install packages
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
# 64 bit OS only
#sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
# Create directories
mkdir ~/bin
mkdir ~/android
mkdir ~/android/system
# Download CyanogenMod Repo
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j6
# Create EpicMTD local manifest
echo '<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="EpicCM" fetch="https://github.com" />
<project
path="device/samsung/epicmtd"
name="EpicCM/android_device_samsung_epicmtd"
remote="EpicCM" revision="gingerbread"
/>
<project
path="vendor/cyanogen"
name="EpicCM/android_vendor_cyanogen"
remote="EpicCM"
revision="epiccm-rebase"
/>
</manifest>' > ~/android/system/.repo/local_manifest.xml
# Create local repo for EpicCM
repo start EpicCM --all
repo sync
# Get the RomManager
~/android/system/vendor/cyanogen/get-rommanager
# Plug in your Epic running CM to get the proprietary files
cd ~/android/system/device/samsung/epicmtd
./extract-files.sh
# Fix to allow successful compile
cd ~/android/system/vendor/cyanogen
git cherry-pick a4a5133
cd ~/android/system
# Update repos
repo sync
make clobber
# Compile
. build/envsetup.sh
brunch epicmtd
Thanks to hazridi for helping me start this.
Changelog
1.0: Initial release
1.1: Updated the local_manifest.xml to reflect new github
Good Work man.
I hope this will keep people busy hehe.
Rock on man, thanks for pulling it together and sharing with the community! Much appreciated!
Sent via Decadent Epic 4G CM7
Awesome.....just re-installed ubuntu today thinking i was gonna....now, no excuses.
Cheers!
You're welcome
(I wrote the info you used for this)
hazridi said:
You're welcome
(I wrote the info you used for this)
Click to expand...
Click to collapse
I forgot to add thanks for you. See the first post
It's cool, I wouldn't have figured it all out without deca, uber, noob, and rodd's input anyway.
awesome work ion. much appreciated. now, for a little light reading...
Hello All. I have received several requests for how to build a kernel from source so I figured I would make a guide for anyone looking.
WARNING: I CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE YOU CAUSE TO YOUR PHONE, PERSONAL RELATIONSHIPS, LIFE, OR CAR. YOU HAVE ALREADY ROOTED YOUR DEVICE SINCE YOU ARE READING THIS SO YOU KNOW IT VOIDS YOUR WARRANTY.
Now that thats over. I will walk you through how to set up a kernel building environment and walk you through building a kernel.
I.) Requirements
1.)You will need a computer. Just about any computer running linux will work, even a Virtual Machine. I will be using Ubuntu Oneiric, Server Edition for my guide. (Most commands are the same across Ubuntu Editions as well as Linux in general.)
2.)Internet Access- the faster the better
3.)Knowledge of the android kernel and what does what.
4.)The Master Branch from Google as well as the source for your device.
5.)ALOT of time.
6.)Common Sense
II.) Installing The Necessary Tools
1.)First we must download the neccesary tools.
To install java, you need to know which version of android you will be developing for.
Froyo and Lower:
Code:
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
Gingerbread and Newer:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
2.)Next we willl download the tools needed(You need to know if you are on a 64 bit system or 32 bit.)
For 64 bit:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
Also you must link one thing based on your Ubuntu Version:
For 10.10:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
For 11.10:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
For 32 bit:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown libxml2-utils xsltproc
No linking is necessary.
NOTE: You can set up CCache on either setup. However, you will not need it necessarily due to the source is not that big compared to building a rom and therefore will not take as long.http://dnssearch.rr.com/index.php?origURL=http://www.goog.gl/&r=
III.) Downloading The Source
1.)If you already have an android Directory set up, then skip this step. If not, follow these commands. (NOTE:THIS GUIDE FOLLOWS AS IF YOU USE THIS STEP. BE CAREFUL)
Code:
$ cd $HOME
$ mkdir android
$ cd android
2.)Set up your source directory.
Code:
$ mkdir source
$ cd source
$ mkdir aosp (YOUR DEVICE)_kernel repo
$ cd repo
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ./repo
$ chmod 755 repo
$ export PATH=$PATH:$HOME/android/source/repo/
OR
$ sudo cp repo /usr/bin/repo
$ cd ../aosp
$ mkdir master
$ cd master
3.)You are now ready to grab the source. You will need the master branch. So while in the master directory:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
THIS WILL TAKE A WHILE SO SIT BACK AND RELAX.
4.)Now you need your specific devices source. So follow those steps accordingly to get the source into the directory for you device kernel @ $HOME/android/source/(YOUR DEVICE)_kernel
You now have all the source you need.
V.) Building The Kernel
1.)Now we will set up the environment for the build.
Code:
$ export ARCH=arm
$ export CROSS_COMPILER=arm-eabi-
$ export CROSS_COMPILE=arm-eabi-
$ export PATH=$PATH:$HOME/android/source/aosp/master/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
2.)Now you go into your device's kernel directory.
Code:
$ cd $HOME/android/source/(YOUR DEVICE)_kernel
3.)And begin the configuration.
If you like a gui like menu:
Code:
$ make menuconfig
If you like to answer questions:
Code:
$ make config
4.)Configure your kernel how you want it.
5.)Then, once thats done:
Code:
$ make -j4
This will build the kernel. This can take anywhere from 15 minutes to an hour and a half+.
VI.)Grabbing The Newly Made Kernel
1.) Your kernel will be located at:
Code:
$ $HOME/android/source/(YOUR DEVICE)_kernel/arch/arm/boot/zImage
2.) Your Wireless Module Will depend on your device. For the Ally, it would be:
Code:
$ $HOME/android/source/ally_kernel/drivers/net/wireless/bcm4329/wireless.ko
CONGRATULATIONS!!!
You have built your own kernel.
Now follow http://forum.xda-developers.com/showthread.php?t=748106 to flash it.
Any problems or questions, let me know. Either a PM or I'm almost always in #asus-transformer on IRC.
Wanna donate to me and help me with bills? Follow this link to Donate Via PayPal:
http://goo.gl/ReRPs
Gonna try this. Thanks for sharing...
Sent using my brain
Thanks for working on this. On first look, I think you intended to put a repo sync after the init command here:
3.)You are now ready to grab the source. You will need the master branch. So while in the master directory:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
THIS WILL TAKE A WHILE SO SIT BACK AND RELAX.
Click to expand...
Click to collapse
Android device
For the device, should it be what our device is named by the company for marketing, etc or is it what is in the build.prop under ro.product.device?? Thanks
pramathesh said:
Gonna try this. Thanks for sharing...
Sent using my brain
Click to expand...
Click to collapse
Sent using my brain <- lol, made my day !
android_owl said:
Sent using my brain <- lol, made my day !
Click to expand...
Click to collapse
glad you liked
@OP: Do I've to make any changes if I were to build from Glitch (SGS) sources for CM7?? Or everything remains the same?
what does (Your device) mean ? its name (example: samsung galaxy ace) or the codename ( example: GT-S5830) ????
Codename
Sent from my Galaxy Nexus using Tapatalk 2
Hi,
When I try to build cm13 for bacon,these errors happen:
Code:
/bin/bash: prebuilts/misc/linux-x86/bison/bison: cannot execute binary file: Exec format error
make: *** [/root/cm/out/host/linux-x86/obj/EXECUTABLES/checkpolicy_intermediates/policy_parse.cpp] Error 126
OS:Ubuntu 14.04 x86_64
Packages:bison build-essential curl flex git gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-7-jdk openjdk-7-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
Bison version is 2:3.0.2.dfsg-2.
Thanks.
I think you're missing some packages needed to build on 14.04. Have you followed this guide? http://source.android.com/source/initializing.html
I'm trying my hand at compiling nougat /cm14 for klte but I need klte or sm-g900t (or sm-g900t1) samsung galaxy S5 (snapdragon) driver binaries. Where to find. Ps thank you again for the the help in the past.and all that you do.
I believe the files i need are .sh files for the S5, but i'm not able to locate them so far.
Ok So my builds failed yesterday.
Today I m starting over. I mean completely.
I deleted the VM and reinstalled
I've got my plan for the build environment and how to set up. I'm still stuck at how I'm going to add the cm14 klte repo that I have git cloned
To the android nougat source repo.
my plans are below************************
sudo -i
master111
add-apt-repository "deb http://archive.canonical.com/ lucid partner" **************** not sure
apt-get update
apt-get install sun-java6-jdk ************ use sun-java9-jdk
apt-get install python
apt-get install git-core
apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils
or
apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
#The next step is optional, but can offer significant performance gains while compiling, by using ccache (a compiler
#cache tool), which caches the output of the compiler, to save time when compiling a file which has not been changed
#since the last compile.
#To enable ccache, edit your ~/.bashrc or ~/.profile file (or equivalent), and add the following line
export USE_CCACHE=1
#After you log out and back in again, this change will take effect.
#By default, the Android build process creates a subfolder named “out” within the root of your source tree. While for
#most users this is best, in some situations it can be advantageous to move the output directory to another file system.
#If, for example, you have a striped RAID array, it is beneficial to store the output directory on this array. All of the
#files within the out directory can be re-generated in the event of filesystem problems (if the sources were held on
#another filesystem).
#To change the output directory to another filesystem, use the command
export OUT_DIR_COMMON_BASE= "********"
#Within the defined output directory, a new folder will be created, named after your current source tree directory. For
#instance, if you have source trees as /source/master1 and /source/master2 and OUT_DIR_COMMON_BASE is set to /output, the
#output directories will be/output/master1 and /output/master2.
#It is therefore important to ensure you do not have multiple sources stored in directories with the same name, as they
#would end up sharing an output directory, with unpredictable results.
#This is only supported when building Jelly Bean (4.1) and newer.
mkdir ~/bin
PATH=~/bin:$PATH
curl $ http://commondatastorage.googleapis....downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
or
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
mkdir NOU_SOURCE
cd NOU_SOURCE
repo init -u https://android.googlesource.com/platform/manifest/ -b android-7.0.0_r6
?????????????????repo init -b master????????????????????
repo sync
https://github.com/TheMuppets/propri...or_samsung.git
or
https://github.com/CyanogenMod/andro...lte-common.git
***binaries
make clobber
*****BUILD TIME****
. build/envsetup.sh
lunch
*******SELECT device type*******to install
make -j1 otapackage
Greetings, assist is for new users to come and be guided to the correct forum to ask their question. You need to ask your question in the S5 forums, hopefully they can help you there.
Thread Closed
Sawdoctor