****FULL SUPPORT ****
So guys from the concept of sharing and caring ..am going to share the way through which i have succeeded to compile my first rom based on omni source.
I will try to make this guide as much as easy ..so dont worry..and feel free to ask any doubt if u have..
Note: Most of the instructions are fit for Ubuntu running normally on any PC and not specific to Virtual Box
**Computer/Laptop with decent amount of ram (min 6gb)and also decent storage
**Internet connection(now thats obvious)
**Some knowledge about linux commands..like basic command such as cd for “change directory”,(anyways even if u dont know just copy and paste the codes given in the thread
**Last but not least "U must have android mobie" not an iphone (kidding)
This Guide will cover below things:
** How to install Ubuntu on virtual box
**How to set up Build environment
**How to build and compile rom
**transfer the zip from ubuntu to your phone
So lets begin
How to install ubuntu on Virtual box:
1. Download ubuntu from HERE(download ubuntu 12.04 LTS 64 bit)if u are having system with 2gb then pls dont try to compile
2. Download virtual box from HERE(download the latestwindows version x86/amd64)
3. After downloading vm click on it and select "NEXT"
4.Choose not to install USB support, networking, or Python support. Do this by clicking the grey icon near each option and selecting the red X or “Entire feature will be unavailable”. Then click “Next” to continue.
5.Uncheck the Quick Launch Bar checkbox and click “Next” to continue
6.Click install and finish.
7.Now click the new button at the top to create a new virtual machine.
8.Give your virtual machine a name and select the operating system you’ll be running(for e,g select version as ubuntu 64 if u are on 64bit os). Click “Next”.then slect create virtual hard drive now
9.now type the amount of memory ..(4gb is absolute minimum)
10.Click “Next” to create a new virtual hard disk, then click “Next” again
11.Select dyanmically allocated storage
12.now type the amount of storage(200 gb is minimum) and click create .
13.Select your new virtual machine. Once you've done this, click the “Settings” button.
14.Click “Storage” tab and Click the “CD/DVD icon" having "+" on it and select ISO to mount.
15.Click system on the left and Choose boot order and keep CD/DVD on the top as first priority.
16.Now close the settings window and Select your virtual machine. Then click the “Start” button
15.Now ubuntu will start and select the language
16.select install ubuntu
17.click continue and select the first radio button ..then hit continue again and install now(wait for some time)
18.Go through all the steps and finally u should have the below screen.(if u have got that screen then u are ok to proceed ahead )
16.So i assume you have got the ubuntu desktop .
17.click on ubuntu software centre avaliable on the left side and select edit/software sources
18.click on update tab and follow the screenshot below
19.After couple of min u should see update box is dancing on the left side , click that and install all the update packages
How to set up build environment:
1. Go to THIS awesome thread , I Bet u would not have any problem in setting up build environment if u had followed it correctly..
2.If u have any troubles in setting up build env then u are free to ask/post in this thread.
3.You can also set up adb and fast boot very easily instead of sdk tools (but remember it does not mean u can skip downloading sdk tools, you have to download all the packages .
Set up adb and fastboot with ease
4.you only need to download the below packages
So i assume you have set up your build environment successfully ..
How to build and compile :
1.We will install build packages needed to compile the rom.
2.Open your ubuntu terminal by pressing ctrl+alt+t
3.As of now u cannot copy/paste text between ubuntu and your windows ..so we will be installing guest addition cd image which u can install by clicking on Devices/install guest addition cd image .
4.it will install now , after that select Devices/share clipboard/bidirectional ..now reboot your ubuntu by typing the below code in terminal
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
apt-get install g++-4.7 gcc-4.7
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool
For 64-bit only systems
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.7-multilib g++-4.5-multilib
7.Now Create the directories
mkdir -p ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
12. now we have to create a directory in which our source will get downloaded
mkdir -p dirname
repo init -u url -b branch
repo init -u https://github.com/omnirom/android.git -b android-4.4
repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4
repo init -u git://github.com/SlimRoms/platform_manifest.git -b kk4.4
repo init -u git://github.com/SlimRoms/platform_manifest.git -b kk4.4-caf
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
15.IF u are lazy and dont want to go throu the above thread then u can skip and follow the below steps.
repo sync -c -j4
repo sycn -c will download only the current version so it saves time for u
17.repo sync will take more time..(for me it took 3 days to complete because my internet speed was 50kb/sec
18.After repo sync is done u have to fetch some additional repoistory using local_manifest.xml
<remote fetch="https://github.com/DonkeyCoyote" name="donkey" /> <project name="DonkeyCoyote/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="android-4.4" /> <project name="android_device_samsung_i9100" path="device/samsung/i9100" remote="omnirom" revision="android-4.4" /> <project name="android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="omnirom" revision="android-4.4" />
note: above is an example for omni rom...if u are fetching aokp,pac etc then u have to change the path , remote , revision accordingly
19.Let's configure ccache too. It will reduce the build time to 40% after first build
echo "export USE_CCACHE=1" >> ~/.bashrc
directoryname/prebuilts/misc/linux-x86/ccache/ccache -M 25G
20.Now its time for compiling .simply type
22.u should get package complete at the end..(unfortunately i could not save screenshot of that..but soon s.s will be posted when i repo sync again)
23.If yes then u have successfully built your rom ..congrats
24.now how to transfer that zip to the phone for flashing?..follow the below steps
how to transfer files from ubuntu to your phone:
1: Download and install the AirDroid app to your Android device.
2: Launch the app and read the starter guide. As soon as you’re done, click “Start”.
3: Take note of the web address that is being shown on the app. You’ll need that web address to access your smartphone through your computer’s web browser.
4.now type the code in ubuntu browser and there u go ...u have connected your phone to ubuntu.
5.transfer the file by selection files/sdcard/upload
Hope this guide helps u the most.
IF U HAVE ANY QUESTION FEEL FREE TO POST ..cheers.
@Myself5 (this guy really deserves it)
Hit the thanks button if u think it deserves to have..