How-to compile a fresh Android! - Touch Cruise Android Development

Hi all.
In this thread I'd like to collect all the information I've found scattered in various threads in order to compile Android system and kernel, directly from GIT repo.
Hoping this help who wants to try to compile Froyo from the GIT repo but really doesn't know where to start!!!
All credits for this infos, obviously, doesn't go to me but to all the great persons I've found in this forum, helping me with a lot of informations: Dzo, l1q1d, Kalt_Kaffe, Incubus and many others.
If something of the things written below is not correct... first of all forgive me! I'm only a newbie trying to do something useful for others like me!!! Then please... help me to correct the mistakes!!!
And then, please, forgive my really bad english! Any correction is appreciated!
DISCLAIMER: even if this steps have been personally tested by me everything u'll decide to do u'll do at ur own risk. The flashing procedure may brick your device.
I've implanted all the compiling environment in a virtual machine with the latest Ubuntu (10.04).
NOTE ABOUT VIRTUAL MACHINE: if you are using a virtual machine it's important that you setup it with at least 1,5GB or RAM. With less RAM than this your Android will not compile.
All you need to obtain a fresh Android System is only a lot of time (and patience) and at least 10GB of free disk space.
10GB is the very minimum disk space you need. If you decide to try in a virtual machine I suggest to create a virtual disk at least 20GB.
1) Install needed software
As in the latest Ubuntu version the repositories have the "sun-java6-jdk", with which you cannot compile Android, you have to install the previous Java version from the Jaunty repo. To do this edit, with your favourite text editor and using "sudo", the "etc/apt/sources.list" file adding the following two lines:
Code:
deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
and then, from a terminal, run the following commands:
Code:
sudo apt-get update
sudo apt-get install sun-java5-jdk
After this you can delete/comment the two lines added above in the sources.list file.
Then, according to the instruction described here, install the needed software with the following command:
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
2) Installing repo and configuring the environment
After the installation of the needed software follow this steps to create the right environment for ur compilation. I assume to work in my "/home/virtual" directory. If d'u like to work in another directory simply replace this path with yours in the commands.
Code:
$ mkdir bin
$ PATH=$PATH:/home/virtual/bin/
$ curl http://android.git.kernel.org/repo > /home/virtual/bin/repo
$ chmod a+x /home/virtual/bin/repo
$ mkdir mydroid
$ cd mydroid
3) Downloading, syncing and compiling the source
Now that you are in the destination directory (I've called it "mydroid" but obviously you can call it with every name you want) you've to init and syncing your repo with the one on the server.
The "init" step have to be executed only the first time. Then you can start directly from the "sync" command.
The following steps may need a looooooot of time (about 3 hours in my virtual machine) so you can have one (or two maybe!!!) coffee in the further coffee bar in your city!!!
Anyway let's go:
Code:
$ repo init -u git://androidhtc.git.sourceforge.net/gitroot/androidhtc/manifest -b froyo
$ repo sync
$ . build/envsetup.sh
$ lunch full_vogue-userdebug
$ make
With these commands you'll obtain a system with all languages in it.
You'll find the "system" folder under "out/target/product/vogue". Simply tar it and you're in!!!
4) Compiling the kernel
If you only want to compile the kernel you have to follow this steps (from your repo dir - "mydroid" in my case)
Code:
$ cd kernel
Open, with your favourite text editor, the file "Makefile" and change the CROSS_COMPILE line like the following:
Code:
CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
then run the following commands:
Code:
make vogue_defconfig
make
After the compilation you'll find the "zImage" file into "kernel/arch/arm/boot/" and use it like you want (I.E. I compile it with NBHCreator in order to flash it into my Polaris).
That's all, folks!!!
Enjoy!

Initializing project gps ...
fatal: The remote end hung up unexpectedly
error: Cannot fetch gps
way not?
did it finish or did it get stuck and there is more to fetch?

Related

[HOWTO][VM][Compile]Setup Lubuntu for Android compiling (VirtualBox Option)

