I've gotten a lot of PMs asking about how to compile CM9 source for CM9 ROMs. While its a somewhat daunting task at first, in this guide I aim to break it down as simple as possible, while not talking to you like an idiot. I had to gather this information myself over a few days of scouring guides and posts and threads over 5 forums, and finally pieced it together to work. My hope is this one guide will be enough for you to build for the A100, and ANY other device you choose, provided CM9 has a device tree for it. Outside of that is beyond the scope of this guide. It does not include AOKP or anything else, just AOSP CM9, which is what I use for the nightly builds here.
Section 1: I want my own stuffs, what kind of machine should I be rocking?
This first part will deal with the machine you plan to use to build with, these are my personal suggestions, however you may deviate however you want, but these instructions may no longer work for you.
Operating System
Any 64 Bit Ubuntu or Ubuntu based distro should do fine. 32 bit can also be used, I have done it successfully but requires some extra steps or variations. I use Linux Mint 11, based on Ubuntu Natty, you can use older or newer releases of course, however the instructions will no longer work and you will need to find them elsewhere. Its been said, and verified by Theonew that Ubuntu 10.04 is the best for compatibility, however this guide is aimed at Linux Mint 11/ Ubuntu Natty as that is what I run and based this guide on. This guide may or may not work on any other version of Linux.
CPU
Any dual core (or even single if you don't mind waiting) will do. 4 core is of course better, and the faster/newer/most epic available will yield builds in as little as 30 minutes. A core 2 duo will build is roughly an hour. A Pentium D about 2. This, over all others, dictate how long it takes to compile the build. Overclocking can be used, however it should be completely stable or you will get build errors and bad ROMs.
RAM
2 GB is passable, 4 GB is suggested, 16 GB ideal. While the amount is more important, get the fastest RAM and tune the lowest STABLE latencies for best performance.
Storage
AOSP can take up to 50+GB of hard drive space. By default it will use the home partition. A single device build will only need 20GB or less of free space, however the more free space the better as the rest of Linux uses it too. Suggest 250GB + hard drive. 80GB minimum for a single device.
Section 2: Ok my machine won't melt, what software do I need?
Assuming your machine is fully operational with some flavor of Ubuntu Natty, we can move on to setting up the software side!
Open a terminal, then in the browser highlight and copy the line, then go back to the terminal and click CTRL+SHIFT+V to paste into terminal. Hit enter when done.
32bit and 64 bit systems:
sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
64 Bit only
sudo apt-get install g++-multilib lib32z1-dev ia32-libs lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib
Other random software you need
sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils
Generate link for libX11.so
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Install Java JDK 1.6
Get Java JDK 6 from here.
Copy the file you downloaded to your Home directory, then go back into terminal.
Remove all other Java, it'll cause problems later.
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Now we copy the Java JDK you moved into your Home directory
Copy each line and run, then move to the next.
sudo mkdir -p /opt/java/64/
sudo cp jdk-6u32-linux-x64.bin /opt/java/64
sudo su -
cd /opt/java/64
chmod +x jdk-6u32-linux-x64.bin
./jdk-6u32-linux-x64.bin
exit
If you get errors, double check the file you downloaded is the same as the command, if not, change the command to match, or the download to match the command.
Next, assuming you have a Gnome desktop installed, we'll edit .bashrc
gedit ~/.bashrc
Should open a text editor. In this text editor add
# Java PATHs
export JAVA_HOME=/opt/java/64/jdk1.6.0_32
export PATH=$PATH:$JAVA_HOME/bin
If it already has text inside, add this to the top. Press save, and close the text editor.
Next, you need to download the Android SDK. Yes, you NEED this. Get it here.
Extract it to your home folder, so it's like this: ~/android/sdk
Open the .bashrc again and add the Android SDK stuff:
gedit ~/.bashrc
#Android PATH
export PATH=$PATH:~/android/sdk
export PATH=$PATH:~/android/sdk/platform-tools
export PATH=$PATH:~/android/sdk/tools
Adapt it to match wherever you decided to place the folders. Add this below the Java from above. Be sure to save.
Now we add device paths:
sudo gedit /etc/udev/rules.d/99-android.rules
Opens the editor again, now add:
#Acer
SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666
#ASUS
SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666
#Dell
SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666
#Foxconn
SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666
#Garmin-Asus
SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666
#Google
SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666
#HTC
SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666
#Huawei
SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666
#K-Touch
SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666
#KT Tech
SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666
#Kyocera
SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666
#Lenevo
SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666
#LG
SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666
#Motorola
SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666
#NEC
SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666
#Nook
SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666
#Nvidia
SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666
#OTGV
SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666
#Pantech
SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666
#Philips
SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666
#PMC-Sierra
SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666
#Qualcomm
SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666
#SK Telesys
SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666
#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666
#Sharp
SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666
#Sony Ericsson
SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666
#Toshiba
SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666
#ZTE
SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666
SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
Save and close.
Back in terminal enter
sudo chmod +x /etc/udev/rules.d/99-android.rules
Now we need to open the Android SDK to install some extras, in terminal enter
android
If the lines above were correct, it should launch your SDK. If not, in terminal, enter
cd ~/android
and try again.
Once the SDK Manager open, give it a second to search the repos, then check the boxes for Android SDK Tools and Android SDK platform-tools, then let them install. It takes a few minutes.
Now, just to make sure, we edit .bashrc again to double check the paths are correct. I messed up here before, so I added this part in just in case.
gedit ~/.bashrc
Should have:
#Android PATH
export PATH=$PATH:~/android/sdk
export PATH=$PATH:~/android/sdk/platform-tools
export PATH=$PATH:~/android/sdk/tools
#Java PATH
export JAVA_HOME=/opt/java/64/jdk1.6.0_32
export PATH=$PATH:$JAVA_HOME/bin
Android and Java can be before or after each other, doesn't matter, just have them at the top.
Post 2 will pick up with getting your workplace prepped, including repos. See you in a second.
Section 3: My machine didn't melt, but my terminal did!
And now we begin EVEN MOAR FUN TERMINAL STUFFS! and lots of waiting. In this section we will begin prepping your workplace for syncing to the repo, which takes a couple hours, or more, to complete the first time. Afterwords it only takes a few minutes.
First we make some directories, and set permissions:
Once again, in terminal.
mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
At this point you will need to at minimum close terminal and open a new one, or even completely reboot your system and resume. /android/system can be named anything you want, like /android/aosp or /android/cm9, etc.
Now we use gedit for .bashrc once again.
gedit ~/.bashrc
export PATH=$PATH:~/bin
Save and exit.
Next we'll attempt to sync to the CM repo, this is the long one.
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync -j16
Again remember this is 1 line per command, enter each line.
Once you issue repo sync it will begin the horribly long process of syncing to the repo, and takes a couple hours, or more, to complete. At this point, go out for dinner or something. Watch the game. It WILL take a long time.
Welcome back, been awhile! Next we sync device specific items, in terminal again:
. build/envsetup.sh && brunch {{{device}}} where {{{device}}} is your device, so in this case:
. build/envsetup.sh && brunch a100
You shouldn't have to do this anymore, a one time deal unless you need to setup all over again.
Next we get the proprietary files from the device:
cd ~/android/system/device/acer/a100/
./extract-files.sh
Substitute acer and a100 for whatever make and model you want to pull from.
While still in /android/system we need to get the prebuilts:
~/android/system/vendor/cm/get-prebuilts
Thats it for the ONE time prep work. This next section will be on a per build basis.
cd ~/android/system/
repo sync
Then to build your ROM:
. build/envsetup.sh && brunch a100
You can also add a -JX argument, where X is cpu cores, or threads, you wish to use. So . build/envsetup.sh && brunch a100 -j16 would hog alot of cpu time, but be faster.
WOW that took forever! But..you got it, next section has some more info!
Section 4: Ok...that was awhole lot of work followed by vast amounts of boredom...wait...where the EFF is my ROM?!
After your first build, you'll probably be looking for your squeaky clean new ROM built by yourself, GRATS!
This is where I end this guide, and leave you to flail around random directories on your own searching in vain for your ROM.
Ok, no I won't, not that mean. Your new ROM will be prepackaged in a flashable zip file in..get ready..
~/android/system/out/target/product/a100/
It'll be amongst alot of files,but it will be there when the build has completed. At this point, name it whatever, and put it on your external SD card, and flash it!
Section 5: Ok..what if I want to build another one?
You'll first want to clear out the previous build, we do this with clobber. In terminal...
cd ~/android/system
make clobber
Then follow the section above for building with
cd ~/android/system/
repo sync
Then to build your ROM:
. build/envsetup.sh && brunch a100
It'll likely take less time then before, but still pretty close. The new build will be in the same place as before!
That ends my guide for building CM9 by source for the A100. Keep in mind this can be adapted to just about any SUPPORTED device tree, just change make and models where appropriate.
This is the first draft, and will likely undergo some changes to clean up and make a little clearer what should be done. Feel free to ask questions or make suggestions, as always, and I will attempt to answer and fix any issues. Keep in mind, though, I am still new to this, and things like changing, modifying, or hacking the code isn't something I know how to do.
Thanks:
The CM team
blahbl4hblah: Alot of my info was from his guide here. It got me MOST of the way there, some other info came from other places, however I can't remember where. It wasn't from XDA, and alot of the missing pieces came from the CM wiki.
Glad to see your living up to it already . *He's done it again* - Another excellent guide and this time, no typos . Thanks for this and don't you think I forgot about it .
Edit (Sorry but I just needed to do this ) - You have a typo in your second to last paragraph (of post #2).
lol my keyboard hasn't even stopped smoking yet and you already start in on my typos! When my fingers stop smoldering I'll go back over and correct anything I can find, which I'm sure there's plenty, as usual I typed it all up and put it up as I did it, not much proofing outside of it had somewhat complete structured language in it. Hopefully english.
pio_masaki said:
lol my keyboard hasn't even stopped smoking yet and you already start in on my typos! When my fingers stop smoldering I'll go back over and correct anything I can find, which I'm sure there's plenty, as usual I typed it all up and put it up as I did it, not much proofing outside of it had somewhat complete structured language in it. Hopefully english.
Click to expand...
Click to collapse
Its nothing major, just a commonly misunderstood concept. One thing you may want to note, is that using Ubuntu 10.04 is recommended and later versions are experimental (some commands are different, and they may not support Git branches other than master).
Theonew said:
Its nothing major, just a commonly misunderstood concept. One thing you may want to note, is that using Ubuntu 10.04 is recommended and later versions are experimental (some commands are different, and they may not support Git branches other than master).
Click to expand...
Click to collapse
While I agree 10.04 is the "best" to use, compatibility wise, these instructions are specifically aimed at Ubuntu Natty 11.04, and all commands listed are what I used to setup for my builds, using Linux Mint 11, which is Ubuntu Natty. The guide wasn't really intended as a coverall for building on any distro, but more a guide documenting what I did to get builds going, and its based on Linux Mint 11 (natty), which is of course mentioned, as well as deviating from that build changing what needs to be done, and the guide will no longer work.
I'll of course add a note about using Ubuntu 10.04, however the guide mostly likely won't work on that release, but then again, it might, haven't tried. I know 11.10+ needs changes to work properly, as I figured out on my server running LM 12, but works fine on 11.04. At least, for this guide it does.
pio_masaki said:
While I agree 10.04 is the "best" to use, compatibility wise, these instructions are specifically aimed at Ubuntu Natty 11.04, and all commands listed are what I used to setup for my builds, using Linux Mint 11, which is Ubuntu Natty. The guide wasn't really intended as a coverall for building on any distro, but more a guide documenting what I did to get builds going, and its based on Linux Mint 11 (natty), which is of course mentioned, as well as deviating from that build changing what needs to be done, and the guide will no longer work.
I'll of course add a note about using Ubuntu 10.04, however the guide mostly likely won't work on that release, but then again, it might, haven't tried. I know 11.10+ needs changes to work properly, as I figured out on my server running LM 12, but works fine on 11.04. At least, for this guide it does.
Click to expand...
Click to collapse
Sweet guide bro!
da-pharoah said:
Sweet guide bro!
Click to expand...
Click to collapse
Thanks, and grats on the new title!
pio_masaki said:
Thanks, and grats on the new title!
Click to expand...
Click to collapse
Thanks man :thumbup:
Sent from my LG-P999 using xda premium
Related
Since I’ve seen many questions on how to build cyanogenmod 9 (CM9) from source for the Galaxy Nexus, but there isn’t a proper guide, I will attempt to write a small how-to. There already is a very good guide how to build ICS from source, but there are a few extra things you’ll have to do for CM9. I hope it will be useful, and if not, well, at least I’ve tried
LATEST UPDATE: August 20th - also added CM10
SETTING UP THE BUILD ENVIRONMENT
I highly recommend Ubuntu 12.04 64 bit for development or Linux Mint 13. It is possible to build on different linux distro’s, but I cannot cover all exceptions. (If you don’t have linux installed or are afraid to set up a dual boot, it is possible to build in a virtual environment –e.g. virtualbox-. Building in a virtual environment however, can be very slow. Also, 64 bit is recommended.)
Make sure java is installed! At the end of this post, I have written a small guide how to install java.
Set up adb and create proper udev rules
I will not write these steps down, but rather point you to some very nice and easy guides. It would be best to do this first, however, it is not completely necessary if you just want to build a fully functioning rom.
1) set up adb (follow this excellent guide)
2) set up udev rules which allow you to start adb without having to use sudo (follow this terrific tutorial)
Installing all necessary packages and set up repo (source)
Open a terminal and copy the following code:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 \
g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown \
libxml2-utils xsltproc zlib1g-dev:i386
WARNING: run the following commands as user (NOT as root) unless stated otherwise (e.g., when it explicitly shows ‘sudo’ before a command)!!!
Next, you’ll have to install repo to download the source. First we’re going to create a bin folder (1) in our home directory and include it in our path (2). Also, download the repo script (3) and make it executable (4). All from the command line:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Okay, we’re done with the first part. So far it’s been similar to building pure AOSP.For CM, there will be some additional things you’ll have to do.
DOWNLOADING THE CM SOURCE
Create a directory (CM9 -or CM10-) for your working files:
Code:
mkdir CM9
cd CM9
and then initialize the main CM repo (For CM10, just replace ics with jellybean):
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
Good, now you’re ready to download the source. This can take a couple of hours!! Run the following command from the terminal (Run the following commands in the terminal from the root of the directory that contains the source, e.g., ~/CM9/):
Code:
repo sync
Okay, the majority of the files needed to build CM are now on your computer. However, device specific files are needed. To get them, issue the following command in your terminal:
Code:
source build/envsetup.sh
lunch
After the lunch command, choose your device. If you have a GSM version, choose cm_maguro, if you have the CDMA version, choose cm_toro. Additional files needed for your device are being downloaded right now.
Before you can actually build the rom, you’ll need to run two more commands to get some proprietary files.
1) Open a terminal and go to CM9/vendor/cm/. Run the following command:
Code:
./get-prebuilts
This will download term.apk and rommanager.apk. You will need these files otherwise you’ll get an error while building.
2) Now we need to grab some files from your phone. Make sure you have a working build cyanogenmod version (just install a nightly) on your phone. Make sure adb is setup properly (see beginning of this post)!
Connect your phone to the pc. Open a terminal and go to CM9/device/samsung/(Maguro OR Toro)/. Run the following command:
Code:
sh extract-files.sh
BUILDING CM9/CM10
The building part is very easy. It just requires two simple commands:
Code:
source build/envsetup.sh
brunch
After the brunch command, choose your device. Again, if you have a GSM version, choose cm_maguro, if you have the CDMA version, choose cm_toro. Depending on your computer, hopefully you’ll have a fully functioning CM9 or CM10 in 30minutes-2hours (or even longer) . You can find the rom in: /out/target/product/(Maguro OR Toro)/
Next time you build, first clean your working directory. Enter the following command in the terminal:
Code:
make clobber
This will completely remove your output directory!
To update the source, before each build just run:
Code:
repo sync
ADDITIONAL INFO
Install Java
Installing java is very easy in Ubuntu 12.04. Java 6 is recommended. To install it in Ubuntu 12.04 or Linux Mint 13, download the most recent Java 6 SDK from HERE. To install, open a terminal and run the following commands:
Code:
$ chmod +x jdk-6u34-linux-x64.bin
$ sudo ./jdk-6u34-linux-x64.bin
$ sudo mv jdk1.6.0_34 /usr/lib/jvm/
$sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_34/bin/java 1
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_34/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_34/bin/javaws 1
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config javaws
NOTE: after each 'update-alternative'-command, choose the correct (new) java version!
To check if you have the correct java version, type in a terminal:
Code:
java –version
I also added JAVA_HOME to my path; I don’t know if it is still necessary, but it doesn’t hurt either. First, check where java is located. In a terminal type:
Code:
which java
In my case the output shows /usr/bin/java, but it could be located somewhere else. Write down the path minus '/java'. Then open /home/USERNAME/.bashrc and add the following line to the bottom of the file:
Code:
export JAVA_HOME=/usr/bin
Of course replace /usr/bin with your path. Then save and close, and in a terminal run:
Code:
source ~/.bashrc
Odexed version
Some people like their rom to be odexed. There are multiple ways to achieve this (special thanks to Planet X for helping me with this):
1)Instead of ‘brunch’ do the following (if you are building for toro, replace maguro with toro):
Code:
source /build/envsetup.sh
lunch cm_maguro-user
make –j4
(Note:
taken from source.android.com: GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32.)
2)If you want to build an odexed version every time and just want to use the brunch command, do the following:
-Open build/core/main.mk
-Comment out (place a # at the beginning of the line) lines 240, 241, 245, and 246. Thus, replace:
ifneq (true,$(DISABLE_DEXPREOPT))
ifeq ($(user_variant),user)
Ifeq ($(HOST_OS),linux)
WITH_DEXPREOPT := true
Endif
endif
endif
Click to expand...
Click to collapse
# ifneq (true,$(DISABLE_DEXPREOPT))
# ifeq ($(user_variant),user)
Ifeq ($(HOST_OS),linux)
WITH_DEXPREOPT := true
Endif
# endif
# endif
Click to expand...
Click to collapse
Now you can use the brunch command to build an odexed version with insecure boot image.
Hopefully this guide will benefit some people, if not, it kept me busy for a while. Enjoy building!!
(btw, I'm not a native english speaker, so excuse me if I made errors in grammar )
Wow great work. These tutorials keep getting better making it so easy to compile your own rom!
So what does that "brunch" command actually do?
Is it just a script that does the make otapackage commands and stuff?
Infra said:
So what does that "brunch" command actually do?
Is it just a script that does the make otapackage commands and stuff?
Click to expand...
Click to collapse
Indeed! Brunch is actually a combination of 'lunch' and 'make'. Using the 'lunch-part' you choose your build (in our case the maguro or toro). Next, the 'make-part' actually gets things going. The nice thing using brunch is that it automatically detects the maximum number of threads it can use so that it will run at maximum speed.
Finally set my computer up to compile CM9 last night for the first time and after a few tries I finally got it going. The only problem is that I am now getting an error very close to this one.
http://forum.xda-developers.com/showpost.php?p=25452343&postcount=3093
That poster says that it has been happening for a few days now. Is this a known issue with compiling CM9 or is this just user error? I have tried twice compiling now and have had no luck. Is it working for anyone else?
---------- Post added at 02:05 PM ---------- Previous post was at 01:19 PM ----------
Here is the exact error that Im getting. I tried it again today just to see if it anything had changed.
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/mark/CM9/kernel/samsung/tuna'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
Thanks for this guide. I just built my first CM9 kang. Getting ready to flash it. Now to find a guide on what I can and can't change and recompile or do I just remove stuff and use 7-zip to zip it back up?
housry23 said:
Thanks for this guide. I just built my first CM9 kang. Getting ready to flash it. Now to find a guide on what I can and can't change and recompile or do I just remove stuff and use 7-zip to zip it back up?
Click to expand...
Click to collapse
Glad to hear you succeeded building your first kang. I don't really understand what you want to do next? If you want to remove stuff from the zip, you can. I for instance always remove stk.apk. But you can also modify the build files so that only things you want will be built. You can play around with the source code and things like that. Anyway, most of the answers you will find using google. I also very much like the development board on Rootzwiki; people are really helpful and friendly there. So if you have any specific questions, i recommend that forum as well!
mbroeders said:
Glad to hear you succeeded building your first kang. I don't really understand what you want to do next? If you want to remove stuff from the zip, you can. I for instance always remove stk.apk. But you can also modify the build files so that only things you want will be built. You can play around with the source code and things like that. Anyway, most of the answers you will find using google. I also very much like the development board on Rootzwiki; people are really helpful and friendly there. So if you have any specific questions, i recommend that forum as well!
Click to expand...
Click to collapse
Okay thanks. I was asking just what you answered. I want to be able to remove and/or add stuff to the zip for starters. I found the answer through Google, but I do appreciate you taking the time to answer. I'll definitely be visiting the Rootzwiki dev board. Thanks for the suggestion.
I have successfully compiled cm9 from source but have never tried to cherry pick or Kang anything yet. Could you quickly explain how you cherry pick with cm9?
Sent from my Galaxy Nexus using Tapatalk 2
SupWiz17 said:
I have successfully compiled cm9 from source but have never tried to cherry pick or Kang anything yet. Could you quickly explain how you cherry pick with cm9?
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Check out this link it may be helpful
http://rootzwiki.com/index.php?/topic/13189-[TUTORIAL]-Everything-you-ever-wanted-to-know-about-GIT#entry322735
Sent from my GT-S5360 using Tapatalk 2
That's a very useful link, thanks! In addition, if you want to cherry pick commits that haven't been merged yet -specific CM commits, such as navbar customization-, have a look here: http://review.cyanogenmod.com/#/q/branch:ics,n,z
Now let's say you see something interesting that you want to add. Then look at that commit and you'll see a 'download' command, such as "git fetch http://review.cyanogenmod.com/CyanogenMod/android_frameworks_base refs/changes/06/13306/15 && git checkout FETCH_HEAD". Just run that command and if everything works, you have succesfully cherry picked a commit. -of course, because these are not yet merged, there is the chance that no everything will work as it should-
There are also some GUI programs to manage git. I'm just about to try gitgui by all accounts it is very good.
Sent from my GT-S5360 using Tapatalk 2
Maybe it is a noobish question, but does this line:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > /bin/repo
miss a ~?
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
UncleDan said:
Maybe it is a noobish question, but does this line:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > /bin/repo
miss a ~?
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Click to expand...
Click to collapse
Not noobish at all! You're absolutely right. It's not necessary when you're already in your home folder, but to be sure I've changed it in the guide. Thanks for letting me know!
Sticky!!!!!
Thanks dude
Sent from my Galaxy Nexus using Tapatalk 2
im sorry for noobish...at this step
1) Create an empty file in ~/CM9/.repo
in home i have dir CM9 but its empty...i havent a folder call .repo
java its installed and adb work perfectly
this is my terminal output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 20774 100 20774 0 0 35679 0 --:--:-- --:--:-- --:--:-- 56604
[email protected]:~$ chmod a+x ~/bin/repo
[email protected]:~$ cd CM9
[email protected]:~/CM9$ repo init -u git://github.com/CyanogenMod/android.git -b ics
Your Name [loris]: loris
Your Email : my email
Your identity is: loris
is this correct [y/N]? y
repo initialized in /home/llo/CM9
[email protected]:~/CM9$
and nothing...
SOLVED
Hey mate any idea why my camera never works after a build... I know I'm missing something but I'm not sure what. I have all the proprietary files for my maguro etc but I just can't get camera to work... everytime
Sent from my Galaxy Nexus using Tapatalk 2
CdTDroiD said:
Hey mate any idea why my camera never works after a build... I know I'm missing something but I'm not sure what. I have all the proprietary files for my maguro etc but I just can't get camera to work... everytime
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
And you flash gapps everytime?
Sent from my GT-I9300 using Tapatalk 2
Infra said:
And you flash gapps everytime?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Sorted it out was just missing a few important files under /system/vendor thanks
Sent from my Galaxy Nexus using Tapatalk 2
CdTDroiD said:
Sorted it out was just missing a few important files under /system/vendor thanks
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Glad it worked out! Seems there have been a few changes lately, so I will add some more info soon.
Sent from my SGS3
Disclaimer - About 4Gb+ to download the source for ICS & 10GB+ are so for JB
You will need 25GB (or more) free to complete a single build, and up to 80GB (or more) for a full set of builds.
To compile android you will need an linux distro preferably an Ubuntu-based distributions such as Ubuntu, Linux Mint however, you can use almost any Linux environment as long as you have the right packages and configurations. In this tutorial I will be showing how to use two Linux distributions Arch-Linux and any Ubuntu-based distribution.
To build android you will need a 64bit OS.
For Ubuntu you need either 10.04LTS or 11.10,12.04 futher version may require some more changes so please research this for find out
For Arch you just need the packages below because Arch is awesome like that
Common Setup
1)SDK
May not be needed - [Untested] Please report if it works for you
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.
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:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Find your .profile file and add this at the bottom of the file:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.
To check for updates issue this into your terminal:
Code:
$ android
2) ADB Ubuntu
Note : Also for Arch if android sdk was downloaded
Configure your USB.
Code:
$ sudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
Code:
#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"
3) Save the file and close it and then issue this command:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
ADB Arch if android-sdk hasn't been installed
Code:
[FONT=Trebuchet MS][SIZE=4]$ sudo yaourt -S android-tools [/SIZE][/FONT]
4) Install the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ Reboot your pc.
5) Packages Arch
Pacman
Code:
$ sudo pacman -S perl git gnupg flex bison gperf zip unzip lzop sdl wxgtk \
quashfs-tools ncurses libpng zlib libusb libusb-compat readline schedtool \
optipng python2 perl-switch lib32-zlib lib32-ncurses lib32-readline \
gcc-libs-multilib gcc-multilib lib32-gcc-libs binutils-multilib libtool-multilib
[/SIZE][/FONT]
Yaourt
Code:
[FONT=Trebuchet MS][SIZE=4]$ sudo yaourt -S [/SIZE][/FONT][FONT=Trebuchet MS][SIZE=4]pngcrush sun-java6[/SIZE][/FONT]
Packages Ubuntu 10.04 - 11.10
Code:
[FONT=Trebuchet MS]$ sudo apt[/FONT][FONT=Trebuchet MS]-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \[/FONT][FONT=Trebuchet MS]
libxml2-utils xsltproc schedtool pngcrush[/FONT]
Packages Ubuntu 12.04 - 13.04
Code:
$ sudo apt-get install git gnupg flex bison gperf build-essential \
zip bzr 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 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool pngcrush
Sun Java 6
Code:
[FONT=Trebuchet MS][SIZE=4]$ sudo apt-get purge openjdk*
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer[/SIZE][/FONT]
Additional changes needed
On Ubuntu 10.10:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
$ sudo apt-get install libx11-dev:i386
On Ubuntu 12.04/13.04:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
6) Download the source
$ mkdir cm(name it whatever you want)
$ cd into the the directory you just created so for me $ cd cm
For CM10
$ repo init -u git://github.com/Quarx2k/android.git -b jellybean
For CM9
$ repo init -u git://github.com/Quarx2k/android.git -b ics
or
$ repo init -u git://github.com/tpruvot/android.git -b ics
For AOKP JB (Black screen bug unsupported do not build!!)
$ repo init -u git://github.com:Kayant/platform_manifest.git -b jb
For AOKP ICS
$ repo init -u git://github.com:Kayant/platform_manifest.git -b ics
For Slim Bean
$ repo init -u git://github.com/Kayant/platform_manifest.git -b SLIM
For CNA
$ repo init -u git://github.com/Kayant/android_manifest.git -b jellybean
For P.A.C
$ repo init -u git://github.com/Kayant/PAC_android.git -b jellybean
Now
$ repo sync
or
If you have a good connection try this
$ repo sync -j16
If it breaks reduce the number or just
$ repo sync
if you still cant just repo sync
$ repo sync -f
Again if you're still getting errors - A tip from my good friend Pottkopp just leave the pc to sync stop watching those videos, chatting, etc u get the idea because this needs a lot of bandwidth .....
Takes about 2 hours or more for me to sync
7) Ccache
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.
Put the following in your .bashrc or equivalent.
export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
export CCACHE_DIR=<path-to-your-cache-directory>
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code:
prebuilts/misc/linux-x86/ccache/ccache -M 50G
When building Ice Cream Sandwich (4.0.x) or older, ccache is in a different location:
prebuilt/linux-x86/ccache/ccache -M 50G
This setting is stored in the CCACHE_DIR and is persistent.
8) Building
All Jellybean roms now use mb526 build for Defy&Defy + thanks to the unified custom kernel
Cyanogenmod -
First you need to download the some stuff or CM won't build -
$ ./vendor/cm/get-prebuilts
If you are getting errors then read this post - here Thanks Skeevy.
Jellybean
$ source build/envsetup.sh && brunch mb526
ICS
$ source build/envsetup.sh && brunch jordan (for defy)
$ source build/envsetup.sh && brunch jordan_plus (for red lense including Defy+)
AOKP JB/ICS -
$ source build/envsetup.sh && lunch
choose aokp_mb526
Slim Bean -
$ source build/envsetup.sh && lunch
choose slim_mb526
CNA -
$ source build/envsetup.sh && lunch
choose cna_mb526
P.A.C
$ ./build-pac.sh mb526 true
Now to Build if the lunch command has been used-
Replace bacon with squish if building CNA
make -j# bacon(# represents double the cores you have on your computer)
So i have two cores so i do make -j4 bacon or you can use mka bacon and the
computer will choose the best one for you
After some hours or minutes if you have a beast of a computer your build should be complete... Well done ^_^
Use the signed zip to update the defy in recovery, don't use the ota package !
File is will be located in ~/out/target/product/mb526
E.g for defy aokp it will be out/target/product/mb526/then aokp_mb526-date.zip.
P.s if you get any errors search this thread first and google then post if you can't find your answer.
Credit and Thanks
Walter79 for his guide and help
Quarx2k, Epsylon3 Maniac103 and the many other moto devs for their work on the motorola devices
Dastin1015 for his guide as am using some of his instructions in this tutorial
Credit and thanks to Google for the guide I used the Ccache setup section from source.andriod.com
Gonna try this a little later
Sent from my MB526 using xda premium
Awesome guide , been looking for one
Defy-ing all limits.
Thanks ...... Tell me if i a have missed anything...... Am not great at explaining stuff
Is it the same procedure for a Defy+ (MB526) build?
!! Reboot for these changes to take effect.
Click to expand...
Click to collapse
A reboot isn't needed.
ok now go to to vendor/cm/proprietary and delete rom manager has you don't need it since our awesome Epyslon3 has a special modded one that is integrated in the build
Click to expand...
Click to collapse
How about Quarx builds? Is there also a manager included? Do I need a ROM manager at all for the ROM to work?
yodawg said:
Is it the same procedure for a Defy+ (MB526) build?
A reboot isn't needed.
How about Quarx builds? Is there also a manager included? Do I need a ROM manager at all for the ROM to work?
Click to expand...
Click to collapse
It doesn't hurt to do it does it ..... anyway all tutorials i have read said you should reboot so yh.....
Rom manager i think is needed by CM for it to build not really too sure but Epyslon3 told me himself that it's not needed i have builted about 10 or so times i can see that is true ..... For defy+ builds you need to edit your mainfest in the .repo folder in the folder you're using scroll down and edit it with gedit change it to ics-plus you will see a note on how to do it....
Now theres also a jelly bean branch, which doesnt differ that much from ics for now. What do i have to do to update my repo to jellybean without redownloading the whole thing? A simple "repo init -u git://github.com/Quarx2k/android.git -b jb" and "repo sync" in that ics directory? or does it mess up everything?
yodawg said:
Now theres also a jelly bean branch, which doesnt differ that much from ics for now. What do i have to do to update my repo to jellybean without redownloading the whole thing? A simple "repo init -u git://github.com/Quarx2k/android.git -b jb" and "repo sync" in that ics directory? or does it mess up everything?
Click to expand...
Click to collapse
Of course you have to re-download everything it's a different source from ICS but it's about the same size 6GB but i don't know if there is a point in trying at the moment since neither quarx2k or Epyslon3 have actually build it yet but you can try however, you need to update the device tree for JB quarx2k has started working on it......
and don't do it in the same folder expect if you delete .repo folder first but you might still get errors so you might aswell make a different folder also it should be repo init -u git://github.com/Quarx2k/android.git -b jellybean. Good luck
use this as an additional guideline - http://forum.xda-developers.com/showthread.php?p=28529222
@Kayant: do u think a core2duo 2.0 ghz with 4 gb RAM can build? If yes, How much time will it take approximately.
brajesh.sharma87 said:
@Kayant: do u think a core2duo 2.0 ghz with 4 gb RAM can build? If yes, How much time will it take approximately.
Click to expand...
Click to collapse
For me c2d 2ghz and 3gig ram took 5 hrs...(RAM at 1200mhz)
No background process...All resources to compiler...
Sent from my MB525 using xda premium
I want to mod a rom based on cm9, but I did not decide to use whose code
nogoodusername said:
For me c2d 2ghz and 3gig ram took 5 hrs...(RAM at 1200mhz)
No background process...All resources to compiler...
Sent from my MB525 using xda premium
Click to expand...
Click to collapse
Yh u should definently try it your system is more powerful than both mine and nogoodusername's... It takes me also about 4 hrs so it might be a bit less for u
Awesome How-To Maybe you should add packages needed in order to compile without error the rom.
However, I tried to build cm from source a month ago with my old pc. It took about 18 hours and it failed though. LOL
carlo93 said:
esome How-To Maybe you should add packages needed in order to compile without error the rom.
However, I tried to build cm from source a month ago with my old pc. It took about 18 hours and it failed though. LOL
Click to expand...
Click to collapse
What packages???
Edit - I think I see what u mean I will update this thread in a couple of days
Updated for JB and added AOKP
Enjoy building from source ^_^
Woo how come this thread never showed in search results
Sent from my MB526 using xda app-developers app
how big is source?
Sent from my MB526 using xda premium
nogoodusername said:
how big is source?
Sent from my MB526 using xda premium
Click to expand...
Click to collapse
About 4GB or so.... When you start compiling it requires like 25gb or more for one build.
kadavil said:
Woo how come this thread never showed in search results
Sent from my MB526 using xda app-developers app
Click to expand...
Click to collapse
It had a different name
Awesome guide.....fr starters like me....this is gonna be my challenge fr next hols.....I will try aosp gb.....must be the lightest one....!!!!....thnx
Sent from my MB526 using xda app-developers app
BUILDING CM9 FROM SOURCE FOR THE KINDLE-FIRE
This is a guide to help with building a rom from Hashcodes source for the kindle fire.
I am no Dev so please go easy, and if you see any mistakes let me know and I will amend them, It took me a week of reading and asking numerous questions (to proper :angelev's:angel with lot's of mistakes to build my first rom.
Below is what worked for me in the end, (but from what I have learnt, every setup is different).
I'm posting this guide hoping it may help in someway, but please read and research as much as possible before starting
Please follow this guide at your own risk.
Please don't blame me if anything in this thread messes with your system.
I tried lot's of things and in the end I installed a new ubuntu 11.10 x64bit on a external 500gb hdd, (the nice thing now is that all my building etc is all done on a external hdd so I can not mess up my pc AGAIN
I tried 32 bit (but java didn't like that)
I tried ubuntu 12.04 (which is what I dual boot on my laptop)
and the one that worked for the following info was ubuntu 11.10 x64bit.
So here goes.
First you need the following installed.
sun-java6-jdk
android sdk (adb etc) (setup as normal for the kindle fire).
eclipse classic.
Then you set up extra build-essentials
Install the Build Packages
sudo apt-get install*git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
sudo apt-get install*g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
Install the repo
mkdir -p $HOME/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > $HOME/bin/repo
Then add the following to your path (e.g. in $HOME/.bashrc)
export PATH=$HOME/bin:$PATH
Then onto the build setup.
mkdir -p $HOME/otter/cm9
cd $HOME/otter/cm9
repo init -u https://github.com/CyanogenMod/android.git -b ics
download the local_manifest to .repo
curl -L -o .repo/local_manifest.xml -O -L https://raw.github.com/KFire-Android/android_local_manifest/ics/local_manifest.xml
at this point you should have a folder called otter inside your home folder and inside this a folder called cm9.
If you show hidden folders in cm9 you should also find a folder called .repo, inside you should have your local manifest, open with a text editor (ie. gedit) and make sure it looks like this.
(hashcodes manifest as of 07/03/2012)
**
****
****
****
****
****
****
****
**
Then sync your repo
repo sync -j4 (duel core)
(this can take a while (mine took 6 hours) (I have a laptop with dual core but only 1.3ghz).
this script uses ccache which will make subsequent builds at least two times faster.
Code:
#!/bin/bash
if [ -z "$1" ]; then
echo "usage: build.sh "
exit 1
fi
device=$1
# ensure ccache is in the path
export PATH="$PATH:$PWD/prebuilt/$(uname|awk '{print tolower($0)}')-x86/ccache"
setup()
{
USE_CCACHE=1
CCACHE=ccache
CCACHE_BASEDIR="$PWD"
CCACHE_DIR="$PWD/.ccache"
#export CCACHE_COMPRESS=1
export USE_CCACHE CCACHE_DIR CCACHE_BASEDIR
if [ ! "$(ccache -s|grep -E 'max cache size'|awk '{print $4}')" = "10.0" ]; then
ccache -M 10G
fi
source build/envsetup.sh
#lunch cm_$1-userdebug
}
setup $device
LOGFILE=build_${device}_$(date +%Y%m%d_%H%M).log
START=$(date +%s)
#make -j`cat /proc/cpuinfo| grep processor | wc -l` bacon 2>&1 | tee $LOGFILE
brunch $device 2>&1 | tee $LOGFILE
END=$(date +%s)
ELAPSED=$((END - START))
E_MIN=$((ELAPSED / 60))
E_SEC=$((ELAPSED - E_MIN * 60))
printf "Time to compile: " >> $LOGFILE
[ $E_MIN != 0 ] && printf "%d min(s) " $E_MIN >> $LOGFILE
printf "%d sec(s)\n" $E_SEC >> $LOGFILE
grep "Time to compile" $LOGFILE
copy/paste the text in a file called $HOME/build.sh, make it executable (chmod 775 build.sh). The script also saves the build output to a file called build_otter_.log.
then onto the build.
cd vendor/cm
./get-prebuilts
cd ../../
then onto buiding
source build/envsetup.sh
then this is the build command
brunch otter (this starts build)
Enjoy
To start over and wipe "out" folder
(from within /otter/cm9)
make clobber
or
rm -rf out/target
build.sh otter
(this can take awhile (mine took another 6 hours)
I had a few things missing and at various times throughout the setup/build I had to download some missing libs. etc (I was prompted all the way through, it would tell me I had so & so file missing and I just used the software centre to dl the missing files).
By all means ask me questions but don't be offended if I answer back “sorry I don't know” as I've already mentioned I am learning myself.
Cheers
Steve
:good:Thanks to Twa_priv & Hashcode with helping me with my rom and this guide:good:
If there are any mistakes/updates to change/modify please let me know.
PLEASE PRESS THE THANKS BUTTON IF YOU FOUND THIS THREAD HELPFULL AND HAPPY ROM BUILDING
helpful links (if you want to add a different guide let me know)
Ubuntu usb install
[B]http://www.ubuntu.com/download/help/create-a-usb-stick-on-ubuntu[/B]
Ubuntu iso
[B]http://releases.ubuntu.com/11.10/[/B]
another build guide (ubuntu 12.04) Thank SBlood86 for this one https://github.com/KFire-Android/and..._manifest/wiki
I can only find the Ubuntu 12.4 on their website, I am running windows 7. If it's not too much can you put links to where the software is downloaded from. Thanks Lovejoy.
TahrirSquare said:
I can only find the Ubuntu 12.4 on their website, I am running windows 7. If it's not too much can you put links to where the software is downloaded from. Thanks Lovejoy.
Click to expand...
Click to collapse
http://lmgtfy.com/?q=ubuntu+11.10+download
Links added ^^^^^^^^^^^^^^^
I think you should add downloading the repo script:
mkdir -p $HOME/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > $HOME/bin/repo
Then add the following to your path (e.g. in $HOME/.bashrc)
export PATH=$HOME/bin:$PATH
twa_priv said:
http://lmgtfy.com/?q=ubuntu+11.10+download
Click to expand...
Click to collapse
Wow what was that, First time I see such a link. cool. Thanks
Thanks Twa_priv (info added to op)
(would not get very far without that
what does this bit do? cd ../../
You should add the build.sh script in there that twa-priv provided us with when we made our builds
Other than that looks great
Sent from my Amazon Kindle Fire using xda app-developers app
lovejoy777 said:
Thanks Twa_priv (info added to op)
(would not get very far without that
what does this bit do? cd ../../
Click to expand...
Click to collapse
This gets you back to the base directory so that "source build/envsetup.sh" works.
all above notes added to op
Thanks guy's
Incidentally the build instructions for Ubuntu 12.04 are here...
https://github.com/KFire-Android/android_local_manifest/wiki
I never put the instructions for older versions on there because they were on the Google and CM pages... Either way, very nice write up
SBlood can I put your guide in the op as well
Sent from my Galaxy Nexus using xda premium
lovejoy777 said:
SBlood can I put your guide in the op as well
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Go for it; if you'd like to see anything added to the wiki shoot me an email.
Please change editor to gedit not gimp
Thanks
thanks, oops
Sent from my Galaxy Nexus using xda premium
Just wondering, does it have to be Sun JDK 6? Will it work with Sun JDK 7 or OpenJDK?
I did a clean install of Ubuntu and the PPA I used to download JDK 6 doesn't work anymore
Only JDK 6 .
Envoyé depuis mon GT-I9000 avec Tapatalk
Trojan38 said:
Only JDK 6 .
Envoyé depuis mon GT-I9000 avec Tapatalk
Click to expand...
Click to collapse
Dang ok. Now I have to figure out how to install JDK 6. lol :silly:
Sorry I can't thank you. I ran out of thanks
---------- Post added at 07:02 PM ---------- Previous post was at 06:21 PM ----------
It's not letting me install JDK 6 at all. What do I do...?
EDIT: Found a way to install. Thanks for the help. http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/
veeman did you not have it before?
Sent from my Galaxy Nexus using xda premium
If you see mistakes please contact me. If you think something can be shorter, easier, feel free to suggest.
I have spent a lot of time figuring this out. Not to mention making this guide.
I DO NOT RESPOND TO PRIVATE MESSAGES. EVERYTHING YOU NEED IS IN HERE.
If this guide helped you feel free to donate.
There is more to come, using different toolchains, important files, adding overclocking etc.
Setting up the environment & building the kernel for the first time
Ubuntu 12.04 64-Bit
Linux Mint 13 64-Bit
Compiling Jelly Bean AOSP ROMs with these 2 is possible WITHOUT ADDITIONAL WORK.
If you want to use virtualization software, do NOT use Virtualbox. You can run into networking issues and so on. I suggest using VMWare Player instead, which is available for free on http://www.vmware.com
Installing latest updates & reboot.
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo reboot
Click to expand...
Click to collapse
Now we will download and install the latest Java 6 JDK from here. Look for Java 6 SE Update 33 or a later update version. Don't download Java 7 JDK. I am downloading the file below for this guide.
Linux x64 68.69 MB jdk-6u33-linux-x64.bin
Click to expand...
Click to collapse
This guide assumes you have downloaded the file in the folder
~/Downloads
Click to expand...
Click to collapse
$ cd ~/Downloads
$ sudo chmod +x jdk-6u33-linux-x64.bin
$ ./jdk-6u33-linux-x64.bin
$ sudo mkdir /usr/lib/jvm
$ sudo mv jdk1.6.0_33 /usr/lib/jvm/jdk1.6.0_33
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_33/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_33/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_33/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_33/bin/jar 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_33/bin/javadoc 1
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config jar
$ sudo update-alternatives --config javadoc
$ java --version
$ ls -la /etc/alternatives/java*
Click to expand...
Click to collapse
Now reboot is optional but welcome. Let's play safe.
$ sudo reboot
Click to expand...
Click to collapse
Install all required packages to play with Android.
Ubuntu 12.04
$ sudo apt-get update
$ 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 git
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
$ sudo reboot
Click to expand...
Click to collapse
Configure USB ports.
$ sudo gedit /etc/udev/rules.d/51-android.rules
Click to expand...
Click to collapse
This file should get the contents:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
Click to expand...
Click to collapse
Don't forget to replace the red marked text with your username from Ubuntu or Linux Mint.
When building a kernel, you only need to start from here. Pick the appropriate branch from the git manually. My example below shows how to download the required files to build a Jelly Bean kernel. What I did was visiting the git repository each time and picked the appropriate branch.
https://android.googlesource.com/device/samsung/maguro
$ mkdir ~/Documents/kernel
$ cd ~/Documents/kernel
$ git clone https://android.googlesource.com/device/samsung/maguro -b jb-release
Click to expand...
Click to collapse
Again pick the right branch from https://android.googlesource.com/kernel/omap.git
$ cd maguro
$ git clone https://android.googlesource.com/kernel/omap.git -b android-omap-tuna-3.0-jb-pre1
Click to expand...
Click to collapse
Ensure the toolchain is in your path.
Default, Easy solution
$ git clone https://android.googlesource.com/platform/prebuilt -b jb-release
$ export PATH=$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
Click to expand...
Click to collapse
$(pwd) is a variable holding the current working directory.
Bandwidth-friendly solution
You can also download the toolchain to another directory. Bit first write down the directory you are working at.
mkdir ~/Documents/toolchain
cd ~/Documents/toolchain
$ git clone https://android.googlesource.com/platform/prebuilt -b jb-release
export PATH=~/Documents/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
Click to expand...
Click to collapse
Instead of specifying the location of the toolchain with a relative path, we must specify the absolute path here.
Now we go back to where we were working.
cd ~/Documents/kernel/maguro
Click to expand...
Click to collapse
I hope you understand why I mentioned the bandwidth-friendly solution. With little insight you could have come up with it yourself.
Now let's build the kernel
$ cd omap
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
$ make tuna_defconfig
$ make
Click to expand...
Click to collapse
[*]Now you need to put it in a flashable zip.
Possible issues, things to avoid, FAQ
- Avoid downloading the kernel sources to directories which might require root/superuser access. This is one of the reasons I downloaded all sources to '~/Documents'. This will save a lot of time messing with chmod or chown commands.
- What is 'tuna', shouldn't this be maguro? No, actually not. Tuna is the board name, while maguro is the codename of the Nexus. Something you might want to remember when building kernels.
Interesting files and locations
<kernel_directory>/samsung/arch/arm/mach-s5pv210/cpu-freq.c
Overclocking
Voltages
Links to mods, source code, ...
Only do these when you are in the omap directory
Getting access to Ezekeel's work
git remote add ezekeel https://github.com/Ezekeel/GLaDOS-nexus-prime.git
git fetch ezekeel
Click to expand...
Click to collapse
If you want to change the text marked in red make sure to change the other one as well. You can think of this as a nickname for the remote repository.
Example of cherry-picking CUSTOM VOLTAGE
1. Go here: https://github.com/Ezekeel/GLaDOS-nexus-prime/commits/customvoltage_JB
2. Copy the SHA of the commit
3.
git cherry-pick 05ab84fa9bc1fa86e5a99c54266873e433ff15e2
Click to expand...
Click to collapse
template
git cherry-pick <SHA>
Click to expand...
Click to collapse
When encountering conflicts, you are on your own. I figured most of this out on my own. So if I can do it you can too.
Getting access to Francisco Franco's work
git remote add franco https://github.com/franciscofranco/Tuna_JB_pre1.git
git fetch franco
Click to expand...
Click to collapse
Getting access to http://www.kernel.org
git remote add kerneldotorg git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git fetch kerneldotorg
Click to expand...
Click to collapse
red 2 days ago yours guide linked in sig.you sad that with ubuntu 12.10 aosp rom are impossible to compile,it's fine only for kernel and for aosp rom should use version 10.xx.now instead you say 12.xx is good for kernel and rom compiling,but from JB and so on.(Compiling AOSP ROMs with these 2 is possible. Only Jelly Bean and later though will compile without additional work)
after that,i think (after reading yours words)that until iCS 12.xx doesn't compile and from jb a so on 12.xx works good?i'm right or i I misunderstood?i'm totally noob on this things,compiled my fist rom 15 days ago,begin with JB but compiled already in mint mate 13,mint cynnamon 13,ubuntu 10.10 and 12.04\10.
very thanks for this guide man,it's very usefull and having already the environment setted it's very fast also.followed instruction in yours sig days ago and with no luck.now i retry with this!on mint 13 cynnamon 64bit now.regards cherrypicking...what you wrote is all we have to known for or is a base?
rated 5 stars and thanked.like this 3ads aims to help everyone begin do things yourselves on android
Good tutorial. Thanks for taking the time to write this.
How many gigs do I need to compile the kernel? I only have a 120gb ssd and 75gb free.
Sent from my Galaxy Nexus using Tapatalk 2
you are safe..
Serious_Beans said:
How many gigs do I need to compile the kernel? I only have a 120gb ssd and 75gb free.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
They are enough
For kernel compiling we don't need any version of java
Inviato dal mio Galaxy Nexus con Tapatalk 2
sert00 said:
red 2 days ago yours guide linked in sig.you sad that with ubuntu 12.10 aosp rom are impossible to compile,it's fine only for kernel and for aosp rom should use version 10.xx.now instead you say 12.xx is good for kernel and rom compiling,but from JB and so on.(Compiling AOSP ROMs with these 2 is possible. Only Jelly Bean and later though will compile without additional work)
after that,i think (after reading yours words)that until iCS 12.xx doesn't compile and from jb a so on 12.xx works good?i'm right or i I misunderstood?i'm totally noob on this things,compiled my fist rom 15 days ago,begin with JB but compiled already in mint mate 13,mint cynnamon 13,ubuntu 10.10 and 12.04\10.
very thanks for this guide man,it's very usefull and having already the environment setted it's very fast also.followed instruction in yours sig days ago and with no luck.now i retry with this!on mint 13 cynnamon 64bit now.regards cherrypicking...what you wrote is all we have to known for or is a base?
rated 5 stars and thanked.like this 3ads aims to help everyone begin do things yourselves on android
Click to expand...
Click to collapse
ICS didn't compile here on Ubuntu 12.04. I believe I needed to do some additional work. ICS was also released before Ubuntu 12.04 was released. Jelly Bean will compile just fine.
The only thing that was difficult to figure out was how to setup the Java 6 JDK properly which I had to figure out by trial and error.
The cherry-picking is handy when you want to 'steal' someone else his work. Let's say 99% of the developers do this all the time here on XDA. I wanted to explain how to cherry-picking because it's useful to know. I spent a long time getting here.
Serious_Beans said:
How many gigs do I need to compile the kernel? I only have a 120gb ssd and 75gb free.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I think 4-5GB if you download everything. If you only download the Jelly Bean things by only downloading the branch you need you will use about maybe 1GB I am not sure. Try it out.
Download the toolchain to a separate directory. This will save lots of bandwidth in the future.
Good job on this guide. I learnt this ages ago though
Sent from my Galaxy Nexus using xda premium
i'm interesting about linaro but i don't know how set it up,can you say something about this?
Sent from my Galaxy Nexus
dxdiag32 said:
i'm interesting about linaro but i don't know how set it up,can you say something about this?
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Linaro is easy.
Google to download the linaro toolchain from their website. And then it's a bit trial and error to fill in:
CROSS_COMPILE line
it's not arm-eabi- anymore buy gnu-arm-eabi or something similar. It has to do with the directory structure or the filenames.
If you get a compile error about vfp or something you must correct this in a make file.
Take a look in francisco franco's github account or AIR Kernel. They have commit which describe what they did if they ran into compile errors. Normally you won't have to change anything I think.
Thanks OP. Maybe when I'm free I'll give this a try. I always wanted to try to make a stock kernel + colour tweaks + trinity contrast + 384 GPU for my own use. As this is considered I am "stealing" work, I wouldn't bother uploading this kernel I have compiled stock AOSP 4.0.4 (referring a guide) for the galaxy nexus. Except I didn't test out the rom as I didn't own a nexus back then.
Sent from my Galaxy Nexus using Tapatalk 2
thanks OP, but why apt-get install openjdk after manually install JDK 6? it is nothing about kernel compile but fail on the whole aosp compile.
Sent from my Galaxy Nexus
Thanks a lot for this tuto.
I'm trying to compile GlaDos kernel with Ubuntu 12.10 and i have this error :
Code:
[email protected]:~/android/kernel/GLaDOS-nexus-prime$ make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: « include/generated/mach-types.h » est à jour.
CC kernel/bounds.s
cc1: error: unrecognized command line option "-mno-unaligned-access"
kernel/bounds.c:1: warning: switch -mcpu=cortex-a9 conflicts with -march= switch
make[1]: *** [kernel/bounds.s] Erreur 1
make: *** [prepare0] Erreur 2
Do you have an idea where it may come from ?
What is the version of your toolchain?
Sent from my Galaxy Nexus using xda app-developers app
anarkia1976 said:
What is the version of your toolchain?
Sent from my Galaxy Nexus using xda app-developers app
Click to expand...
Click to collapse
I took the one in the 1st post :
Code:
git clone https://android.googlesource.com/platform/prebuilt -b jb-release
It's arm-eabi-4.4.3
I tried with Ubuntu 12.04 to be exactly in the same conditions as described in the 1st post but I have exactly the same error...
That is really weird... Any ideas ?
Remove from makefile this:
-mno-unaligned-access
Otherwise you can use new toolchain from my github:
https://github.com/anarkia1976/AK-linaro
anarkia1976 said:
Remove from makefile this:
-mno-unaligned-access
Otherwise you can use new toolchain from my github:
https://github.com/anarkia1976/AK-linaro
Click to expand...
Click to collapse
Thanks anarkia1976 !
I've been able to compile with the last version of your toolchain. :good:
No problem .. if I can help it is a pleasure.
anarkia1976 said:
No problem .. if I can help it is a pleasure.
Click to expand...
Click to collapse
I noticed JZO54K has a crashing camera bug. I checked several times, redownloaded everything on different devices being maguro and grouper.
Has anyone managed to build CM10 or AOSP on Ubuntu 12.10 ? When installing the same packages I notice everything crashes. It's unclear if it's actually the packages or Google Chrome. I suspect one of the packages being the culprit.
I am going one by one through the packages in Ubuntu 12.10. Those willing to help me let me know. just install each package one by one.
INDEX
Code:
*Setting up the Workspace
*Syncing Source
*How to build
Code:
Pls use this version you compiled, not to spam dev forums! We have already working Releases of CM7 for our GIO!!!
About Me:
Im using a VirtualMachine with Ubuntu 11.10 and every cm based Rom compiles fine for me :silly:
And: i found out that many users want to build from source, but dont know how!
So i decided to create a how to
Click to expand...
Click to collapse
I will post some other guides related to gio here!
Maybe with: How to build AOKP Jellybean or MIUI JB/ICS - Cyanogenmod 9/10
Click to expand...
Click to collapse
Install Android SDK
First of all: Download the Android SDK r21 for Linux x64
After you downloaded it: open your terminal ...
then type in (1Command = 1 Line!)
Code:
cd ~
mkdir android
tar -zxvf ~/Downloads/android-sdk_r21-linux.tgz
mv android-sdk-linux ~/android/sdk
Next we need to set up the sdk, to run "adb" command from any directory in terminal
Code:
sudo gedit .bashrc
Now add these lines to the bottom of the document:
Code:
export PATH=${PATH}:~/android/sdk/platform-tools
export PATH=${PATH}:~/android/sdk/tools
export PATH=${PATH}:~/android/bin
export PATH=${PATH}:~/bin
Next is, Set up the 51-android.rules, to get an adb connection from usb to ubuntu:
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Next, add these lines to the document that has been opened:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="10A9", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666", OWNER="leob" #Galaxy Nexus
Gratulation, u finally setted up the Android SDK (Dont worry if Android SDK wont work [ADB]! it needs a package we download later )
Installing JAVA 6 (JDK)
type in terminal: (remember: 1 line = 1 command)
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk
(TIP: Use to keyboard (Right-Left-Top-Bottom)-Button to press ok & yes)
Installing the SDK
type in terminal (remember 1 line one command!)
Code:
cd android
cd sdk
cd tools
./android
Now the SDK Manager will be opened!
tick the small box leftside of the "SDK Android Platform tools" Part!
After its done, click "install 1 package..."
Now a window gets opened, select "Accept All ..." and click "Install"
After its done, click "close"! gratulations you now have the SDK installed
Installing required depencies
################# Ubuntu 11.10 #################
If you are using a 32 Bit inviroment of Ubuntu 11.10: (copy and paste this completely in terminal & press ok ^^)
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
Im devloping on a 64 Bit Platform of Ubuntu 11.10 (I recommend it : (copy and paste this completely in terminal & press ok ^^)
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind lib32readline-gplv2-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32z-dev pngcrush schedtool
############################################
################# Ubuntu 10.04 #################
If you are using a 32 Bit inviroment of Ubuntu 10.04: (copy and paste this completely in terminal & press ok ^^)
Code:
coming later :P
Im devloping on a 64 Bit Platform of Ubuntu 10.04 (I recommend it : (copy and paste this completely in terminal & press ok ^^)
Code:
coming soon xD
############################################
Syncing the Source
In terminal: (1 line = 1 command)
This is only to initialize the GIT commands to sync the repo later
Code:
cd ~
mkdir bin
Now i recommend to close all Terminals! (BEST: Reboot Ubuntu)
After its done, open Terminal once more and type in (1 line = 1 command):
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now cd to android:
Code:
cd android
################# CM7 #################
Then create a new directory:
Code:
mkdir cm7
(just for example / but you can do it)
Now cd to your created directory:
Code:
cd cm7
After that you can initialize the repo command! (1 line = 1 command!)
Code:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
######################################
################# CM9 #################
Then create a new directory:
Code:
mkdir cm9
(just for example / but you can do it)
Now cd to your created directory:
Code:
cd cm9
After that you can initialize the repo command! (1 line = 1 command!)
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
######################################
Now you can sync the repo to your local directory! (REMEMBER: This takes minutes [for me] and hours, days maybe for you!)
Code:
repo sync
################# CM7 #################
Add the lunch combo
Download this file with ubuntu
Push it to "android/cm7/vendor/cyanogen/products"!
This step is important because our device is not supported officialy from the Cyanogenmod Team
#######################################
Syncing Gio Device Tree
after the source sync is done and you can type commands now, you can sync the device tree!
First, cd to the devices/samsung directory (1 Command = 1 line):
Code:
cd device
mkdir samsung
cd samsung
################# CM7 #################
Now (i personally use the source by phiexz bcause its almost bugfree and the Governeur problem isn´t there anymore)
we type the commands for the Gio device tree (CD to samsung directory first, like above ^^)
Code:
git clone git://github.com/marcin1147/android_device_samsung_gio.git gio
After its done, u can cd back to your cm7 directory:
Code:
cd ..
cd ..
xD
######################################
################# CM9 #################
Now we type the commands for the Gio device tree (CD to samsung directory first, like above ^^)
Code:
git clone git://github.com/Jellaxy/android_device_samsung_gio.git -b ics gio
Code:
git clone git://github.com/Jellaxy/android_device_samsung_msm7x27-common.git -b ics samsung-msm7x27
After its done, u can cd back to your cm9 directory:
Code:
cd ..
cd ..
xD
Get the vendor for cm9:
cd to vendor! (1 Line = 1 Command)
Code:
cd vendor
This is for the vendor sync (no extra directorys needed
Code:
git clone git://github.com/Jellaxy/proprietary_vendor_samsung.git -b ics samsung
######################################
now we need to get the actual rommanager.apk!
type this in terminal
Code:
~/android/cm7/vendor/cyanogen/get-rommanager
After Rom Manager has been downloaded, you can continua with the ""Build it Part"
Build it
now when you are in the cm7 directory, you need to configure the vendor and some other parts of it (1 line = 1 command):
Code:
. build/envsetup.sh
lunch cyanogen_gio-eng
to build cm7 one last command:
Code:
make -j6 bacon
or not ? ^^
You can also do it using marcin profile, which do not need vendor folder.
Also, you do not need the 'push-to-vendor' step using a special passage.
Maybe we could work on a local_manifest.xml... and on an official CM7... pm me if you want.
ahhh, this is what I need. Thanks for making this tutorial. Gonna bookmark this page
nice job tanx
might help for making official cm7..
yeah ...
but i need to figure some parts out before :/
wifi cant be turned on if i build using phiexz device config, might i gonna use marcins and make some changes to fix som ethings
AufKoka said:
yeah ...
but i need to figure some parts out before :/
wifi cant be turned on if i build using phiexz device config, might i gonna use marcins and make some changes to fix som ethings
Click to expand...
Click to collapse
Think it's kernel related, in fact there's an issue on github on phiexz kernel.
At first, you can try using marcin kernel.
At second, I'm downloading phiexz and try building CM7 with marcin config... if it works, it's good.
AufKoka said:
yeah ...
but i need to figure some parts out before :/
wifi cant be turned on if i build using phiexz device config, might i gonna use marcins and make some changes to fix som ethings
Click to expand...
Click to collapse
making it official would really be great.
it seems that phiexz kernel and device config have problems with wifi sometimes, I think it won't be when using marcin's.
voetbalremco said:
might help for making official cm7..
Click to expand...
Click to collapse
The CM team will never do anything official for a gio.
This comment makes zero sense.
On topic, decent guide.
CM make official for beni,cooper and tass , so why not gio?
Sent from my GT-5660 using xda-developers app
Frankin96 said:
CM make official for beni,cooper and tass , so why not gio?
Sent from my GT-5660 using xda-developers app
Click to expand...
Click to collapse
In fact, only tass.
On get.cm there are only tass builds.
BTW...
#PROGRESS 1: Build done with marcin's profile. Will test at home
Frankin96 said:
CM make official for beni,cooper and tass , so why not gio?
Sent from my GT-5660 using xda-developers app
Click to expand...
Click to collapse
Cyanogenmod need the maintainer that had good device tree from specific device, and then submit the gerrit to cm. As you know, before Phiexz was 'gone away', he planned to do that :| But, i think he was busy with his job, and have no time to develop again.
ItachiSama said:
In fact, only tass.
On get.cm there are only tass builds.
BTW...
#PROGRESS 1: Build done with marcin's profile. Will test at home
Click to expand...
Click to collapse
ace has official nightlies. codename cooper = ace
http://get.cm/?device=cooper
---------- Post added at 12:45 PM ---------- Previous post was at 12:39 PM ----------
mussieonlinux said:
The CM team will never do anything official for a gio.
This comment makes zero sense.
On topic, decent guide.
Click to expand...
Click to collapse
it does.
http://www.cyanogenmod.org/blog/developer-relations
Every good open source software project grows. With that growth, it sometimes becomes difficult to communicate with people within that project. This is true for the CyanogenMod project as well. With our continued growth, change is coming as well. A major change is to make it easier for outside developers to communicate with the CyanogenMod project.
This is where I, and this blog post, come into play. Are you maintaining a device that is not currently maintained by the CM team? Do you wish for that device to be added to the list with your support? Have you found a vulnerability that you discovered that needs to be disclosed? Is there a problem with code used that needs attention? There is now a face for you to communicate with to get these things taken care of.
I’ve been in the background of the CyanogenMod project for just over two years now. With the knowledge I’ve gained, I am now taking on the roll of making it easier for outside developers to work within the project. This change will help us to continue and grow as the number one aftermarket Android distribution. Please do not read this as a new contact for bug reports or feature requests. Bugs and features are to be reported on the CyanogenMod bug tracker. Code submissions will still be handled through our gerrit instance. This new contact avenue is to assist the community in ways previously described.
You can contact me via email at devrel _at_ cyanogenmod _dot_ com. I look forward to getting the ball rolling on whatever needs to be taken care of.
Here are the currently available resources for the community:
CyanogenMod Code Review
CyanogenMod Bug / Issue Tracker
CyanogenMod Forum
CyanogenMod Wiki
*Edit* Please do not send device requests. If you want to add a device to CyanogenMod and are going to do the work on it, this would be your contact avenue. Please keep requests to the Issue Tracker.
This avenue is also for questions about development process or submission guidelines. CyanogenMod does not want to exclude anyone from the development process. We want to give you as much help as possible when adding your work to ours.
Click to expand...
Click to collapse
i will publish that if we got an almost bugfree build
i have configured already my own device tree
Now lets see how to handle the github with push and pull requests ^^
If you want, I can publish online my device config (marcin one, will work on) and then link it to you and else.
I think that marcin device config is better cuz of no wifi issues and Camera could be easily fixed...
Thread moved to general.
Nice thread, gave it a sticky.
YZ.