Related
Disclaimer - About 4Gb+ to download the source for ICS & 10GB+ are so for JB
You will need 25GB (or more) free to complete a single build, and up to 80GB (or more) for a full set of builds.
To compile android you will need an linux distro preferably an Ubuntu-based distributions such as Ubuntu, Linux Mint however, you can use almost any Linux environment as long as you have the right packages and configurations. In this tutorial I will be showing how to use two Linux distributions Arch-Linux and any Ubuntu-based distribution.
To build android you will need a 64bit OS.
For Ubuntu you need either 10.04LTS or 11.10,12.04 futher version may require some more changes so please research this for find out
For Arch you just need the packages below because Arch is awesome like that
Common Setup
1)SDK
May not be needed - [Untested] Please report if it works for you
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Find your .profile file and add this at the bottom of the file:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.
To check for updates issue this into your terminal:
Code:
$ android
2) ADB Ubuntu
Note : Also for Arch if android sdk was downloaded
Configure your USB.
Code:
$ sudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
3) Save the file and close it and then issue this command:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
ADB Arch if android-sdk hasn't been installed
Code:
[FONT=Trebuchet MS][SIZE=4]$ sudo yaourt -S android-tools [/SIZE][/FONT]
4) Install the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ Reboot your pc.
5) Packages Arch
Pacman
Code:
$ sudo pacman -S perl git gnupg flex bison gperf zip unzip lzop sdl wxgtk \
quashfs-tools ncurses libpng zlib libusb libusb-compat readline schedtool \
optipng python2 perl-switch lib32-zlib lib32-ncurses lib32-readline \
gcc-libs-multilib gcc-multilib lib32-gcc-libs binutils-multilib libtool-multilib
[/SIZE][/FONT]
Yaourt
Code:
[FONT=Trebuchet MS][SIZE=4]$ sudo yaourt -S [/SIZE][/FONT][FONT=Trebuchet MS][SIZE=4]pngcrush sun-java6[/SIZE][/FONT]
Packages Ubuntu 10.04 - 11.10
Code:
[FONT=Trebuchet MS]$ sudo apt[/FONT][FONT=Trebuchet MS]-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \[/FONT][FONT=Trebuchet MS]
libxml2-utils xsltproc schedtool pngcrush[/FONT]
Packages Ubuntu 12.04 - 13.04
Code:
$ sudo apt-get install git gnupg flex bison gperf build-essential \
zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool pngcrush
Sun Java 6
Code:
[FONT=Trebuchet MS][SIZE=4]$ sudo apt-get purge openjdk*
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer[/SIZE][/FONT]
Additional changes needed
On Ubuntu 10.10:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
$ sudo apt-get install libx11-dev:i386
On Ubuntu 12.04/13.04:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
6) Download the source
$ mkdir cm(name it whatever you want)
$ cd into the the directory you just created so for me $ cd cm
For CM10
$ repo init -u git://github.com/Quarx2k/android.git -b jellybean
For CM9
$ repo init -u git://github.com/Quarx2k/android.git -b ics
or
$ repo init -u git://github.com/tpruvot/android.git -b ics
For AOKP JB (Black screen bug unsupported do not build!!)
$ repo init -u git://github.com:Kayant/platform_manifest.git -b jb
For AOKP ICS
$ repo init -u git://github.com:Kayant/platform_manifest.git -b ics
For Slim Bean
$ repo init -u git://github.com/Kayant/platform_manifest.git -b SLIM
For CNA
$ repo init -u git://github.com/Kayant/android_manifest.git -b jellybean
For P.A.C
$ repo init -u git://github.com/Kayant/PAC_android.git -b jellybean
Now
$ repo sync
or
If you have a good connection try this
$ repo sync -j16
If it breaks reduce the number or just
$ repo sync
if you still cant just repo sync
$ repo sync -f
Again if you're still getting errors - A tip from my good friend Pottkopp just leave the pc to sync stop watching those videos, chatting, etc u get the idea because this needs a lot of bandwidth .....
Takes about 2 hours or more for me to sync
7) Ccache
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.
Put the following in your .bashrc or equivalent.
export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
export CCACHE_DIR=<path-to-your-cache-directory>
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code:
prebuilts/misc/linux-x86/ccache/ccache -M 50G
When building Ice Cream Sandwich (4.0.x) or older, ccache is in a different location:
prebuilt/linux-x86/ccache/ccache -M 50G
This setting is stored in the CCACHE_DIR and is persistent.
8) Building
All Jellybean roms now use mb526 build for Defy&Defy + thanks to the unified custom kernel
Cyanogenmod -
First you need to download the some stuff or CM won't build -
$ ./vendor/cm/get-prebuilts
If you are getting errors then read this post - here Thanks Skeevy.
Jellybean
$ source build/envsetup.sh && brunch mb526
ICS
$ source build/envsetup.sh && brunch jordan (for defy)
$ source build/envsetup.sh && brunch jordan_plus (for red lense including Defy+)
AOKP JB/ICS -
$ source build/envsetup.sh && lunch
choose aokp_mb526
Slim Bean -
$ source build/envsetup.sh && lunch
choose slim_mb526
CNA -
$ source build/envsetup.sh && lunch
choose cna_mb526
P.A.C
$ ./build-pac.sh mb526 true
Now to Build if the lunch command has been used-
Replace bacon with squish if building CNA
make -j# bacon(# represents double the cores you have on your computer)
So i have two cores so i do make -j4 bacon or you can use mka bacon and the
computer will choose the best one for you
After some hours or minutes if you have a beast of a computer your build should be complete... Well done ^_^
Use the signed zip to update the defy in recovery, don't use the ota package !
File is will be located in ~/out/target/product/mb526
E.g for defy aokp it will be out/target/product/mb526/then aokp_mb526-date.zip.
P.s if you get any errors search this thread first and google then post if you can't find your answer.
Credit and Thanks
Walter79 for his guide and help
Quarx2k, Epsylon3 Maniac103 and the many other moto devs for their work on the motorola devices
Dastin1015 for his guide as am using some of his instructions in this tutorial
Credit and thanks to Google for the guide I used the Ccache setup section from source.andriod.com
Gonna try this a little later
Sent from my MB526 using xda premium
Awesome guide , been looking for one
Defy-ing all limits.
Thanks ...... Tell me if i a have missed anything...... Am not great at explaining stuff
Is it the same procedure for a Defy+ (MB526) build?
!! Reboot for these changes to take effect.
Click to expand...
Click to collapse
A reboot isn't needed.
ok now go to to vendor/cm/proprietary and delete rom manager has you don't need it since our awesome Epyslon3 has a special modded one that is integrated in the build
Click to expand...
Click to collapse
How about Quarx builds? Is there also a manager included? Do I need a ROM manager at all for the ROM to work?
yodawg said:
Is it the same procedure for a Defy+ (MB526) build?
A reboot isn't needed.
How about Quarx builds? Is there also a manager included? Do I need a ROM manager at all for the ROM to work?
Click to expand...
Click to collapse
It doesn't hurt to do it does it ..... anyway all tutorials i have read said you should reboot so yh.....
Rom manager i think is needed by CM for it to build not really too sure but Epyslon3 told me himself that it's not needed i have builted about 10 or so times i can see that is true ..... For defy+ builds you need to edit your mainfest in the .repo folder in the folder you're using scroll down and edit it with gedit change it to ics-plus you will see a note on how to do it....
Now theres also a jelly bean branch, which doesnt differ that much from ics for now. What do i have to do to update my repo to jellybean without redownloading the whole thing? A simple "repo init -u git://github.com/Quarx2k/android.git -b jb" and "repo sync" in that ics directory? or does it mess up everything?
yodawg said:
Now theres also a jelly bean branch, which doesnt differ that much from ics for now. What do i have to do to update my repo to jellybean without redownloading the whole thing? A simple "repo init -u git://github.com/Quarx2k/android.git -b jb" and "repo sync" in that ics directory? or does it mess up everything?
Click to expand...
Click to collapse
Of course you have to re-download everything it's a different source from ICS but it's about the same size 6GB but i don't know if there is a point in trying at the moment since neither quarx2k or Epyslon3 have actually build it yet but you can try however, you need to update the device tree for JB quarx2k has started working on it......
and don't do it in the same folder expect if you delete .repo folder first but you might still get errors so you might aswell make a different folder also it should be repo init -u git://github.com/Quarx2k/android.git -b jellybean. Good luck
use this as an additional guideline - http://forum.xda-developers.com/showthread.php?p=28529222
@Kayant: do u think a core2duo 2.0 ghz with 4 gb RAM can build? If yes, How much time will it take approximately.
brajesh.sharma87 said:
@Kayant: do u think a core2duo 2.0 ghz with 4 gb RAM can build? If yes, How much time will it take approximately.
Click to expand...
Click to collapse
For me c2d 2ghz and 3gig ram took 5 hrs...(RAM at 1200mhz)
No background process...All resources to compiler...
Sent from my MB525 using xda premium
I want to mod a rom based on cm9, but I did not decide to use whose code
nogoodusername said:
For me c2d 2ghz and 3gig ram took 5 hrs...(RAM at 1200mhz)
No background process...All resources to compiler...
Sent from my MB525 using xda premium
Click to expand...
Click to collapse
Yh u should definently try it your system is more powerful than both mine and nogoodusername's... It takes me also about 4 hrs so it might be a bit less for u
Awesome How-To Maybe you should add packages needed in order to compile without error the rom.
However, I tried to build cm from source a month ago with my old pc. It took about 18 hours and it failed though. LOL
carlo93 said:
esome How-To Maybe you should add packages needed in order to compile without error the rom.
However, I tried to build cm from source a month ago with my old pc. It took about 18 hours and it failed though. LOL
Click to expand...
Click to collapse
What packages???
Edit - I think I see what u mean I will update this thread in a couple of days
Updated for JB and added AOKP
Enjoy building from source ^_^
Woo how come this thread never showed in search results
Sent from my MB526 using xda app-developers app
how big is source?
Sent from my MB526 using xda premium
nogoodusername said:
how big is source?
Sent from my MB526 using xda premium
Click to expand...
Click to collapse
About 4GB or so.... When you start compiling it requires like 25gb or more for one build.
kadavil said:
Woo how come this thread never showed in search results
Sent from my MB526 using xda app-developers app
Click to expand...
Click to collapse
It had a different name
Awesome guide.....fr starters like me....this is gonna be my challenge fr next hols.....I will try aosp gb.....must be the lightest one....!!!!....thnx
Sent from my MB526 using xda app-developers app
I don't know if are there any other guide to build Cyanogen Mod for Samsung Galaxy W GT-i8150 Wonder on this Forum.
But i would like to share my experience to make your life more simple.
Requirements
Ubuntu (I think any version is OK).
Some packages for Ubuntu.
Java.
The source for Cyanogen Mod.
Repos for our phone.
An open mind.
Good internet connection to download everythings.
Download Ubuntu
Click here to go in Ubuntu website.
Choose 64 bit version.
I suggest to install it as host system, not on a virtual machine.
Click to expand...
Click to collapse
Download Required Tools and Packages
Enable i386 Architecture:
Code:
sudo dpkg --add-architecture i386
sudo apt-get update
Install Java:
Code:
sudo apt-get install openjdk-6-jdk
Install Git Core:
Code:
sudo apt-get install git-core
Download Packages for Ubuntu:
sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-glx \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev
Click to expand...
Click to collapse
Then you have to apply this one too:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now you muse create file to for USB configurations:
Code:
gedit /etc/udev/rules.d/51-android.rules
Insert the following code
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Click to expand...
Click to collapse
Make sure to have permissions for that file.
Code:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Install Repo
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Click to expand...
Click to collapse
Create The Working Folder
mkdir cm
cd cm
Click to expand...
Click to collapse
Download Cyanogen Mod Source
I use CM-10.1 as booted example.
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
Click to expand...
Click to collapse
Download Phone Repos
After downloading Cyanogen Mod source, you have to enable your device, so do in this way.
mkdir .repo/local_manifests
gedit .repo/local_manifests/roomservice.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="gh"
fetch="git://github.com/" />
<project path="device/samsung/ancora" name="arco/android_device_samsung_ancora" remote="gh" revision="cm-10.1_ion" />
<project path="kernel/samsung/msm7x30-common" name="arco/samsung-kernel-msm7x30" remote="gh" revision="cm-10.1_ion" />
<project path="vendor/samsung/ancora" name="arco/android_vendor_samsung_ancora" remote="gh" revision="cm-10.1_ion" />
<project path="hardware/qcom/media-caf" name="arco/android_hardware_qcom_media-caf" remote="gh" revision="cm-10.1" />
<project path="hardware/qcom/display-caf" name="arco/android_hardware_qcom_display-caf" remote="gh" revision="cm-10.1" />
<project path="hardware/qcom/audio-caf" name="arco/android_hardware_qcom_audio-caf" remote="gh" revision="cm-10.1" />
</manifest>
Download the repos by repo sync
Click to expand...
Click to collapse
Apply Patch For Camera
Download the patch that i attach in the thread.
Copy it into the root of Cynogen Mod
chmod a+x cm-10.1
./cm-10.1
Press enter after finish.
OK, Let's Compile The Rom
After we configure computer, system and repos, it's time for compilation, so follow this one.
. vendor/cm/get-prebuilts
make clean
make clobber
. build/envsetup.sh
lunch (select the number of ancora)
brunch ancora otapackage
Click to expand...
Click to collapse
Now sit and watch a movie on YouTube or TV while this compile our rom, work good, you should got something like this one
Special thank to who help me and spend time to got CM booted without problems
Original article from here.
Confuse step
Apply Patch For Camera
Download the patch that i attach in the thread.
Copy it into the root of Cynogen Mod
chmod a+x cm-10.1
./cm-10.1
Press enter after finish.
OK, Let's Compile The Rom
Dear
i Confuse of that step, where is the root of Cyanogen Mod, you never said that before. i was repo sync on cm directory, but no one file on there.
i wanna to patch this on the source seek-for-android/wiki/BuildingTheSystem. i really help your help.
I really appreciate your help for it.
thanks for advanced
---------- Post added at 10:48 AM ---------- Previous post was at 10:42 AM ----------
sir can you explain final step of this guide, that's very make me confuse.
i really appreciate your help, thanks for advanced.
sparcoima said:
Apply Patch For Camera
Download the patch that i attach in the thread.
Copy it into the root of Cynogen Mod
chmod a+x cm-10.1
./cm-10.1
Press enter after finish.
OK, Let's Compile The Rom
Dear
i Confuse of that step, where is the root of Cyanogen Mod, you never said that before. i was repo sync on cm directory, but no one file on there.
i wanna to patch this on the source seek-for-android/wiki/BuildingTheSystem. i really help your help.
I really appreciate your help for it.
thanks for advanced
---------- Post added at 10:48 AM ---------- Previous post was at 10:42 AM ----------
sir can you explain final step of this guide, that's very make me confuse.
i really appreciate your help, thanks for advanced.
Click to expand...
Click to collapse
ok you have to download cm-10.1.zip archive from attacched files then extract the patch into the root of your source then type chmod a+x cm-10.1 then run by ./cm-10.1 will repo sync your source and fix CameraHAL error during compilation.
once the commits are installed press enter and build your rom, many developers use my guide and work successfully is for cyanogen mod but i guess will work for other roms. if have any problem pm me..thanx
I'm not responsable for all that you do with your PC and your Nexus.
For first you need a 64-bit PC,with minimum 4GB of RAM and a Dual-core PC,and Ubuntu.
Start with PC configuration.
1) You need the following:
-JDK 6 if you wish to build Kit-Kat.
Code:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update && sudo apt-get install oracle-java6-installer
-Python, which you can download from python.org. Or:
Code:
$ sudo apt-get install python
-Git, which you can find it at git-scm.com. Or:
Code:
$ sudo apt-get install git-core
-Android SDK:
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Find your .profile file and add this at the bottom of the file:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.
To check for updates issue this into your terminal:
Code:
$ android
2) Installing required packages (Ubuntu 13.04+)
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev lib32z1 \
lib32ncurses5 lib32bz2-1.0 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 \
lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc 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 lzop
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Installing required packages (Ubuntu 12.04)
Code:
$ sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Installing required packages (Ubuntu 10.04 -- 11.10)
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
On Ubuntu 10.10:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
Code:
$ sudo apt-get install libx11-dev:i386
3) Configure your USB.
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
4) Save the file and close it and then issue this command:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
4a) [OPTIONAL] Setting up ccache
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.
Put the following in your .bashrc or equivalent.
Code:
export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
Code:
export CCACHE_DIR=<path-to-your-cache-directory>
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code:
Code:
prebuilts/misc/linux-x86/ccache/ccache -M 50G
This setting is stored in the CCACHE_DIR and is persistent.
5) Install the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
6) Initialize the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
6a) For AOSP:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.4_r2
6.1) For people who have already done a repo init:
Code:
$ cd WORKING_DIRECTORY
AOSP:
Code:
$ repo init -b android-4.4.4_r2
$ repo sync
7) When prompted, enter your real name and email address.
8) Gather the files:
Code:
$ repo sync
How to add Nexus device config.
1) Navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir samsung
$ cd samsung
2) Clone the github device tree from remote to local(I'll add all 3 variants of nexus)
Code:
git clone https://android.googlesource.com/device/samsung/tuna
Code:
git clone https://android.googlesource.com/device/samsung/maguro
Code:
git clone https://android.googlesource.com/device/samsung/toro
Code:
git clone https://android.googlesource.com/device/samsung/toroplus
3) Add Vendor files(we will use shiny that are already on github,for simply setup):
Return to source root folder and do:
Code:
$ mkdir vendor
$cd vendor
now clone vendor files:
Code:
git clone https://github.com/ShinyROM/android_vendor_widevine.git -b master
Code:
git clone https://github.com/ShinyROM/android_vendor_nxp.git -b master
Code:
git clone https://github.com/ShinyROM/android_vendor_invensense -b master
Code:
git clone https://github.com/ShinyROM/android_vendor_broadcom -b master
Code:
git clone https://github.com/ShinyROM/android_vendor_csr -b master
Code:
git clone https://github.com/ShinyROM/android_vendor_ti -b master
Code:
git clone https://github.com/ShinyROM/android_vendor_samsung -b master
Code:
git clone https://github.com/ShinyROM/android_vendor_imgtec -b master
after this return to source root folder
4) Add KitKat changes to the source(more difficult part):
Tuna part:
Code:
$ cd device/samsung/tuna
$ git remote add ShinyROM https://github.com/ShinyROM/android_device_samsung_tuna
$ git fetch ShinyROM
$ git cherry-pick 4b8c328bbdf85eb9ef9ff91d387e856b0fa41598
$ git cherry-pick 3b73c36a90dc64fea97a444b3f78f9c46f51d3a1
$ git cherry-pick 20bc682ea8b7f4839fac5a9186caad66654e8744
$ git cherry-pick c3de6cd1a5d9836a26c8ec988961266e1d10eafb
$ git cherry-pick 3ab5ebccee0447c05e502876915a4f80e694774c
$ git cherry-pick 592cca8e9f9e2a6dc97aa04cdeec63b0f43f6cf8
$ git cherry-pick 0370ce5c126c4beb08ac449fdba9520709850104
$ git cherry-pick d218fe0237272173f8f525e73bc4af4eea8a22b2
$ git cherry-pick 9d1cc345633397969161f1864c8fd31bea934ed5
Now choose this for the type of your Nexus:
Maguro doesn't any change.
Toro part(will be added soon).
Toroplus part:
Code:
$ cd device/samsung/toroplus
$ git remote add ShinyROM https://github.com/ShinyROM/android_device_samsung_toroplus
$ git fetch ShinyROM
$ git cherry-pick 4bf9f8b5f3aa9a3d87cfcbeb8c12c59f4d7fbc42
Glitch fix:
return to source tree folder.
Code:
$ cd frameworks/native
$ git remote add GeyerA https://github.com/GeyerA/platform_frameworks_native
$ git fetch GeyerA
$ git cherry-pick a92548738b12f37a0ae9bf2268a15c835cabed9d
$ git cherry-pick 8c5f62fefb9c8b3e7dc8a5fbbef3e69b9afd23f9
$ git cherry-pick 2ec9852a507e977895f3794615506ca9f0e7e23b
$ git cherry-pick 117c4c56d15774ec31b4db8bbe748709090e1a16
$ git cherry-pick 32d4c4fda4032052b6a2938a89c1c7be9ecb3f75
$ git cherry-pick 55fa4ff4ce705c7a059006f5ae3acd7d8671b968
$ git cherry-pick 571387e4962f2981feb2414c16f210a6cea33810
$ git cherry-pick 5b78c099864ece8a17bee54659fa342a6be2f5a3
$ git cherry-pick 458c63bc4b5f080a4a890ef242838ccba5e557ff
$ git cherry-pick 340907456b4042de743cdd3924ce5b46ea25f5f5
$ git cherry-pick 99ee6c73d613ee859d321cda65c065aad6fb36df
Prepare for compiling:
1) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY
2) Prepare To Compile:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
3) Get your list of devices:
Code:
$ lunch
4) Now compile ('#' being the number of cores in your processor +1):
Code:
$ make -j#
Or for a flashable zip:
Code:
$ make -j# otapackage
Now you will found the zip in out folder.
Credits to:
baldwindguy77
dastin1015
GeyerA
XDA for learning me this.
Reserved.
Reserved 2
Compiling with a 64-bit device less than 4 GB is also possible. So minimum required memory is at least 2 GB, it's better to have 4GB than 2 because with 2 GB RAM chromium may be a little bit pain in as$ when it doesn't want to get built nicely every time.
Sent from my Galaxy Nexus using XDA Free mobile app
Carlos_Manuel said:
Compiling with a 64-bit device less than 4 GB is also possible. So minimum required memory is at least 2 GB, it's better to have 4GB than 2 because with 2 GB RAM chromium may be a little bit pain in as$ when it doesn't want to get built nicely every time.
Sent from my Galaxy Nexus using XDA Free mobile app
Click to expand...
Click to collapse
yes,but with 4gb today I had some problem.
antonio8297 said:
yes,but with 4gb today I had some problem.
Click to expand...
Click to collapse
Chromium stuff requires a lot of RAM memory. I build myself with intel pentium dual core inside 2 GB and 2 GB of RAM 667 MHz, building kitkat (clean build) takes 8 hours to 3 days for me, depends how well libwebviewchromium gets built :good:
Carlos_Manuel said:
Chromium stuff requires a lot of RAM memory. I build myself with intel pentium dual core inside 2 GB and 2 GB of RAM 667 MHz, building kitkat (clean build) takes 8 hours to 3 days for me, depends how well libwebviewchromium gets built :good:
Click to expand...
Click to collapse
i gets build purity in 5hours with intel i3 dual core and 4gb of RAM.
Can i use brunch for compile?
Krizthian said:
Can i use brunch for compile?
Click to expand...
Click to collapse
Aosp or cm?
antonio8297 said:
Aosp or cm?
Click to expand...
Click to collapse
aosp
Project Developer
Welcome
This is a guide for all those who want to build for their Xiaomi redmi1s [Armani] Device but do not neccesasarily have the knowledge or experience.
This is an unofficial guide for the building of custom ROMs and other mods for the Xiaomi Redmi1s. This is a work in progress, with additions being made as often as possible. This thread has already grown with the help of the devs established in this forum. BMP777 began this project a year ago when I was using a Samsung GS II Skyrocket. BMP777 started another alike thread called PR II in the LGOG forum a while back as well. I have since moved on to a ONE, but both threads remain to this day. and Started by Me on Xperia Arc The point is this: everyone who uses this site has a desire for modding, customizing, and/or otherwise altering their device. Unfortunately, many have no idea how to go about doing these things for themselves. As such, there is a lot of dissatisfaction among developers about receiving constant demands, suggestions, and requests for updates. This thread is meant to give those who want to step up and build for themselves the means to do so. It is an ever-changing thread, with all assistance welcomed.
READ ME:
On one hand, it should go without saying that if you have no knowledge and/or experience with building, java, C++, and various other tools, you probably shouldn't begin here. At the same time, it is possible to learn to build, provided you can read, follow directions, and aren't too lazy to RESEARCH.
OH YEAH, and you better have patience. This isn't easy. It will be work. The quickest way to get flamed is to show yourself to be lazy. If you think that with a couple clicks, you can have your own flashy ROM, forget it. But, if you do want to learn, this is a good place to get started. I have no ego about this; I started the same way and just want to help everyone learn to build their own ROM. But, everyone will struggle to get to a successful point, and lazy, unmotivated people just irritate those who have had to learn from scratch too. Tutorials will be posted for any new thing learned and built as time and space allow. ALL ARE WELCOME AND ALL QUESTIONS ARE TOO. But, seriously, if it's a really ridiculous one, I/we reserve the right to screw with you about it.
ALWAYS REMEMBER:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thread Disclaimer:
The instructions and extras posted here are to be used at your own risk. I am working hard to provide good, workable tutorials that will make successful building much easier. Nevertheless, I am not responsible if you lose your files, brick your device, or inadvertently cause a nuclear war. If you are seeking absolute perfection, RUN NOW WHILE YOU STILL CAN!!
Thread Navigation :
# 2 > Setting Up Build enviorment
# 3 > Building instructions & How To Build Using Linaro Toolchain
# 4 > Kernel building and CCACHE
# 5 > reserved for future
Build Enviorment Set up :
This is a combination of the steps offered in the threads 'Compile JB on Ubuntu' and TeamChopsticks CyanogenMod.
Special thanks to dastin1015 and TeamChopsticks.
Tip: Allocate at least 75 gigs of space for the building of ONE ROM. If you install ccache, you will want 90. A complete build directory can use as much as 100 gigs, so make sure you have plenty of room. One of the ways to fail out a build is too use all of your partition before acquiring all the necessary files.
Here are the steps from those 2 tutorials in correct order:
0.1 ))
Install Gedit
Code:
# gedit
sudo apt-get install gedit
1) You need the following:
-JDK 6 if you wish to build Jellybean.
Code:
[COLOR="Black"]$ sudo apt-get install oracle-java7-installer
-Python 2.4 -- 2.7, which you can download from python.org.[/COLOR]
Or:
Code:
[COLOR="black"]$ sudo apt-get install python
-Git 1.7 or newer. You can find it at git-scm.com.[/COLOR]
Or:
Code:
[COLOR="black"]$ sudo apt-get install git-core[/COLOR]
-Android SDK:
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to – this tutorial assumes you've done that as well.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file:
Code:
[COLOR="black"]# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin[/COLOR]
Find your .profile file and add this at the bottom of the file:
Code:
[COLOR="black"]PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.[/COLOR]
To check for updates issue this into your terminal:
Code:
[COLOR="black"]$ android[/COLOR]
2) Install required packages. 64-bit (recommended)
Code:
[COLOR="black"]$ sudo apt-get install git-core gnupg flex bison gperf build-essential
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs
x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown
libxml2-utils lzop schedtool[/COLOR]
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
[COLOR="black"]$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so[/COLOR]
Code:
[COLOR="black"]$ sudo apt-get install git-core gnupg flex bison gperf build-essential
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so[/COLOR]
3) Configure your USB.
Code:
[COLOR="black"]$ gksudo gedit /etc/udev/rules.d/51-android.rules[/COLOR]
Inside of this blank text file insert:
Code:
[COLOR="black"]#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"[/COLOR]
4) Save the file and close it and then issue this command:
Code:
[COLOR="black"]$ sudo chmod a+r /etc/udev/rules.d/51-android.rules[/COLOR]
5) Install the repo:
Code:
[COLOR="black"]$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo[/COLOR]
Create your work directory:
Code:
[COLOR="black"]mkdir ~/"your directory name here" For example: mkdir ~/cm10
cd ~/cm10[/COLOR]
Building Instructions : For CyanogenMod
Unofficial
CM-11.0 [Android-4.4.x]
To get started with Android/CyanogenMod, you'll need to get familiar with Git and Repo.
To initialize your local repository using the CyanogenMod trees, use a command like this:
first create folder named " cm "
Code:
mkdir cm
enter into cm
Code:
cd ~/cm
For CM - 11.0 kitkat 4.4.x
Code:
[COLOR="black"]repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Please see the CyanogenMod Wiki for building instructions.
For more information on this Github Organization and how it is structured, please read the wiki article.
Create and edit device.xml in .repo:
Code:
[COLOR="black"]gedit .repo/local_manifests/device.xml[/COLOR]
Add this to the device.xml:
For CM 11.0 KitKat 4.4.x
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-11.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-11.0" />
</manifest>
Code:
[COLOR="black"]. build/envsetup.sh (notice the period and space)
vendor/cm/get-prebuilts
[/COLOR]
then
Code:
brunch armani
CM-12.0 [Android -5.0.x]
For CM - 12.0
Code:
[COLOR="black"]repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Please see the CyanogenMod Wiki for building instructions.
For more information on this Github Organization and how it is structured, please read the wiki article.
Create and edit device.xml in .repo:
Code:
[COLOR="black"]gedit .repo/local_manifests/device.xml[/COLOR]
Add this to the device.xml:
For CM 12.0
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-12.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-12.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-12.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-12.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-12.0" />
</manifest>
Repo Sync again to grab device stuff
Code:
repo sync
Code:
[COLOR="black"]. build/envsetup.sh (notice the period and space)
[/COLOR]
then
Code:
brunch armani
Building Instructions : For Carbon Rom
Unofficial
To get started with the Carbon-Dev sources, you'll need to get familiar with Git and Repo.
Getting Started
To get started with the Carbon-Dev sources, you'll need to get familiar with Git and Repo.
Create the Directories
You will need to set up some directories in your build environment.
To create them run:
Code:
[COLOR="black"]mkdir -p ~/carbon[/COLOR]
Install the Repository
You may need to reboot for these changes to take effect. Now enter the following to initialize the repository:
Code:
[COLOR="black"]cd ~/carbon[/COLOR]
Repositories:
Before you continue --> run this in the terminal
Code:
[COLOR="black"]repo init -u https://github.com/CarbonDev/android.git -b kk[/COLOR]
after it does its thing
Code:
[COLOR="black"]mkdir .repo/local_manifests
touch .repo/local_manifests/device.xml
gedit .repo/local_manifests/device.xml[/COLOR]
Add this to the device.xml:
For Carbon Rom kk
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-11.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-11.0" />
</manifest>
save and exit then
Code:
[COLOR="black"]repo sync[/COLOR]
after everything syncs
Code:
[COLOR="black"]gedit vendor/carbon/vendorsetup.sh[/COLOR]
and add this to the bottom:
Code:
[COLOR="black"]add_lunch_combo carbon_device-userdebug[/COLOR]
save and exit.. then
Code:
[COLOR="black"]See The Below link and make the Following Changes in your Repo[/COLOR]
https://github.com/tarunkapadia93/a...mmit/738f266a3b14da2ed578f55e2bc8f488f4240c14
Code:
[COLOR="black"]. build/envsetup.sh[/COLOR]
Code:
[COLOR="black"]brunch device[/COLOR]
Next Tutorial is Strictly Not for beginners
Building with Linaro 4.8 toolchain
Checkout these toolchains customised for arm v7 and scorpion Cpu here http://forum.xda-developers.com/showthread.php?t=2098133
thanks @Christopher83
Go into Terminal and navigate to the root folder of your source tree, then:
Code:
[COLOR="Black"]prebuilts/gcc/linux-x86/arm/[/COLOR]
Run:
Code:
[COLOR="black"]wget http://releases.linaro.org/13.06/components/toolchain/gcc-linaro/4.8/gcc-linaro-4.8-2013.06.tar.bz2[/COLOR]
Run:
Code:
[COLOR="black"]bunzip2 *.tar.bz2[/COLOR]
Run:
Code:
[COLOR="black"]tar -xvf *.tar[/COLOR]
Using your file manager, navigate to the root folder of your source tree again.
Navigate To "/build", in your root folder.
Run:
Code:
[COLOR="black"]gksudo gedit envsetup.sh[/COLOR]
change the line in bold, to look exactly like this one:
Code:
[COLOR="black"]case $ARCH in
x86) toolchaindir=x86/i686-linux-android-4.6/bin
;;
[B]arm) toolchaindir=arm/gcc-linaro-4.8-2013.06[/B] [COLOR="Red"]<--------[/COLOR]
;;
mips) toolchaindir=mips/mipsel-linux-android-4.6/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
[/COLOR]
Exit out and open new. Initialize and build. That's it! Makes you wonder why you never did it before, right?
Not so fast. You may have build issues, you may not. I had a few lengthy sets of errors in gsm calltracker and another .java file that was solved by using Meld and making it look exactly like a successful build's file. More as I learn.......
Thanks to infected_ for this tut; his post can be found here: [/COLOR]
http://forum.xda-developers.com/showpost.php?p=42976693&postcount=12
This is a work in progress. Many more pieces of information will be added and this is meant to be an ever-changing thread. If you see something that is outdated or incorrect, please let me know ASAP, so I can make the correction. Also, make sure that any info offered can be and has been confirmed as functional.
Ccache
CCACHE
Here is a brief tutorial on the installation of Ccache, which can shorten build times drastically :
If you have room on your build system you can speed
your builds up considerably by using ccache. ccache is a compiler
cache. It speeds up re-compilation of C/C++ code by caching
previous compiles and detecting when the same compile is
being done again.
Install it with apt-get:
Code:
[COLOR="Black"]sudo apt-get install ccache[/COLOR]
Set environment vars for Android use:
(I put these exports in my .bashrc)
Code:
[COLOR="Black"]export USE_CCACHE=1
export NDK_CCACHE=ccache[/COLOR]
Set a cache size of 10G for optimal results:
Code:
[COLOR="black"]ccache -M 10G[/COLOR]
Check the status of your cache with the command:
Code:
[COLOR="black"]ccache -s [/COLOR]
Returns:
Code:
[COLOR="black"]
cache directory /home/Jarvis/.ccache
cache hit 106673
cache miss 18379
called for link 3758
preprocessor error 5
not a C/C++ file 4425
unsupported compiler option 678
no input file 4565
files in cache 36758
cache size 3.2 Gbytes
max cache size 10.0 Gbytes[/COLOR]
Really Useful things
Here are some relevant topics/tutorials/sites:
Download | Ubuntu - www.ubuntu.com/download
Official Ubuntu Documentation: Help for all versions. - https://help.ubuntu.com/
How To Windows Dual Boot: - https://help.ubuntu.com/community/WindowsDualBoot
How To Use The Terminal: Commandline stuff. - https://help.ubuntu.com/community/UsingTheTerminal/
[HOW TO] Beginners Guide to Android ROM Development - http://forum.xda-developers.com/showthread.php?t=1272270 (courtesy of isidromxz)
[Tutorial] Compile JB on Ubuntu - http://forum.xda-developers.com/showthread.php?t=1762641 (courtesy of dastin1015)
[CM10] [PPA] Cyanogenmod Compiler v0.6 - http://forum.xda-developers.com/showthread.php?t=1789190 (courtesy of lithid-cm)
[Wiki] How to: Gerrit - http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit
[Wiki] How to: Git - http://wiki.cyanogenmod.com/wiki/Howto:_Git
[Guide] How to: upload repo with commit history - http://forum.xda-developers.com/showthread.php?t=2727886 (courtesy of Mazda [Alex Cruz])
[Wiki] How to: Connect to device with SSH - http://wiki.cyanogenmod.com/wiki/Howto:_Connect_to_Device_with_SSH
Here is an easy-to-use page on common Linux commands: - http://www.pixelbeat.org/cmdline.html
Linux Newbie Guide : - http://www.unixguide.net/linux/linuxshortcuts.shtml
Also, Team Chopsticks has a good page with some useful tips as well, located here:
http://www.teamchopsticks.org/p/contributing.html (thanks to bdusmc for the tip)
Here is a link to LIFEHACKER's command line tutorials. Very good stuff!! : http://lifehacker.com/5743814/become-a-command-line-ninja-with-these-time+saving-shortcuts
CyanogenMod git : - https://github.com/CyanogenMod
LegacyXperia git : - https://github.com/LegacyXperia
Original Beanstalk thread : - http://forum.xda-developers.com/showthread.php?t=2091900
Beanstalk git : - https://github.com/scotthartbti?tab=repositories
The Muppets git : - https://github.com/TheMuppets
Thanks to:
CyanogenMod
david279
jsevi83,
Kra1o5
MallardDuck
ktempleton
AdhvanIt
Mazda
matthew0776
spleef
M4570D0N
car vs driver
BMP777
Need Help ?
You can always Hit me up on IRC [FREENODE] at #armani-dev
Click to expand...
Click to collapse
wow....thanks bro it will really help a lot to new user just like me
Thanks....................
Luffy.d said:
wow....thanks bro it will really help a lot to new user just like me
Click to expand...
Click to collapse
That's the aim bro to provide support for all guys who want to learn
Guide Updated according to R17 Changes
Really awesome thread here man.
Keep it coming!
Peace.
rebelos said:
Need Help ?
Click to expand...
Click to collapse
tried to compile AOSPA legacy 4.6 for unofficial device (armani/redmi 1s), since this tutorial is outdated
http://forum.xda-developers.com/showthread.php?t=1863547
and I haven't found any updated guide, I tried to compile it like CM11 (using local_manifests, etc) but stuck when building
http://hastebin.com/opiteyogux.md
I use device tree from https://github.com/armani-dev/android_device_xiaomi_armani with several change (local not committed to github) :
1. rename cm.mk to pa.mk also change cm_armani to pa_armani in PRODUCT_NAME
2. rename cm.dependencies to pa.dependencies adjust qcom_common to use AOSPA-legacy/android_device_qcom_common
3. added add_lunch_combo pa_armani-userdebug to envsetup.sh
anything I have missed? since I think I don't need to manually add files into vendor/pa folder
http://forum.xda-developers.com/showpost.php?p=30958881&postcount=2 aren't this obsolete in PA 4?
dels07 said:
tried to compile AOSPA legacy 4.6 for unofficial device (armani/redmi 1s), since this tutorial is outdated
http://forum.xda-developers.com/showthread.php?t=1863547
and I haven't found any updated guide, I tried to compile it like CM11 (using local_manifests, etc) but stuck when building
http://hastebin.com/opiteyogux.md
I use device tree from https://github.com/armani-dev/android_device_xiaomi_armani with several change (local not committed to github) :
1. rename cm.mk to pa.mk also change cm_armani to pa_armani in PRODUCT_NAME
2. rename cm.dependencies to pa.dependencies adjust qcom_common to use AOSPA-legacy/android_device_qcom_common
3. added add_lunch_combo pa_armani-userdebug to envsetup.sh
anything I have missed? since I think I don't need to manually add files into vendor/pa folder
http://forum.xda-developers.com/showpost.php?p=30958881&postcount=2 aren't this obsolete in PA 4?
Click to expand...
Click to collapse
see this git https://github.com/darknightmare it has everything u need
Regards
dels07 said:
tried to compile AOSPA legacy 4.6 for unofficial device (armani/redmi 1s), since this tutorial is outdated
http://forum.xda-developers.com/showthread.php?t=1863547
and I haven't found any updated guide, I tried to compile it like CM11 (using local_manifests, etc) but stuck when building
http://hastebin.com/opiteyogux.md
I use device tree from https://github.com/armani-dev/android_device_xiaomi_armani with several change (local not committed to github) :
1. rename cm.mk to pa.mk also change cm_armani to pa_armani in PRODUCT_NAME
2. rename cm.dependencies to pa.dependencies adjust qcom_common to use AOSPA-legacy/android_device_qcom_common
3. added add_lunch_combo pa_armani-userdebug to envsetup.sh
anything I have missed? since I think I don't need to manually add files into vendor/pa folder
http://forum.xda-developers.com/showpost.php?p=30958881&postcount=2 aren't this obsolete in PA 4?
Click to expand...
Click to collapse
make the pa.mk to pa_armani.mk if you still get error then go to vendor/pa/products n copy paste pa_armani.mk there go to the androidproduct.mk add in this line
Code:
ifeq (pa_amami,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_armani.mk
endif
Guide updated according to latest Github Changes
Edit: Updated the Guide again
regards
Thanks, will try after my exams.
Many Thanks Super Thread . I Will Request Your Please Make Step By Step Kernel Build For New User Who Want Kernel For Redmi 1S ..
manoranjan2050 said:
Many Thanks Super Thread . I Will Request Your Please Make Step By Step Kernel Build For New User Who Want Kernel For Redmi 1S ..
Click to expand...
Click to collapse
Kernel Compiling is not recommended for new user.. needs a certain degree of experience with source compiling to move onto kernels
guide is ready for r19 sources compiling
Guide Updated with R20 changes and Also added Carbon ROM Tutorial
credits: carbon maintainer for our device @Tarun93
Guide Updated with R20 changes and Also added Carbon ROM Tutorial
credits: carbon maintainer for our device @Tarun93
Today I was able to unlock the bootloader through an app from Azus, but when the phone is connected it works correctly adb in the terminal of linux. But when I disconnect and enter bootloader it no longer recognizes the device. Can anyone help? My Linux is mint v19, I installed adb via terminal (sudo apt-install ...)
DucksDodgers said:
Today I was able to unlock the bootloader through an app from Azus, but when the phone is connected it works correctly adb in the terminal of linux. But when I disconnect and enter bootloader it no longer recognizes the device. Can anyone help? My Linux is mint v19, I installed adb via terminal (sudo apt-install ...)
Click to expand...
Click to collapse
Assuming you already installed fastboot and adb tool
Create rules for 51-android.rules
sudo gedit /etc/udev/rules.d/51-android.rules
when files opens if you haven't added rules it will be empty. Now add the following
# Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
# Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666"
# Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
# HTC, Wiko
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
# Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
# Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666"
# Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
# XiaoMi
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666"
Save the file and exit
run following commands as root
chmod a+r /etc/udev/rules.d/51-android.rules
udevadm control --reload-rules
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
sukhwant717 said:
Assuming you already installed fastboot and adb tool
Create rules for 51-android.rules
sudo gedit /etc/udev/rules.d/51-android.rules
when files opens if you haven't added rules it will be empty. Now add the following
# Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
# Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666"
# Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
# HTC, Wiko
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
# Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
# Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666"
# Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
# XiaoMi
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666"
Save the file and exit
run following commands as root
chmod a+r /etc/udev/rules.d/51-android.rules
udevadm control --reload-rules
Click to expand...
Click to collapse