This Guide is intended to fast-track the curious Windows user into the world of Compiling Android With Linux
It does not cover Linux in depth and does not cover hacking the code.
It does include an introduction to git by way of an example (replacing the default Kernel)
I hope it proves helpful
Below I shall run through setting up VirtualBox and installing Lubuntu.
Lubuntu is a lighter alternative to Ubuntu targeted at older/low powered hardware which makes it ideally suited to running in a VM.
Before we start, I would like to make it clear that unless you have a powerful,memory rich PC, compiling Android inside a VM is not ideal.
Having said that, You can probably get some mileage on a reasonably spec'ed Machine. And this should prove helpful to those who are not quite ready to take the plunge and install a native linux.​
The latter half of the guide detailing Lubuntu will also work running native on the bare metal. Just ignore the VB driver parts.
If you haven't already, Download an iso from http://cdimages.ubuntu.com/lubuntu/releases/11.10/release/
I will be working through the desktop version
if you have a 64-bit PC *AND* your current OS is 64-bit get the lubuntu-11.10-desktop-amd64.iso
if your PC or OS is 32-bit then lubuntu-11.10-desktop-1386.iso is what you want.
As well as a {L}ubuntu disk, you will need:
VirtualBox https://www.virtualbox.org/ optionally grab the extension pack for usb2 support
At least 25 GB free disk space with large file support
A working internet connection, the CM source is 9GB so have that in mind.
VirtualBox Installation
Bit of a no brainer, just install it like any other program
At some point it may prompt you to download Additions, not to be confused with the extension pack.
The Additions Pack is an .iso containing drivers for the guest OS's, video, clipboard etc.
VirtualBox Setup
Once VirtualBox has installed open it
If you downloaded the extensions pack install it as follows:
file >> preferences >> extensions
click the add package icon and navigate to the download
Now create a virtual machine
click new >> next
give it a name like "AndroidCompiler"
OS Type "Linux"
Version "Ubuntu" >> next
The Version is not particularly important, as far as I know it is just for the icon.​
increase the memory , keeping it in the green >> next
create new disk >> next
VDI >> next
Fixed size >> next
select the location (for example your second hard drive X: or whatever)
change the size to 5.00 GB, if the slider is a pita just type it >> next
If you can afford it a larger disk will not hurt, 10GB should be plenty​
review and >> create >> create again
The basic VM is now complete
Fine tune the VM Settings
Highlight the new VM and hit Settings
system
Motherboard tab
in boot order select hdd and 'move' it to the top of the list with the up icon
Processor tab
tick enable PAE/NX
select number of CPUs
Note that if you use all of your cpu cores it will slow down your host​
Display
Video tab
tick enable 3D
Network
Adapter 1 tab
Attached to Bridge Adaptor
Name < select your NIC >
Advanced >
Promiscuous Mode : Allow All
Storage
highlight the empty CD
click the cd icon to the far right
Choose a virtual cd/dvd, (your iso d/l)
highlight the sata Controller
add hard disk (3 stacked disks icon) >> create new disk
create a new disk called AndroidSrc or something, it must be at least 20GB (40GB recommended)
if you plan on playing with ics then triple it​
Shared Folders
add new folder
tick auto mount
navigate to a folder (or create a new one)
this will be used to transfer files between your OS and the VM​
Now click OK, and then start
Installation of Lubuntu
You will be presented with a rather ugly language selection, pick one
Then select install Lubuntu
Ignore any errors about smbpii4 bios blah blah..
Language selection (again but nicer looking) >> continue
Tick download updates while installing >> continue
select something else >> continue
select /dev/sda >> new partition table
select /dev/sda free space >> add
type = logical
size = 555
location = end
use as = swap area
>> OK
Normally Linux Distos create a swap the same size as physical memory.
This is so physical memory can be dumped to swap when going into hibernation (save state with no power use)
Since VirtualBox has it's own Save State feature we don't need it.
And for what it's worth I have always found the resume after hibernate to be painfully slow​
select /dev/sda free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /
>> ok
tick format for /dev/sda2
select /dev/sdb >> new partition table
select /dev/sdb free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /Android
>> ok
tick format for /dev/sdb1
unless you are re-using an old Android source disk​
>> install now
Where are You?
Lubuntu guesses from your IP, if needed correct it​ >> continue
Keyboard setup >> continue
username / password >> continue
wait for it to finish
>> restart now! -- press enter when prompted
You should now be booted to Lubuntu
Ignore the update manager, we will get the script to deal with that.
VirtualBox Drivers
Next to the clock should be a pci card icon
click it
install drivers
activate >> input your password
wait .....
when finished >> close
bottom left is some strange icon, it is the main menu
click it >> logout >> logout (no need to reboot yet) >> login again
Shared Folders
Main Menu >> system tools >> users and groups
Manage Groups >> vboxsf >> Properties >> tick your username
Main Menu >> Accessories >> LXTerminal (right click >> add to desktop, if you like)
The reason for the earlier logout and back in was to activate the VB host to VM clipboard
The below script will install the required packages
It will work for both 32 and 64 bit
The script is based on instructions for 11.10
It will probably work on 11.04 and may even work on 10.xx but I have only tested against Lubuntu 11.10 both 32 and 64 bit
It is not specific to Lubuntu and should work with any Ubuntu 11.10 derivative
To paste with the keyboard ctrl+shift+v *NOT* ctrl+v
ctrl+shift+c to copy​copy and paste this to the term.
Code:
cat > ~/setup.sh << "EOF"
#!/bin/bash
sudo apt-get update
# Reference : http://source.android.com/source/initializing.html
case $(uname -m) in
x86_64) # packages for 64-bit
sudo apt-get -y install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
sudo apt-get -y install lib32readline-gplv2-dev || \
sudo apt-get -y install lib32readline5-dev
case $(awk -F"=" '/DISTRIB_RELEASE/ {print $NF}' /etc/lsb-release) in
11.10|11.04) sudo apt-get -y install libx11-dev:i386 ;;
10.10|10.04) sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so ;;
esac ;;
i?86) # packages for 32-bit
sudo apt-get -y 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 ;;
*) echo "Error: Machine type not recognised" && exit 1;;
esac
# Extras for CyanogenMod builds
sudo apt-get -y install squashfs-tools \
pngcrush libsdl1.2-dev \
libesd0-dev \
libwxgtk2.6-dev \
schedtool
# system update
sudo apt-get -y upgrade
# install sun java jdk
# Reference : top google hit for " ubuntu 11.10 sun-java6-jdk "
# http://www.gaggl.com/2011/10/installing-java6-jdk-on-ubuntu-11-10/
case $(awk -F"=" '/DISTRIB_RELEASE/ {print $NF}' /etc/lsb-release) in
11.10) codename=oneiric;;
11.04) codename=natty;;
10.10) codename=maverick;;
11.10) codename=lucid;;
*) echo "Error: Unrecognised ubuntu version";exit 1;;
esac
test -e /etc/apt/sources.list.d/ferramroberto-java-${codename}.list || \
echo | sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get -y install sun-java6-jdk sun-java6-plugin
# The default lubuntu install does not include java
# but other ubuntu derivatives may include openjdk
Java6Sun=$(echo | update-alternatives --config java | awk '/java-6-sun/ && ($1 !~ /*|^There/){print $1}')
test "$Java6Sun" != "" && echo $Java6Sun | sudo update-alternatives --config java
# create ~/bin if it does not exist
install -v -d ~/bin
# clean up
rm $0
EOF
Now run the script
Code:
bash ~/setup.sh
It will ask for your password
eventually you will be asked to read and accept the Sun Java licence
Once all that is done..
The updates will have installed a new kernel, and we still haven't loaded the VMs special video/shared folder drivers yet so it is time for a reboot
Like the logout we did earlier, but reboot.
Now that you have rebooted lets fix the permissions for our source partition
open a term
Code:
sudo chown $USER:$USER /Android
replace Android with the mount point you gave for your source drive
make a directory for the CM src
Code:
mkdir /Android/CM
cd /Android/CM
Now to get the src
#
# http://source.android.com/source/downloading.html
# http://wiki.cyanogenmod.com/wiki/HTC_Dream_&_Magic:_Compile_CyanogenMod_(Linux)
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -c -j16
The CM wiki advises repo sync -j16
You will be downloading 9 GB, depending on the speed of your connection this may take some time
Reduce the number of threads(16) if you don't want to saturate your connection
NEW : 2012-03-10
added -c to the repo sync.
-c tells repo to only fetch the current branch which will save time and diskspace
If you are interested in comparing branches then leave out -c
don't forget to include -c with all future repo syncs
using -c will save approx 2GB diskspace as well as network bandwidth (7GB instead of 9GB)​
use this table to get an approximation of how long it will take
Code:
10GB @ 60 Mbit/s 0.46 hrs ( 28 mins)
10GB @ 40 Mbit/s 0.69 hrs ( 42 mins)
10GB @ 20 Mbit/s 1.39 hrs ( 83 mins)
10GB @ 10 Mbit/s 2.78 hrs ( 167 mins)
10GB @ 5 Mbit/s 5.56 hrs ( 333 mins)
10GB @ 2.5 Mbit/s 11.11 hrs ( 667 mins)
10GB @ 1 Mbit/s 27.78 hrs ( 1667 mins)
Assumes Max throughput
When setting up the VM we created a bridge to one of your NICs
If you are on a laptop and switch between wire and wireless, you can also with the VM
Devices >> network adaptors (the VirtualBox Menu)
You could try setting up a 2nd adapter, one for wire and the other wireless, net traffic should be routed automatically
You can only add adaptors while the VM is Powered Off​
When repo sync has completed
Setting up the Environment
Setting up the Environment needs to be done with each new shell session
make sure you are in the repo root
A quick glance at your command prompt should tell you where you are
Code:
source build/envsetup.sh
alternative:
Code:
. build/envsetup.sh
that is <dot><space>bui​
Setting up the build
ccache
not to be confused with compcache, ccache can help speed up recompilations
More information can be found on cm's wiki here
and in google's http://source.android.com/source/initializing.html
Code:
export USE_CCACHE=1
# for reboots and new shell sessions
echo "export USE_CCACHE=1" >> ~/.bashrc
by default ccache uses ~/.ccache we won't have enough space
Code:
export CCACHE_DIR=/Android/.ccache
# for reboots and new shell sessions
echo "export CCACHE_DIR=/Android/.ccache" >> ~/.bashrc
The default max cache size is 976.6 MB (that is what is reported,could be a / 1024 screwup ), this will just about fit our min sized 20GB drive
http://source.android.com/source/initializing.html recommends between 50 and 100 GB. I imagine this is to accommodate multiple targets
space permitting between 5 and 10 GB should be fine for a single device
if you have a 20GB Android drive then leave it at the default
If you opted for a larger drive, adapt to suit
for 5 GB :
Code:
prebuilt/linux-x86/ccache/ccache -M 5G
The setting is stored in CCACHE_DIR so unless you want to change it forget about it.
Lets do lunch
don't ask me why it is called lunch. My best guess is a play on Menu
Code:
lunch
and select your target
when you get bored of seeing that lunch menu
Code:
lunch cyanogen_dream_sapphire-eng
Proprietary Files
The Proprietary Files need to be put into the vendor tree
You have two options:
Extract from a zip
Extract from your device
I'm going to walk through Option 1
Remember the Shared Folder we created?
Well we are going to use that now.
On your Host system copy a recent ROM zip to the folder your shared with the VM
good choices are : ezginger, ADS_magpie, dw9906
in your VM's terminal,
Code:
ls /media/
you should see a folder sf_<Name> and in that folder your rom zip
There are two scripts in device/htc/dream_sapphire/
unzip-files.sh and extract-files.sh
Unfortunately the unzip-files.sh script is not up to date with extract
You can manually fix it or use my script which converts the extract script to an unzip script
to use it:
set a environment var like so
Code:
ROM=/me<tab>s<tab><tab>
<tab> is the tab key, please don't type <tab>
read this to get an idea of what is happening​eventually you should have something like
ROM=/media/sf_5gb/ADS_magpie-V1.0-signed.zip
Code:
pushd device/htc/dream_sapphire
#awk '/adb pull/{sub(/adb pull/,"unzip '$ROM'")sub(/\.\./,"-o ..")};{print}' extract-files.sh | sh
# 2012-03-19 corrected the above script, it should be :
awk '/adb pull/{sub(/adb pull \//,"unzip -o '$ROM' ")sub(/.*/,"-d ../../../vendor/htc/$DEVICE/proprietary/",$NF)};{print}' extract-files.sh | sh
popd
pushd and popd
The above step only needs to be done the once
that is unless the proprietary files require changes, for instance a switch to open sourced versions
Kernel
The DS kernel in CM is old so I added ezterry's latest
I shall show you how, but we are taking the scenic route
We shall create our own git repo and add that to a local_manifest
Configure git
This is a global config, you should only need to do it once per user
Code:
git config --global user.name "Your Name Comes Here"
git config --global user.email [email protected]
taken from file:///usr/share/doc/git-doc/gittutorial.html
Install git docs with
Code:
sudo apt-get install git-doc
Create a git repo and push to it
Code:
git init /Android/my_git_repos/device_htc_dream_sapphire
cd /Android/CM/device/htc/dream_sapphire
git push file:///Android/my_git_repos/device_htc_dream_sapphire github/gingerbread
Now let's have a look
Code:
cd /Android/my_git_repos/device_htc_dream_sapphire
ls
you will see it is empty
But wait.. is it empty?
Code:
ls .<tab><tab>
Code:
git branch -a
git checkout gingerbread
ls
git log # q to exit
git log -p
now lets make some changes
Remember the shared folder?
Well I hope you have ezterry kernel pack in there
Code:
unzip /media/sf_<REPLACEME>/ezgb-2636-v1.5.2_S.zip *2708*
mv 2708-zImage kernel
mv mod-2708/modules.sqf prebuilt/
rmdir mod-2708/
git status
edit full_dream_sapphire.mk
change
device/htc/dream_sapphire/prebuilt/wlan.ko:/system/lib/modules/wlan.ko \
to
device/htc/dream_sapphire/prebuilt/modules.sqf:/system/lib/modules/modules.sqf \
we can do this with a simple sed
Code:
sed -i -e 's[/wlan.ko[/modules.sqf[g' full_dream_sapphire.mk
now
Code:
git diff
Code:
git add full_dream_sapphire.mk kernel prebuilt/modules.sqf
Since the wlan.ko is of no use to us (we replaced the kernel it was for) we need to remove it
but not just from the filesystem but git as well
Code:
git rm prebuilt/wlan.ko
Have another look at git status and git diff
notice that git diff produces no output
now try git diff --cached
commit the staged changes with
Code:
git commit
The default editor for git is nano
^ == ctrl
^O == ctrl+o
write commit notes
Code:
Updated Kernel and kmodules to 2708 ezgb-2636-v1.5.2
http://forum.xda-developers.com/showpost.php?p=14768272&postcount=2427
to save Ctrl+o<enter>
to exit Ctrl+x
if you prefer vim
Code:
git config --global core.editor vim
don’t forget to install vim​Adding a local_manifest.xml
Code:
cat > /Android/CM/.repo/local_manifest.xml << "EOF"
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="Local"
fetch="file:///Android/my_git_repos/" />
<project path="device/htc/dream_sapphire" remote="Local" name="device_htc_dream_sapphire" revision="gingerbread" />
</manifest>
EOF
Apologies My initial post had an error in the above codebox
it should be fetch="file:///Android/my_git_repos/" not fetch="file:///Android/my_git_repos/device_htc_dream_sapphire/"​
make sure you are in /Android/CM/
repo sync
Then look in device/htc/dream_sapphire to see if your changes were applied
Code:
pushd device/htc/dream_sapphire
git branch -a # look for remotes/m/gingerbread -> Local/gingerbread
git log -p # you should see your commit notes
popd
Remove RomManager
Optionally remove RomManager from the build
Code:
sed -i '/RomManager/d' vendor/cyanogen/products/common.mk
The above is not permanent, when you repo sync it will be reverted
That is unless you commit the change​if you want RomManager then
Code:
./vendor/cyanogen/get-rommanager
finally build it
Code:
mka bacon
It is going to take a while depending on the speed of your machine and the memory/cpu cores you gave the VM (if you are using a VM)
Lets hope you don't get any build errors
If all goes well you should end up with a zipfile in /Android/CM/out/target/product/dream_sapphire/
Don't forget your /media/sf_ folder, cp the completed zip to that and from there you can treat it like any other rom
I hope you had fun following this
reserved for extras
like editors, linux tipsntricks, github, eclipse
moar extraz
I was under the impression that 64-bit linux was required now to compile android from source.
I compiled AOSP froyo with the following specs fine:
Ubuntu 10.04 (tried both native and vm)
Pentium 4 3.20ghz Hyper-Threaded
32-bit of course
3.12 GB of RAM
It took about two hours but not as bad as I thought, and it worked
Anyways thank you Scrip for this wonderful guide (yes I'll thank you in a second).
I knew 70%ish of this, and you helped fill up the rest of the holes for me
Thanks a lot man.
I'm sorry for kinda yelling back at you earlier
One question: Is there any hope for grabbing the cm6 source? It's been broken with a lot of files missing for a while now.
select /dev/sda free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /
>> ok
tick format for /dev/sda2
Click to expand...
Click to collapse
Tried this and no matter how many times I do it it still makes the entire 12GB sda partition the SWAP space.
EDIT: So solution is not to type in "555" but to use the arrow selection button to drop it down to "555".
wergeld said:
I was under the impression that 64-bit linux was required now to compile android from source.
Click to expand...
Click to collapse
Pointless and inaccurate post
Come back when you can prove 32-bit won't compile Android
Post the appropriate errors and I will do my best to resolve it
Scrip said:
Pointless and inaccurate post
Come back when you can prove 32-bit won't compile Android
Post the appropriate errors and I will do my best to resolve it
Click to expand...
Click to collapse
Woah, just asking. I saw this:
Ubuntu 10.04 64-bit is recommended. Building using a newer version of Ubuntu or a 32-bit Ubuntu is currently only experimentally supported and is not guaranteed to work on branches other than master.
Click to expand...
Click to collapse
This is taken from http://source.android.com/source/initializing.html
I just wanted to make sure that yes, you can compile against 32-bit before I spend a while setting this up.
wergeld said:
Tried this and no matter how many times I do it it still makes the entire 12GB sda partition the SWAP space.
EDIT: So solution is not to type in "555" but to use the arrow selection button to drop it down to "555".
Click to expand...
Click to collapse
no idea what is wrong there
try the other way round
with a clean 12gb partition
primary = < size - 555 >
use as = ext4
mount point = /
you could just let ubuntu set everything up
downside is
I will need to add instruction to mount the /Android drive
+ wasted diskspace
but again, I don't see why
Scrip said:
no idea what is wrong there
try the other way round
with a clean 12gb partition
primary = < size - 555 >
use as = ext4
mount point = /
you could just let ubuntu set everything up
downside is
I will need to add instruction to mount the /Android drive
+ wasted diskspace
but again, I don't see why
Click to expand...
Click to collapse
No worries on that. Ghost in the Machine maybe. Coming from TFS and VS2010 I have come accustomed to oddball things like this.
So far so good. Best part is the package script you have up there. Waiting to finish package installs...
frankdrey said:
I compiled AOSP froyo with the following specs fine:
Ubuntu 10.04 (tried both native and vm)
Pentium 4 3.20ghz Hyper-Threaded
32-bit of course
3.12 GB of RAM
It took about two hours but not as bad as I thought, and it worked
Anyways thank you Scrip for this wonderful guide (yes I'll thank you in a second).
I knew 70%ish of this, and you helped fill up the rest of the holes for me
Thanks a lot man.
I'm sorry for kinda yelling back at you earlier
One question: Is there any hope for grabbing the cm6 source? It's been broken with a lot of files missing for a while now.
Click to expand...
Click to collapse
I can't say it will build
look at the repo init command
-b <branch>
so if you replace gingerbread with froyo you will checkout cm6
if you have already added the local_manifest then you need to delete that before a repo sync
I will probably cover this in post 2/3
post 1 is basic
my idea is to get people interested
posts 2 and 3 will deal with extras, in post 1 I skipped basics like text editing
mostly because I have no idea how to deal with that.
Personally I use vim or kate
But I plan (if there is interest) on adding eclipse, which would make a text editor redundant
Yes I have downloaded the source for froyo before
A lot of the files are missing and repo sync doesn't complete
I know that all alsa-related files are missing, but there is more that I might have forgotten by now
frankdrey said:
Yes I have downloaded the source for froyo before
A lot of the files are missing and repo sync doesn't complete
I know that all alsa-related files are missing, but there is more that I might have forgotten by now
Click to expand...
Click to collapse
if post (or better pastebin.com)
the errors I can look
I've not tested these instructions against froyo , but I did at least get a zip from froyo asop a while back
missing files stinks of a screwed up prop mk
Yes AOSP works fine
CM6 doesn't
I'll post the errors when I find the time to get it all set up.
That may not be for a while though .
frankdrey said:
Yes AOSP works fine
CM6 doesn't
I'll post the errors when I find the time to get it all set up.
That may not be for a while though .
Click to expand...
Click to collapse
I think cm6 still points to android.git.kernel.org (which is gone). I was gonna fork from cm and change it to the right place but I haven't got around to it yet....
tvall said:
I think cm6 still points to android.git.kernel.org (which is gone). I was gonna fork from cm and change it to the right place but I haven't got around to it yet....
Click to expand...
Click to collapse
Yes I fixed that part.
but there were a whole buncha repos missing, the alsa one is all i can remember right now
WOW! Very well done! I love how you cited your sources and everything.
I appreciate the time and effort you put into this. Definately makes for a great reference.
Sent from my HTC PH39100 using Tapatalk
Thank you very much for this great tutorial! Even if I knew already most of the things, it's very useful to have such a tutorial here. We will see if this tutorial helps to increase the number of active android developers ...
Btw.: this thread should become sticky.
AndDiSa said:
Btw.: this thread should become sticky.
Click to expand...
Click to collapse
+1
Sent from my HTC PH39100 using Tapatalk
Left for work and set up the repo sync. Hopefully when I get home I can get a compile going. Thanks!

[GUIDE][DEV] Compile any source built rom for your device [ULTRA NOOB FRIENDLY]

I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
This thread on Madteam Forums: http://madteam.co/forum/development...lt-rom-for-your-device-(ultra-noob-friendly)/
So lets start with simple things
Basic FAQ:
Q: What is a Source built rom?
A: Source Built Roms are roms that are compiled from source on a Linux Platform! They are not themed manually.
Q: How do we build these type of roms?
A: Setup Linux and then follow this guide.
Click to expand...
Click to collapse
This post/guide is divided into 4 parts:
1. Setting up build environment
2. Machine specifications etc.
3. Device Tree and source basics
4. Syncing Source and Building
PART 1: Setting up build environment​
Type sudo su and then your password to get rid of Admin Permissions
#Installing Python
STEP 1: Open terminal (CTRL + ALT + T)
Then execute the following commands in terminal one by one
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
sudo make install
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Now Python is configured
#Installing JDK
As far as I know PPA which was the earlier method of installing JDK etc. doesn't exist's anymore, So I used another way!
Step 1: Open Terminal (CTRL + ALT + T)
STEP 2: Now we need to download the JDK 6 Binary by executing this command in terminal
Code:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
STEP 3: Then we need to run the binary and move it to a shared location:
Code:
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
STEP 4: Now you have to install all binaries and give them highest priority, This will also overwrite the previous version of Java Binaries in your computer
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
STEP 5: Now check if JDK 1.6 is selected on this:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Now JDK is configured! To check if it is done
Execute this is Terminal
Code:
java -version
Output will be similar to this
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
#Installing GNU Make
Code:
cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.82
./configure
sudo make install
These commands are for Make 1.81 if you want to install Make 1.82 Execute these
Code:
cd
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.82.tar.gz
tar -xvzf make-3.82.tar.gz
cd make-3.82
./configure
sudo make install
Now GNU make is configures
#Installing Android SDK
STEP ONE: Download the SDK from http://developer.android.com/sdk/index.html and extract it in a folder called "sdk" in the Downloads folder
STEP TWO: Now, Execute these commands in terminal
Code:
cd ~/Downloads/sdk/tools/
./android sdk
SDK is configured now :victory:
#Installing required packages:
STEP 1: Open Terminal
Now execute these commands:
Code:
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 pngcrush gcc-multilib lib32z1 schedtool
Good, Now you have successfully setup linux build environment!​
PART 2: Machine specifications and other misc. stuff​
Basic Computer Specs:
2Ghz Dual Core Processor
2GB Minimum ram
50GB File Space (For only one rom source)
*PLEASE NOTE*: This is the basic specification, It really depends on the condition of your ram and cpu!
If you want to use other apps while compilation you should make a 5GB minimum swap partition!
If ram is more than 4GB ram then you don't swap partition!
PART 3: DEVICE TREE AND SOURCE BASICS​
Basic source folders:
/packages - Proprietary rom applications
/framework - Framework (Overall rom UI and stuff)
/device - Device config
/vendor - Vendor Tree and other vendor files
/hardware - Hardware drivers
Q: What is BoardConfig.mk?
A: It's the file where you setup path's to files like toolchain etc. and enable/disable stuff, its very easy to understand. You can find it in your device's tree
Q: Where is build.prop in source?
A. Build.prop is available in the source in the form of system.prop in the device tree!
Q: How to remove ringtones, video editor, CM wallpapers from bulid?
A: Go to device/releasetools/extras.txt and Delete anything you don't want in your build
PART 4: Syncing Source and Building​
# Installing Repo Package
Code:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
STEP 2: Now it is recommended to reboot your computer (No need of sudo su after reboot)
STEP 3: Now make directory:
Code:
mkdir -p ~/rom/android/system
STEP 4: Go into directory and set path for Repo Package
Code:
cd ~/rom/android/system
PATH=~/bin:$PATH
STEP 5: NOW ITS TIME FOR SYNCING:
Their are different sources for different roms:
Some are listed bellow:
MIUI - www.github.com/micode/
Rootbox - www.github.com/Root-Box/
rasbeanjelly - www.github.com/rascarlo/
Xylon AOSP - www.github.com/xyaosp/
PAC-Man - www.github.com/PAC-Man/
CyanogenMod - www.github.com/Cyanogenmod/
CarbonROM - www.github.com/carbondev/
SaberMOD - www.github.com/SaberMOD/
AOKP - www.github.com/AOKP/
From the above collection some are Gingerbread some are ICS and some are JB 4.1/4.2 you have to visit these links via browser and see which source is which and follow the commands given at android.git/platform_manifest.git
Click to expand...
Click to collapse
For CM10.1 source execute this:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm10.1
For syncing CM10 source execute:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
You have to find for the rest!!
PS: You don't have to execute all the repo init commands written above
Now to sync execute this after the the repo init command
Code:
repo sync
Once it finishes without breaking all the folders will appear in rom/android/system folder
now execute this:
Code:
mkdir -p ~/rom/android/system/device/<ManufacturerName>/<DeviceCodeName>
and extract the device config/tree here
for me its samsung/totoro (galaxy Y, Don't mind )
then do the following:
Code:
mkdir -p ~/rom/android/system/vendor/<ManufacturerName>/<DeviceCodename>
Its the same as for the device folder
Now for compiling:
Code:
. build/envsetup.sh
lunch cm_<DeviceCodename>-eng
brunch cm_<DeviceCodename>-eng
Your build will be located at /rom/android/system/out as <RomName>-date/month/year-UNOFFICIAL-<DeviceCodeName>.zip
HAPPY COMPILING ​
Credits:
MadTeam (motafoca, whitexp etc.) for MADTeam Forums and many help
Team Broadcom CM (bieltv.3, SpaceCaker, Psychogame etc.) for giving my device a quite stable cm.. I learnt to compile because of them! Cheers
BeerGang
mithun46
abhisahara
galaxyfreak
cybojenix
Sniper Killer for supporting me a lot! Thanks dude
prototype-U for Supporting..
Others who supported me
IF YOU LIKE MY GUIDE, DO RATE THIS THREAD A FIVE STAR!
THOSE WHO ARE FACING ERRORS, DO POST YOUR PROBLEM at speed_bot's Source Building Help Thread ​
Good good !! Nicely compiled
abhisahara said:
Good good !! Nicely compiled
Click to expand...
Click to collapse
Thanks
I'll update this guide whenever I get time
Good work on this, I found it quite clear keep up the good work!
Sent from my GT-I9505 using Tapatalk 4 Beta
nicely copied
Aniruddh Chandratre said:
nicely copied
Click to expand...
Click to collapse
Just read what I said at the begging of the thread!
If you are too lazy then:
I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
Click to expand...
Click to collapse
And yes, I took reference from others guide... I do give credits!
Have you ever compiled it(successfully) yourself?
Sent from my HTC Desire X using xda app-developers app
prototype-U said:
Have you ever compiled it(successfully) yourself?
Sent from my HTC Desire X using xda app-developers app
Click to expand...
Click to collapse
Yes.. I did..
Thanks for your support
Arnav.G said:
Yes.. I did..
Thanks for your support
Click to expand...
Click to collapse
Where is it?
Sent from my HTC Desire X using xda app-developers app
prototype-U said:
Where is it?
Sent from my HTC Desire X using xda app-developers app
Click to expand...
Click to collapse
It will come...
Please don't spam the thread now! I know you are a RC and you know the rules but still.. Please
http://xda-university.com/as-a-developer/getting-started-building-android-from-source
Nice simplifications...
Noob friendly? Lol! Did you test it on yourself!
When I run the binaries on jdk
I get errors on the 2nd command-Syntax error
Why >
Fang Leone said:
When I run the binaries on jdk
I get errors on the 2nd command-Syntax error
Why >
Click to expand...
Click to collapse
Can you please explain your problem in a little more details?
"This Story Ends Where It Began" - Octavarium (Dream Theater)
Sent from my GT-I9505
Great Guide!!
This is very kind of you to make this helpful thread. It really helped me alot after setting up my new build environment. I ran into an error on you post that you may want to correct, other than that, great work! Here is the typo
"cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz<--this is correct.
cd make-3.82<---it changes here.
./configure
sudo make install"
Hello guys!
I have an error at brunch:
Code:
host Java: guavalib (/home/richard/android/system/out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/classes)
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/content/EventLogTags.java <= frameworks/base/core/java/android/content/EventLogTags.logtags
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/speech/tts/EventLogTags.java <= frameworks/base/core/java/android/speech/tts/EventLogTags.logtags
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/webkit/EventLogTags.java <= frameworks/base/core/java/android/webkit/EventLogTags.logtags
[B]make: *** No rule to make target `/home/richard/android/system/out/host/linux-x86/bin/dx', needed by `/home/richard/android/system/out/target/common/obj/APPS/Apollo_intermediates/proguard.classes-with-local.dex'. Stop.[/B]
make: *** Waiting for unfinished jobs....
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/src/src/java/com/android/internal/telephony/EventLogTags.java <= frameworks/opt/telephony/src/java/com/android/internal/telephony/EventLogTags.logtags
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Anyone knows what's causing it? It couldn't be the roomservice.xml in local_manifest as I used the one which another person successfully built CM with. I also repo sync'ed a few times already. I tried make clobber and built again, but nothing :crying:
I am building PACMAN ROM (4.3) now by the way.
All help is appreciated (with a thank!)
Greedings everyone
For some time now i am trying to download and compile CyanongenMod Sources for my Device. I Install VirtualBox + Linux Mint + all the needed stuff. Then i do the repo init and everything looks ok but when i do the repo sync it always throw me a error fetch stop because of sync errors. Ive done it a lot of time with no luck. Also i tried the repo sync -f which finaly finishes fetching things but stops at getting the project tree. Can anyone help me? :/ its really frustrating
vale amicis said:
I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
This thread on Madteam Forums: http://madteam.co/forum/development...lt-rom-for-your-device-(ultra-noob-friendly)/
So lets start with simple things
Basic FAQ:
This post/guide is divided into 4 parts:
1. Setting up build environment
2. Machine specifications etc.
3. Device Tree and source basics
4. Syncing Source and Building
PART 1: Setting up build environment​
Type sudo su and then your password to get rid of Admin Permissions
#Installing Python
STEP 1: Open terminal (CTRL + ALT + T)
Then execute the following commands in terminal one by one
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
sudo make install
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Now Python is configured
#Installing JDK
As far as I know PPA which was the earlier method of installing JDK etc. doesn't exist's anymore, So I used another way!
Step 1: Open Terminal (CTRL + ALT + T)
STEP 2: Now we need to download the JDK 6 Binary by executing this command in terminal
Code:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
STEP 3: Then we need to run the binary and move it to a shared location:
Code:
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
STEP 4: Now you have to install all binaries and give them highest priority, This will also overwrite the previous version of Java Binaries in your computer
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
STEP 5: Now check if JDK 1.6 is selected on this:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Now JDK is configured! To check if it is done
Execute this is Terminal
Code:
java -version
Output will be similar to this
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
#Installing GNU Make
Code:
cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.82
./configure
sudo make install
These commands are for Make 1.81 if you want to install Make 1.82 Execute these
Code:
cd
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.82.tar.gz
tar -xvzf make-3.82.tar.gz
cd make-3.82
./configure
sudo make install
Now GNU make is configures
#Installing Android SDK
STEP ONE: Download the SDK from http://developer.android.com/sdk/index.html and extract it in a folder called "sdk" in the Downloads folder
STEP TWO: Now, Execute these commands in terminal
Code:
cd ~/Downloads/sdk/tools/
./android sdk
SDK is configured now :victory:
#Installing required packages:
STEP 1: Open Terminal
Now execute these commands:
Code:
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 pngcrush gcc-multilib lib32z1 schedtool
Good, Now you have successfully setup linux build environment!​
PART 2: Machine specifications and other misc. stuff​
Basic Computer Specs:
2Ghz Dual Core Processor
2GB Minimum ram
50GB File Space (For only one rom source)
*PLEASE NOTE*: This is the basic specification, It really depends on the condition of your ram and cpu!
If you want to use other apps while compilation you should make a 5GB minimum swap partition!
If ram is more than 4GB ram then you don't swap partition!
PART 3: DEVICE TREE AND SOURCE BASICS​
Basic source folders:
/packages - Proprietary rom applications
/framework - Framework (Overall rom UI and stuff)
/device - Device config
/vendor - Vendor Tree and other vendor files
/hardware - Hardware drivers
Q: What is BoardConfig.mk?
A: It's the file where you setup path's to files like toolchain etc. and enable/disable stuff, its very easy to understand. You can find it in your device's tree
Q: Where is build.prop in source?
A. Build.prop is available in the source in the form of system.prop in the device tree!
Q: How to remove ringtones, video editor, CM wallpapers from bulid?
A: Go to device/releasetools/extras.txt and Delete anything you don't want in your build
PART 4: Syncing Source and Building​
# Installing Repo Package
Code:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
STEP 2: Now it is recommended to reboot your computer (No need of sudo su after reboot)
STEP 3: Now make directory:
Code:
mkdir -p ~/rom/android/system
STEP 4: Go into directory and set path for Repo Package
Code:
cd ~/rom/android/system
PATH=~/bin:$PATH
STEP 5: NOW ITS TIME FOR SYNCING:
For CM10.1 source execute this:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm10.1
For syncing CM10 source execute:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
You have to find for the rest!!
PS: You don't have to execute all the repo init commands written above
Now to sync execute this after the the repo init command
Code:
repo sync
Once it finishes without breaking all the folders will appear in rom/android/system folder
now execute this:
Code:
mkdir -p ~/rom/android/system/device/<ManufacturerName>/<DeviceCodeName>
and extract the device config/tree here
for me its samsung/totoro (galaxy Y, Don't mind )
then do the following:
Code:
mkdir -p ~/rom/android/system/vendor/<ManufacturerName>/<DeviceCodename>
Its the same as for the device folder
Now for compiling:
Code:
. build/envsetup.sh
lunch cm_<DeviceCodename>-eng
brunch cm_<DeviceCodename>-eng
Your build will be located at /rom/android/system/out as <RomName>-date/month/year-UNOFFICIAL-<DeviceCodeName>.zip
HAPPY COMPILING ​
Click to expand...
Click to collapse
I had two things to ask
1)Was installing android-sdk needed
2)If device not yet had a cm build or device tree how to get them

[How To] Setup ABE For Compiling Android Roms From Source (CM11) UPDATED 11/1/14

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

[GUIDE]How to build a rom from scratch/source for the Micromax Canvas 2 aka a110.

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

How To Compile Rom From Source full guide step by step by Jai Sharma

How To Compile Rom From Source
We need following things to compile ROM from source
A Computer( Linux or Mac)
Java JDK
Some required Package for building Rom
Rules for Accessing USB devices
Choosing a Branch
Installing Java on the Machine
Here i am using Ubuntu(14.04 LTS) as a Linux machine but it should work for other Linux variant
Open a terminal and type following
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
This command will remove other existing openjdk installation
2. Once java is uninstalled use following command for installing correct version of java
sudo apt-get update
sudo apt-get install openjdk-s8-jdk
Check java version by typing following command
java -version
2. Installing some required packages
Type following in terminal to install some required packages
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
3. Downloading Repo Tool and setting PATH
mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now open the bashrc file and so we can include the repo tool:
sudo nano ~/.bashrc
Add following in the end of the file
export PATH=~/bin:$PATH
Now we need to reload bash variables to include the new path:
source ~/.bashrc
4. Initializing a Repo client
Now we need to create a directory where our source code will be downloaded. I am creating a directory AOSP here
mkdir AOSP
cd AOSP
In the following command insert your name and email address
git config --global user.name "Your_Name"
git config --global user.email "Your_EMail"
Now care fully select your branch whether you are downloading aosp or Cyanogenmod
repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.0_r7
type your desired branch name after the -b. This also applies to Cyanogenmod
5. Downloading source code
Now start downloading source code by typing following
repo sync
Note: this may take some time depending upon your internet speed and also please make sure you have enough storage
6. Configuring USB Access
type your username in following command and type enter
wget -S -O - http://source.android.com/source/51-android.rules | sed "s/<username>/$USER/" | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules
7. Now building Rom for your device
To build rom we need following
Device tree
Vendor tree
kernel
Finding device tree and Vendor Tree
To find your device tree search on Github or similar sources with your device code name. If you are lucky you will find it there and believe me it is the easiest way to build your rom rather than creating device tree and vendor tree from scratch
Your device tree will go on following location
device/device_manufacturer_name/device_codename
Same for vendor tree
vendor/device_manufacturer_name/device_codename
If you find device tree and vendor tree then how to download it
For device tree
git clone “Github url” -b (branch_tag) device/device_manufacturer_name/device_codename
2. For vendor tree
git clone “Github url” -b (branch_tag) vendor/device_manufacturer_name/device_codename
Note1: You may need to change some files if everything is not working or giving you some error in rom compiling. Look into output to find out error. You can use Google if you can't correct it
Note2: You may be not found your device tree and vendor tree then what to do?. You may need to create them. Please follow my guide
Creating Device tree and vendor tree from scratch
For creating device tree
http://azodik.com/how-to-create-device-tree-for-android-rom-building/
2. For creating Vendor tree
“Coming Soon”
Kernel
For kernel part if you are lucky than you can find your kernel source from Github or similar sources. If not you can use your prebuilt kernel Foolow this to extract your kernel http://azodik.com/how-to-create-device-tree-for-android-rom-building/
Kernel location
/kernel/device_manufacturer_name/device_codename
Downloading your kernel
Manually download it and extract to kernel location or use following command
git clone “Github url” kernel/device_manufacturer_name/device_codename
Note1: You can use your prebuilt kernel. To use your prebuilt kernel edit BoardConfig.mk file in your device tree.
Note2: If you created device tree from scratch following my guide. Use of prebuilt kernel set to default
How to build
Use following command for building your rom
Source build/envsetup.sh
lunch
Now select your device from menu
3. make or mka
I hope you found it usefull. Please follow my website for interesting guide. Please comment here if you face any error.
Thank You
Really a great guide bro!
Can you please post a rom porting guide? easy to understand and effective
sohamsen said:
Really a great guide bro!
Can you please post a rom porting guide? easy to understand and effective
Click to expand...
Click to collapse
Thank you very much. Sure i will post soon.
jai44 said:
Thank you very much. Sure i will post soon.
Click to expand...
Click to collapse
Nice tutor.. But it looks need an enormous data usage to do that. If i wanna porting rom for example slim rom nougat to my device (kenzo) can you give me some info how many data should i provide and how to do that? Thanks
thanks
elanglangit said:
Nice tutor.. But it looks need an enormous data usage to do that. If i wanna porting rom for example slim rom nougat to my device (kenzo) can you give me some info how many data should i provide and how to do that? Thanks
Click to expand...
Click to collapse
You can follow this guide. Read it again and again. I hope soon you will build your own Rom. You can comment here if you face any problem
While compiling pure nexus. I got this error. How to solve thishttp://cloud.tapatalk.com/s/589b479597bc0/tapatalk_1486571095280.jpeg?
@jai44 wow! you make it look so easy! :') I have subscribed to this thread. When I get free time, Ill build my own rom
Thank you so much!
not able to sync rr source...
After i type repo sync it doesnt do anything. I double checked my site direction and it appears to be fine. Any hints??
could you please spare some time and make a post about how to create vendor tree?
can anyone help with this error while porting dotos rom for lenovo a700
/home/ubuntu/android/dotos/out/build-dot_aio_row.ninja is missing, regenerating...
device/lenovo/aio_row/board/ril.mk:4: error: cannot assign to readonly variable: PRODUCT_PROPERTY_OVERRIDES
10:14:07 ckati failed with: exit status 1
and ril.mk script
# RIL
BOARD_PROVIDES_RILD := true
BOARD_RIL_CLASS := ../../../device/lenovo/aio_row/ril
PRODUCT_PROPERTY_OVERRIDES += ro.telephony.sim.count=2
Hy I'm building lineage os 14.1 for SM-J250F
Samsung Galaxy J2 Pro 2018 (SM-J250F) but im not going to giveup .. so I'm started to build roms my self .. fixed some build errors and successfully compiled but it stuck on Samsung logo(no bootanimation) also took pstore logs but it only store recovery logs .. sir can you please help to make it boot? Can u kindly tell me what changes i need to do in sources to make it boot? Or can u fix the issue in my tree? Please I'm hoping your feedback
Source android base : Android 7.1.1
Tried compilation : Lineage OS 14.1
I cant post my tree links due to new account please pm
jai44 said:
How To Compile Rom From Source
We need following things to compile ROM from source
A Computer( Linux or Mac)
Java JDK
Some required Package for building Rom
Rules for Accessing USB devices
Choosing a Branch
Installing Java on the Machine
Here i am using Ubuntu(14.04 LTS) as a Linux machine but it should work for other Linux variant
Open a terminal and type following
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
This command will remove other existing openjdk installation
2. Once java is uninstalled use following command for installing correct version of java
sudo apt-get update
sudo apt-get install openjdk-s8-jdk
Check java version by typing following command
java -version
2. Installing some required packages
Type following in terminal to install some required packages
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
3. Downloading Repo Tool and setting PATH
mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now open the bashrc file and so we can include the repo tool:
sudo nano ~/.bashrc
Add following in the end of the file
export PATH=~/bin:$PATH
Now we need to reload bash variables to include the new path:
source ~/.bashrc
4. Initializing a Repo client
Now we need to create a directory where our source code will be downloaded. I am creating a directory AOSP here
mkdir AOSP
cd AOSP
In the following command insert your name and email address
git config --global user.name "Your_Name"
git config --global user.email "Your_EMail"
Now care fully select your branch whether you are downloading aosp or Cyanogenmod
repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.0_r7
type your desired branch name after the -b. This also applies to Cyanogenmod
5. Downloading source code
Now start downloading source code by typing following
repo sync
Note: this may take some time depending upon your internet speed and also please make sure you have enough storage
6. Configuring USB Access
type your username in following command and type enter
wget -S -O - http://source.android.com/source/51-android.rules | sed "s/<username>/$USER/" | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules
7. Now building Rom for your device
To build rom we need following
Device tree
Vendor tree
kernel
Finding device tree and Vendor Tree
To find your device tree search on Github or similar sources with your device code name. If you are lucky you will find it there and believe me it is the easiest way to build your rom rather than creating device tree and vendor tree from scratch
Your device tree will go on following location
device/device_manufacturer_name/device_codename
Same for vendor tree
vendor/device_manufacturer_name/device_codename
If you find device tree and vendor tree then how to download it
For device tree
git clone “Github url” -b (branch_tag) device/device_manufacturer_name/device_codename
2. For vendor tree
git clone “Github url” -b (branch_tag) vendor/device_manufacturer_name/device_codename
Note1: You may need to change some files if everything is not working or giving you some error in rom compiling. Look into output to find out error. You can use Google if you can't correct it
Note2: You may be not found your device tree and vendor tree then what to do?. You may need to create them. Please follow my guide
Creating Device tree and vendor tree from scratch
For creating device tree
http://azodik.com/how-to-create-device-tree-for-android-rom-building/
2. For creating Vendor tree
“Coming Soon”
Kernel
For kernel part if you are lucky than you can find your kernel source from Github or similar sources. If not you can use your prebuilt kernel Foolow this to extract your kernel http://azodik.com/how-to-create-device-tree-for-android-rom-building/
Kernel location
/kernel/device_manufacturer_name/device_codename
Downloading your kernel
Manually download it and extract to kernel location or use following command
git clone “Github url” kernel/device_manufacturer_name/device_codename
Note1: You can use your prebuilt kernel. To use your prebuilt kernel edit BoardConfig.mk file in your device tree.
Note2: If you created device tree from scratch following my guide. Use of prebuilt kernel set to default
How to build
Use following command for building your rom
Source build/envsetup.sh
lunch
Now select your device from menu
3. make or mka
I hope you found it usefull. Please follow my website for interesting guide. Please comment here if you face any error.
Thank You
Click to expand...
Click to collapse
how much storage is used to sync sir?
BryanHafidz said:
how much storage is used to sync sir?
Click to expand...
Click to collapse
depend on rom for me los17 took almost 70gb

Categories

Resources