Thought I'd share this - and I need to help a friend with this
CallMeVentus said:
Alright, now you've built AOSP and CM7 and you love it, what next?
Ice Cream Sandwich *insert holy choir here*
Requirements (they are much more different now):
A computer that's capable of 64-bit
A dual-core processor of a speed of at least 2.2Ghz (Intel Xeon/Core i7 recommended)
Either Ubuntu 10.04 LTS 64-bit (later versions have experimental support) but if you're using a later version that's fine.
Or Mac OSX 10.6
At least 8GB of RAM and 10~GB swap maybe? (Otherwise you could have 4Gb of RAM and ~20GB swap this time)
At least a 70GB partition for Ubuntu (to make sure there is space for compiling + installing required stuff)
Well, here are the steps to build it:
Instructions (Taken from http://source.android.com/source/initializing.html & http://wiki.cyanogenmod.com/wiki/Android_SDK_Emulator:_Compile_CyanogenMod_(Linux)):
---------ONLY FOR UBUNTU 10.10--12.04---------
Chapter 1: Initializing a Build Environment
This section describes how to set up your local work environment, how to use Repo to get the Android files, and how to build the files on your machine. To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.
Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 90GB (or more) for a full set of builds.
Section 1 (Linux/Ubuntu): Setting up a Linux build environment
The Android build is routinely tested in house on recent versions of Ubuntu LTS (10.04), but most distributions should have the required build tools available. Reports of successes or failures on other distributions are welcome.
Note: It is also possible to build Android in a virtual machine. If you are running Linux in a virtual machine, you will need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree.
In general you will need:
Python 2.5 -- 2.7.
GNU Make 3.81 -- 3.82.
JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older.
Git 1.7 or newer.
Detailed instructions for Ubuntu 10.04+ follow.
Step 1: Installing the JDK
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.
To download Java 6, do this:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Note: The lunch command in the build step will ensure that the Sun JDK is used instead of any previously installed JDK.
Alternatively you can follow eoghan2t7's instructions:
Or bs828's instructions:
Step 2: Installing required packages (Ubuntu 10.04 -- 11.10)
You will need a 64-bit version of Ubuntu. Ubuntu 10.04 is recommended. Building using a newer version of Ubuntu is currently only experimentally supported and is not guaranteed to work on Git branches other than master (http://github.com/android).
To install the required packages, do this:
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
---------ONLY FOR UBUNTU 10.10--11.10---------
For Ubuntu 10.10 users, do this as well:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
Note: This is used to avoid a compile error with libGL later on.
For Ubuntu 11.10 users, do this:
Code:
$ sudo apt-get install libx11-dev:i386
---------END FOR UBUNTU 10.10--11.10---------
----------ONLY FOR UBUNTU 12.04----------
Step 2: Installing required packages (Ubuntu 12.04)
Building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master.
To install the required packages, do this:
Code:
$ sudo 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-dev:i386 \
g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown \
libxml2-utils xsltproc zlib1g-dev:i386
---------END FOR UBUNTU 10.10--12.04---------
I won't do MacOSX for ICS, mainly because it has a very unstable success chance of compilation.
Your build environment is good to go! Proceed to
Chapter 2: Downloading the Source Tree
Section 1: Repo
Repo is a tool that makes it easier to work with Git in the context of Android.
It is also a tool that allows you to download source files from Android easily.
Step 1: Installing Repo
To install, initialize, and configure Repo, follow these steps:
Make sure you have a bin/ directory in your home directory, and that it is included in your path:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the Repo script and ensure it is executable:
Code:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
For version 1.15, the SHA-1 checksum for repo is 8eb56d98b36d615c3efec51868e87bebe757feb1
For version 1.16, the SHA-1 checksum for repo is f3bfa7fd2d0a44aa40579bb0242cc20df37b5e17
Step 2: Initializing a Repo client
After installing Repo, set up your client to access the android source repository:
Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like:
Code:
$ mkdir I_HATE_STEVE
$ cd I_HATE_STEVE
Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.
For AOSP:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r1
or
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r2
or
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r3
or even
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b ics-plus-aosp
For CM9:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b ics
When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.
A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo directory where files such as the manifest will be kept.
Step 3: Getting the files
To pull down files to your working directory from the repositories as specified in the default manifest, run
Code:
$ repo sync
The Android source files will be located in your working directory under their project names. The initial sync operation will take an hour or more to complete, depending on your Internet bandwidth.
Note: If you initialize your repo on your root area for all projects, the time for downloading will decrease
If you haven't set up ccache now, now is a good time to set it up.
Chapter 2.5 (AOSP only): Downloading the various device specific configurations from GitHub
Now that you have a full copy of AOSP, you will realise that inside your working directory/device you will only see only a few device configurations. That's because AOSP only supports those devices and you will need to manually download other devices for use with AOSP.
You will have to find the device configs yourself as I do not know where every device config in the world is.
Chapter 3: Building the System
The basic sequence of build commands is as follows:
Step 1: Initialize
Initialize the environment with the envsetup.sh script. Note that replacing "source" with a single dot saves a few characters, and the short form is more commonly used in documentation.
Either:
Code:
$ source build/envsetup.sh
or
Code:
$ . build/envsetup.sh
Step 2: Choose a target
Choose which target to build with lunch. The exact configuration can be passed as an argument, e.g.
Code:
$ lunch full-eng
The example above refers to a complete build for the emulator, with all debugging enabled.
If run with no arguments lunch will prompt you to choose a target from the menu.
Step 3: Build the Code
Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32.
If you are using a dual-core computer do either of these:
Code:
make -j2
or
Code:
make -j4
It is usually recommended that you make the -jN amount twice the number of cores your processor has.
Therefore if you have a quad-core processor do this:
Code:
make -j4
or
Code:
make -j8
There are different ways to run make:
Code:
$ make clean
or
Code:
$ make clobber
Cleans the compile directory and deletes all compiled files.
Code:
$ make update-api
Makes part of the framework, usually used to update the API.
Code:
make otapackage
Makes a flashable .zip file, as otapackage = Over The Air package.
Code:
make (app name, like framework-res)
Makes the specified app and the .apk will be compiled in the output directory.
Once you finish make, you are done! Congratulations!
Chapter 4: Troubleshooting Common Build Errors
Sometimes, things don't go as planned such as unexpected build errors. Here are some solutions to common problems:
Section 1: Wrong Java Version
If you are attempting to build froyo or earlier with Java 1.6, or gingerbread or later with Java 1.5, make will abort with a message such as
Code:
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: WRONG_VERSION.
The correct version is: RIGHT_VERSION.
Please follow the machine setup instructions at
https://source.android.com/source/download.html
************************************************************
This may be caused by:
failing to install the correct JDK as specified on the Initializing chapter. Building Android requires Sun JDK 5 or 6 depending on which release you are building.
another JDK that you previously installed appearing in your path. You can remove the offending JDK from your path with:
Code:
$ export PATH=${PATH/\/path\/to\/jdk\/dir:/}
Section 2: Python Version 3
Repo is built on particular functionality from Python 2.x and is unfortunately incompatible with Python 3. In order to use repo, please install Python 2.x:
Code:
$ apt-get install python
Optional Step: Setting up ccache
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.
Put the following in your .bashrc or equivalent.
Code:
$ export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
Code:
$ export CCACHE_DIR=
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code, if you use CCache.
Code:
$ prebuilt/linux-x86/ccache/ccache -M 50G
Optional Step: Using a separate output directory
By default, the output of each build is stored in the out/ subdirectory of the matching source tree.
On some machines with multiple storage devices, builds are faster when storing the source files and the output on separate volumes. For additional performance, the output can be stored on a filesystem optimized for speed instead of crash robustness, since all files can be re-generated in case of filesystem corruption.
To set this up, export the OUT_DIR_COMMON_BASE variable to point to the location where your output directories will be stored.
Code:
export OUT_DIR_COMMON_BASE=
The output directory for each separate source tree will be named after the directory holding the source tree.
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's important in that case to not have multiple source trees stored in directories that have the same name, as those would end up sharing an output directory, with unpredictable results.
This is only supported on branches newer than 4.0.x (IceCreamSandwich).
Click to expand...
Click to collapse
Related
This is strictly just a reference guide/tutorial! If you cannot simply follow directions and copy/paste, I'm not going to help you! This is idiot-proof.
Build Environment
Operating system -- Tested on Ubuntu 10.04 (64bit)
Terminal
Decent hardware (minimum of at least a dual core CPU and 4 GB of RAM)
Optimally have an SSD (standard mechanical drives work as well but slow down the process drastically)
Must have required packages for building installed, I will list them further down
Required Packages
Simply copy and paste this in a terminal window:
Code:
sudo apt-get install curl 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 g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
Let that install and then proceed.
Getting the Source
Make required directories
Obtain repo binary
Add repo binary to your path
Give repo binary proper permissions
Initialize empty repo
Sync repo
Grab device tree and vendor tree which are not included in the AOKP manifest
Add Mecha to the vendor setup
Alright, so now we're getting there. I have outlined the basics of what we're about to do and broke them down as I know them. This is all pretty much going to be copy/paste so it'll be fairly difficult to screw this up
Copy/paste:
Make directory for repo binary
Code:
mkdir ~/bin
Add directory for repo binary to your path
Code:
PATH=~/bin:$PATH
Download repo binary and place it in the proper directory
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Give the repo binary the proper permissions
Code:
chmod a+x ~/bin/repo
Create directory for where the AOKP repo will be stored and synced
Code:
mkdir ~/aokp
Move to our new AOKP directory
Code:
cd ~/aokp
Initialize the AOKP repo and download the manifest
Code:
repo init -u git://github.com/AOKP/platform_manifest.git -b master
Sync AOKP source
Code:
repo sync -jX
X == Number of cores your CPU has
Start the build
This is probably the EASIEST part of all, simply copy/paste this command and walk away!
Code:
. build/envsetup.sh && lunch aokp_toro-userdebug && make otapackage -jX
Where X == cores per CPU again.
Syncing the repo is dependent upon your Internet connection. It can take anywhere from 30 minutes to several hours to fully sync. Same thing goes for build times. Don't expect this to be short. If you have patience and have no build errors, you'll end up with a flashable zip in ~/aokp/out/target/product/toro! Happy crack-flashing!
This is awesome! Thanks for taking the time to do this. Looks like I'm be building a custom AOKP for myself very soon
Looks like I have me a nice little project!
Sent from my Galaxy Nexus
tried to follow your guide but had to find a workaround I'm using 11.10 64bit, sdk and java jdk installed and working properly here's the error sorry for the huge output
"sudo apt-get install curl 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 g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
[sudo] password for plagueis:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev
E: Package 'lib32readline5-dev' has no installation candidate
E: Unable to locate package gcc-4.3-multilib
E: Couldn't find any package by regex 'gcc-4.3-multilib'
E: Unable to locate package g++-4.3-multilib
E: Couldn't find any package by regex 'g++-4.3-multilib'
btw here's the howto I used combined with yours to get everything working on 11.10. http://forum.xda-developers.com/archive/index.php/t-1188298.html
vdub804 said:
tried to follow your guide but had to find a workaround I'm using 11.10 64bit, sdk and java jdk installed and working properly here's the error sorry for the huge output
"sudo apt-get install curl 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 g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
[sudo] password for plagueis:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev
E: Package 'lib32readline5-dev' has no installation candidate
E: Unable to locate package gcc-4.3-multilib
E: Couldn't find any package by regex 'gcc-4.3-multilib'
E: Unable to locate package g++-4.3-multilib
E: Couldn't find any package by regex 'g++-4.3-multilib'
btw here's the howto I used combined with yours to get everything working on 11.10. http://forum.xda-developers.com/archive/index.php/t-1188298.html
Click to expand...
Click to collapse
Type this instead:
Code:
sudo apt-get install curl 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 g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.3-multilib g++-4.3-multilib
Replacing lib32readline5-dev with lib32readline-gplv2-dev.
anybody can help me in getting this error when i downloading the source
Fetching projects: 99% (252/254) fatal: remote error:
AOKP/packages/apps/Mms is not a valid repository name
Email [email protected] for help
error: Cannot fetch AOKP/packages/apps/Mms
titto503 said:
anybody can help me in getting this error when i downloading the source
Fetching projects: 99% (252/254) fatal: remote error:
AOKP/packages/apps/Mms is not a valid repository name
Email [email protected] for help
error: Cannot fetch AOKP/packages/apps/Mms
Click to expand...
Click to collapse
try resync again, sometimes that error happens
also, passing -jX (where X is not the number of "cores" - it's the number of jobs that can be run by the cpu at the same time) is not very good for github's health. Do 'repo sync -j1'.
from gnu make wiki:
‘--jobs[=jobs]’
Specifies the number of recipes (jobs) to run simultaneously. With no argument, make runs as many recipes simultaneously as possible.
Click to expand...
Click to collapse
5.4 Parallel Execution
GNU make knows how to execute several recipes at once. Normally, make will execute only one recipe at a time, waiting for it to finish before executing the next. However, the ‘-j’ or ‘--jobs’ option tells make to execute many recipes simultaneously.
Click to expand...
Click to collapse
does this work for the maguro too? the unlocked version.
MrTechnikron said:
does this work for the maguro too? the unlocked version.
Click to expand...
Click to collapse
Well i have been trying, and I don't know if I have missed something or I'm just being a noob but this is what I am getting.
Code:
[email protected]:~$ cd aokp
[email protected]:~/aokp$ repo sync -j2
Fetching projects: 100% (254/254), done.
Syncing work tree: 100% (254/254), done.
[email protected]:~/aokp$ . build/envsetup.sh && lunch aokp_maguro-userdebug && make otapackage -j2
including device/hp/tenderloin/vendorsetup.sh
including device/htc/inc/vendorsetup.sh
including device/htc/supersonic/vendorsetup.sh
including device/htc/vivow/vendorsetup.sh
including device/moto/stingray/vendorsetup.sh
including device/moto/wingray/vendorsetup.sh
including device/samsung/crespo4g/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/aokp/vendorsetup.sh
including vendor/htc/vivow/vendorsetup.sh
including sdk/bash_completion/adb.bash
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[vendor/aokp/products/otter.mk]]: "device/amazon/otter/device.mk" does not exist. Stop.
Device maguro not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for maguro not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[vendor/aokp/products/otter.mk]]: "device/amazon/otter/device.mk" does not exist. Stop.
** Don't have a product spec for: 'aokp_maguro'
** Do you have the right repo manifest?
[email protected]:~/aokp$
I don't enough about how this stuff works to diagnose whats going wrong. Hopefully someone can help because I would hate the 24 hours (yeah my connection is that bad) it took me to do the initial repo sync to be for nothing.
Cheers
cjward23 said:
Well i have been trying, and I don't know if I have missed something or I'm just being a noob but this is what I am getting.
Code:
[email protected]:~$ cd aokp
[email protected]:~/aokp$ repo sync -j2
Fetching projects: 100% (254/254), done.
Syncing work tree: 100% (254/254), done.
[email protected]:~/aokp$ . build/envsetup.sh && lunch aokp_maguro-userdebug && make otapackage -j2
including device/hp/tenderloin/vendorsetup.sh
including device/htc/inc/vendorsetup.sh
including device/htc/supersonic/vendorsetup.sh
including device/htc/vivow/vendorsetup.sh
including device/moto/stingray/vendorsetup.sh
including device/moto/wingray/vendorsetup.sh
including device/samsung/crespo4g/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/aokp/vendorsetup.sh
including vendor/htc/vivow/vendorsetup.sh
including sdk/bash_completion/adb.bash
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[vendor/aokp/products/otter.mk]]: "device/amazon/otter/device.mk" does not exist. Stop.
Device maguro not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for maguro not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[vendor/aokp/products/otter.mk]]: "device/amazon/otter/device.mk" does not exist. Stop.
** Don't have a product spec for: 'aokp_maguro'
** Do you have the right repo manifest?
[email protected]:~/aokp$
I don't enough about how this stuff works to diagnose whats going wrong. Hopefully someone can help because I would hate the 24 hours (yeah my connection is that bad) it took me to do the initial repo sync to be for nothing.
Cheers
Click to expand...
Click to collapse
Hey man i figured that out and it worked but took like 6 hours to build. you have to install java six. if you already have it installed do it again because that is what happened to me.
---------- Post added at 06:02 PM ---------- Previous post was at 05:59 PM ----------
know i can't find where it downloaded to. it said it finished then i looked in the root folder and it was in there but i couldn't take it out of the root folder. so i cant get my rom.
i keep getting errors while trying to sync the repo...
Code:
[email protected]:~/aokp# repo init -u git://github.com/AOKP/platform_manifest.git -b master
... A new repo command ( 1.15) is available.
... You should upgrade soon:
cp /root/aokp/.repo/repo/repo /root/bin/repo
Your identity is: Nicholas W. <[email protected]>
If you want to change this, please re-run 'repo init' with --config-name
repo initialized in /root/aokp
[email protected]:~/aokp# repo sync -j1
... A new repo command ( 1.15) is available.
... You should upgrade soon:
cp /root/aokp/.repo/repo/repo /root/bin/repo
remote: Counting objects: 59553, done.
remote: Compressing objects: 100% (17905/17905), done.
error: RPC failed; result=18, HTTP code = 200B | 37 KiB/s
and this is happening everytime i try to sync
tnap1979 said:
i keep getting errors while trying to sync the repo...
and this is happening everytime i try to sync
Click to expand...
Click to collapse
Just do a "cp /root/aokp/.repo/repo/repo /root/bin/repo" and sync again.
EDIT:
Maybe some more explanation would be nice There is newer version of repo available. It has been downloaded to /root/aokp/.repo/repo/repo. So you manually have to copy the new repo file to the location of the older file. You do that with the command I mentioned above.
here is the result of the commands you mentioned
Code:
[email protected]:~$ sudo -i
[sudo] password for tnap1979:
[email protected]:~# cd ~/aokp
[email protected]:~/aokp# cp /root/aokp/.repo/repo/repo /root/bin/repo
[email protected]:~/aokp# repo init -u git://github.com/AOKP/platform_manifest.git -b master
Your identity is: Nicholas W. <[email protected]>
If you want to change this, please re-run 'repo init' with --config-name
repo initialized in /root/aokp
[email protected]:~/aokp# repo sync -j2
remote: Counting objects: 59553, done.
remote: Compressing objects: 100% (17905/17905), done.
Fetching projects: 4% (12/297) Receiving objects: 0% (182/59553), 44.00 KiBerror: RPC failed; result=18, HTTP code = 200KiB | 5 KiB/s
error: The requested URL returned error: 403 while accessing https://android.googlesource.com/device/generic/goldfish/info/refs
fatal: HTTP request failed
EDIT: also to clarify, im running 10.04 ubuntu LTS 64bit on a core i5-430m 2.26ghz 8gb ddr3 on a 160gb hd with a clean updated ubuntu install as per the tutorial also and ive followed every step in the tutorial except for the java sdk, i had to manually install oracle java 7 jdk as i kept getting errors trying to install java according to the tutorial
---------- Post added at 06:32 AM ---------- Previous post was at 06:13 AM ----------
here is the most recent errors...
this is frustrating me to high hell... and its not my internet i know that....
Code:
[email protected]:~$ sudo -i
[sudo] password for tnap1979:
[email protected]:~# cd ~/aokp
[email protected]:~/aokp# cp /root/aokp/.repo/repo/repo /root/bin/repo
[email protected]:~/aokp# repo sync
remote: Counting objects: 59553, done.
remote: Compressing objects: 100% (17905/17905), done.
Fetching projects: 5% (15/297) Receiving objects: 0% (120/59553), 36.00 KiBException in thread Thread-18:59553), 460.00 KiB | 52 KiB/s
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "/root/aokp/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
clone_bundle=not opt.no_clone_bundle)
File "/root/aokp/.repo/repo/project.py", line 978, in Sync_NetworkHalf
and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
File "/root/aokp/.repo/repo/project.py", line 1519, in _ApplyCloneBundle
exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
File "/root/aokp/.repo/repo/project.py", line 1583, in _FetchBundle
raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: github.com: <urlopen error [Errno -2] Name or service not known>
remote: Counting objects: 1725, done.
remote: Compressing objects: 100% (790/790), done.
remote: Counting objects: 89, done.
remote: Compressing objects: 100% (62/62), done.
error: RPC failed; result=18, HTTP code = 200B | 46 KiB/s
error: RPC failed; result=18, HTTP code = 200B | 26 KiB/s
error: The requested URL returned error: 403 while accessing http://github.com/AOKP/android_device_htc_inc/info/refs
fatal: HTTP request failed
I'm not sure about the error, but I do know you should never perform any of these actions as root! So I'd suggest to start again, repeat all steps, but without the 'sudo'.
Edit:
Your build system is fine, however, you could be getting an error when -in the next step- you're gonna build with java7. But that's easy to overcome (just comment out the check in one of the make files).
I really think the errors you're getting now are caused by sudo.
what's the average time for build on a good machine?
i have a q9650 quadcore at 4ghz with 4gb ram and a raid0 array, it took around 35 minutes for a full aokp build for my maguro.
i flashed it and works fine but i thought it should take like 4/5 hours..
etoy said:
what's the average time for build on a good machine?
i have a q9650 quadcore at 4ghz with 4gb ram and a raid0 array, it took around 35 minutes for a full aokp build for my maguro.
i flashed it and works fine but i thought it should take like 4/5 hours..
Click to expand...
Click to collapse
Sounds about right. For comparison: on my i3 dual core it takes about 1.5 hours, on my i7 quadcore about 40 minutes, and on CMs build servers with dual Xeon X5675's, 12 cores and 32gb ram it takes about 9 minutes. But for us 'normal' people, everything between 30mins and 2 hours is normal
wow, great then! i thought there was some error giving such short build time. wanted to leave the pc building overnight but if it takes only 35 mins i can easily make mods and check if they work within an hour or even less. looks like my 3 years old gaming rig has still got enough muscles for ICS
this is for those who are having trouble getting java 6 jdk
https://github.com/flexiondotorg/oab-java6
follow that and you should have a working java 6 jdk installed in ubuntu 10.04
apparently the jdk was removed from the apt-get sources due to some stupid licensing issues from oracle
tnap1979 said:
this is for those who are having trouble getting java 6 jdk
https://github.com/flexiondotorg/oab-java6
follow that and you should have a working java 6 jdk installed in ubuntu 10.04
apparently the jdk was removed from the apt-get sources due to some stupid licensing issues from oracle
Click to expand...
Click to collapse
i used this guide to update jdk to 1.6.0_31 on both mint 12 (which has already jdk 1.6.0_26) and ubuntu 10.04/11.10, worked fine for each of them.
http://askubuntu.com/questions/67909/how-do-i-install-oracles-jdk-6
etoy said:
wow, great then! i thought there was some error giving such short build time. wanted to leave the pc building overnight but if it takes only 35 mins i can easily make mods and check if they work within an hour or even less. looks like my 3 years old gaming rig has still got enough muscles for ICS
Click to expand...
Click to collapse
It takes me 11 minutes on an i7-2600 and 16gb of ram
Compiling Gummy on Ubuntu 10.04
All work here is done from Ubuntu 10.04.. Newer releases may require slightly different packages.
Installing dependencies:
Install Ubuntu 10.04 and install all updates
Install Java SDK (type or copy the commands into the terminal exactly as you see them here )
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner”
Code:
sudo apt-get update
Code:
sudo apt-get install sun-java6-jdk
Install Git
Code:
sudo apt-get install git-core
Install the rest of the needed files
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 pngcrush
Setting up and syncing Gummy’s Repo
Enter the commands in the terminal exactly as they are displayed to setup your PATH
Code:
mkdir ~/bin
Code:
PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Create your Gummy source directory and then go to that directory
Code:
mkdir ~/Gummy
Code:
cd ~/Gummy
Initialize and sync the Gummy repo (where X is put the number of cores for your CPU such as “repo sync -j4” for a quad core)
Code:
repo init -u https://github.com/teamgummy/platform_manifest.git -b master
Code:
repo sync -jX
Take a break and enjoy an ice cold beer
Go to the fridge
Pull out your favorite brand of beer
Open with care
Drink with pleasure
Otherwise its going to take a while ( a long while )
Preparing to Gummy and compiling
Get prebuilts (Term)
Code:
cd ~/Gummy/vendor/Gummy
Code:
./get-prebuilts
Code:
cd ~/Gummy
Compile (dont forget the . and also make sure you again change the X to the number of cores you have)
Code:
. build/envsetup.sh && lunch Gummy_toro-userdebug && make gummy -jX
_____________________________________________________________
Compiling Gummy on Ubuntu 11.10
Some of these instructions were taken directly from here..
First up:
Install Ubunutu 11.10 and install all the updates
Installing java:
Download the java JDK make sure you select accept the licence agreement and grab the jdk-6u30-linux-x64.bin
enter these commands exactly as they are listed
Code:
sudo chmod a+x ~/Downloads/jdk-6u30-linux-x64.bin
Code:
sudo cp ~/Downloads/jdk-6u30-linux-x64.bin /usr/lib
Code:
cd /usr/lib
Code:
sudo ./jdk-6u30-linux-x64.bin
Code:
sudo mv /usr/lib/jdk1.6.0_30/ /usr/lib/jvm/
Determine if any other JVMs are installed, and count how many, if any
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_30/jre/bin/java 1
Code:
sudo update-alternatives --config java
Be sure to select /usr/lib/jvm/jdk1.6.0_30/jre/bin/java (number 2 in my build environment)
We need create symbolic links to a few Java binaries in /usr/bin
Code:
cd /usr/bin
Code:
sudo ln -s /usr/lib/jvm/jdk1.6.0_30/bin/javac
Code:
sudo ln -s /usr/lib/jvm/jdk1.6.0_30/bin/jar
Code:
sudo ln -s /usr/lib/jvm/jdk1.6.0_30/bin/javadoc
We need to ensure that the AOSP build process can locate the JDK, so we will set a variable it uses to locate the JDK.
Code:
nano ~/.bashrc
Add the following lines at the botton:
ANDROID_JAVA_HOME=/usr/lib/jvm/jdk1.6.0_30
export ANDROID_JAVA_HOME
pres CTRL + X then Y to save your changes
Installing dependencies:
Enter these commands exactly as they are listed
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 lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc pngcrush
Just to be sure reboot
Setting up and syncing Gummy’s Repo
Enter the commands in the terminal exactly as they are displayed to setup your PATH
Code:
mkdir ~/bin
Code:
PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Create your Gummy source directory and then go to that directory
Code:
mkdir ~/Gummy
Code:
cd ~/Gummy
Initialize and sync the Gummy repo (where X is put the number of cores for your CPU such as “repo sync -j4” for a quad core)
Code:
repo init -u https://github.com/teamgummy/platform_manifest.git -b master
Code:
repo sync -jX
Take a break and enjoy an ice cold beer
Go to the fridge
Pull out your favorite brand of beer
Open with care
Drink with pleasure
Otherwise its going to take a while ( a long while )
Preparing to Gummy and compiling
Get prebuilts (Term)
Code:
cd ~/Gummy/vendor/Gummy
Code:
./get-prebuilts
Code:
cd ~/Gummy
Compile (dont forget the . and also make sure you again change the X to the number of cores you have)
Code:
. build/envsetup.sh && lunch Gummy_toro-userdebug && make gummy -jX
Thanks for the guide I will try to play with this
Sent from my Galaxy Nexus using xda premium
You realize steps 2.3, 3.1 and 4.1 can all be combined into one?
I have added the lucid partner repo, did apt-get update and the extra needed packages still don't want to install. It says they're missing. On Ubuntu 10.04 everything is updated.
donlad said:
I have added the lucid partner repo, did apt-get update and the extra needed packages still don't want to install. It says they're missing. On Ubuntu 10.04 everything is updated.
Click to expand...
Click to collapse
are you using 10.04 64 bit?? I know stupid questions but I need to ask.
kejar31 said:
are you using 10.04 64 bit?? I know stupid questions but I need to ask.
Click to expand...
Click to collapse
Nope I'm using 32-bit
Edit: I also checked in software sources to make sure the repo was added correctly and it was.
donlad said:
Nope I'm using 32-bit
Edit: I also checked in software sources to make sure the repo was added correctly and it was.
Click to expand...
Click to collapse
you will need to use 64 bit... Sorry I should have included that in the OP... Will update now.
To compile android on anything above 2.3 you need to compile it on a 64 bit OS
kejar31 said:
you will need to use 64 bit... Sorry I should have included that in the OP... Will update now.
To compile android on anything above 2.3 you need to compile it on a 64 bit OS
Click to expand...
Click to collapse
Well that's a bit of a letdown..because I went ahead and let it sync your repo last night. lol.
Oh well...
donlad said:
Nope I'm using 32-bit
Edit: I also checked in software sources to make sure the repo was added correctly and it was.
Click to expand...
Click to collapse
Ive heard that youll need a 64-bit to do this from TMartin...
Sent from my Galaxy Nexus
ok updated the original OP to include how to compile on Ubuntu 11.10..
As an fyi you should always use the 64bit version of Ubuntu
Compiling Gummy
All work here is done from Ubuntu 10.04.. Newer releases may require slightly different packages.
Installing dependencies:
Install Ubuntu 10.04 and install all updates
Install Java SDK (type or copy the commands into the terminal exactly as you see them here )
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner”
Code:
sudo apt-get update
Code:
sudo apt-get install sun-java6-jdk
Install Git
Code:
sudo apt-get install git-core
Install the rest of the needed files
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 pngcrush
Setting up and syncing Gummy’s Repo
Enter the commands in the terminal exactly as they are displayed to setup your PATH
Code:
mkdir ~/bin
Code:
PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Create your Gummy source directory and then go to that directory
Code:
mkdir ~/Gummy
Code:
cd ~/Gummy
Initialize and sync the Gummy repo (where X is put the number of cores for your CPU such as “repo sync -j4” for a quad core)
Code:
repo init -u[url="https://github.com/teamgummy/platform_manifest.git"][color=#000000] https://github.com/teamgummy/platform_manifest.git[/color][/url] -b master
Code:
repo sync -jX
Take a break and enjoy an ice cold beer
Go to the fridge
Pull out your favorite brand of beer
Open with care
Drink with pleasure
Otherwise its going to take a while ( a long while )
Preparing to Gummy and compiling
Get prebuilts (Term)
Code:
cd ~/Gummy/vendor/Gummy
Code:
./get-prebuilts
Code:
cd ~/Gummy
Compile (dont forget the . and also make sure you again change the X to the number of cores you have)
Code:
. build/envsetup.sh && lunch Gummy_maguro-userdebug && make gummy -jX
Great work. Really appreciate the open-source spirit!
I'd just like to add that for folks with hyper-threaded processors (most newer Intel chips), it's faster if X is double the number of physical cores and you can even try doubling that again to find the fastest build times. In my limited testing, I was getting faster build times with -j4 compared to -j2 on my AMD dual-core system. YMMV and I'm sure there are a lot of factors involved.
From AOSP (http://source.android.com/source/building.html):
"Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32."
This guide is an adaptation/update of the following guides to CM10:
http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S:_Compile_CyanogenMod_(Linux)
http://forum.xda-developers.com/showthread.php?t=1505006
http://forum.xda-developers.com/showthread.php?t=1533711
DISCLAMER
Although the procedures in this guide were tested on 2012-08-03 and produced a working build on the i9000, I take no responsibility for any consequences derived from their use.
Thanks:
stbenz
rycus86
kasper_h
gmhafiz
Requirements:
Linux - Ubuntu 12.04 - 64bit (AFAIK, a 64 bit host is needed to compile JB)
An i9000 with cm10 already installed - Get the latest nightly here: http://get.cm/?device=galaxysmtd
About 14GB of storage for the repository plus about 15GB for building
If you're using Windows or another OS, grab Virtual Box and install Ubuntu on a VM. It makes a nice development environment.
(Give the VM enough resources - A few cores and 2-4GB of RAM)
Building in other Linux distributions?
Here are some contibutions from fellow members:
Arch Linux: Replace steps 1 to 3 with gmhafiz's instructions
________________________________________________________________________________________________________
1 - Install Ubuntu Packages
1.1 - In terminal:
Code:
sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils
sudo apt-get install g++-multilib lib32z1-dev ia32-libs lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib xsltproc
2 - Install JAVA
NOTE: Must be JDK 1.6 - Don't use other versions.
2.1 - Download Java JDK for Linux 64-bit from Java site: (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
Correct file will be something like: jdk-6u##-linux-x64.bin , where ## is the version number and will change with updates.
2.2 - Move jdk-6u##-linux-x64.bin to your home directory
2.3 - Remove any other java packages from system:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
2.4 - Install Java JDK:
Code:
sudo mkdir -p /opt/java/64/
sudo cp jdk-6u##-linux-x64.bin /opt/java/64
sudo su -
cd /opt/java/64
chmod +x jdk-6u##-linux-x64.bin
./jdk-6u##-linux-x64.bin
exit
2.5 - Add JDK PATH to .bashrc:
Code:
vi ~/.bashrc
Add these lines to .bashrc:
Code:
# Java PATHs
export JAVA_HOME=/opt/java/64/jdk1.6.0_##
export PATH=$PATH:$JAVA_HOME/bin
3 - Install Android SDK
3.1 - Setup directories:
Code:
cd ~
mkdir android
cd android
mkdir sdk
3.2 - Download Android SDK from http://developer.android.com/sdk/index.html
3.3 - Extract SDK contents to ~/android/sdk
3.4 - Add Android SDK Path:
Code:
vi ~/.bashrc
Enter the Following:
Code:
#Android PATH
export PATH=$PATH:~/android/sdk
export PATH=$PATH:~/android/sdk/platform-tools
export PATH=$PATH:~/android/sdk/tools
3.5 - Add Extra Path For Device:
Code:
sudo vi /etc/udev/rules.d/99-android.rules
Enter this:
Code:
#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666
SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
Save/close file and run:
Code:
sudo chmod +x /etc/udev/rules.d/99-android.rules
3.6 - Close and open new terminal.
3.7 - Install Android SDK Tools
Code:
android
Check Android SDK Tools and Android SDK platform-tools and Install them
4 - Install Repository
4.1 - Download Repo:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
4.2 - Add Repo Path:
Code:
vi ~/.bashrc
Enter the following:
Code:
export PATH=$PATH:~/bin
4.3 - Close and open new terminal.
4.4 - Initialize Repository & Sync:
Code:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync -j16
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16
Want to make sure you didn't get any connection errors and have the complete repository? Just run the repo sync command again. It can't give you ANY errors.Go get a beer. And another. And another...
4.5 - Get Device Specific Repos:
Code:
. build/envsetup.sh && breakfast galaxysmtd
Get more beer...
4.6 - Extract files from phone:
NOTE: You need to have cm10 installed on the phone.
Connect phone to pc and in terminal type:
Code:
adb root
cd ~/android/system/device/samsung/galaxysmtd/
./extract-files.sh
4.7 - Download Extra Files:
Code:
~/android/system/vendor/cm/get-prebuilts
4.8 - Add Toolchain PATH:
Code:
vi ~/.bashrc
Enter the following:
Code:
#Android Toolchain PATH
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:/home/YOUR-USERNAME/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
4.9 - Close and open new terminal.
5 - Building Android
Code:
cd ~/android/system
. build/envsetup.sh && brunch galaxysmtd
Go get a beer. And another. And another...
6 - Install on Phone
6.1 - Copy your .zip file from ~/android/system/out/target/product/galaxysmtd/cm-10-XXXXXXXXX-UNOFFICIAL-galaxysmtd.zip to the root of the SD card.
6.2 - Optional: Download Google Apps for Jelly Bean from http://goo.im/gapps and place it on the root of the SD card.
6.3 - Flash both of these .zip files from recovery.
Call your mother. She misses you.
...and that's it.
________________________________________________________________________________________________________
How to update?
Code:
cd ~/android/system
repo sync -j16
make installclean
find ./out/ -name 'build.prop' | xargs rm
find ./out/ -name 'cm_galaxysmtd-target_files-eng.*.zip' | xargs rm
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16
...get beer, build and install.
Want to go "Steve Jobs" on the Android build? (Warning: Will take a gazillion years to re-build everything again)
Run:
Code:
make clobber
________________________________________________________________________________________________________
Want to customize the kernel?
Look here: [Guide] How to customize the CM10 i9000 kernel
.
will try this soon... thankx
Can you also write a small paragraph where you explain how compile a single application like Mms, Phone...
Thank you
a0a0 said:
Can you also write a small paragraph where you explain how compile a single application like Mms, Phone...
Thank you
Click to expand...
Click to collapse
You get all the application apks in the produced build.
From there you can extract any single one you want...
Sent from my GT-I9000 using Tapatalk 2
Yes but if i will try a small change in a code i must compile every time all the rom
a0a0 said:
Yes but if i will try a small change in a code i must compile every time all the rom
Click to expand...
Click to collapse
Not really.
Only changed files are compiled (and affected dependencies)
Sent from my GT-I9000 using Tapatalk 2
With mmm you can build single apk files, see the cm9 compile thread for details...
Verstuurd van mijn GT-I9000
Thanks man
Verstuurd van mijn GT-I9000
Requirements:
Linux - Ubuntu 12.04...
Click to expand...
Click to collapse
Does it have to be Ubuntu, provided I can find all listed packages for CentOS, for example?
Also, do you recommend the desktop or the server version?
elitevet said:
Does it have to be Ubuntu, provided I can find all listed packages for CentOS, for example?
Also, do you recommend the desktop or the server version?
Click to expand...
Click to collapse
Doesn't have to be Ubuntu, as long as you can find the equivalent packages.
It can be the desktop or server version, as long as you have X in it.
The android SDK setup uses a GUI. (but perhaps there's a way to run it from the CLI)
Sent from my GT-I9000 using Tapatalk 2
Thanks!
Already built it from the info from the CM9 thread, but this is always welcome
and very useful! Great +++++
Is step 4.5 (Setup Manifest) really required? Can't test it at the moment, but I know, it isn't required for building CM9 anymore, despite it is mentioned in the guide for building CM9. As I understand it, its a relict from when the Galaxy S specific sources weren't yet merged to the CyanogenMod repository.
stbenz said:
Is step 4.5 (Setup Manifest) really required? Can't test it at the moment, but I know, it isn't required for building CM9 anymore, despite it is mentioned in the guide for building CM9. As I understand it, its a relict from when the Galaxy S specific sources weren't yet merged to the CyanogenMod repository.
Click to expand...
Click to collapse
It's not needed.
Gesendet von meinem GT-I9000 mit Tapatalk 2
stbenz said:
Is step 4.5 (Setup Manifest) really required? Can't test it at the moment, but I know, it isn't required for building CM9 anymore, despite it is mentioned in the guide for building CM9. As I understand it, its a relict from when the Galaxy S specific sources weren't yet merged to the CyanogenMod repository.
Click to expand...
Click to collapse
The local manifest is still needed to download the device specific files & kernel source (also for CM9).
The thing not needed for CM9 after some time was using the teamhacksung buildscript.
---------- Post added at 05:27 PM ---------- Previous post was at 05:27 PM ----------
DerTeufel1980 said:
It's not needed.
Gesendet von meinem GT-I9000 mit Tapatalk 2
Click to expand...
Click to collapse
Sure? I don't see the device-files in the default.xml manifest file...
DerTeufel1980 said:
It's not needed.
Gesendet von meinem GT-I9000 mit Tapatalk 2
Click to expand...
Click to collapse
It shouldn't be, if it is like that, but I didn't get those sources until I added the manifest.
Perhaps a quirk, but that's how it worked.
The thing is, I had to put in the guide, as it was the way it worked, starting from a fresh, completely clean system.
Sent from my GT-I9000 using Tapatalk 2
Thanks again!
I was looking for something like this for quite a while now. Now I can finally compile my own builds
I compiled a build using this exact method 2 days ago, flashed the build to the phone and it went into constant pre-recovery bootloops. I had to flash GB with Odin to get back.
One thing was that I compile on a seperate box at home and transferred the file using scp. Maybe that corrupted, so I'm gonna try again tomorrow.
Could it be possible that the codebase itself was broken when I compiled? :-/
Did anybody have anythign similar? :S
K****iz_Indian said:
Could it be possible that the codebase itself was broken when I compiled? :-/
Did anybody have anythign similar? :S
Click to expand...
Click to collapse
Don't think so. The repo is not left with a broken code base.
The thing is, sometimes users get into the boot loop state even when installing the (un)official cm10 builds, so other factors cause them.
Sent from my GT-I9000 using Tapatalk 2
Could anyone refer me to a good guide about commit picking, please?
elitevet said:
Could anyone refer me to a good guide about commit picking, please?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=23715982&postcount=64
Hello guys, since I don't have the time of the world to finish easily the cm11 project because of school I am posting here the updated guide to compile CM11 so Fame Dev's could like finish the project and make an fully working cyanogenmod :good:
Overview
I. Preparation
II. Installation of the required packages
III. Installing Java
IV. The sources
V. Building the ROM
VI. Rebuilding with newest sources
VII. Galaxy Fame Build menu
I. Preparation
Things you need for building:
A computer
An internet connection
An open mind
Time
Patience
First of all, you need a running up-to-date Ubuntu/Linux system. I am using Ubuntu 14.04 64-bit.
Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for the terminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't be any problem.
IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!
II. Installation of the required packages (Ubuntu 13.10 64-bit)
Install packages:
Code:
$ sudo apt-get install bison build-essential curl flex \
g++-multilib gcc-multilib git-core gnupg gperf \
lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev \
libesd0-dev libncurses5-dev libsdl1.2-dev \
libwxgtk2.8-dev libxml2 libxml2-utils lzop \
openjdk-6-jdk openjdk-6-jre pngcrush schedtool \
squashfs-tools xsltproc zip zlib1g-dev
III. Installing Java
[/FONT]
You need a version 6 Java Development Kit for building CM11.0. Usually, the SUN JDK 6 is recommended. But there is another way: you can use the OpenJDK 6. When you installed the required packages as described above, you will just need to configure your Java installation.
Check your Java version:
Code:
$ java -version
Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the right Java location and version:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
If they are pointing to the wrong versions you have to change that to OpenJDK6.
Select the default Java version for your system:
Code:
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar
That's it.
IV. The sources
Install repo:
Repo is a tool that makes it quite easy to download and maintain the sources of Cyanogenmod.
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Create the working directory:
Code:
$ mkdir ~/cm11
$ cd ~/cm11
Initialize Repo:
Code:
$ repo init -u http://github.com/CyanogenMod/android.git -b cm-11.0
and enter your credentials.
Download the sources:
Code:
$ repo sync
Wait until it's finished - takes some time to download the hefty 15-35 GB of source code!
Have a break, have a KitKat!
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync
If you are running into a lot of syncing errors the reason might be that the 'repo sync' command is establishing four threads automatically. This might be too much. So try to change the command to run with one thread only by using
Code:
$ repo sync -j1
Initialize the environment
Code:
$ . build/envsetup.sh
Obtain the proprietary files:
create a file with the name local_manifest.xml in the local_manifests directory. To see this directory, you have to press Ctrl-H in your file manager.
Use this code
Code:
$ gedit ~/cm11/.repo/local_manifests/local_manifest.xml
Paste the following lines to the editor
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="wulsic/android_device_samsung_nevisp.git" path="device/samsung/nevisp" remote="github" revision="cm-11.0"/>
<project name="wulsic/android_vendor_samsung_nevisp.git" path="vendor/samsung/nevisp" remote="github" revision="master"/>
<project name="wulsic/android_kernel_samsung_nevispcm11.git" path="kernel/samsung/nevisp" remote="github" revision="master"/>
<project name="wulsic/android_patchesnevisp.git" path="patches" remote="github" revision="cm-11.0"/>
</manifest>
Save the file.
Run
Code:
$ repo sync
again to get the files needed.
Download the necessary prebuilts from cyanogenmod by running
Code:
$ cd ~/cm11/vendor/cm
$ . get-prebuilts
$ croot
And you're done!
V. Building the ROM
Now build it:
Code:
$ brunch nevisp
And the building process starts. Now have patience. Building takes around half an hour on fast systems and a lot more on older and slower machines.
When everything worked as it should you will find your new ROM-image in ~/cm11/out/target/product/nevisp
It is called cm-11-DATE-NIGHTLY-nevisp-zip. You can flash it via CWM
VI. Rebuilding with newest sources
Whenever you like to update your sources and build a new version you have to run these four simple commands:
Code:
$ cd ~/cm11
$ repo sync
$ . build/envsetup.sh
$ brunch nevisp
Compiling takes less time than it took for creating the ROM the first time because it's only building new parts while reusing old parts that haven't changed.
VII. Galaxy Fame Build menu
Now that you know how building works but for full functionality on the fame we also need to apply patches. We are going to do this using a simple menu I made to spare time and mistakes.
https://github.com/wulsic/Personalscripstrepository/blob/master/build-nevisp_simple.sh
Open the link and Right click on the raw button and
Save the file in your CM11 directory and rename it to build-nevisp.sh or whatever name is easier/better for you as it doesn't matter.
You can execute this menu by making it executable by going to properties, permissions and allow executing file as program.
or you can open a terminal in the CM11 root folder and execute it by typing:
Code:
. build-nevisp.sh
Usefull addon if you have ubuntu so you can Open terminal in every folder by only right clicking in the folder and selecting open terminal. To get it you have to install it with:
Code:
sudo apt-get install nautilus-open-terminal
Happy building![/QUOTE]
Big thanks to Raum1807 Since this is his guide but modified for the Fame Dev's/People to keep it easier. I had his permission for this.
Stop by his thread and thank him for his guide:good: http://forum.xda-developers.com/nexus-4/general/guide-cm11-how-to-build-cyanogenmod-11-t2515305
Thanks to Google for android and Cyanogenmod well for Cyanogenmod ofcourse ;p
Reserved:
You can flash the cm11 builds by flashing the Selinux enabled Clockworkmod recovery:https://drive.google.com/file/d/0B1u3mnq0nstfWFd5eGVlbHNkaTg/edit?usp=sharing
Or compile a new clockworkmod recovery by yourself since you are already compiling android :good: but I believe this is already automatically done.
Does it work on S6810B?
Sorry my english, I'm Brazilian and do not speak well in English.
by: Google Translate
John Blueh said:
Does it work on S6810B?
Sorry my english, I'm Brazilian and do not speak well in English.
by: Google Translate
Click to expand...
Click to collapse
try it,,yyou just need to change the repo
John Blueh said:
Does it work on S6810B?
Sorry my english, I'm Brazilian and do not speak well in English.
by: Google Translate
Click to expand...
Click to collapse
John blueh I am not sure, the S6810B is dualsim model right? The only thing you have to change then is maybe device model and somethings in the ramdisk related to the device model.
But I could not make cm11 boot yet, probably an ramdisk issue since I am doing it blindly its going harder especially with school.
I hope you could maybe also invest your time in it a bit and make an fully working cm11 only problems so far are related to the kernels ramdisk so far as I know.
I hope google translates this good for you.
i got problem :/ ,,see below
wulsic said:
Hello guys, since I don't have the time of the world to finish easily the cm11 project because of school I am posting here the updated guide to compile CM11 so Fame Dev's could like finish the project and make an fully working cyanogenmod :good:
Overview
I. Preparation
II. Installation of the required packages
III. Installing Java
IV. The sources
V. Building the ROM
VI. Rebuilding with newest sources
I. Preparation
Things you need for building:
A computer
An internet connection
An open mind
Time
Patience
First of all, you need a running up-to-date Ubuntu/Linux system. I am using Ubuntu 14.04 64-bit.
Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for the terminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't be any problem.
IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!
II. Installation of the required packages (Ubuntu 13.10 64-bit)
Install packages:
Code:
$ sudo apt-get install bison build-essential curl flex \
g++-multilib gcc-multilib git-core gnupg gperf \
lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev \
libesd0-dev libncurses5-dev libsdl1.2-dev \
libwxgtk2.8-dev libxml2 libxml2-utils lzop \
openjdk-6-jdk openjdk-6-jre pngcrush schedtool \
squashfs-tools xsltproc zip zlib1g-dev
III. Installing Java
[/FONT]
You need a version 6 Java Development Kit for building CM11.0. Usually, the SUN JDK 6 is recommended. But there is another way: you can use the OpenJDK 6. When you installed the required packages as described above, you will just need to configure your Java installation.
Check your Java version:
Code:
$ java -version
Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the right Java location and version:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
If they are pointing to the wrong versions you have to change that to OpenJDK6.
Select the default Java version for your system:
Code:
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar
That's it.
IV. The sources
Install repo:
Repo is a tool that makes it quite easy to download and maintain the sources of Cyanogenmod.
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Create the working directory:
Code:
$ mkdir ~/cm11
$ cd ~/cm11
Initialize Repo:
Code:
$ repo init -u http://github.com/CyanogenMod/android.git -b cm-11.0
and enter your credentials.
Download the sources:
Code:
$ repo sync
Wait until it's finished - takes some time to download the hefty 15-35 GB of source code!
Have a break, have a KitKat!
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync
If you are running into a lot of syncing errors the reason might be that the 'repo sync' command is establishing four threads automatically. This might be too much. So try to change the command to run with one thread only by using
Code:
$ repo sync -j1
Initialize the environment
Code:
$ . build/envsetup.sh
Obtain the proprietary files:
create a file with the name local_manifest.xml in the local_manifests directory. To see this directory, you have to press Ctrl-H in your file manager.
Use this code
Code:
$ gedit ~/cm11/.repo/local_manifests/local_manifest.xml
Paste the following lines to the editor
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="wulsic/android_device_samsung_nevispcm11.git" path="device/samsung/nevisp" remote="github" revision="master"/>
<project name="wulsic/android_vendor_samsung_nevispcm11.git" path="vendor/samsung/nevisp" remote="github" revision="master"/>
<project name="wulsic/android_kernel_samsung_nevispcm11.git" path="kernel/samsung/nevisp" remote="github" revision="master"/>
</manifest>
Save the file. (Replace the device revision with Testing if you want to get my Testing branch.)
Run
Code:
$ repo sync
again to get the files needed.
Download the necessary prebuilts from cyanogenmod by running
Code:
$ cd ~/cm11/vendor/cm
$ . get-prebuilts
$ croot
And you're done!
V. Building the ROM
Now build it:
Code:
$ brunch nevisp
And the building process starts. Now have patience. Building takes around half an hour on fast systems and a lot more on older and slower machines.
When everything worked as it should you will find your new ROM-image in ~/cm11/out/target/product/nevisp
It is called cm-11-DATE-UNOFFICIAL-nevisp-zip. You can flash it via CWM
VI. Rebuilding with newest sources
Whenever you like to update your sources and build a new version you have to run these four simple commands:
Code:
$ cd ~/cm11
$ repo sync
$ . build/envsetup.sh
$ brunch nevisp
Compiling takes less time than it took for creating the ROM the first time because it's only building new parts while reusing old parts that haven't changed.
Happy building!
Click to expand...
Click to collapse
Big thanks to Raum1807 Since this is his guide but modified for the Fame Dev's/People to keep it easier. I had his permission for this.
Stop by his thread and thank him for his guide:good: http://forum.xda-developers.com/nexus-4/general/guide-cm11-how-to-build-cyanogenmod-11-t2515305
Thanks to Google for android and Cyanogenmod well for Cyanogenmod ofcourse ;p
I hope this Guide is good since I screwed up my ubuntu again... Please report to me if there is a mistake in the OP.[/QUOTE]
If By Chance I Took Build On A Virtual Machine ... Would Take To Build It?
PS :. I am Brazilian, translated to English by Google Translate.
@NickyClouD this guide is good but you have to replace the master revision by device_samsung_nevispcm11 to Testing.
I dont know were you screwed it up but this guide is good
I dont know howlong it would take to build it since I am triplebooting.
So change master to Testing. Goodluck :good:
EDIT: Could you also unquote the OP please since it takes alot of space
For the one who cares about building roms for the fame community I adjusted the guide a bit again and added the repository with all the patches needed for the fame to the local_manifest.xml part.
I also added a new part to the guide called:
VII. Galaxy Fame Build menu
It includes a link to a simple build script which I made so that you compilers can compile/update/clean your builds easier without the need of wasting more time then needed and it also includes a feature so you can see how long the build went or how long repo sync took.
Also an addon/package for ubuntu variants which allows you to open the terminal in the folder by only right clicking in the folder and selecting open terminal menu. This addon spares you ALOT of time when you are busy with these kinds of things.