I'm always surprised at the lack of good documentation for CM. But I thought I'd put together a quick guide for building CM9 on the G2X (this has been tested only on Ubuntu 11.10 32-bit)
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 libncurses5-dev zlib1g-dev openjdk-6-jdk pngcrush schedtool
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Code:
cd ~/android/system/
../../bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
This is important:
You'll need to add the following lines to "~/android/system/.repo/manifest.xml"
Code:
<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
Then you can run:
Code:
../../bin/repo sync -j16
I've had some issues with repo syncing properly, you might have to run this command a few times (don't be afraid to close the console and try running it again if it hangs)
Then you run:
Code:
~/android/system/vendor/cm/get-prebuilts
Please read the following:
In most guides you read, you are told to run "extract-files.sh" with the device plugged in, to pull the proprietary files off the phone. Do not do this. That script hasn't been updated for ICS and doesn't pull the needed files. Do the following instead:
Code:
cd ~
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics
Then, make a new folder inside "~/android/system/vendor" named "lge". Copy the p999 folder inside ~/proprietary_vendor_lge into ~/android/system/vendor/lge.
Then you can run:
Code:
cd ~/android/system
. build/envsetup.sh
brunch p999
Please post any questions here, I'll try my best to answer them. There may be typo' so please let me know if you run into any issues, thanks!
Not to be snide, but maybe a 'tutorial' or link to a thread which explains the individual commands. Some of them I am familiar with, either because something like CD exists on PC as well or through beating my head into a table trying to find explanations of commands and either by way of a quick comment or s/g I get the answer. But I've had a hard time finding an explanation of android-related commands or CWM scripts. In short, for people who aren't noons but aren't Linux savvy or what not, a guide or link would be nice.
Otherwise, sweet! Thanks!
Sent from my LG-P999 using xda premium
@Волк,
If you dont know what something(tool, cmd, etc.) is, type man in your terminal. Ex: man git. You can also type the tool/cmd name and use the help switch. Ex: git --help Sometimes the help switch will vary. Could be --help, -h, or --h. Online Linux man pages can be found at Linux.die.net
-----------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------
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 openjdk-6-jdk pngcrush schedtool
*sudo apt-get is used to install packages in the terminal. The packages above are un-met dependencies such as java, tools, development files/packages, etc.
Also can be done in the software center.
----------------------------------------------------------------------
mkdir -p ~/bin
*mkdir is a tool/cmd to make a directory and the -p is a switch to make a parent directory.
----------------------------------------------------------------------
*The ~ is a command line shortcut. Instead of typing /home/computername/ use the ~ instead.
----------------------------------------------------------------------
mkdir -p ~/android/system
*same as above.
----------------------------------------------------------------------
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
*curl is a tool to transfer data to or from a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction. curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume and more. curl is powered by libcurl for all transfer-related features.(Taken from the man pages)
in this case your downloading a git repo and piping it to ~/bin/repo. Type https://dl-ssl.google.com/dl/googlesource/git-repo/repo in your browser without the pipe and see what happens. But piping or directing output can be done by using the > symbol.
----------------------------------------------------------------------
chmod a+x ~/bin/repo
*chmod means to (CH)ange file (MOD)e bits. A is for all users, U is for root only, and O is for other(guests). You can add modes or remove them with the + or - signs. Permissions are r for read, w for write and x for execute. Sometimes you will need to be root to change/modify modes/permissions.
----------------------------------------------------------------------
CD means to (c)hange (d)irectory. Ex: cd /home/ubuntu/Documents/
----------------> I AM NOT TOO FAMILIAR WITH GIT, SVN, ETC.
Thank you for posting this guide. I have not tested it yet because I am out of town for work. I an going to attempt building this weekend. I used to roll my own on CM7 and want to do the same with CM9. Is the packages required to build CM9 the same as CM7 (software environment)?
loganmc10 said:
Please read the following:
In most guides you read, you are told to run "extract-files.sh" with the device plugged in, to pull the proprietary files off the phone. Do not do this. That script hasn't been updated for ICS and doesn't pull the needed files. Do the following instead:
Code:
cd ~
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics
Then, make a new folder inside "~/android/system/vendor" named "lge". Copy the p999 folder inside ~/proprietary_vendor_lge into ~/android/system/vendor/lge.
Then you can run:
Code:
cd ~/android/system
. build/envsetup.sh
brunch p999
Please post any questions here, I'll try my best to answer them. There may be typo' so please let me know if you run into any issues, thanks!
Click to expand...
Click to collapse
you could do this part easier like this
Code:
cd ~/android/system
mkdir vendor
cd vendor
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics
Then rename the folder you cloned to lge. in some cases you can do
Code:
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics lge
and it will name the folder you clone lge for you
At least I do something along those lines.
If it freezes you do not have to close console. Simply push ctrl+z and it will kill the command and you can reissue it again.
codecaine21 said:
@Волк,
If you dont know what something(tool, cmd, etc.) is, type man in your terminal. Ex: man git. You can also type the tool/cmd name and use the help switch. Ex: git --help Sometimes the help switch will vary. Could be --help, -h, or --h. Online Linux man pages can be found at Linux.die.net
Click to expand...
Click to collapse
Beautiful, thanks a ton! Now I don't feel like I'm reading Czech, lol.
Awesome ..Thanks!
loganmc10, that was awesome!
Thanks!
------------------------------------------------------------------------------
edit1:
as proposed by kwes1020 used
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics lge
to get the lge proprietary repo in place..
Image is bootable, has wifi, but no phone..
------------------------------------------------------------------------------
after many times of trying to get thhe repo to sync, I am finally building ICS for my G2x.
The sync would stall with two items remaining. I deleted everything and started over many times. What I finally did was monitor where it was failing and deleted just that directory (prebuilts). Restarted the sync and it completed cleanly. I have bee compiling for about 30 minutes without errors. I hope the final product is bootable.
edit, the final product was bootable. No camera, data, or phone.
Modified steps to build ROM (KOUSH repo not needed)
Steps:
1. 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 openjdk-6-jdk pngcrush schedtool
2. mkdir -p ~/bin
3. mkdir -p ~/android/system
4. use curl to get repo to ~/bin/repo
5. chmod a+x ~/bin/repocd ~/android/system/
6. ../../bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
7. edit manifest.xml and add the following 2 lines..
<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
8. repo sync -j16
9. ~/android/system/lunch (pick 21 or whatever references cm_p999)
10. ~/android/system/vendor/cm/get-prebuilts
11. cd ~/android/system/device/lge/p999
12. Plug in device and turn usb debugging on
13. ./setup-makefiles.sh
14. ./extract-files.sh
15. cd ~/android/system/
16. make clean && repo sync && brunch p999
THE BUILD SHOULD COMPLETE AFTER STEP 15
17. cd ~/android/system/out/target/product/p999
18. adb push update-cm-9.0.0-RC0-p999-KANG-signed.zip /sdcard/ROM/update-cm-9.0.0-RC0-p999-KANG-signed.zip
19. Boot into recovery, wipe cache, dalvik cache, install update-cm-9.0.0-RC0-p999-KANG-signed.zip, install gapps (currently 03042012)
enjoy..(Data/WIFI/Phone works.. No Camera)
wallhue said:
Edit 2 : IT ALL WORKS NOW (with some tweaks..)
Code:
Steps:
1. 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 openjdk-6-jdk pngcrush schedtool
2. mkdir -p ~/bin
3. mkdir -p ~/android/system
4. use curl to get repo to ~/bin/repo
5. chmod a+x ~/bin/repocd ~/android/system/
6. ../../bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
7. edit manifest.xml and add the following 2 lines..
<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
8. ~/android/system/lunch (pick 21 or whatever references cm_p999)
8. repo sync -j16
9. ~/android/system/vendor/cm/get-prebuilts
10. cd ~/android/system/device/lge/p999
11. Plug in device and turn usb debugging on
12. ./setup-makefiles.sh
13. ./extract-files.sh
14. cd ~/android/system/
15. make clean && repo sync && brunch p999
THE BUILD SHOULD COMPLETE AFTER STEP 15
16 cd ~/android/system/out/target/product/p999
17 adb push update-cm-9.0.0-RC0-p999-KANG-signed.zip /sdcard/ROM/update-cm-9.0.0-RC0-p999-KANG-signed.zip
18. Boot into recovery, wipe cache, dalvik cache, install update-cm-9.0.0-RC0-p999-KANG-signed.zip, install gapps (currently 03042012)
enjoy..
Click to expand...
Click to collapse
Did the camera work?
wallhue said:
Steps:
1. 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 openjdk-6-jdk pngcrush schedtool
2. mkdir -p ~/bin
3. mkdir -p ~/android/system
4. use curl to get repo to ~/bin/repo
5. chmod a+x ~/bin/repocd ~/android/system/
6. ../../bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
7. edit manifest.xml and add the following 2 lines..
<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
8. repo sync -j16
9. ~/android/system/lunch (pick 21 or whatever references cm_p999)
10. ~/android/system/vendor/cm/get-prebuilts
11. cd ~/android/system/device/lge/p999
12. Plug in device and turn usb debugging on
13. ./setup-makefiles.sh
14. ./extract-files.sh
15. cd ~/android/system/
16. make clean && repo sync && brunch p999
THE BUILD SHOULD COMPLETE AFTER STEP 15
17. cd ~/android/system/out/target/product/p999
18. adb push update-cm-9.0.0-RC0-p999-KANG-signed.zip /sdcard/ROM/update-cm-9.0.0-RC0-p999-KANG-signed.zip
19. Boot into recovery, wipe cache, dalvik cache, install update-cm-9.0.0-RC0-p999-KANG-signed.zip, install gapps (currently 03042012)
enjoy..(Data/WIFI/Phone works.. No Camera)
Click to expand...
Click to collapse
This will definitely not work. the "extract-files.sh" script hasn't been updated since gingerbread, it doesn't pull all the needed files from the device. Also why do you run "setup-makefiles.sh" before extract-files? It is run at the end of the "extact-files.sh" script, as you can see here:
https://github.com/CyanogenMod/android_device_lge_p999/blob/ics/extract-files.sh
On a final note, there is no need to run "lunch", "brunch" is all that is needed. You can go here for an explanation on the differences between lunch & brunch
I don't think pulling the proprietary files from Koush's repo works properly for the G2X yet, but it's definitely more correct than using the extract-files.sh script (how do you think the build bot builds the ROM's? Do they have all 70 CM devices plugged into the build server? Nope, they use that repo)
Thanks for the tutorial, loganmc10! I have built many CM7 KANG's for the G2x without issue, but I seem to be having some problems with CM9. I figured out what I assumed was the proper way to build CM9 for the G2x a few weeks ago, and your tutorial matches what I did, so I know I'm on the right path, but my CM9 KANG's have a few deal-breaking issues (and possibly others, but I haven't run my KANG's long enough to know of any others):
1.) No 4G/HSDPA+ network, Only EDGE. (Or at least I only see the "E" indicator).
2.) No Wi-Fi Calling. Get "Wi-Fi Calling has stopped" error messages starting immediately after boot.
3.) Camera doesn't work, receive an error message that the camera can't be accessed.
I'd like to know if anyone has created a G2x CM9 KANG without these issues and what they did differently. I know it's possible from running Ricardo Cerqueira's KANG's. Any help would be greatly appreciated.
Holy crap. I want to learn this stuff... but I am lost as sh*t! Any ideas of what I should read or learn so I can eventually follow along!
Sent from my LG-P999 using xda premium
BobbyDukes707 said:
Holy crap. I want to learn this stuff... but I am lost as sh*t! Any ideas of what I should read or learn so I can eventually follow along!
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
You gotta at lease be able to read Java, some C++, and have a basic knowledge of how Linux works
and if you want to be lazy you can just add this to your manifest
<project name="koush/proprietary_vendor_lge.git" path="vendor/lge" remote="github" />
no need to fool around with the files from koush they will be placed in the right dir
i build using this command
cd vendor/cm && ./get-prebuilts && cd ../../ && . build/envsetup.sh && brunch p999 CC=gcc-4.4 CXX=g++-4.4 USE_CCACHE=1 -j24 2> warn.log
cd vendor/cm && ./get-prebuilts && cd ../../
for getting prebuilds everything time i build icheck for updates
. build/envsetup.sh
no need to explain i think
brunch p999
since it is less typing then breakfast p999 && mka bacon
CC=gcc-4.4 CXX=g++-4.4
selecting old gcc toolchain
USE_CCACHE=1
yup i want to use ccache should be enabled by default but just to be sure
-j24
building with 24 threats i want to use multiple cores and not just one
2> warn.log
filtering out hose annoying error and write them to warn.log
then i have two terminals one with the building process
and one with "tail -f warn.log" in case i get abuild error
this is interesting
Does anyone know how to get the camera to work after building? Everything else seems to work fine. Thanks!
is there an update to this? koush git isnt working for proprietary_vendor_lge... hmm let me scope his github
edit:
found it here:
https://github.com/x0xhellx0x/proprietary_vendor_lge
da-pharoah said:
is there an update to this? koush git isnt working for proprietary_vendor_lge... hmm let me scope his github
edit:
found it here:
https://github.com/x0xhellx0x/proprietary_vendor_lge
Click to expand...
Click to collapse
For some reason its been deleted from koushs git :-\
Sent from my LG-P999 using Tapatalk 2
Is there a way to shrink down the repo sync to just ics? It seems that its downloading also cm7 as well as every other phone. Humongous sync going on here... Im new at this, but I understand enough and there has to be a way to sync just the stuff needed for ics.
Sent from my LG-P999 using xda app-developers app
Related
Since there isn't any clear tutorial or guide on how to build CM7 EpicMTD from source, I put a simple to use script for anyone.
Either manually follow the script. Or copy and paste the code into a sh file. Execute.
Code:
#!/bin/sh
# EpicMTD CM7 Download and Compile script
# VERSION 1.1
# Install packages for Ubuntu/Debian
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
# 64 bit OS only (comment the next line if you are on 32 bit)
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
# Create directories
mkdir ~/bin
mkdir ~/android
mkdir ~/android/system
# Download CyanogenMod Repo
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j6
# Create EpicMTD local manifest
echo '# Install packages
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
# 64 bit OS only
#sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
# Create directories
mkdir ~/bin
mkdir ~/android
mkdir ~/android/system
# Download CyanogenMod Repo
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j6
# Create EpicMTD local manifest
echo '<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="EpicCM" fetch="https://github.com" />
<project
path="device/samsung/epicmtd"
name="EpicCM/android_device_samsung_epicmtd"
remote="EpicCM" revision="gingerbread"
/>
<project
path="vendor/cyanogen"
name="EpicCM/android_vendor_cyanogen"
remote="EpicCM"
revision="epiccm-rebase"
/>
</manifest>' > ~/android/system/.repo/local_manifest.xml
# Create local repo for EpicCM
repo start EpicCM --all
repo sync
# Get the RomManager
~/android/system/vendor/cyanogen/get-rommanager
# Plug in your Epic running CM to get the proprietary files
cd ~/android/system/device/samsung/epicmtd
./extract-files.sh
# Fix to allow successful compile
cd ~/android/system/vendor/cyanogen
git cherry-pick a4a5133
cd ~/android/system
# Update repos
repo sync
make clobber
# Compile
. build/envsetup.sh
brunch epicmtd
Thanks to hazridi for helping me start this.
Changelog
1.0: Initial release
1.1: Updated the local_manifest.xml to reflect new github
Good Work man.
I hope this will keep people busy hehe.
Rock on man, thanks for pulling it together and sharing with the community! Much appreciated!
Sent via Decadent Epic 4G CM7
Awesome.....just re-installed ubuntu today thinking i was gonna....now, no excuses.
Cheers!
You're welcome
(I wrote the info you used for this)
hazridi said:
You're welcome
(I wrote the info you used for this)
Click to expand...
Click to collapse
I forgot to add thanks for you. See the first post
It's cool, I wouldn't have figured it all out without deca, uber, noob, and rodd's input anyway.
awesome work ion. much appreciated. now, for a little light reading...
Hello All. I have received several requests for how to build a kernel from source so I figured I would make a guide for anyone looking.
WARNING: I CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE YOU CAUSE TO YOUR PHONE, PERSONAL RELATIONSHIPS, LIFE, OR CAR. YOU HAVE ALREADY ROOTED YOUR DEVICE SINCE YOU ARE READING THIS SO YOU KNOW IT VOIDS YOUR WARRANTY.
Now that thats over. I will walk you through how to set up a kernel building environment and walk you through building a kernel.
I.) Requirements
1.)You will need a computer. Just about any computer running linux will work, even a Virtual Machine. I will be using Ubuntu Oneiric, Server Edition for my guide. (Most commands are the same across Ubuntu Editions as well as Linux in general.)
2.)Internet Access- the faster the better
3.)Knowledge of the android kernel and what does what.
4.)The Master Branch from Google as well as the source for your device.
5.)ALOT of time.
6.)Common Sense
II.) Installing The Necessary Tools
1.)First we must download the neccesary tools.
To install java, you need to know which version of android you will be developing for.
Froyo and Lower:
Code:
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
Gingerbread and Newer:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
2.)Next we willl download the tools needed(You need to know if you are on a 64 bit system or 32 bit.)
For 64 bit:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
Also you must link one thing based on your Ubuntu Version:
For 10.10:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
For 11.10:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
For 32 bit:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown libxml2-utils xsltproc
No linking is necessary.
NOTE: You can set up CCache on either setup. However, you will not need it necessarily due to the source is not that big compared to building a rom and therefore will not take as long.http://dnssearch.rr.com/index.php?origURL=http://www.goog.gl/&r=
III.) Downloading The Source
1.)If you already have an android Directory set up, then skip this step. If not, follow these commands. (NOTE:THIS GUIDE FOLLOWS AS IF YOU USE THIS STEP. BE CAREFUL)
Code:
$ cd $HOME
$ mkdir android
$ cd android
2.)Set up your source directory.
Code:
$ mkdir source
$ cd source
$ mkdir aosp (YOUR DEVICE)_kernel repo
$ cd repo
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ./repo
$ chmod 755 repo
$ export PATH=$PATH:$HOME/android/source/repo/
OR
$ sudo cp repo /usr/bin/repo
$ cd ../aosp
$ mkdir master
$ cd master
3.)You are now ready to grab the source. You will need the master branch. So while in the master directory:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
THIS WILL TAKE A WHILE SO SIT BACK AND RELAX.
4.)Now you need your specific devices source. So follow those steps accordingly to get the source into the directory for you device kernel @ $HOME/android/source/(YOUR DEVICE)_kernel
You now have all the source you need.
V.) Building The Kernel
1.)Now we will set up the environment for the build.
Code:
$ export ARCH=arm
$ export CROSS_COMPILER=arm-eabi-
$ export CROSS_COMPILE=arm-eabi-
$ export PATH=$PATH:$HOME/android/source/aosp/master/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
2.)Now you go into your device's kernel directory.
Code:
$ cd $HOME/android/source/(YOUR DEVICE)_kernel
3.)And begin the configuration.
If you like a gui like menu:
Code:
$ make menuconfig
If you like to answer questions:
Code:
$ make config
4.)Configure your kernel how you want it.
5.)Then, once thats done:
Code:
$ make -j4
This will build the kernel. This can take anywhere from 15 minutes to an hour and a half+.
VI.)Grabbing The Newly Made Kernel
1.) Your kernel will be located at:
Code:
$ $HOME/android/source/(YOUR DEVICE)_kernel/arch/arm/boot/zImage
2.) Your Wireless Module Will depend on your device. For the Ally, it would be:
Code:
$ $HOME/android/source/ally_kernel/drivers/net/wireless/bcm4329/wireless.ko
CONGRATULATIONS!!!
You have built your own kernel.
Now follow http://forum.xda-developers.com/showthread.php?t=748106 to flash it.
Any problems or questions, let me know. Either a PM or I'm almost always in #asus-transformer on IRC.
Wanna donate to me and help me with bills? Follow this link to Donate Via PayPal:
http://goo.gl/ReRPs
Gonna try this. Thanks for sharing...
Sent using my brain
Thanks for working on this. On first look, I think you intended to put a repo sync after the init command here:
3.)You are now ready to grab the source. You will need the master branch. So while in the master directory:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
THIS WILL TAKE A WHILE SO SIT BACK AND RELAX.
Click to expand...
Click to collapse
Android device
For the device, should it be what our device is named by the company for marketing, etc or is it what is in the build.prop under ro.product.device?? Thanks
pramathesh said:
Gonna try this. Thanks for sharing...
Sent using my brain
Click to expand...
Click to collapse
Sent using my brain <- lol, made my day !
android_owl said:
Sent using my brain <- lol, made my day !
Click to expand...
Click to collapse
glad you liked
@OP: Do I've to make any changes if I were to build from Glitch (SGS) sources for CM7?? Or everything remains the same?
what does (Your device) mean ? its name (example: samsung galaxy ace) or the codename ( example: GT-S5830) ????
Codename
Sent from my Galaxy Nexus using Tapatalk 2
GITHUB servers are up!
So I finally thought that I should make a guide to build from source as I feel like the one on the wiki is a bit outdated and isn't very clear.
I will cover both instructions for how to build for Ubuntu 13.04 (64 bit only), and OS X 10.8.x(PLEASE KEEP AT LEAST 35GB Free)
LINUX SPECIFIC INSTRUCTIONS
Please open a terminal window NOW. If you can't do this, don't build android. Please be vigilant in following in-terminal directions, such as pressing enter if it's asking you to do so or confirm something, and using sudo before a command will invoke a password prompt also if entering a new command, please wait until the command exits out to the bash prompt (asking for a new command)
First, let's get rid of the wrong java assuming it's already installed, Android will "REFUSE" to build properly with the wrong java.
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Now let's install the correct java,
Code:
sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java6-installer && java -version
It should end with this
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
or something like it.
Now let's set up for making bacon!
Enter this in order to get dependencies for building android, please note that this is about 100-150 megs and will take a few minutes/10ish minutes depending on your computer and internet connection.
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs 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
then,
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Repo is required for sucking sources from the cloud, so let's get it
Code:
mkdir ~/bin && curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo && chmod a+x ~/bin/repo
Now let's add this repo thing to our path
Code:
sudo nano ~/.bashrc
at the bottom of the file,add this
Code:
export PATH=~/bin:$PATH
now press Ctrl-O followed by Ctrl-X
restart bash by entering
Code:
source ~/.bashrc
now find a directory to build android in. Personally, I use /home/username/android
so for now let's place it in there
Code:
mkdir ~/android && cd ~/android && mkdir cm && cd cm
SYNC TIME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!x10^infinity!
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 && mkdir -p .repo/local_manifests && curl https://raw.github.com/teamuserdebug/page/manifests/manifests/cm10.1-aries.xml > .repo/local_manifests/local_manifest.xml && repo sync
make sure you acknowledge name, color, email etc, or you'll be sitting around and wasting time. this can take anywhere from 1 hr to 1 week depending on your internet connection, personally takes me 3-5 hrs.
go grab a starbucks and come back, you'll need it.
after it's done, make sure you are still in your cm directory.
IT'S BUILDING TIME
OPTIONAL: If you have some free space sitting around eg, 70-100 gigs for building android,
it's time to setup CCACHE, this speeds up future builds by "A LOT"
first edit .bashrc
Code:
sudo nano ~/.bashrc
add these lines at the bottom
Code:
export CCACHE_DIR=/home/-username-/.ccache
(Note, replace "-username-" with your computer username, without the dashes.
Code:
export USE_CCACHE=1
press Ctrl-O followed by Ctrl-X
enter
Code:
[CODE]source ~/.bashrc
[/CODE]
now enable ccache by entering
Code:
prebuilts/misc/linux-x86/ccache/ccache -M50
or
Code:
./prebuilts/misc/linux-x86/ccache/ccache -M50
if the first one doesn't work
BUILD TIME:
enter these
Code:
cd ~/android/cm
Code:
vendor/cm/get-prebuilts
Code:
. build/envsetup.sh
Code:
lunch cm_galaxys4gmtd-userdebug
Code:
mka clobber
Code:
mka bacon
It will be in ~/android/cm/out/products/target/galaxys4gmtd/cm-unofficial-something-something-signed.zip or something like that.
Make sure you don't pick the wrong zip file, because there are 2 or 3 in there.
OS X 10.8.x SPECIFIC INSTRUCTIONS
Please open a terminal window NOW. If you can't do this, don't build android. Please be vigilant in following in-terminal directions, such as pressing enter if it's asking you to do so or confirm something, and using sudo before a command will invoke a password prompt also if entering a new command, please wait until the command exits out to the bash prompt (asking for a new command)
First, let's install java if it's not already installed
Code:
java
Now, we MUST install X-Code otherwise we won't even be able to lunch.
1. Open the App Store
2. Find X-Code,(it's free) and install it [this is a 1+ GB download, and install]
3.Open X-Code and go to preferences. There you find a 'Downloads' tab. Open it and install “Command line tools” It will take a few minutes to download and install
Now let's set up for making bacon!
Download and install MacPorts, not Homebrew, since MacPorts is faster.
You can get the mountain lion pkg installer here
After it is installed, close and open terminal.
edit your bash profile
Code:
sudo nano ~/.bash_profile
add
Code:
export BUILD_MAC_SDK_EXPERIMENTAL=1
somewhere at the bottom
Press Ctrl-X, then y, then "enter/return" Note: Yes, the control key is used, not the command key, so don't be confused
Install dependencies to make bacon
Code:
POSIXLY_CORRECT=1 sudo port install git-core coreutils findutils gsed gnupg pngcrush repo
then
Code:
sudo ln -s /opt/local/bin/gfind /opt/local/bin/find && ln -s /opt/local/bin/gsed /opt/local/bin/sed
run
Code:
pngcrush
in terminal to make sure that things are properly in your path
THEY SHOULD BE since MacPorts edits your .bash_profile for you.
Now, we need a case-sensitive folder so we will need to make a sparseimage which you will have to mount every time you want to do something with your android builds.(like a DMG), but for now, this command will attach it for you. It will be on your desktop
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
Make the cm folder
Code:
cd /Volumes/Android && mkdir cm && cd cm
SYNC TIME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!x10^infinity!
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 && mkdir -p .repo/local_manifests && curl https://raw.github.com/teamuserdebug/page/manifests/manifests/cm10.1-aries.xml > .repo/local_manifests/local_manifest.xml && repo sync
make sure you acknowledge name, color, email etc, or you'll be sitting around and wasting time. this can take anywhere from 1 hr to 1 week depending on your internet connection, personally takes me 3-5 hrs.
go grab a starbucks and come back, you'll need it.
after it's done, make sure you are still in your cm directory.
Before we build, we have to fix an elf.h error
Code:
cp /Volumes/android/cm/external/elfutils/libelf/elf.h /usr/local/include
IT'S BUILDING TIME
OPTIONAL: If you have some free space sitting around eg, 70-100 gigs for building android,
it's time to setup CCACHE, this speeds up future builds by "A LOT"
install a ccache which is usable by mac
Code:
sudo port install ccache
edit your bash profile to use ccache.
Code:
sudo nano ~/.bash_profile
find the line that says
Code:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
and edit it to say
Code:
export PATH=/opt/local/libexec/ccache:/opt/local/bin:/opt/local/sbin:$PATH
press Ctrl-X, then y, then "enter/return"
then exit and reopen terminal
now configure ccache's memory
Code:
ccache -M50
BUILD TIME:
enter these
Code:
cd ~/android/cm
Code:
vendor/cm/get-prebuilts
Code:
. build/envsetup.sh
Code:
lunch cm_galaxys4gmtd-userdebug
Code:
mka clobber
Code:
mka bacon
It will be in /Volumes/android/cm/out/products/target/galaxys4gmtd/cm-unofficial-something-something-signed.zip or something like that.
Make sure you don't pick the wrong zip file, because there are 2 or 3 in there
nice, didn't take long to get it stickied either.
sent from within pure darkness
I know right!
Also, I have edited it for the mac version as well.
Now you guys can build on both mac and linux!!!!!!!!!!!!
Also, I will post when github stuffs are back up.
Thx. is this coming from a straight Unbuntu say setup without having to install a bunch of crap? I had that BBQLinux installed which is supposed to be for building android but it didn't have apt installed, so then tried yum to install that, and it didn't have that. lol. Just going to install Ubuntu on a VM and try your directions from a new install.
yes
but obviously you need to have wifi
airfluip1 said:
yes
but obviously you need to have wifi
Click to expand...
Click to collapse
Why do I need wifi?
i mean internet.
airfluip1 said:
i mean internet.
Click to expand...
Click to collapse
O ya, I got tonnes of that. lol. Thanks for the guide though. I've tried a few times to get a build environment going and it always goes wacky or I don't get something right.
i think that they are up now.
airfluip1 said:
i think that they are up now.
Click to expand...
Click to collapse
don't know, I'm getting fetch errors, url can't found, 404 and then when it's done, it craps out and says can't sync, too many fetch errors. Is this the servers still being down?
Maybe
Sent from my SGH-T959V using xda premium
airfluip, you might have been better off creating a local_manifest.xml file (though those are deprecated and now you can just create a manifest file called, for example, airfluip1_aokp.xml).
You're going to have to keep up with the platform_manifest changes and will have to resolve merge conflicts if the AOKP team decides to make some major changes (not unlikely).
You can actually add the changes you made to the manifest.xml into a custom manifest xml file similar to what we did with team acid's CM9/AOKP repos.
maybe, but I thought it was easier. I'll change it in a week or two.
Just thought I'd throw in that BBQLinux is arch based and for building android and linuxBBQ is NOT the same thing, it's probably the worst distro to start from to build android. In case someone else decides to go there.
airfluip1 said:
maybe, but I thought it was easier. I'll change it in a week or two.
Click to expand...
Click to collapse
Just as a way to make syncing source faster, you can also remove the device/kernel trees for other devices that aren't the SGS4G so that we can just download what's necessary for building for our phone.
yeah, I know. I'll do that later as well. I just don't have much time for a few weeks.
I got a rom compiled with your sources airfluip. I haven't flash tested yet.
I did run into problems with the SGS4GParts package so I had to remove it from galaxys4gmtd.mk, other than that the rom compiled fine. I'll help you look into the error later.
Thanks for the guide, easy to follow
EDIT
By the way, are you using TWRP in these builds, or is it CWM?
Code:
______ _____ __ __ _____
/\ _ \/\ __`\/\ \/\ \ /\ _ `\
\ \ \L\ \ \ \/\ \ \ \/'/'\ \ \L\ \
\ \ __ \ \ \ \ \ \ , < \ \ ,__/
\ \ \/\ \ \ \_\ \ \ \\`\ \ \ \/
\ \_\ \_\ \_____\ \_\ \_\\ \_\
\/_/\/_/\/_____/\/_/\/_/ \/_/
===========-Package complete-===========
zip: /home/fb/android/jb_aokp/work/out/target/product/galaxys4gmtd/aokp_galaxys4gmtd_unofficial_2013-05-14.zip
md5: c8fcc3417bab626ca6d018b88450ab42
size: 150M
========================================
It must have been something that I edited.
I am using CWm.
I don't like twrp very much.
It's always something....
I'm not sure if something changed since you made this tutorial but I can't seem to get this to build.
My first attempt resulted in the SGS4GParts error like FB mentioned. Which seems to have something to do with the TVOut setting.
Each attempt at rebuilding I seem to get different errors.
I also get this when building starts...normal?
Code:
find: `../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory
find: `src': No such file or directory
Edit: Is there a way to grab a log of the entire build output? Is it saved to a file somewhere?
LOL I am building right now.
The src error is normal
AND IF THERE IS A BUILD ERROR, POST A LOG IN PASTEBIN.
ALSO, THERE SHOULDN'T BE ANY BUILD ERRORS RIGHT NOW AS LONG as you
Code:
repo sync
before you do a new build.
Also you should run
Code:
make clobber && mka bacon
everytime.
Setup ABE (Android Build Environment To Compile Roms)
For this you tutorial you need to be running Ubuntu 13.10 64-Bit (32-Bit Will Not Work).
Does Not Matter if you are running this in a virtual machine or not. (Will work on Both)
Also I will also be showing a Guide to Syncing CM11 Repo and TamsuiCM11 Repo.
Instructions (Read Carefully):
First, let's set up the correct JDK.
Many of you probably have some kind of wrong Java installed unless you're starting with a fresh Ubuntu base, and even then maybe.
Let's get rid of that. Copy and paste this into a Terminal window:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the instructions to remove OpenJDK. If you must keep it, it's possible. But I'm not going to tell you how to do it here. I don't want any chance of confusion or mistake.
Now copy and paste the following into the Terminal:
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.10. No more unrecognized Java version errors! And it will update automatically with the rest of your system.
Next, we actually need to install the package. More copy-paste:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:
Code:
sudo apt-get install git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 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 gcc g++ cpp gcc-4.8 g++-4.8
When that is done installing, run the following command in your Terminal window:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That's it on the package side of things.
You guessed it, time for more Terminal. This really is the easiest way, seriously. And it's totally worth it when you're basking in the glory of a bunch of people on XDA.
The binary for a program called "repo" will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
I like nano:
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. Restart bash:
Code:
source ~/.bashrc
In the terminal, navigate to where you would like to store the Android source code. The directions below will make it in your home folder, but if you have limited space, you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external is basically unusable. Here we go:
Code:
mkdir ~/cm11
cd ~/cm11
We will configure your information, your name and email address, In terminal type:
Code:
git config --global user.name your name
git config --global user.email your email
Now you're going to initialize the repo. Here's where you decide the flavor of Android you want to build for, ie AOKP, CyanogenMod, AOSP etc. The following, for the purposes of this tutorial, will initialize for Stable CM11:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b stable/cm-11.0
Almost there. Last step, but it's a doozy. You're going to get the source. Prepare yourself, mere mortal. 10+ GB of downloading await you. Don't worry, it's automated. Go to sleep. Eat something. Perhaps you have heard of this new thing the kids are doing called "going outside"? Yeah, I didn't think so. Me neither. The final terminal command, to be run from your android directory:
Code:
repo sync
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
After that is done its time to Sync TamsuiCM11 Repo:
Go into your file browser and to your username then your cm11 folder, once there press Ctrl+H on your keyboard. Go into the folder .repo and make a folder called:
Code:
local_manifests
Once done exit out of the repo folder and press Ctrl+H on your keyboard once again.
Now its time you configure the local manifest, this will download all necessary files for the devices in this forum.
Type this in terminal:
Code:
. build/envsetup.sh
[B]breakfast jlo[/B] (For Xperia J) [B]tapioca[/B] (For Xperia Tipo) [B]mesona[/B] (For Xperia Miro) [B]nanhu_ds[/B] (For Xperia E)
gedit ~/cm11/.repo/local_manifests/local_manifest.xml
Now go to this link: https://github.com/TamsuiCM11/local_manifest/blob/master/tamsui.xml
Copy everything in the file into the open window of gedit hit save and close.
Go back to Terminal and type:
Code:
repo sync
This will download all necessary files, once done type the following into terminal:
Code:
cd ~/cm11/vendor/cm
. get-prebuilts
croot
Finally type:
Code:
[B]brunch jlo[/B] (For Xperia J) [B]tapioca[/B] (For Xperia Tipo) [B]mesona[/B] (For Xperia Miro) [B]nanhu_ds[/B] (For Xperia E
It will begin to build, if you run into any errors, do some research before creating tons of threads.
THANK ME IF I HELPED!
Thanks a lot for the how to. I'm just "syncing" (don't know if this is how it is said, just entered the command that downloads 10Gb) and it is doing the job! Don't know why this has only 5 "thanks", I found it very useful!!
JUST ONE QUESTION!! If I type breakfast tapioca it gives me "no such file or directory" error. If I type "tapioca_ss" it gives me no problems. Is it right?
Thanks
phn1993 said:
Thanks a lot for the how to. I'm just "syncing" (don't know if this is how it is said, just entered the command that downloads 10Gb) and it is doing the job! Don't know why this has only 5 "thanks", I found it very useful!!
JUST ONE QUESTION!! If I type breakfast tapioca it gives me "no such file or directory" error. If I type "tapioca_ss" it gives me no problems. Is it right?
Thanks
Click to expand...
Click to collapse
In your home folder, look in cm11/devices. If there's a folder called tapioca_ss, then you need to use tapioca_ss. If there's a folder called tapioca, then you need to use tapioca.
Yes, this guide is very useful, but unfortunately, you can only thank a post once (I did)!
NSDCars5 said:
In your home folder, look in cm11/devices. If there's a folder called tapioca_ss, then you need to use tapioca_ss. If there's a folder called tapioca, then you need to use tapioca.
Yes, this guide is very useful, but unfortunately, you can only thank a post once (I did)!
Click to expand...
Click to collapse
Yes, I noticed!! Thanks!!
One last question (new it's true lol): I get "make" errors (ERROR 1) when compiling audio drivers. I don't know why, but I'm trying to repeat the how to as root!
phn1993 said:
Yes, I noticed!! Thanks!!
One last question (new it's true lol): I get "make" errors (ERROR 1) when compiling audio drivers. I don't know why, but I'm trying to repeat the how to as root!
Click to expand...
Click to collapse
I don't think you should do this as root; I've seen some guides that say doing so might deter the building process.
And you're welcome.
NSDCars5 said:
I don't think you should do this as root; I've seen some guides that say doing so might deter the building process.
And you're welcome.
Click to expand...
Click to collapse
I finally decided to repeat all the guide! I think I've just found the problem!! Thanks again
Hello guys. I have seen a lot of activity here. But I found almost no one knew about source building in this community. Another reason for posting is for people who want to build cm11 from scratch themselves. Our computer crashes most of the time.
Here starts the fun :
Prerequisites
Quote:
HTML:
1. Ubuntu 13.10 / BBQLINUX (I personally use this)
2. patience...lots and lots of patience.
1. Installing ubuntu 13.10.
Quote:
This can be done in 3 ways and I am not gonna cover it all.
- along with windows ,i.e dual boot
- in virtualbox within windows
- as a windows application installation with "wubi" installer
For starting user i think second option, i.e installing in virtualbox is best.
here's starting tutorials
http://www.youtube.com/watch?v=tDDRFiwHujg
NOTE - you should have atleast 100 Gb partion for virtualbox.
2. Setting up building environment.
PHP:
THIS ALL BELOW STEPS ARE NOT NEEDED IF YOU HAVE INSTALLED BBQLINUX, BUILDING ENVIRONMENT IS SET IN BBQLINUX BY DEFAULT. IT WORKS OUT-OF-THE-BOX.
Initializing a fresh Android Build Environment in Ubuntu 13.10 sucks, right? The instructions at the AOSP page are outdated and inaccurate. Near as I can tell, they try to have you install 2 JDKs, the first one not even being the correct link for Saucy Salamander, and the second being OpenJDK. Which might work. But I dunno about all that, I’d rather have Oracle’s official stamp when it comes to building for Android.
Currently most of the guides are up to 12.04 LTS, which is fine and dandy, but being on the cutting edge is nice too.
This guide applies to all variations of Ubuntu 13.10 Saucy Salamander 64 bit. 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.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
First lets perform an update:
HTML:
sudo apt-get update
After this Restart ubuntu.
Okay, let’s set up the correct JDK.
Many of you probably have some kind of wrong Java installed unless you’re starting with a fresh Ubuntu base, and even then maybe.
Let’s get rid of that. Copy and paste this into a Terminal window:
Code:
PHP:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the instructions to remove OpenJDK.
If you must keep it, it’s possible. But I’m not going to tell you how to do it here. I don’t want any chance of confusion or mistake.
Now copy and paste the following into the Terminal:
Code:
PHP:
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.10.
No more unrecognized Java version errors! And it will update automatically with the rest of your system.
Next, we actually need to install the package. More copy-paste:
Code:
PHP:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the on-screen instructions. You have to Accept the Licensing Agreement to complete the install. Hopefully no human centipede clauses.
Let’s make sure the correct version of Java is activated, run the following Terminal command:
Code:
PHP:
java -version
You should see something like the following:
Code:
PHP:
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.12-b01, mixed mode)
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:
Code:
PHP:
sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 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
When that is done installing, run the following command in your Terminal window:
Code:
PHP:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That’s it on the package side of things.
You guessed it, time for more Terminal. This really is the easiest way, seriously. And it’s totally worth it when you’re basking in the glory of a bunch of people on XDA.
The binary for a program called “repo” will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
PHP:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
I like nano:
Code:
PHP:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
PHP:
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. Restart bash:
Code:
PHP:
source ~/.bashrc
Set up android sdk
Refer this guide. Go only to sdk section.
http://forum.xda-developers.com/showthread.php?t=2302780
3. Downloading source
Open terminal
To initialize your local repository using the your Rom trees, use a command like this:
HTML:
mkdir cm11
cd cm11
Repositories of famous roms. Choose one:
HTML:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo init -u git://github.com/AOKP/platform_manifest.git -b kitkat
repo init -u git://github.com/ResurrectionRemix/platform_manifest.git -b kitkat1
Of course you have to make rom specific changes as they are not supported yet. But will be in near FUTURE. I Will highlight rom specific changes in second post.
Create local_manifest.xml in .repo folder.
PHP:
cd .repo
nano local_manifest.xml
Paste following into the terminal
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/micromax/a110" name="Ateekujjawal/android_device_micromax_a110" remote="github" revision="cm-11.0" />
<project path="kernel/micromax/a110" name="Ateekujjawal/android_kernel_micromax_a110" remote="github" revision="cm-11.0" />
</manifest>
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash.
Then to sync up:
HTML:
repo sync -j#
# is number of jobs you want to give for your downloading source. I use 2.
Download gonna be huge. Approx 12-15 GB.
So its gonna take while depending upon your internet connection.
You may get errors while downloading, like
HTML:
Sync exited due to fetch errors
Just restart download by
HTML:
repo sync
Let's extract those vendors.
HTML:
cd cm11
cd /device/micromax/a110
./extract-files.sh
Starting Building process
PHP:
. build/envsetup.sh && time brunch a110 -j#
Again # is meant for No. of CPU cores you have.
Building gonna take time, depending upon your computer configuration.
Any errors, post here.
I will try my best to solve problems .
Start building your own CM11...
Any suggestion welcome.
Sent from my GT-I9082 using Tapatalk Pro.
R1
Sent from my GT-I9082 using Tapatalk Pro.
R2
Sent from my GT-I9082 using Tapatalk Pro.
R3
Sent from my GT-I9082 using Tapatalk Pro.
Great also add to get android SDK...
We forgot that remember....??
Also add ther android touch files ..
Without that adb won't work...
More mistakes ...edit it through buddy...
Avenger4droid said:
Great also add to get android SDK...
We forgot that remember....??
Also add ther android touch files ..
Without that adb won't work...
More mistakes ...edit it through buddy...
Click to expand...
Click to collapse
If error comes, then no. Don't tell me. Plus in that link the error fixation is there. At least hit Thanks.
Sent from my GT-I9082 using Tapatalk Pro.
wow. gud one. bookmarked for future reference
So now are you going yo build ROM or we have to build by our self....????
talhask said:
So now are you going yo build ROM or we have to build by our self....????
Click to expand...
Click to collapse
Patience bro. We are building. But you know our pc crashed. So it is gonna take time. If you want to build any other rom, then you can follow this guide. I wouldn't say it is noob friendly but it's a Kickstart.
Sent from my GT-I9082 using Tapatalk Pro.
okay on my way to to download source again new expected date of release is 24 th of march...
hope this time no bad thing happens...
now those wanna try this method i say wait for a couple days as till then i will release and check wheteher its working or not...
:good::good:
regards..
i can see if i can find a good build server then it is easy