[TUTORIAL] Compiling N7000 CM10 for us Dummies - Galaxy Note GT-N7000 Q&A, Help & Troubleshooting

Compiling CM from source is hard, right? Wrong!
All you need is
a semi decent PC
a decent Interweb connection
a bit of patience
a) semi decent PC - compiling a Rom from source entails some data crunching, so the better the box you have, the quicker it gets done
b) doing a repo sync means that you have to download CM10 repository to your machine. It contains some 6-7 Gbs of data, so attempting to do it on a 0.5 megabit connection might take forever and a day. For instance, I'm on a 20 megabit connection and the sync takes about 90 minutes.
c) some patience to read the following tutorial
And that's all.
First things first: you need to download and install 64-bit version of Ubuntu 12.04. A 32-bit one won't cut it. You'll want to have about 80-100 Gb partition for Ubuntu and compiling, and it wouldn't hurt to use another smaller partition (cca 30-40Gb) for swap. For instance, Anti uses a 120 Gb SSD for his compiling, I use 100+40 swap prehistoric SATA 2.
Installed it? Good, let's move on.
Now do a system update; click that little switch icon in the top right hand corner and you'll get a menu. Launch Update Manager and install everything it finds.
Now that your Ubuntu is up to speed you need to download and install some more stuff. Launch the terminal (Ctrl + Alt + T).
Copy the below code and paste it (right-click and paste, Ctrl + V doesn't work) in the terminal, hit enter.
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev libxml2-utils
If 'lib32ncurses5-dev' fails, delete it from the list, install everything else.
Now you need to add the following repos, again copy/paste each line into the terminal, hit enter. Repeat for each line of the code below.
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Code:
sudo apt-get update
Now you are going to install Synaptic.
Code:
sudo apt-get install synaptic
Done? Good.
Click the 'Dash Home' button (top left hand corner of your desktop), find and launch Synaptic Package Manager. Search for 'Sun Java6 JDK' and install it will all the dependencies except sun-java6-demo and sun-java6-doc.
Now go to http://developer.android.com/sdk/index.html and download the linux version of the Android SDK. It provides the API libraries and developer tools necessary to build. When your download is done, open it with Archive Manager, extract it somewhere, and move the extracted folder to your Home folder. Rename it to 'SDK' for simplicity.
Now you need to download and install Android SDK Platform Tools. Use file manager to navigate to your SDK sub-folder Tools. Find 'android' and double-click to run it. You'll be asked what you want to download. Choose the 'Platform Tools' and the Android 4.1.2 SDK Level 16 and the Android 4.2 SDK level 17 Dev tools and hit install. Let it download; it might take some time, depending on your download speed.
Now the time is ripe for you to setup your Android repos. Copy/paste the following commands into the terminal, hit enter after each one.
Code:
mkdir -p ~/bin
Code:
mkdir -p ~/android/system
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Code:
export PATH=~/bin:$PATH
You have to reboot after this for changes to take effect. Once back at your desktop, relaunch the terminal and copy/paste the following commands (with Enter).
Code:
cd ~/android/system
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
Code:
repo sync
Basically, what you're doing here is downloading the CM repo to your machine. This will take quite some time, so go grab a cup of coffee and watch some telly.
After the sync has gone through with no problems (knock on wood), you need to create a local manifest to pull TeamHacksung’s fork for N7000.
Launch File Manager, navigate to /android/system and click Ctrl + H for your hidden folders and files to appear. Enter the /.repo folder, right-click and choose 'Create New Document'. Name the empty document 'local_manifest.xml'. Open the document and paste the below code into it. Save and exit Gedit.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="jellybean">
<copyfile dest="build.sh" src="build.sh" />
</project>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_device_samsung_n7000" path="device/samsung/n7000" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="jellybean" />
</manifest>
Click to expand...
Click to collapse
Now another repo sync needs to be done to pull in the changes in the local manifest. This sync will be considerably shorter than the first one.
Launch the terminal and copy/paste
Code:
repo sync
Everything went well? Fine, it's time for you to start your first build. It will also take some time; it lasts about 80-90 minutes on my Intel i3-3220 CPU @ 3.30GHz × 4 with SATA 2 drives.
Take a stiff drink, say a brief prayer, and enter the following commands into the terminal.
Code:
cd ~/android/system
Code:
./build.sh n7000
If all goes well (no errors), once it is done you will have a flashable CM10 zip in /android/system/out/target/product/n7000 folder.
Not so hard, and it's great fun.
I'd like to say a great big THANK YOU to utacka and anti for helping me navigate the murky waters of my first compile.

Alternative way to install Java:
$ sudo apt-get install openjdk-6-jdk
$ apt-get update

Interesting... Thank you

del

Brief & clear. Barmen to this, and don't forget to change a local manifest soon for a new device:angel:

ahalford said:
Brief & clear. Barmen to this, and don't forget to change a local manifest soon for a new device:angel:
Click to expand...
Click to collapse
When/if I get it, I promise to do it.

Don't talk C# to me, there is no "if", there is only "When"

Do not lead me into this temptation!
Thank you very much chas! :good:

trahzebuck said:
Do not lead me into this temptation!
Thank you very much chas! :good:
Click to expand...
Click to collapse
Try it, it's a piece of cake, especially for an old Linux dog like you.

chasmodo said:
When/if I get it, I promise to do it.
Click to expand...
Click to collapse
I'll do my best to get it.
And thanks for the tutorial.

Thank you so much for this!
Can you teach us to cherry pick codes from aokp and cm10 repos?
e. g. I love cm10, but prefer the switchboard style toggles, or any random code, how can I incoporate it into my own KANG from source
Sent from my GT-N7000 using Tapatalk 2

baz77 said:
Thank you so much for this!
Can you teach us to cherry pick codes from aokp and cm10 repos?
Click to expand...
Click to collapse
I'll let you know as soon as I do it myself, I promise.

Please delete

Size of Swap Partition
I think your Swap Partition is too big - wasting space of your harddisk.
I normally (when having RAM from 2-4 GB) choose the same (or double) space on a harddisk.
See the Ubuntu Documentation "SwapFaq" for detailed explanations.
Anyway: thanks for this documentation - I will try it later today.

Thanks for this tutorial ! So clear and works exactly as expected !!

Problem with arch/arm/mach-exynos/exynos4-smc.o
Hello,
I am building cm10.1 for GT-N7000 on Mac 10.7.5. I extracted the kernel for the device from CyanogenMod/android_kernel_samsung_smdk4210.
When I trying to build, it gives me the following error:
CC arch/arm/mm/proc-syms.o
CC arch/arm/mach-exynos/exynos4-smc.o
/var/folders/tn/g4qp8wtn4qx7q8kwmm72ksjc0000gp/T//ccgA75qU.s: Assembler messages:
/var/folders/tn/g4qp8wtn4qx7q8kwmm72ksjc0000gp/T//ccgA75qU.s:32: Error: selected processor does not support ARM mode `smc 0'
/var/folders/tn/g4qp8wtn4qx7q8kwmm72ksjc0000gp/T//ccgA75qU.s:74: Error: selected processor does not support ARM mode `smc 0'
make[3]: *** [arch/arm/mach-exynos/exynos4-smc.o] Error 1
make[2]: *** [arch/arm/mach-exynos] Error 2
I compared the file arch/arm/mach-exynos/exynos4-smc.o in the repository,its same. What modifications do I need to do in exynos4-smc.o?
At some places when i searched it said the prob is with path of toolchain. But I think the problem is with that particular file which doesnot support ARM mode.
Kindly help me solving this error.

First off, this is a tutorial on compiling CM10, not CM10.1.
Second off, there's no need to extract anything when compiling for n7000. Go here, follow the instructions to the letter and all will be well.

chasmodo said:
First off, this is a tutorial on compiling CM10, not CM10.1.
Second off, there's no need to extract anything when compiling for n7000. Go here, follow the instructions to the letter and all will be well.
Click to expand...
Click to collapse
Actually I may have used a wrong word "extract'. Actually I followed the steps for 10.1 and used the local_manifest.xml from the thread you mentioned. Still I encounter the same error. Even I tried to run breakfast n7000 , I encountered the same error and I think its because of that particular file but not sure. The terminal output is :
CC arch/arm/mach-exynos/dma.o
CC arch/arm/mach-exynos/irq-eint.o
CC arch/arm/mach-exynos/ppmu.o
CC arch/arm/mach-exynos/exynos4-smc.o ( Error with only this one).
/var/folders/tn/g4qp8wtn4qx7q8kwmm72ksjc0000gp/T//ccq6LJqf.s: Assembler messages:
/var/folders/tn/g4qp8wtn4qx7q8kwmm72ksjc0000gp/T//ccq6LJqf.s:32: Error: selected processor does not support ARM mode `smc 0'
/var/folders/tn/g4qp8wtn4qx7q8kwmm72ksjc0000gp/T//ccq6LJqf.s:74: Error: selected processor does not support ARM mode `smc 0'
make[3]: *** [arch/arm/mach-exynos/exynos4-smc.o] Error 1
Kindly help me solve this error.

Related

[GUIDE CM10] How to build your own CyanogenMod 10 ROM from sources for LG P990 O2x

Make your 'own' ROM today!
Revision History:
V1.5 2013.01.07 Update to newest Java 6 version: Java SE Development Kit 6 Update 38
V1.4 2012.11.20 ParanoidAndroid ROM building guide added, minor changes
V1.3 2012.11.10 New FAQ, Updates Java section, WIFI fix
V1.2 2012.11.05 Sync part updated
V1.1 2012.11.04 Typos fixed
V1.0 2012.11.03 Initial release
Thank you note: Thank you Ricardo Cerqueira for your work on the LG P990. Without you none of this would be possible. Thank you ethansp for your feedback and your input regarding the sync matter. Thank you TrymHansen and Ferrum Master for your input in respect of the JAVA topic. And thank you p.valenta for your contribution to the WIFI build fix.
Overview
0. Preparation
I. Installation of the required packages
II. Installing JAVA
III. The sources
IV. Building the ROM
V. Rebuilding with newest sources
VI. FAQ
VII. Building ParanoidAndroid ROM
0. 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 12.10 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!
I. Installation of the required packages (Ubuntu 12.10 64-bit)
Install packages:
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-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils schedtool pngcrush xsltproc zlib1g-dev:i386
Set the links:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
II. Installing JAVA
You need a Java Development Kit for building CM10. Recommended is the SUN JDK 6. As of writing the most recent version is SUN JDK 6 Update 38.
1. Download the jdk-6u38-linux-i586.bin from the Oracle/Sun Java Download Area. If you are on 64-bit Ubuntu as I am, you should grab jdk-6u38-linux-x64.bin.
2. Make the bin file executable:
Code:
$ chmod +x jdk-6u38-linux-x64.bin
3. Extract the bin file:
Code:
$ ./jdk-6u38-linux-x64.bin
4. Move the extracted folder to this this location:
Code:
$ sudo mv jdk1.6.0_38 /usr/lib/jvm/./jdk-6u38-linux-x64.bin
5. Install the new Java source in system:
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javadoc 1
$ sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javah 1
$ sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javap 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/jar 1
6. 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
7. Check Java version:
Code:
$ java -version
8. Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the new Java location and version:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
III. 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 https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Create working directory:
Code:
$ mkdir ~/cm10
$ cd ~/cm10
Initialize Repo:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b jellybean
and enter your credentials.
Download the sources:
Code:
$ repo sync
Wait until it's finished (takes a lot of time!)
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync
Tip from ethansp: 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 .repo directory. To see this directory, you have to press Ctrl-H in your file manager.
Create it with
Code:
gedit ~/cm10/.repo/local_manifest.xml
Paste the following lines to the editor
Code:
<manifest>
<project name="CyanogenMod/android_device_lge_p990" path="device/lge/p990" remote="github" revision="jellybean"/>
<project name="CyanogenMod/android_device_lge_star-common" path="device/lge/star-common" remote="github" revision="jellybean"/>
<project name="CyanogenMod/lge-kernel-star" path="kernel/lge/star" remote="github" revision="jellybean"/>
<project path="vendor/lge" name="TheMuppets/proprietary_vendor_lge.git" remote="github" revision="jellybean"/>
</manifest>
Save the file.
Run
Code:
$ repo sync
again to get the files needed.
Download the necessary prebuilts from cyanogenmod by running
Code:
$ ~/cm10/vendor/cm/get-prebuilts
And you are done!
IV. Building the ROM
Now build it:
Code:
$ brunch p990
And 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 ~/cm10/out/target/product/p990
It is called cm-10-DATE-UNOFFICIAL-p990-zip. You can flash it via CWM as usual.
If you are having trouble with the WIFI not working with your newly flashed ROM, check the FAQ section C below for the solution.
V. 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 ~/cm10
$ repo sync
$ . build/envsetup.sh
$ brunch p990
Building takes less time than it took for creating it the first build because it's only rebuilding new parts and using old parts that haven't changed.
Happy building!
VI. FAQ
A. How to tell how long it takes to build the ROM?
First, it depends on your hardware, second, whether it is your first build or a daily rebuild. To get a first number, you can use the “time” command and add the “brunch” command to it.
E.g.
Code:
time brunch p990
So the system will tell you how long it took to build the ROM. Then you know next time if it will be a short or long coffee break while waiting for your build to finish.
B. Is there a way to speed up the building process?
Actually, there are a lot of ways to speed up the process. Here are some of them:
1. Hardware:
When you build the first time it takes half an hour on fast machines and up to many hours on slower machines. What counts most is raw CPU power. Multi-core computers with a lot of fast RAM are recommended. The more cores the better. Memory-wise a setup with more than 8GB with aggressive but of course also stable timings is also adding to the building speed. A fast HDD or even SSD doesn't hurt either. When resourceful, you can use a system with multiple SSDs and gain more speed than single storage systems. But in most cases the CPU will be the biggest bottleneck. Check with tools, e.g. System Monitor in Ubuntu – and watch the resources tab to find out your bottleneck.
2. System-Software:
If you are using virtual machine software then try to optimize it. Look for “virtualization support” in the BIOS. Give it as much CPU power and memory as you can from your host system. Whenever it is possible it is recommended that you install the system directly, as the virtualization solution usually comes with a performance drop compared to a system installed and booted from directly.
3. The building software:
a. Out Directory
You can use a separate output directory for your builds, e.g. on a different hard drive with a fast file system.
Append
Code:
export OUT_DIR_COMMON_BASE=<path-to-your-out-directory>
to your .bashrc file.
b. Caching
You can setup Ccache, a system that acts as a compiler cache for all the parts of the building that are written in C. This is excellent if you rebuild often. But keep in mind that building the first time takes even longer when you have Ccache activated than building without it. So for first tests it is fine to build without Ccache enabled.
To enable Ccache add
Code:
export USE_CCACHE=1
to your .bashrc file
Optional: If you like to set the path, where the Ccache will be stored on your own, you have to add another line to the .bashrc
export CCACHE_DIR=<path-to-your-cache-directory>
Now run this command once to initialize the Ccache
Code:
prebuilts/misc/linux-x86/ccache/ccache -M 15G
C. I built the ROM successfully. I flashed it too, but the WiFi is not working anymore. What can I do?
The efforts of the CyanogenMod devs can be considered work in progress. And so it happens that features get broken while trying to fix others...
If you suffer from this then take the file 'wireless.ko'. You find the file below as an attachment. Push or copy it to '/system/lib/modules' and overwrite the file with the same name there. Change the rights to 644 or rw- r-- r-- It's the same as read/write by owner, read by group and read by other.
Without reboot, you can switch on the WiFi now. And you should be back in the game. Thanks to p.valenta for confirmation that it is working.
D. I checked the free space of the system partition. There isn't any. What can I do?
Without changing the size of the system partition not so much. But you can squeeze out a few MBs by removing some files from the created ROM image:
E.g. all the videos in /system/media/video can be deleted.
You can erase the /system/media/bootanimation.zip if you want.
Check /system/media/audio/, there you can delete some ringtones you are not using.
And if you know what you are doing, you can even get rid of some .apk files from '/system/app'.
For example LiveWallpapers.apk, VisualizationWallpapers.apk, CMWallpapers.apk, MagicSmokeWallpapers.apk, HoloSpiralWallpaper.apk are expendable.
E. I don't want to use Sun's/Oracle's Java Development Kit. Can I use another one instead?
Yes, you can. But using Sun's version is recommended by Google and CyanogenMod for building ROMs. So consider yourself warned. You can use the OpenJDK 6 that you will find already on your system if you installed the necessary packages as shown above. What you finally need to do is checking which Java version is active.
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
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
Each time choose the OpenJDK6 variant.
Verify the symlinks: Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the new Java location:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
When everything you see says 'OpenJDK6' then you can build your ROM with the usual commands.
VII. Build your own ParanoidAndroid ROM based on CM10 for LG P990
IMPORTANT! THIS IS A FOLLOW-UP GUIDE THAT REQUIRES A WORKING BUILDING ENVIRONMENT.
Preparation
You need a tested and fully working building environment (Ubuntu 12.04/12.10, Java 6, etc.). If you do not have one already, please follow this guide throughly first and build a normal CM10 ROM from sources as a test. If everything works as it should, then you can proceed with the following lines.
ParanoidAndroid Environment
Let's start.
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.
Create a directory named 'paranoid' in your home folder
Code:
$ mkdir ~/paranoid
Initialize the Repo in your newly created directory:
Code:
$ cd ~/paranoid
$ repo init -u git://github.com/ParanoidAndroid/android.git -b jellybean
Before downloading the files you need to edit a file. One line leads to sync errors and has to be deleted from the file. Edit 'default.xml' in /paranoid/.repo/manifests/
(Hint if you can't see the .repo directory: it's hidden, so to make it visible press Ctrl+H) or use this line
Code:
$ gedit ~/paranoid/.repo/manifests/default.xml
Search (Ctrl+F) for 'ParanoidPreferences' and remove the whole line. Save and close the 'default.xml' file.
We need to add some LGE (P990) specific repositories as well. You can either copy the 'local_manifest.xml' file (it's the same!) from your cm10-build-environment or create a new file in /paranoid/.repo/
To create a new file use
Code:
$ gedit ~/paranoid/.repo/local_manifest.xml
Insert the following lines
Code:
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="jellybean"/>
<project name="CyanogenMod/android_device_lge_p990" path="device/lge/p990" remote="github" revision="jellybean"/>
<project name="CyanogenMod/android_device_lge_star-common" path="device/lge/star-common" remote="github" revision="jellybean"/>
<project name="CyanogenMod/lge-kernel-star" path="kernel/lge/star" remote="github" revision="jellybean"/>
<project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="jellybean"/>
</manifest>
Save it.
Sync the repositories (takes time!)
Code:
$ repo sync
Take a looong coffee break.
A few files
After the successful sync process go to 'paranoid/vendor/pa/products/'.
Create a new file with the name 'pa_p990.mk'
Code:
$ gedit ~/paranoid/vendor/pa/products/pa_p990.mk
Insert these lines:
(lines changed, xhdpi to hdpi, thanks rugglez)
Code:
# Check for target product
ifeq (pa_p990,$(TARGET_PRODUCT))
# Define PA bootanimation size
PARANOID_BOOTANIMATION_NAME := HDPI
# OVERLAY_TARGET adds overlay asset source
OVERLAY_TARGET := pa_hdpi
# include ParanoidAndroid common configuration
include vendor/pa/config/pa_common.mk
# Inherit CM device configuration
$(call inherit-product, device/lge/p990/cm.mk)
PRODUCT_NAME := pa_p990
GET_VENDOR_PROPS := $(shell vendor/pa/tools/getvendorprops.py $(PRODUCT_NAME))
endif
Save it.
Open 'AndroidProducts.mk' in 'paranoid/vendor/pa/products/' with
Code:
$ gedit ~/paranoid/vendor/pa/products/AndroidProducts.mk
and add these lines to then end of the file:
Code:
ifeq (pa_p990,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_p990.mk
endif
Save it.
Create a file called 'p990.proprietaries' in 'paranoid/vendor/pa/vendorprops/'
Code:
$ gedit ~/paranoid/vendor/pa/vendorprops/p990.proprietaries
Code:
[
{
"account": "TheMuppets",
"repository": "proprietary_vendor_lge",
"target_path": "vendor/lge",
"revision": "jellybean"
}
]
Save it.
Open 'vendorsetup.sh' in 'paranoid/vendor/pa/'
Code:
$ gedit ~/paranoid/vendor/pa/vendorsetup.sh
Add this line
Code:
add_lunch_combo pa_p990-userdebug
Save it.
Get CM Prebuilts
Now go to
Code:
$ ~/paranoid/vendor/cm/get-prebuilts
Building ParanoidAndroid
Ready to go! Build your ROM now with
Code:
$ cd ~/paranoid
$ ./rom-build.sh p990
The compiling takes around the same amount of time as when building CM10. Half an hour minimum, up to a few hours on slower systems. You will find your CWM flashable zip in 'paranoid/out/target/product/p990/'. It is called 'pa_p990-version-date-time.zip'
Rebuilding
Everytime you want to rebuild or build a new version, just change to the directory, resync the sources and start building:
Code:
$ cd ~/paranoid
$ repo sync
$ ./rom-build.sh p990
If you haven't enlarged your system partition yet, you have to delete some files or the ROM probably won't fit.
Deletable files
/system/media/: delete bootanimation.zip, saves 9.4 MB
/system/media/video/: delete all files, saves 6.4 MB
/system/media/audio/ringtones/: keep one or two, delete the rest, saves up to ~8 MB
You can even delete some system apps (.apk) from '/system/app/' like LiveWallpapers.apk, VisualizationWallpapers.apk, CMWallpapers.apk, MagicSmokeWallpapers.apk, HoloSpiralWallpaper.apk
I would personally love it if people included instructions for other distros. Not everything uses apt-get. That's kind of just me being nitpicky, but I've compiled CM9 on Archlinux with substituting a few things.
Also, what happened to the month of letting RC shine?
tetrahedonism said:
I would personally love it if people included instructions for other distros. Not everything uses apt-get. That's kind of just me being nitpicky, but I've compiled CM9 on Archlinux with substituting a few things.
Also, what happened to the month of letting RC shine?
Click to expand...
Click to collapse
Google their advice is to use ubuntu if you want to use a distros if your own choices you are probably advanced enough to change the instructions to your needs
And about Ricardo his month it is only a tut to compile it yourself you don't have to share it
Sent from my Galaxy Nexus using XDA Premium HD app
owain94 said:
Google their advice is to use ubuntu if you want to use a distros if your own choices you are probably advanced enough to change the instructions to your needs
And about Ricardo his month it is only a tut to compile it yourself you don't have to share it
Sent from my Galaxy Nexus using XDA Premium HD app
Click to expand...
Click to collapse
I guess I could always post my own adapted instructions! Maybe some day. Ahah.
As funny as it may seem to u, instructions to compile CM10 on different distro than Ubuntu would be highly appreciated. Not everyone uses Ubuntu (I do actually), so u may help someone trying to set it up on their distro...
Just my 2 cents....
tetrahedonism said:
I guess I could always post my own adapted instructions! Maybe some day. Ahah.
Click to expand...
Click to collapse
I think you should, and hey, please don't tempt us, share your things
Thanks for the tread as well raum1807
Great guide. This will probably let me make my own rom and share it on xda
Is it possible to compile on 32 bits system?
Sent from my LG-P990 using Tapatalk 2
slebit said:
Is it possible to compile on 32 bits system?
Sent from my LG-P990 using Tapatalk 2
Click to expand...
Click to collapse
No, 64 bits only
Sent from my LG-P990 using xda premium
HerrKuk said:
No, 64 bits only
Sent from my LG-P990 using xda premium
Click to expand...
Click to collapse
You mean it's impossible to compile on Ubuntu 12.04 32-bit ?
Litderose said:
You mean it's impossible to compile on Ubuntu 12.04 32-bit ?
Click to expand...
Click to collapse
If i've done my homework properly, yes
ICS and older are possible with 32bits though
Sent from my LG-P990 using xda premium
Hi, i'm trying to build following your guide.
I have a little problem with step 5.
When i put the line exactly like your
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac
I get fail, system told me they need prority in entire numeric. I get it work with this:
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac 1
Have to do the same with the other 2 commands.
Hope this help someone stucked.
Cheers,
eThAn
ethansp said:
Hi, i'm trying to build following your guide.
I have a little problem with step 5.
When i put the line exactly like your
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac
I get fail, system told me they need prority in entire numeric. I get it work with this:
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac 1
Have to do the same with the other 2 commands.
Hope this help someone stucked.
Cheers,
eThAn
Click to expand...
Click to collapse
Thank you for pointing me to that error. Somehow the priority got lost while pasting. I corrected it.
tetrahedonism said:
Also, what happened to the month of letting RC shine?
Click to expand...
Click to collapse
As owain already said, we devs have decided to wait for 3-4 weeks before using his work and releasing it as an "own" ROM.
This does only affect releasing a ROM, not building it.
I will always encourage everone to build their own ROM for their own purpose, there's nothing wrong with that. And you will learn a lot
slebit said:
Is it possible to compile on 32 bits system?
Sent from my LG-P990 using Tapatalk 2
Click to expand...
Click to collapse
HerrKuk said:
No, 64 bits only
Sent from my LG-P990 using xda premium
Click to expand...
Click to collapse
Litderose said:
You mean it's impossible to compile on Ubuntu 12.04 32-bit ?
Click to expand...
Click to collapse
HerrKuk said:
If i've done my homework properly, yes
ICS and older are possible with 32bits though
Sent from my LG-P990 using xda premium
Click to expand...
Click to collapse
HerrKuk is right. If you try to compile it on a 32-bit system you will see a lot of errors. As JBQ stated here, a 64-bit OS is mandatory.
Do any of you guys get working wi-fi on your kangs?
TrymHansen said:
Do any of you guys get working wi-fi on your kangs?
Click to expand...
Click to collapse
Is not working. I have too dead wifi. Stucks "activating WI-FI..."
I going to see logcat later and share here.
Good, thanks, was just wondering if I had to make a new build-system from scratch, I've re-used my old CM9-builder.
tonyp said:
As owain already said, we devs have decided to wait for 3-4 weeks before using his work and releasing it as an "own" ROM.
This does only affect releasing a ROM, not building it.
I will always encourage everone to build their own ROM for their own purpose, there's nothing wrong with that. And you will learn a lot
Click to expand...
Click to collapse
We all understand rest of the devs here are waiting for RC Shine, thats fine. But as these nightly builds are having too many annoying bugs liek slow battery charging, wifi-battery drain issue, screen wake issue, power button issue, which makes it impossible to even test, forget making it daily driver. In fact even some pals are not able to install it properly (4,5 builds). I dont understand why rest of the devs are not making fixes to these various issues in this nightlies. Other devs are expert who can understand this seperate issues and can make patches till a month, before actually making own custom roms.
Uptil now the fixes suggested by some members are either not working or even making it worse sometimes.
Devs, Please think again for your strong valuable expert fixes. How about a single file parmanent patch with all possible fixes? Will appreciate. Sorry if asking too much or out of protocol. I dont know much what you devs have decided long time back.
Was on the latest build from RC and on bb v20c and the ril which came with the build....wifi was working perfectly and I confirm without a big drain of battery....it was richly smooth
O2X with Magical ROM and supersonic kernels from my buddies

[HOWTO] Build CM10.1 for N7000, Nexus 4 and 7, Note II and Note II LTE

First of all, why would you want to do it when there are Nightlies to be dowloaded and flashed?
Let me quote Rec Dev fattire here:
fattire said:
Off the top of my head...
You never, ever have to wait for a nightly
You can add or remove as-yet uncommitted features with ease.
You learn how Android works under the hood
You learn how to use Linux
You'll learn how to use git
You may, even accidentally, pick up a little C, Java, C++, and learn about the build system.
You can personalize Android-- make your own tweaks, modules, graphics, add or remove projects etc. In other words, you have control over every aspect of your device's functionality. Your build is custom to you.
You can audit the code for potential security issues such as back doors or trojans (as opposed to just trusting a random person who posts a build). Since CM10 source is open, you can examine every commit, and there are many eyes looking at the code. (does not apply to proprietary blobs, but these are pulled from your device, so you have and are using them already)
You can contribute features/fixes back upstream
You can start ports to other as-yet-unsupported devices (start by copying folders from similar devices to devices/manufacturer/model)
You come to really understand that Android phones and tablets are full-fledged general-purpose computers just like laptops and desktops.
AAAAND....you get huge bragging rights
The extent to which you delve into the above is entirely up to you. The walkthrough is just an introduction to that world. Some people will build once and never do it again... but others will start to tinker and make changes to their own build and want to share them with others, and soon some will start making contributions back to official CM10 upstream... or port to new devices... and by fixing bugs and all this... everyone benefits.
Plus...
It's fun.
Click to expand...
Click to collapse
Hardware Requirements
You'll need a computer configuration that is not too shabby to pull this off; also you'll need a decent Interweb connection to download all that is needed.
Here are some hardware examples:
Utacka
Ahalford
Anti
Me
In other words, you need to have a box capable of doing some crunching. The better the PC, the faster the compile and vice-versa.
As for the Internet connection, you have to pull about 13 Gb of tiny files in the first CM10.1 sync, and additional 2-3 Gbs in your second sync.
Trying to do it on a 512Kb/s connection is an exercise in futility.
Setting up the Build Environment
First things first: you need to download and install 64-bit version of Ubuntu 12.04. A 32-bit one won't cut it.
Installed it? Good, let's move on.
Now do a system update; click that little switch icon in the top right hand corner and you'll get a menu. Launch Update Manager and install everything it finds.
Now that your Ubuntu is up to speed you need to download and install some more stuff. Launch the terminal (Ctrl + Alt + T).
Copy the below code and paste it (right-click and paste or Shift + Insert, Ctrl + V doesn't work) in the terminal, hit enter.
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev libxml2-utils
If 'lib32ncurses5-dev' fails, delete it from the list, install everything else.
Now you need to add the following repos, again copy/paste each line into the terminal, hit enter. Repeat for each line of the code below.
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Code:
sudo apt-get update
Now you are going to install Synaptic.
Code:
sudo apt-get install synaptic
Done? Good.
Click the 'Dash Home' button (top left hand corner of your desktop), find and launch Synaptic Package Manager. Search for 'Sun Java6 JDK' and install it will all the dependencies except sun-java6-demo and sun-java6-doc.
Now go to http://developer.android.com/sdk/index.html and download the linux version of the Android SDK. It provides the API libraries and developer tools necessary to build. When your download is done, open it with Archive Manager, extract it somewhere, and move the extracted folder to your Home folder. Rename it to 'SDK' for simplicity.
Now you need to download and install Android SDK Platform Tools. Use file manager to navigate to your SDK sub-folder Tools. Find 'android' and double-click to run it. You'll be asked what you want to download. Choose the 'Platform Tools' and the Android 4.1.2 SDK Level 16 and the Android 4.2 SDK level 17 Dev tools and hit install. Let it download; it might take some time, depending on your download speed.
Now the time is ripe for you to setup your Android repos. Copy/paste the following commands into the terminal, hit enter after each one.
Code:
mkdir -p ~/bin
Code:
mkdir -p ~/cm10.1
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Code:
export PATH=~/bin:$PATH
You have to reboot after this for changes to take effect.
Initial Repo, local_manifest
Once reboobed, open the terminal once again and do this:
Code:
cd cm10.1
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
Your initial sync will take some time. After it is is done, go to your cm10.1/.repo folder (/.repo is hidden, so press Ctrl + H in your file manager for it to show up). Create a
subfolder called local_manifests in /.repo. Then create a blank document called roomservice.xml in /.repo/local_manifests. Copypasta™ the below code into roomservice.xml,
save it, close the document.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_n7000" path="device/samsung/n7000" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />
</manifest>
Click to expand...
Click to collapse
NOTE: All in the above posts needs to be done only once, prior to compiling your first build.
For all your subsequent builds you'll have to do just the steps listed in the next posts.
Start the Build
It's time for you to do another repo sync to pull Samsung device-specific stuff.
Code:
repo sync
This sync is going to be considerably shorter than the first one. After it is done, it's time for you to start the build.
Code:
~/cm10.1/vendor/cm/get-prebuilts
. build/envsetup.sh
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G
brunch n7000
If everything goes right, you should see this at the end of the compile:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Your cm10.1 rom zip will be in cm10.1/out/target/product/n7000 folder.
This is how it looks when the build gets going:
Subsequent Builds
You'll want to do another build tomorrow once your first one has gone through fine.
There are two ways you can go about it.
#1: do a
Code:
cd cm10.1
repo sync
export USE_CCACHE=1
~/cm10.1/vendor/cm/get-prebuilts
. build/envsetup.sh
brunch n7000
The build system should notice which source files have changed and need rebuilding, and should only build the new stuff. This is what you might want to do when there were no major changes in the merged commits here: http://review.cyanogenmod.org/#/q/status:merged,n,z
However, what I always do and would always recommend
#2:
Code:
cd cm10.1
make clean
repo sync
~/cm10.1/vendor/cm/get-prebuilts
. build/envsetup.sh
brunch n7000
'make clean' command will delete your whole /out folder, and your new build will start from scratch. Instead of 'make clean' you can also use 'make clobber'; the difference between the commands is explained here.
There is a way to completely automate your compiling process à la CyanogenMod's Jenkins. You can learn how from AndroidSlave here: http://forum.xda-developers.com/showthread.php?p=46110939
Cherry Picking
***Cherry picking from CM Gerrit***
This is one of the perks of compiling CM10.1 yourself. Official nightlies have a lot of features, but there's also a lot of stuff waiting for a review on Gerrit.
You can follow the commits waiting to be reviewed and merged into the main repo here: http://review.cyanogenmod.org/#/q/status:reviewed,n,z
You can cherry-pick anything from the upcoming features and incorporate it into your Rom before the official CM10.1 does the same.
Let's say that you want to have this commit before it becomes merged: http://review.cyanogenmod.org/30878
The commit says:
Code:
Project CyanogenMod/android_packages_apps_LockClock
It's quite simple to do that. Fire up the Terminal (Ctrl + Alt + T) and navigate to your LockClock folder.
Code:
cd cm10.1/packages/apps/LockClock
In other words you must be in the same folder as stated in 'Project' for cherry-picking to work.
Now minimize the terminal (don't close it) and switch to the Gerrit page in your browser.
http://review.cyanogenmod.org/#/c/30878/
Click on cherry-pick button here.
Then click several times on the little clipboard icon at the end of the cherry-pick URL.
This automagically copies the cherry-pick URL into your clipboard. Now, go back to your terminal, paste the cherry-pick URL in it and hit enter.
That is all: the commit will get pulled and incorporated into your local repo. You are ready to compile a build which will contain the feature you have just cherry-picked.
***Cherry-picking from Github***
http://forum.xda-developers.com/showpost.php?p=42486858&postcount=449
How to compile CM10.1 for Nexus 4
If you have never built CM10.1 then you need to do everything from post #3 here, and this part
Code:
cd cm10.1
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
from post #4.
After the initial repo sync is done, now comes the Nexus 4 specific bit. As stated before, go to your cm10.1/.repo folder and create a blank document called local_manifest.xml. Paste the below code into local_manifest.xml, save it, close the document.
If you already have local_manifest.xml with n7000 stuff in it, then just add all the lines beginning with <project name= from below to it, save and exit Gedit.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_lge_mako" path="device/lge/mako" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/lge-kernel-mako" path="kernel/lge/mako" remote="github" revision="jellybean" />
</manifest>
Click to expand...
Click to collapse
Now do the second repo sync to pull Nexus 4 specific stuff.
Code:
repo sync
Do the following after the second sync has gone through.
Code:
~/cm10.1/vendor/cm/get-prebuilts
Now it's time to start the build.
Code:
. build/envsetup.sh
export USE_CCACHE=1
brunch mako
That's it. Wait for the build to get compiled and flash your CM10.1_UNOFFICIAL_mako.zip from cm10.1/out/target/product/mako folder.
How to compile CM10.1 for Note II LTE (t0lte)
If you have never built CM10.1 then you need to do everything from post #3 here, and this part
Code:
cd cm10.1
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
from post #4.
After the initial repo sync is done, now comes the Note II LTE specific bit. As stated before, go to your cm10.1/.repo folder and create a blank document called local_manifest.xml. Paste the below code into local_manifest.xml, save it, close the document.
If you already have local_manifest.xml with n7000 stuff in it, then just add all the lines beginning with <project name= from below to it, save and exit Gedit.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_t0lte" path="device/samsung/t0lte" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />
</manifest>
Click to expand...
Click to collapse
Note: you might already have some of the lines in your local_manifest.xml if you have compiled a build for n7000. If that's the case, skip adding the lines you already have.
Now do the second repo sync to pull Note II specific stuff.
Code:
repo sync
Do the following after the second sync has gone through.
Code:
~/cm10.1/vendor/cm/get-prebuilts
Now it's time to start the build.
Code:
. build/envsetup.sh
export USE_CCACHE=1
brunch t0lte
That's it. Wait for the build to get compiled and flash your CM10.1_UNOFFICIAL_mako.zip from cm10.1/out/target/product/t0lte folder.
Reserved
How to set up a build environment in Ubuntu 13.04:
http://forum.xda-developers.com/showthread.php?t=2224142
Discarding Failed or Unwanted Cherry Picks
If you want to get rid of something you have cherry-picked this is what needs to be done.
We'll stick to the cherry-picking example described in the previous post.
Start the Terminal and navigate to the folder containing your unwanted cherry-pick, in this case LockClock.
Code:
cd cm10.1/packages/apps/LockClock
From here you need to persuade Git to discard the cherry-picked thing. Do this:
Code:
git reset --hard
And that is that.
However, sometimes git has its quirks and doesn't want to do what it's been told. If that is the case, you'll get warnings when doing your next repo sync.
If that happens, repeat the two steps from above and delete the top folder where your cherry-pick was located. In this case, it is /packages.
Do the repo sync again and the folder will be redownloaded and stored on your machine in pristine state.
How to compile CM10.1 for Nexus 7
If you have never built CM10.1 then you need to do everything from post #3 here, and this part
Code:
cd cm10.1
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
from post #4.
After the initial repo sync is done, now comes the Nexus 7 specific bit. Do this:
Code:
~/cm10.1/vendor/cm/get-prebuilts
. build/envsetup.sh
breakfast grouper
This will download the device specific configuration and kernel source for your device.
Now it's time to extract proprietary blobs from your tablet.
Go to your grouper CM10.1 folder.
Code:
cd cm10.1/device/asus/grouper
Connect your Nexus 7 to the computer using USB cable. Make sure that adb debugging is on in Developer's Options. Now paste this into the terminal:
Code:
./extract-files.sh
If you get adb errors, that means that adb is not in the path of execution. Close the terminal, start your file manager and when in your /home folder press Ctrl + H for hidden stuff to appear. Open .bashrc file with Gedit and add the following line at the end of the code:
Code:
export PATH=${PATH}:/<your path to sdk>/platform-tools
(My <path to sdk> looks like this: export PATH=${PATH}:/home/chasmodo/android-sdk/sdk/platform-tools)
Save the file, open a new terminal window, go to cd cm10.1/device/asus/grouper and repeat
Code:
./extract-files.sh
The adb command should now be available and your blobs pulled. After this has been done go back to cm10.1 folder and start the build.
Code:
cd ~/cm10.1 (or croot, same thing)
export USE_CCACHE=1
brunch grouper
After the compile goes through, your CM10.1_UNOFFICIAL_grouper.zip will be waiting for you in cm10.1/out/target/product/grouper folder.
How to compile CM10.1 for Note II (n7100)
If you have never built CM10.1 then you need to do everything from post #3 here, and this part
Code:
cd cm10.1
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
from post #4.
After the initial repo sync is done, now comes the Note II specific bit. As stated before, go to your cm10.1/.repo folder and create a blank document called local_manifest.xml. Paste the below code into local_manifest.xml, save it, close the document.
If you already have local_manifest.xml with n7000 stuff in it, then just add all the lines beginning with <project name= from below to it, save and exit Gedit.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_n7100" path="device/samsung/n7100" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />
</manifest>
Click to expand...
Click to collapse
Note: you might already have some of the lines in your local_manifest.xml if you have compiled a build for n7000. If that's the case, skip adding the lines you already have.
Now do the second repo sync to pull Note II specific stuff.
Code:
repo sync
Do the following after the second sync has gone through.
Code:
~/cm10.1/vendor/cm/get-prebuilts
Now it's time to start the build.
Code:
. build/envsetup.sh
export USE_CCACHE=1
brunch n7100
That's it. Wait for the build to get compiled and flash your CM10.1_UNOFFICIAL_mako.zip from cm10.1/out/target/product/n7100 folder.
thumbs up, really appreciate sharing your knowledge :good:
Re: [HOWTO] Build CM10.1 for N7000
I build on the first gen i7 @ 2.0ghz, 8gigs of ram, 120gig SSD, clean compile is about 30-35 min.
My next machine will be a i7 @ 3.4, 16gigs of ram and 250gig SSD
I suggest a minimum of an i3 with 8gigs of ram, otherwise you'll be compiling for hours.
Then reason I suggest that as a minimum is because if for instance you cherry pick something, that breaks the build, you'll need to revert that pick and re build. It could be a very time consuming process.
This is great~!
i'm going to have to try this out haha... ubuntu in a VM environment on an i7 + 256gb ssd
hope you're up for questions guys haha :silly:
happiboi said:
This is great~!
i'm going to have to try this out haha... ubuntu in a VM environment on an i7 + 256gb ssd
hope you're up for questions guys haha :silly:
Click to expand...
Click to collapse
Of course we are up for questions, that's why this thread is here.
chasmodo said:
Of course we are up for questions, that's why this thread is here.
Click to expand...
Click to collapse
Excellent Article.
Hmmmm now where did i keep my Computer
Odp: [HOWTO] Build CM10.1 for N7000
Thanks for tutorial Chas
Wysłane z mojego GT-N7000 za pomocą Tapatalk 2
great thing ... short, precise .... Keep it up Chas

[GUIDE-HOW TO] Project Rookie III - ROM Building steps, tricks and tips for M7SPR [4.4] [WIP]

[GUIDE-HOW TO] Project Rookie III - ROM Building steps, tricks and tips for M7SPR [4.4] [WIP]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Welcome
This is a guide for all those who want to build for their Sprint HTC ONE but do not neccesasarily have the knowledge or experience.
This is an unofficial guide for the building of custom ROMs and other mods for the Sprint HTC ONE (M7SPR or M7WLS). This is a work in progress, with additions being made as often as possible. This thread has already grown with the help of the devs established in this forum. I began this project a year ago when I was using a Samsung GS II Skyrocket. I started another alike thread called PR II in the LGOG forum a while back as well. I have since moved on to a ONE, but both threads remain to this day. The point is this: everyone who uses this site has a desire for modding, customizing, and/or otherwise altering their device. Unfortunately, many have no idea how to go about doing these things for themselves. As such, there is a lot of dissatisfaction among developers about receiving constant demands, suggestions, and requests for updates. This thread is meant to give those who want to step up and build for themselves the means to do so. It is an ever-changing thread, with all assistance welcomed.
READ ME:
On one hand, it should go without saying that if you have no knowledge and/or experience with building, java, C++, and various other tools, you probably shouldn't begin here. At the same time, it is possible to learn to build, provided you can read, follow directions, and aren't too lazy to RESEARCH.
OH YEAH, and you better have patience. This isn't easy. It will be work. The quickest way to get flamed is to show yourself to be lazy. If you think that with a couple clicks, you can have your own flashy ROM, forget it. But, if you do want to learn, this is a good place to get started. I have no ego about this; I started the same way and just want to help everyone learn to build their own ROM. But, everyone will struggle to get to a successful point, and lazy, unmotivated people just irritate those who have had to learn from scratch too. Tutorials will be posted for any new thing learned and built as time and space allow. ALL ARE WELCOME AND ALL QUESTIONS ARE TOO. But, seriously, if it's a really ridiculous one, I/we reserve the right to screw with you about it.
ALWAYS REMEMBER:
Thread Disclaimer:
The instructions and extras posted here are to be used at your own risk. I am working hard to provide good, workable tutorials that will make successful building much easier. Nevertheless, I am not responsible if you lose your files, brick your device, or inadvertently cause a nuclear war. If you are seeking absolute perfection, RUN NOW WHILE YOU STILL CAN!!
Building instructions are in post #1 - Build fixes and tips are in post #2 - All relevant tutorials are in post #3 - Kernel building, CCACHE, and other steps and tips are in post #4
GETTING STARTED
Setting up your environment :
This is a combination of the steps offered in the threads 'Compile JB on Ubuntu' and TeamChopsticks CyanogenMod.
Special thanks to dastin1015 and TeamChopsticks.
Tip: Allocate at least 75 gigs of space for the building of ONE ROM. If you install ccache, you will want 90. A complete build directory can use as much as 100 gigs, so make sure you have plenty of room. One of the ways to fail out a build is too use all of your partition before acquiring all the necessary files.
Here are the steps from those 2 tutorials in correct order:
1) You need the following:
-JDK 6 if you wish to build Jellybean or KitKat.
Code:
[COLOR="Black"]$ sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
[/COLOR]
and:
-Python 2.4 -- 2.7, which you can download from python.org.
Code:
[COLOR="black"]$ sudo apt-get install python
[/COLOR]
and:
-Git 1.7 or newer. You can find it at git-scm.com.
Code:
[COLOR="black"]$ sudo apt-get install git-core[/COLOR]
-Android SDK:
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to – this tutorial assumes you've done that as well.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file:
Code:
[COLOR="black"]# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin[/COLOR]
Find your .profile file and add this at the bottom of the file:
Code:
[COLOR="black"]PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.[/COLOR]
To check for updates issue this into your terminal:
Code:
[COLOR="black"]$ android[/COLOR]
2) Install required packages. 64-bit (recommended)
Code:
[COLOR="black"]$ 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 lzop schedtool[/COLOR]
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
[COLOR="black"]$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so[/COLOR]
Code:
[COLOR="black"]$ 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-glx:i386
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so[/COLOR]
3) Configure your USB.
Code:
[COLOR="black"]$ gksudo gedit /etc/udev/rules.d/51-android.rules[/COLOR]
Inside of this blank text file insert:
Code:
[COLOR="black"]#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"[/COLOR]
4) Save the file and close it and then issue this command:
Code:
[COLOR="black"]$ sudo chmod a+r /etc/udev/rules.d/51-android.rules[/COLOR]
5) Install the repo:
Code:
[COLOR="black"]$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo[/COLOR]
Create your work directory:
Code:
[COLOR="black"]mkdir ~/"your directory name here" For example: mkdir ~/cm10
cd ~/cm10[/COLOR]
Setup local manifest:
Code:
[COLOR="Black"]mkdir .repo/local_manifests
touch .repo/local_manifests/local_manifest.xml
nano .repo/local_manifests/local_manifest.xml[/COLOR]
A local manifest is your chance to remove/add packages to the repo before you sync.
This is what you need for your build environment. From here, the various types of ROM styles can be built with a few additions and commands.
Unofficial
To get started with Android/CyanogenMod, you'll need to get familiar with Git and Repo.
To initialize your local repository using the CyanogenMod trees, use a command like this:
Code:
[COLOR="black"]repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Please see the CyanogenMod Wiki for building instructions.
For more information on this Github Organization and how it is structured, please read the wiki article.
Create and edit roomservice.xml in .repo:
Code:
[COLOR="black"]gedit /.repo/local_manifests/roomservice.xml[/COLOR]
Add this to the roomservice.xml:
Code:
[COLOR="Black"]
<manifest>
<project name="CyanogenMod/android_device_htc_m7-common" path="device/htc/m7-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_m7spr" path="device/htc/m7spr" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_m7" path="kernel/htc/m7" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>[/COLOR]
then
Code:
[COLOR="Black"]repo sync[/COLOR]
Code:
[COLOR="black"]. build/envsetup.sh (notice the period and space)
vendor/cm/get-prebuilts
repo sync -j16[/COLOR]
then
Code:
[COLOR="Black"]CM_EXTRAVERSION=mycustombuild CM_SNAPSHOT=1 brunch cm_m7spr-userdebug[/COLOR]
Unofficial
Special thanks to scott.hart.bti for his hard work -
From terminal
1. type
Code:
[COLOR="black"]cd[/COLOR]
.
This will bring you to your root folder.
2. type
Code:
[COLOR="black"]mkdir beanstalk[/COLOR]
.
This will create a folder named beanstalk.
3. type
Code:
[COLOR="black"]cd beanstalk[/COLOR]
.
This will take you to the beanstalk directory created from previous step
4. type
Code:
[COLOR="black"]repo init -u git://github.com/scotthartbti/android.git -b kk44[/COLOR]
.
This will setup the folders to be synced.
5. type
Code:
[COLOR="black"]repo sync[/COLOR]
.
This will sync the folders to your beanstalk directory. Note - This will take some time depending on internet connection. Be patient!
6. Within your .repo folder(control+H in your root build files), create a 'local manifests' folder. Within that folder, create a 'local_manifest.xml' doc.
7. Open that new, blank XML doc with Text Editor and paste in your local_manifest code:
Code:
[COLOR="Black"]
<manifest>
<project name="CyanogenMod/android_device_htc_m7-common" path="device/htc/m7-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_m7spr" path="device/htc/m7spr" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_m7" path="kernel/htc/m7" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>[/COLOR]
8. Save and exit
9. Outside of terminal, navigate to beanstalk/vendor/cm. Double click on the get-prebuilts file and select run in terminal. This will fetch necessary files needed to build and place them where they need to be.
10. Type
Code:
[COLOR="Black"]. build/envsetup.sh && brunch m7spr[/COLOR]
11. Previous step will start building beanstalk for your device. The process takes anywhere from 1 - 3 hours depending on your computer.
12. Once completed, it will say package complete and you will have a beanstalk named zip file in your out folder.
Unverified
Unofficial
Special thanks to MallardDuck for sharing this information
To get started with Android/PACman Rom, you'll need to get familiar with Git and Repo.
First Make your Pac directory and initilize the repo with the following commands:
Code:
[COLOR="Black"]mkdir pacrom && cd pacrom[/COLOR]
Code:
[COLOR="black"]repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Wait, but once you're done waiting feel free to move on...
Once properly synced the next step is to sync device files and to compile; which with PAC is all one step.
Simply,
Code:
[COLOR="black"]./build-pac -j# m7spr[/COLOR]
Where # is the number of cores you have.
This command will thriger the pac build scrpt that will then download the needed device trees and begin compiling.
Unverified
Unofficial
Special thanks to spleef and ktempleman for laying this out
This set of instructions is unverified. If you build successfully or have build issues, please post here so we can confirm or fix what isn't working
First:
Code:
[COLOR="Black"]mkdir aokp[/COLOR]
then
Code:
[COLOR="black"]cd aokp[/COLOR]
then
Code:
[COLOR="black"]repo init -u https://github.com/AOKP/platform_manifest.git -b kk[/COLOR]
after it does its thing
Code:
[COLOR="black"]mkdir .repo/local_manifests
touch .repo/local_manifests/local_manifest.xml
nano .repo/local_manifests/local_manifest.xml[/COLOR]
then add these lines to the aokp local manifest:
Code:
[COLOR="black"]
<manifest>
<project name="CyanogenMod/android_device_htc_m7-common" path="device/htc/m7-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_m7spr" path="device/htc/m7spr" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_m7" path="kernel/htc/m7" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>
[/COLOR]
save and exit then
Code:
[COLOR="black"]repo sync[/COLOR]
after everything syncs
Code:
[COLOR="black"]nano vendor/aokp/vendorsetup.sh[/COLOR]
and add this to the bottom:
Code:
[COLOR="black"]add_lunch_combo aokp_m7spr-userdebug[/COLOR]
save and exit.. then
Code:
[COLOR="black"]. build/envsetup.sh[/COLOR]
Code:
[COLOR="black"]lunch[/COLOR]
Code:
[COLOR="black"]make otapackage[/COLOR]
For more on AOKP building, try here: http://aokp.co/learn/so-you-want-to-build-aokp-jb-ubuntu-1204
And Here: https://github.com/AOKP
Unofficial
Getting Started
To get started with the Carbon-Dev sources, you'll need to get familiar with Git and Repo.
Create the Directories
You will need to set up some directories in your build environment.
To create them run:
Code:
[COLOR="black"]mkdir -p ~/bin[/COLOR]
Code:
[COLOR="black"]mkdir -p ~/carbon[/COLOR]
Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
[COLOR="black"]curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo[/COLOR]
Code:
[COLOR="black"]chmod a+x ~/bin/repo[/COLOR]
You may need to reboot for these changes to take effect. Now enter the following to initialize the repository:
Code:
[COLOR="black"]cd ~/carbon[/COLOR]
Repositories:
Before you continue --> run this in the terminal
Code:
[COLOR="black"]repo init -u https://github.com/CarbonDev/android.git -b kk && repo sync -f[/COLOR]
PLEASE NOTE THAT YOU MUST USE THE -f flag when repo syncing/initializing if you want to sync with our default -j4 setup as android.googlesource seems to like to reject your requests if you set your -jflag too high. if you wish to avoid this issue run it repo sync -j1 otherwise -f (force) is reccomended so it will resync the repos it gets error codes on. Thank you and have a nice day.
Building the System
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.
Code:
[COLOR="black"]. build/envsetup.sh[/COLOR]
Code:
[COLOR="black"]lunch[/COLOR]
Enter the number of the build you want to start and press enter
Build the Code:
Code:
[COLOR="black"]make carbon -j7 = Run Squisher/Run Opticharger[/COLOR]
Code:
[COLOR="Black"]make otapackage -j7 = No Squisher/No Opticharger[/COLOR]
Unofficial
Getting Started
From terminal
1. type
Code:
[COLOR="black"]cd[/COLOR]
.
This will bring you to your root folder.
2. type
Code:
[COLOR="black"]mkdir cfx[/COLOR]
.
This will create a folder named beanstalk.
3. type
Code:
[COLOR="black"]cd cfx[/COLOR]
.
This will take you to the cfx directory created from previous step.
4. Then: - From the CFX git, found here: https://github.com/codefireXperiment/android_manifest
To get started with codefireX(periment), you'll need to get familiar with Git and Repo.
Click to expand...
Click to collapse
Init core trees without any device/kernel/vendor :
Code:
[COLOR="Black"]$ repo init -u git://github.com/codefireXperiment/android_manifest.git -b kk-devel[/COLOR]
Init repo with all devices, kernels and vendors supported by codefireXperiment :
Code:
[COLOR="black"]$ repo init -u git://github.com/codefireXperiment/android_manifest.git -b kk-devel -g all,kernel,device,vendor[/COLOR]
Init repo only for a particular device :
Code:
[COLOR="black"]$ repo init -u git://github.com/codefireXperiment/android_manifest.git -b kk-devel -g all,-notdefault,<devicename>,<vendorname>[/COLOR]
for example, to init only trees needed to build mako :
Code:
[COLOR="black"]$ repo init -u git://github.com/codefireXperiment/android_manifest.git -b kk-devel -g all,-notdefault,mako,lge[/COLOR]
Init repo for multiple devices :
Code:
[COLOR="black"]$ repo init -u git://github.com/codefireXperiment/android_manifest.git -b kk-devel -g all,-notdefault,<devicename1>,<devicename2>,<devicename3>,<vendorname1>,<vendorname2>,<vendorname3>[/COLOR]
for example, to init trees needed to build mako and grouper :
Code:
[COLOR="black"]$ repo init -u git://github.com/codefireXperiment/android_manifest.git -b kk-devel -g all,-notdefault,mako,grouper,lge,asus[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
This will sync the folders to your cfx directory. Note - This will take some time depending on internet connection. Be patient!
5. Within your .repo folder(control+H in your root build files), create a 'local manifests' folder. Within that folder, create a 'local_manifest.xml' doc.
6. Open that new, blank XML doc with Text Editor and paste in your local_manifest code:
Code:
[COLOR="Black"]
<manifest>
<project name="CyanogenMod/android_device_htc_m7-common" path="device/htc/m7-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_m7spr" path="device/htc/m7spr" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_m7" path="kernel/htc/m7" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>[/COLOR]
7. Save and exit
8. Sync again....
Code:
[COLOR="black"]repo sync[/COLOR]
9. Issue build commands:
Code:
[COLOR="black"]. build/envsetup.sh[/COLOR]
Code:
[COLOR="black"]lunch full_m7spr-codefirex && mka bacon[/COLOR]
Unofficial
Special thanks to gimmeitorilltell for laying this out
Getting Started
From terminal
type
Code:
[COLOR="black"]cd[/COLOR]
.
This will bring you to your root folder.
type
Code:
[COLOR="black"]mkdir mokee[/COLOR]
.
This will create a folder named mokee.
type
Code:
[COLOR="black"]cd mokee[/COLOR]
.
This will take you to the mokee directory created from previous step.
Then, to sync up the sources:
Code:
[COLOR="Black"]repo init -u git://github.com/MoKee/android.git -b kk_mkt[/COLOR]
and:
Code:
[COLOR="black"]repo sync[/COLOR]
After source finishes, type
Code:
[COLOR="black"]vendor/mk/get-prebuilts[/COLOR]
- this is a quick download here.
Now it's time for your device tree; if the device is not supported yet by mokee then you'll need to do something like this to make your repo pull in your device trees.
Create an xml file, it can be named "anything.xml" so long as it is a ".xml".
Code:
[COLOR="black"]<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github" fetch="git://github.com" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>[/COLOR]
This .xml needs to placed in your .repo folder ina folder of its own called <local_manifests>.
NOTICE the remote name to fetch "github"? That's the special fetch we need for mokee - DON'T forget the rest of your device tree if mokee does not support it. Below is an example of what mokee does support & you'll see that we don't need the github url for our manifest to fetch these trees:
Code:
[COLOR="black"]<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="MoKee/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="mokee" revision="kk_mkt" />
<project name="MoKee/android_device_htc_m7-common" path="device/htc/m7-common" remote="mokee" revision="kk_mkt" />
<project name="MoKee/android_vendor_htc_m7-common" path="vendor/htc/m7-common" remote="mokee" revision="kk_mkt" />
<project name="MoKee/android_vendor_htc_m7spr" path="vendor/htc/m7spr" remote="mokee" revision="kk_mkt" />
<project name="MoKee/android_kernel_htc_m7" path="kernel/htc/m7" remote="mokee" revision="kk_mkt" />
</manifest>[/COLOR]
After getting everything setup you want to set the output of your rom. Find the "mk" file in the root of your source. You WILL need to open your source folder with "root" perms to change the "mk" file. Go to line 67 & delete the "#" before this writing "OUT_DIR=/mokee/out/target/product/$DEVICE" .
Code:
[COLOR="black"]# if you set another OUT_DIR,set this before use.
#OUT_DIR=/mokee/out/target/product/$DEVICE
if [ "mk$OUT_DIR" == "mk" ][/COLOR]
You want to type in "repo sync" again to grab the device trees, once this finishes you're ready to start compiling.
Type
Code:
[COLOR="black"]. build/envsetup.sh && breakfast <device name> && ./mk <device name>[/COLOR]
without the quotations, of course you'll want to put your devices name in that you wish to build for.
This is a work in progress. Many more pieces of information will be added and this is meant to be an ever-changing thread. If you see something that is outdated or incorrect, please let me know ASAP, so I can make the correction. Also, make sure that any info offered can be and has been confirmed as functional.
Thanks to:
CyanogenMod
scott.hart.bti
Team Carbon
david279
MallardDuck
ktempleton
AdhvanIt
matthew0776
spleef
M4570D0N
car vs driver
gimmeitorilltell
​
XDA:DevDB Information
Project Rookie III, a Tool/Utility for the Sprint HTC One
Contributors
BMP7777
Version Information
Status: Testing
Created 2013-10-09
Last Updated 2014-01-22
Tips, patches, fixes and workarounds for all 4.3 building
Patches
IR Blaster commit for IR remote capability w/ custom ROMs- http://review.cyanogenmod.org/#/c/48638/ - use patch #4
​
Links for all relevant topics:
Here are some relevant topics/tutorials/sites:
Download | Ubuntu - www.ubuntu.com/download
Official Ubuntu Documentation: Help for all versions. - https://help.ubuntu.com/
How To Windows Dual Boot: - https://help.ubuntu.com/community/WindowsDualBoot
How To Use The Terminal: Commandline stuff. - https://help.ubuntu.com/community/UsingTheTerminal/
[HOW TO] Beginners Guide to Android ROM Development - http://forum.xda-developers.com/showthread.php?t=1272270 (courtesy of isidromxz)
[Tutorial] Compile JB on Ubuntu - http://forum.xda-developers.com/showthread.php?t=1762641 (courtesy of dastin1015)
[CM10] [PPA] Cyanogenmod Compiler v0.6 - http://forum.xda-developers.com/showthread.php?t=1789190 (courtesy of lithid-cm)
[Wiki] How to: Gerrit - http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit
[Wiki] How to: Git - http://wiki.cyanogenmod.com/wiki/Howto:_Git
[Wiki] How to: Connect to device with SSH - http://wiki.cyanogenmod.com/wiki/Howto:_Connect_to_Device_with_SSH
Here is an easy-to-use page on common Linux commands: - http://www.pixelbeat.org/cmdline.html
Linux Newbie Guide : - http://www.unixguide.net/linux/linuxshortcuts.shtml
Also, Team Chopsticks has a good page with some useful tips as well, located here:
http://www.teamchopsticks.org/p/contributing.html (thanks to bdusmc for the tip)
Here is a link to LIFEHACKER's command line tutorials. Very good stuff!! : http://lifehacker.com/5743814/become-a-command-line-ninja-with-these-time+saving-shortcuts
CyanogenMod git : - https://github.com/CyanogenMod
HTC-msm8960 git : - https://github.com/htc-msm8960
Original Beanstalk thread : - http://forum.xda-developers.com/showthread.php?t=2091900
Beanstalk git : - https://github.com/scotthartbti?tab=repositories
The Muppets git : - https://github.com/TheMuppets
​
KERNEL BUILDING and other EXTRAS
Building your first kernel
(this is non-device-specific; tweaks will be required to produce an M7SPR kernel) :
This is a set of steps to get you building your first kernel. Special thanks to thewadegeek for putting this tutorial together. His thread can be found here: http://forum.xda-developers.com/showthread.php?t=1748297
Step 1. Build Environment
A. Install Ubuntu 12.04(Not holding your hand here, if you can't do this you shouldn't be messing with kernels)
B. Required packages: git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib, and Adb.
C. Open a terminal
D. Type
Code:
[COLOR="black"]mkdir android[/COLOR]
E. Type
Code:
[COLOR="black"]cd android[/COLOR]
G.Type
Code:
[COLOR="black"]mkdir kernel[/COLOR]
Step 2. Your Source
A. Open your Terminal Prompt
B. Type
Code:
[COLOR="black"]cd android/kernel[/COLOR]
C. Type
Code:
[COLOR="black"]git clone git://github.com/DooMLoRD/android_prebuilt_toolchains.git toolchains[/COLOR]
D. Now comes the tricky part, you need to have some-type of source for your kernel. Check the following two sites for your device as appropriate. Once you have it download it is extracted/cloned into a folder in your kernel directory.
http://www.htcdev.com/
http://opensource.samsung.com/
.http://developer.sonymobile.com/wpor...ads/opensource
http://www.lg.com/global/support/ope...opensource.jsp
Step 3. Modifications
This is the part people are curious about, they want to make modifications to the kernel to make it "special". Start all these from the root directory of your kernel source.
Mod 1. Applying a patch
A. Download the patch you wish to apply, in this case this one should work.
B. Save that file as "kernelPatch" in your kernel directory.
C. Open a Terminal
D. Move into the root directory of the kernel you wish to patch.
E. Type
Code:
[COLOR="black"]patch -p1 < ../kernelPatch[/COLOR]
Mod 2. Adding a Governor Alone
A. Open "drivers/cpufreq/Kconfig"
B. Add the following lines in appropriate spot amongst the other govenor's
Code:
[COLOR="Black"]config CPU_FREQ_DEFAULT_GOV_SMARTASS
bool "smartass"
select CPU_FREQ_GOV_SMARTASS
select CPU_FREQ_GOV_PERFORMANCE
help
Use the CPUFreq governor 'smartass' as default.
[/COLOR]
Code:
[COLOR="Black"]config CPU_FREQ_GOV_SMARTASS
tristate "'smartass' cpufreq governor"
depends on CPU_FREQ
help
smartass' - a "smart" optimized governor!
If in doubt, say N.[/COLOR]
C. Open "drivers/cpufreq/Makefile"
D. Add the following line in the appropriate spot.
Code:
[COLOR="Black"] obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS) += cpufreq_smartass.o[/COLOR]
E. Create a file called "drivers/cpufreq/cpufreq_smartass.c"
F. Put the following code in that file.
http://pastebin.com/f0Bk9kVZ
G. open "include/linux/cpufreq.h"
H. Under the "Cpufreq Default" section add
Code:
[COLOR="Black"]#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS)
extern struct cpufreq_governor cpufreq_gov_smartass;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_smartass)[/COLOR]
Ok there is a governor added, do the exact same steps for any other one's you would like to add.
Step 4. Getting a Config file
Option A. Pulling a config file from a kernel.
A. Hook up a device that is using a kernel similar to one you are using as your base.
B. Open a terminal
C. Change to your root kernel directory
D. Type
Code:
[COLOR="black"]adb pull /proc/config.gz[/COLOR]
E. Type
Code:
[COLOR="black"]gunzip config.gz[/COLOR]
F. Type
Code:
[COLOR="black"]mv config arch/arm/configs/<your_config_name>_defconfig[/COLOR]
Option B. Using the manufacturers config.
Unfortunately as stated above, not all kernels support the "/proc/config.gz" method. You can typically find a manufacturer's configuration file in "arch/arm/configs". I believe the one for my HTC Flyer was called "flyer_hc_defconfig", so look for a layout similar to that one. Also read the README to get a better idea of how to modify it. I would personally make a copy of it called "<your_config_name>_defconfig" and use that as my base.
Step 5. Building
Time to start the real "build" section of this tutorial.
Part A. Pre-build Steps
A. Open terminal and change to the root of your kernel directory
B. Type
Code:
[COLOR="black"]export ARCH=arm[/COLOR]
C. Type
Code:
[COLOR="black"]export CROSS_COMPILE=~/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-[/COLOR]
Part B. The First Build
A. Type
Code:
[COLOR="black"]make <your_config_name>_defconfig[/COLOR]
B. Type
Code:
[COLOR="black"]make menuconfig[/COLOR]
and make the required changes to use any modules you added or similar changes.
C. Type
Code:
[COLOR="black"]make -j<maximum number of jobs>[/COLOR]
Part C. Re-Builds
A. Type
Code:
[COLOR="black"]make clean[/COLOR]
B. Type
Code:
[COLOR="black"]make oldconfig[/COLOR]
C. Type
Code:
[COLOR="black"]make -j<maximum number of jobs>[/COLOR]
Part D. Building Modules
You have two options:
A. Type
Code:
[COLOR="black"]make modules[/COLOR]
B. Type
Code:
[COLOR="black"]make path/to/your/module.ko[/COLOR]
The above steps explained:
Part A.(These steps are required every time you close your terminal and re-open it to build again.)
A. Ok shouldn’t need to explain this.
B. This command sets your target architecture.
C. Defines the path to the toolchain we are going to use to compile our kernel. You can change this to point towards whatever toolchain you have downloaded or feel like using, the way it is currently configured it will use the Linaro toolchain that we downloaded above.
Part B.(These only need to be run the first time you build a kernel.)
A. Load's your configuration file from earlier.
B. Open up a menu to configure your kernel. It will use the config file you loaded in the previous step as a base.
C. Viola start the build. I typically allow 1 job per core, so on my quad core machine I put "make -j4". Just raising that number will not make your build faster, your processor needs to be able to support the number of jobs you are assigning it.
Part C. (Use the command's when you are building any-time outside of the first)
A. This command gets rid of any old/outdated binaries or modules you compiled before, and let's start fresh. I like to run it every I build unless my changes are really small and localized.
B. A very awesome command, it parses through what has changed and only prompts you about new options.
C. See the explanation for the above "Part C.".
Part D.(Use these for just building kernel modules.)
A. This will re-build all modules.
B. Will rebuild just the module you need. Very useful when you need to rebuild a WiFi module.
Step 6. Now what
Ok we have now started our build and we are waiting for it to finish, so there are two possible outcomes:
Outcome A. Build Succeeds
W00t!! You have a kernel built by your self from source. There are a couple things you need in-order to use this kernel on your device any ".ko" modules and the zImage binary. If you pay attention to the output of your compiler then you will see the location of those objects. However the following commands will make your life a bit easier(Thanks Recognized Developer Hacre):
A. Open a terminal
B. Change to your root kernel directory
C. Type
Code:
[COLOR="black"]mkdir ../<your_kernel>_output[/COLOR]
D. Type
Code:
[COLOR="black"]cp arch/arm/boot/zImage ../<your_kernel>_output/zImage[/COLOR]
E. Type
Code:
[COLOR="black"]find . -name "*.ko" -exec cp {} ../<your_kernel>_output \;[/COLOR]
The above steps explained:
A-C. Self-Explanatory
D. Move our kernel binary into our output folder
E. This handy bit of magic finds all ".ko" modules and also copies them into your output file.
You will also need to assemble a kernel image containing a initramfs for your device, along with the kernel binary and such. That however is beyond the scope of this tutorial. To get started though try searching the following phrases.
Code:
[COLOR="Black"]building android kernel image
xda build kernel image
xda unpack boot.img[/COLOR]
Outcome B. Build Fails
Oh dear. It failed. Well guess what...this is going to happen..a LOT. Get used to it, and get used to googling and experimenting with different solutions. The following are some tips that will help you with debugging your issues.
Running a "Clean" build
A. Backup your config file - Type
Code:
[COLOR="black"]cp .config ../backupConfig[/COLOR]
B. Re-run the build process using just your defconfig from earlier.
Limiting Output(Thanks Hacre.)
A. Another good tip is to run "make -j1" to get the error, as it will limit the amount of text you need to scroll through.
Building TWRP recovery - http://forum.xda-developers.com/showthread.php?t=1943625​
Building CWM recovery - http://forum.xda-developers.com/showthread.php?t=1866545​
CCACHE​
Here is a brief tutorial on the installation of Ccache, which can shorten build times drastically :
If you have room on your build system you can speed
your builds up considerably by using ccache. ccache is a compiler
cache. It speeds up re-compilation of C/C++ code by caching
previous compiles and detecting when the same compile is
being done again.
Install it with apt-get:
Code:
[COLOR="Black"]sudo apt-get install ccache[/COLOR]
Set environment vars for Android use:
(I put these exports in my .bashrc)
Code:
[COLOR="Black"]export USE_CCACHE=1
export NDK_CCACHE=ccache[/COLOR]
Set a cache size of 10G for optimal results:
Code:
[COLOR="black"]ccache -M 10G[/COLOR]
Check the status of your cache with the command:
Code:
[COLOR="black"]ccache -s [/COLOR]
To clear your ccache:
Code:
[COLOR="Black"]ccache -C[/COLOR]
Returns:
Code:
[COLOR="black"]
cache directory /home/jocala/.ccache
cache hit 106673
cache miss 18379
called for link 3758
preprocessor error 5
not a C/C++ file 4425
unsupported compiler option 678
no input file 4565
files in cache 36758
cache size 3.2 Gbytes
max cache size 10.0 Gbytes[/COLOR]
Using Git and learning to push commits - WIP
- When you "create" a new repo it has to be named correctly and the rest will follow with a tut on how to make your initial commit. Well once you start compiling and changing things, it can get pretty difficult to figure out how to push your commits. I'm not gonna get into setting up github because there are several tutorials for that. Ok let's say you've changed some things and try to run a "repo sync" and you get ERROR: you must stash or commit your changes or they will be lost during checkout. Hmm what do we do here? Well I track down the folder which has the changed commit and open it in terminal. Here I use something like "git checkout kk44" since this is my branch name. Sometimes if I get an error I will use "git branch kk44" I don't know the difference but I always seem to get the job done. I'll break this down later into just the cmds by themselves. Now the commands are not all the same & you need different ones for rebasing your repo but for now we want to commit our device changes. Below I will list some things that eventually work to allow me to push my commits to my git.
Code:
UPDATE existing branch!
Code:
git checkout kk44
"or"
Code:
git branch kk44
Code:
git init
Code:
git update-server-info
Code:
git add <any changes here>
Code:
git commit -m <Your message for the commit>
.. You need to be on the specific branch
Code:
git push origin kk44 <here put in your username & PW for git>
Code:
git rm <filename>
to remove a file if the build did NOT work for you!
Sometimes the above don't always work so we go below. This will be a way to "rebase" your repo & in some cases commit your work. I'm not even close to being an avid git user but I'm trying here!
Thanks to Scotthartbti for pointing some of the below out to me.
Quote:
***COMMIT CHANGES***
Click to expand...
Click to collapse
- Wherever changes are made do the following to save it.
Code:
git add -A
Code:
git commit -s
put a title for it <my change for BS>
then hit CTRL X & Y
git push remote_name branch_name..
The above will get you some place and if it doesn't, try the below. I believe below are commands to "rebase" a repository?
Code:
Code:
git pull origin kk44
Code:
git push origin kk44
If you do the above steps it will usually lead you to what needs to be committed and you can "git add boardconfigcommon.mk <this is for informational purposes only!
"git add ." is supposed to add all files to be committed but I find it doesn't work most times. You can always go to your github to see what you have named your device tree.
I really just play around with most of these cmds until I get my repo to commit. If you get a message stating "nothing to commit, up to date" but you know you have files to commit, keep working with different cmds until you push your work. Hopefully this guide will get more clear as others help out or as I learn more.
Building with Linaro 4.8 toolchain
Go into Terminal and navigate to the root folder of your source tree, then:
Code:
[COLOR="Black"]prebuilts/gcc/linux-x86/arm/[/COLOR]
Run:
Code:
[COLOR="black"]wget http://releases.linaro.org/13.06/components/toolchain/gcc-linaro/4.8/gcc-linaro-4.8-2013.06.tar.bz2[/COLOR]
Run:
Code:
[COLOR="black"]bunzip2 *.tar.bz2[/COLOR]
Run:
Code:
[COLOR="black"]tar -xvf *.tar[/COLOR]
Using your file manager, navigate to the root folder of your source tree again.
Navigate To "/build", in your root folder.
Run:
Code:
[COLOR="black"]gksudo gedit envsetup.sh[/COLOR]
change the line in bold, to look exactly like this one:
Code:
[COLOR="black"]case $ARCH in
x86) toolchaindir=x86/i686-linux-android-4.6/bin
;;
[B]arm) toolchaindir=arm/gcc-linaro-4.8-2013.06/bin[/B] [COLOR="Red"]<--------[/COLOR]
;;
mips) toolchaindir=mips/mipsel-linux-android-4.6/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
[/COLOR]
Exit out and open new. Initialize and build. That's it! Makes you wonder why you never did it before, right?
Not so fast. You may have build issues, you may not. I had a few lengthy sets of errors in gsm calltracker and another .java file that was solved by using Meld and making it look exactly like a successful build's file. More as I learn.......
​
lemme be the first to appreciate the time you took to share
flex360 said:
lemme be the first to appreciate the time you took to share
Click to expand...
Click to collapse
Plenty more coming soon, I'm sure. Thanks for your support. If you have any info to share, now or later, I'm all ears. :highfive:
Exactly what I've been looking for, greatly appreciated!
Sent from my HTCONE using Tapatalk now Free
how about compiling unsupported roms?
could you do a write up for that too?
for example paranoid android
Very helpful. Thanks
flex360 said:
how about compiling unsupported roms?
could you do a write up for that too?
for example paranoid android
Click to expand...
Click to collapse
I'll add any and all relevant info on building for this device; at least until I run out of room. But, I need verified successful steps before I post. Don't want anyone complaining about bad information. But, yeah, that's the whole point: to give detailed building instructions for any ROM out there. Stock or custom, as long as it's 4.3 and up. I used to run three or four builds at once and run the how to thread; not finding that kind of time anymore, so I need all the help I can get. The CM and BS builds are the only ones I have tried and/or been successful at compiling and running(had a few Carbon builds, but they never got past boot). I've already spoken with MallardDuck and he's gonna get a PACman tut together tonight. If you want to share, I want to post. The more people we empower to build for themselves, the happier EVERYONE will be.
I guess it is worth mentioning that if it's an unofficial deal, make sure you have permission first. Don't want some rabid dev sticking their foot in my rear because they didn't want to put their work out on the street. For example, the CM is unofficial but open-source(at least it is right now ), whereas my Beanstalk build needs no distinction like that, because the creator makes it for the use of all. One last thing, if you want me to post a tut for a particular ROM, make sure you include those I need to thank as well as the steps. I can be reached for tutorial steps posting by PM or at Hangouts(PM me for my gmail). Make sure your steps are complete, because as I said, I don't have time to verify each and every step before posting....Thanks
Thank you for this, very interesting read.
nice
hey pal, just wanted to publicly thank you for the work you did starting this! It'll be great for the m7spr community!
thanks again for getting me involved in it.
I'm looking for the involvement of everyone who's interested in sharing what they know. Thanks for the support.
Sent from my One using XDA Premium 4 mobile app
This is Great! I had always wanted to compile a rom from source. Good reading THANKS!!
Unofficial PACROM
To get started with Android/PACman Rom, you'll need to get familiar with Git and Repo.
First Make your Pac directory and initilize the repo with the following commands:
Code:
[COLOR="black"]mkdir pacrom && cd pacrom[/COLOR]
[COLOR="black"]repo init -u git://github.com/PAC-man/android.git -b cm-10.2[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Wait, but once you're done waiting feel free to move on...
Once properly synced the next step is to sync device files and to compile; which with PAC is all one step.
Simply,
Code:
[COLOR="black"]./build-pac -j# m7spr[/COLOR]
Where # is the number of cores you have.
This command will thriger the pac build scrpt that will then download the needed device trees and begin compiling.
:cyclops:
UPDATE: Now in OP.
:good::good:
OP updated. Thanks man!
OP also updated with AOKP build instructions. Be aware this is unverified, if you build successfully, share your success or tell me it's broken so I can fix it.
Sent from my One using XDA Premium 4 mobile app
This is awesome, thank you. What version of Ubuntu do you recommend? 12.04LTS or Latest? I don't know which to get.
Bairdog35 said:
This is awesome, thank you. What version of Ubuntu do you recommend? 12.04LTS or Latest? I don't know which to get.
Click to expand...
Click to collapse
I am normally the type to tell you the newest anything is the way to go, but depending on the type of system you are using, I have heard of some display issues that newer Linux distros have brought about. They seem to be nothing more than some settings discrepencies that can be worked out, but for a rookie builder, you really want as few issues as possible, especially with your environment. I would stick with 12 for now. Ubuntu is highly regarded, and so is Mint. I use Luninux 12, and its worked great for me for over a year. I like it because it has a UI that is virtually an OSX clone. I have experience with Apple systems, so it was easier to use than trying to learn the ins and outs of a different OS. There are quite a few other choices as well. But, most professional devs will recommend you use one of the choices above.
BMP7777 said:
I am normally the type to tell you the newest anything is the way to go, but depending on the type of system you are using, I have heard of some display issues that newer Linux distros have brought about. They seem to be nothing more than some settings discrepencies that can be worked out, but for a rookie builder, you really want as few issues as possible, especially with your environment. I would stick with 12 for now. Ubuntu is highly regarded, and so is Mint. I use Luninux 12, and its worked great for me for over a year. I like it because it has a UI that is virtually an OSX clone. I have experience with Apple systems, so it was easier to use than trying to learn the ins and outs of a different OS. There are quite a few other choices as well. But, most professional devs will recommend you use one of the choices above.
Click to expand...
Click to collapse
Thank you! I have had experience with Ubuntu and other distros before, but I didn't know if you needed a certain version to do all this haha, once again thank you for this!
Bairdog35 said:
This is awesome, thank you. What version of Ubuntu do you recommend? 12.04LTS or Latest? I don't know which to get.
Click to expand...
Click to collapse
I use the latest x86_64 gnome ubuntu(13.04 currently).
There is a beta of 13.10 but I'd go with 13.04 cause it's solid and tested.

[Guide] to Build your KitKat ROM (CM-AOKP-Carbon-Slim) x N5 from source (Ubuntu14LTS)

Hi, my name's Stefano I'm from Italy, and sorry for my poor english. This is the guide to build your own the KitKat (or whatever branch you want) for your HammerHead. We'll start, obviously, setting up your client (PC), and here we'll use ubuntu x64. Is possible to use almost any linux distribution (also MacOSX) but I prefer to stay on what is much supported and known (for me!). This guide is taken from internet and reading forums/blogs. I didn't invent anything, you can found a lot of guides like this. Just this is updated with last changes. For the setup part I read and paste a lot from here (thanks to sylentprofet).
Regard the hardware side you'll need at least of:
a Dual Core processor
4 Gb of RAM
80 Gb of hard disk for each repository (Better if SSD but don't required)
The Graphics Card don't care, we don't use to compile
A good internet connection, you have to download up to 40 Gb of stuff
A lot of patience, if you aren't go to download a ready ROM, it's better!
Time, time, time, time and again time!
How to Configure Ubuntu for Properly Compiling Android ROMs​
This guide applies to Ubuntu 13.04 Raring Ringtail 64 bit (but also down to 12.04 LTS which is the version that I prefer). Do not use the 32 Bit version. Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t. During normal build you don't have absolutely need to use "sudo", just during the PC setup.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
First, let’s set up the correct JDK.
Many of you probably have some kind of wrong Java installed. Sad cupcake.Let’s get rid of that. Copy and paste this into a Terminal window:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Back to the Terminal. Copypasta the following:
Code:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.04 (or less). No more unrecognized Java version errors! Yay! And it’s self updating, so you don’t have to redownload binaries everytime they release a new version.
Next, we actually need to install the package. More copypasta:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the onscreen instructions. You have to Accept the Licensing Agreement or whatever. Hopefully no human centipede clauses. Once that is completed successfully, you will have to restart any open browsers with Java content for it to display correctly.
To make sure the correct version of Java is activated, run the following at the Terminal prompt:
Code:
java -version
You should see something like the following:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)​ 
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu. Because (K)Ubuntu no longer carries ia32-libs-multiarch and ia32-libs (from Saucy onwards), it is necessary to install from precise repos:
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse"
sudo apt-get update
sudo apt-get install ia32-libs-multiarch
once is installed, you can remove repository:
Code:
sudo add-apt-repository --remove "deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse"
sudo apt-get update
Before start, install:
Code:
sudo apt-get install dpkg-dev
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
And we wait. Don’t worry, this isn’t the crazy downloading part just yet.
When that is done, do this:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now it's time to download and setup SDK Tools. First of all download Android SDK Tools for Linux x64. Extract the folder “sdk”, inside package, into your "Downloads" folder and rename it to "AndroidSDK" e.g..
Then come to your terminal and type:
Code:
cd ~/Downloads/AndroidSDK/tools
and after:
Code:
./android sdk
You can now see the GUI that propose all installable packages. Install Platform tools and Tools for most recent Android (4.4), with the most higher API (19+) version. Flag "accept" and install.
Once is complete, you have you need the binary for repo that will let you talk to git servers and download all that precious source code:
Code:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Open "~/.bashrc" to add a line:
Code:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Type to restart bash:
Code:
source ~/.bashrc
Now you have all need to work (or play) with your ubuntu and it's time to give the sources (repositories) from your preferred Team (who share the source code for their rom). The most known host service for sources and projects is GitHub. E.g. https://github.com/CyanogenMod/
The point of start of any repo is its "manifest" (default.xml) where the team list all it's projects (here an example), only the necessary to the building process.
Until last year was necessary to compile (before begin and looking to platform manifest) an own local manifest where we exclude from download all the devices/kernel/vendor parts unnecessary for our device. This saves up to some Gigabytes of download.
Fortunately now the repositories will download itself the necessary devices/kernel/vendor parts when we'll choose ("lunch") the device to build ("make"). With the exception of AOKP who wanna know, before initialize your local repo, for which device/s you'd like build.
Now I'll write a section for each Team/ROM you want to initialize, that's for me has sense. How take a sense to put each "platform/project" in a different folder (e.g. CarbonDev in a folder and Cyanogenmod in another, both sons of your Home folder).
In the waiting to read next part, better familiarize a little with terms like "breakfast, brunch, lunch, make" into Android contest.
Building Cyanogenmod
In the terminal, now we'll make a folder where to store the Android source code. Typically will make it in your home folder, within a folder called like your projected ROM, to identify from other stuff, open your terminal and type:
Code:
mkdir –p ~/Cyanogenmod
cd ~/Cyanogenmod
Now we are going to initialize your local repository, with the "branch" cm-11.0 (KitKat), in your terminal:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
And now, the most long part of the story: you’re going to get the source. We have to download around 10-15 Gbytes. First of begin the process, you must to know that you can accelerate the process related to your processor and, obviously, to your internet band. You can choose the number of simultaneous processes to start. They depends from the "#" in the "-j" parameter. E.g. the option -j6 is related to a “normal” processor. If you have a performant processor and/or internet connection, try to increment putting –j10 or more. On terminal:
Code:
repo sync -j6
From time to time, check the situation on output, maybe occurs a pair of hours or a whole night. But when all will be done, you’re ready to build Android!
Once you finish your repo sync, you’ll ready to build. In your terminal, into your working folder type (pay attention at the initial “dot”):
Code:
. build/envsetup.sh
The commands are loaded, now you can build (tune your -j# parameter as you want):
Code:
breakfast hammerhead && make -j6 bacon
At the end of all, your fresh ROM to flash will be in Cyanogenmod/out/target/product/hammerhead. Happy flash!
Thanks @Lloir for supervision.
Building AOKP
Reserved 2
Reserved 3
Reserved 4
Reserved 5
Reserved 6
Nice
Thank you man I'm gonna try it out
I am getting a tone of errors while compiling. Is this normal. I'm gonna assume as long as it doesn't stop everything should be OK.
Sent from my hammerhead
Cuzz1369 said:
I am getting a tone of errors while compiling. Is this normal. I'm gonna assume as long as it doesn't stop everything should be OK.
Sent from my hammerhead
Click to expand...
Click to collapse
When u have warnings, it's all right.
When u have errors the building stops itself...
I was about to do the same guide . I have made the part for paranoidandroid and aosp yesterday, but I am now late. Btw good guide. Better than mine.
Make this thread a sticky thread!
Sent from my Nexus 5 using xda app-developers app
@PippoX3 I really appreciate this guide and your help. My phone just booted into my self comiled cm11. This is always something I've wanted to do since I flashed my first ROM a couple years ago. @Lloir it was actually one of yours "evervolv" for HOV I would like to thank both of you for your help thus far and look forward to continue to ask silly questions. To some this sounds like nothing special. But using a rom you compiled yourself for the first time is quite a rush. Thanks again...
Cuzz1369 said:
@PippoX3 I really appreciate this guide and your help. My phone just booted into my self comiled cm11. This is always something I've wanted to do since I flashed my first ROM a couple years ago. (@Llor it was actually one of yours "evervolv" for HOV) I would like to thank both of you for your help thus far and look forward to continue to ask silly questions. To some this sounds like nothing special. But using a rom you compiled yourself for the first time is quite a rush. Thanks again...
Click to expand...
Click to collapse
You're welcome mate. I remember my first builded and flashed rom for HtcOneS and was a big goal for me. Then I understand you. A step away to grow again and learn more and more. Dig it! :laugh:
The only difference for aosp is just changing the link in repo init -u ? I wanna build a stock rom only with advanced brightness adjustment
Sent from my Nexus 5 using Tapatalk
andrei.voinea93 said:
The only difference for aosp is just changing the link in repo init -u ? I wanna build a stock rom only with advanced brightness adjustment
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Generally yes. Take a look to their readme into manifest platform, usually they explain there how to initialize your local repo. The rest is same for alls...
Thank you
Sent from my Nexus 5 using Tapatalk
I'm getting this error while trying to install packages after the Java step.(Ubuntu 13.10)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
Package ia32-libs 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:
lib32z1 lib32ncurses5 lib32bz2-1.0
I moved on to the next step and receive this:
[email protected]:~$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
ln: failed to create symbolic link ‘/usr/lib/i386-linux-gnu/libGL.so’: No such file or directory
Edit: Found my answer here
http://forum.xda-developers.com/showthread.php?p=50353201
Cuzz1369 said:
I'm getting this error while trying to install packages after the Java step.(Ubuntu 13.10)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
Package ia32-libs 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:
lib32z1 lib32ncurses5 lib32bz2-1.0
I moved on to the next step and receive this:
[email protected]:~$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
ln: failed to create symbolic link ‘/usr/lib/i386-linux-gnu/libGL.so’: No such file or directory
Edit: Found my answer here
http://forum.xda-developers.com/showthread.php?p=50353201
Click to expand...
Click to collapse
I got issues with 13.10 (was a beta, now I don't know...) try 13.04. My prefer is 12.04 or 12.10.
PippoX3 said:
I got issues with 13.10 (was a beta, now I don't know...) try 13.04. My prefer is 12.04 or 12.10.
Click to expand...
Click to collapse
I found the answer and posted above. Worked great now.
Sent from my hammerhead
So I successfully compile slimKat. It gave me 2 different zips in my out folder slim****ota***.zip which was 186mb and slim*****.zip which was only 156mb. What the difference between the two?
Sent from my Nexus 7 using Tapatalk

[GUIDE][TUTORIAL][MAKO] How to build Cyanogenmod 12 from source

Requirements
1- Good knowledge of a linux distribution, I I recommend Ubuntu 14.04 LTS or or derived (Xubuntu, Lubuntu etc.);
2- A PC with at least 4 GB of ram (8 recommended) and CPU at least dual-core (quad-core recommended);
3- A partition with at least 100 GB free;
4- An Internet connection.
Now we are going to prepare the necessary tools for compile:
Install version 7 of java with the following commands:
Code:
sudo apt-get install openjdk-7-jdk
After type:
Code:
java -version
And make sure that your Java version is 7.
Now, install this packages necessary for build with this command:
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
At terminated download type:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
mkdir ~/bin
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Now we will modify the bash file
Code:
sudo nano ~/.bashrc
At the end of fil We will add:
Code:
export PATH=~/bin:$PATH
After, save with the key combination Ctrl+o and exit with Ctrl+x.
OK, Now we are almos ready!
We proceed typing:
Code:
mkdir ~/cm12
Code:
cd ~/cm12
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
Code:
repo sync
Be patient because you need to download about 20 GB of source.
If you have problems with authentication, you need to register on the site Git-Hub and enter your credentials typing:
Code:
git config --global user.email "xxxxxxxxxxxxxxxxx"
Code:
git config --global user.name "xxxxxxx"
At the end of source code download, we need to initialize building tool:
Code:
. build/envsetup.sh
Now:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
And in the text file we just need to paste:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
After once again:
Code:
repo sync
OK, finally, we are ready for start building process:
Code:
. build/envsetup.sh
Code:
brunch mako
You will find your rom ready for flash in:
Code:
cm12/out/target/product/mako
Good building at all!!!
Now:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
And in the text file we just need to paste:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
Thank you very much for this guide. I am working toward compiling my first ROM from source, so please forgive me noob questions. Can you please help explain how you got the text for the local_manifest.xml file? Why is the device source not "CyanogenMod/android_device_lge_mako," which is listed as the "source code" here?
Also, I didn't see your post until just now so I have been following the guide here. Does not the local_manifest.xml file need device, vendor, and kernal info?
Sorry if this very basic. I am still learning.
Mawth said:
Now:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
And in the text file we just need to paste:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
Thank you very much for this guide. I am working toward compiling my first ROM from source, so please forgive me noob questions. Can you please help explain how you got the text for the local_manifest.xml file? Why is the device source not "CyanogenMod/android_device_lge_mako," which is listed as the "source code" here?
Also, I didn't see your post until just now so I have been following the guide here. Does not the local_manifest.xml file need device, vendor, and kernal info?
Sorry if this very basic. I am still learning.
Click to expand...
Click to collapse
You must create local_manifest.xml file with the command:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
In gedit (text editor file..download it in ubuntu software center) you will see an empty file..for this reason you must copy in it these strings:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
Thank you for your very fast reply.
And thank you for providing the text for the local_manifest.xml file. I understand that is what I need to do.
I've successfully built CM12 from source using your guide. Thank you again. Very helpful.
Now my question is about subsequent builds. Is it necessary to make clean before each new build?
The reason I ask is that I have re-sync'd the repo several days after my first build and despite the updated date listed in the ~out file (e.g., "cm-12-20150325-UNOFFICIAL-mako.zip") the CyanogenMod version listed on my phone after flashing the new .zip stays the same as the first build (e.g. "cm-12-20150321-UNOFFICIAL-mako.zip"). I'm not sure what I'm doing wrong. The only solution seems to be make clean, which dramatically increase the compiling time.
Mawth said:
I've successfully built CM12 from source using your guide. Thank you again. Very helpful.
Now my question is about subsequent builds. Is it necessary to make clean before each new build?
The reason I ask is that I have re-sync'd the repo several days after my first build and despite the updated date listed in the ~out file (e.g., "cm-12-20150325-UNOFFICIAL-mako.zip") the CyanogenMod version listed on my phone after flashing the new .zip stays the same as the first build (e.g. "cm-12-20150321-UNOFFICIAL-mako.zip"). I'm not sure what I'm doing wrong. The only solution seems to be make clean, which dramatically increase the compiling time.
Click to expand...
Click to collapse
because build system didn't generate a new build prop and use first time build prop you build. just delete build.prop on system folder before you want to build, system will generate new build.prop witch exact date you build
Mawth said:
I've successfully built CM12 from source using your guide. Thank you again. Very helpful.
Now my question is about subsequent builds. Is it necessary to make clean before each new build?
The reason I ask is that I have re-sync'd the repo several days after my first build and despite the updated date listed in the ~out file (e.g., "cm-12-20150325-UNOFFICIAL-mako.zip") the CyanogenMod version listed on my phone after flashing the new .zip stays the same as the first build (e.g. "cm-12-20150321-UNOFFICIAL-mako.zip"). I'm not sure what I'm doing wrong. The only solution seems to be make clean, which dramatically increase the compiling time.
Click to expand...
Click to collapse
I advice always make clean
what is mako?
autoradio78 said:
Requirements
1- Good knowledge of a linux distribution, I I recommend Ubuntu 14.04 LTS or or derived (Xubuntu, Lubuntu etc.);
2- A PC with at least 4 GB of ram (8 recommended) and CPU at least dual-core (quad-core recommended);
3- A partition with at least 100 GB free;
4- An Internet connection.
Now we are going to prepare the necessary tools for compile:
Install version 7 of java with the following commands:
Code:
sudo apt-get install openjdk-7-jdk
After type:
Code:
java -version
And make sure that your Java version is 7.
Now, install this packages necessary for build with this command:
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
At terminated download type:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
mkdir ~/bin
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Now we will modify the bash file
Code:
sudo nano ~/.bashrc
At the end of fil We will add:
Code:
export PATH=~/bin:$PATH
After, save with the key combination Ctrl+o and exit with Ctrl+x.
OK, Now we are almos ready!
We proceed typing:
Code:
mkdir ~/cm12
Code:
cd ~/cm12
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
Code:
repo sync
Be patient because you need to download about 20 GB of source.
If you have problems with authentication, you need to register on the site Git-Hub and enter your credentials typing:
Code:
git config --global user.email "xxxxxxxxxxxxxxxxx"
Code:
git config --global user.name "xxxxxxx"
At the end of source code download, we need to initialize building tool:
Code:
. build/envsetup.sh
Now:
Code:
gedit ~/cm12.repo/local_manifests/local_manifest.xml
And in the text file we just need to paste:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-12.0"/>
</manifest>
After once again:
Code:
repo sync
OK, finally, we are ready for start building process:
Code:
. build/envsetup.sh
Code:
brunch mako
You will find your rom ready for flash in:
Code:
cm12/out/target/product/mako
Good building at all!!!
Click to expand...
Click to collapse
can you specify for which device is this source and rom for?
what is mako?
can i use this codes for building cm12 for any android device?
shivajiv said:
can you specify for which device is this source and rom for?
what is mako?
can i use this codes for building cm12 for any android device?
Click to expand...
Click to collapse
Mako is for nexus 4
can i use the above tutorial for building for any device
cqloveqc said:
Mako is for nexus 4
Click to expand...
Click to collapse
by changing vendor,device,kernel can i use this tutorial for building rom for any device?
shivajiv said:
by changing vendor,device,kernel can i use this tutorial for building rom for any device?
Click to expand...
Click to collapse
I don't know, I'm not a developper, but also an amateur, I try to learn how to build a Rom for Nexus 4, but I think it take time
Thanks fo sharing
Thanks fo sharing~

Categories

Resources