[Completed] how do i get my hands on the s5 binaries for sm-g900t ofr klte , .sh files? - XDA Assist

I'm trying my hand at compiling nougat /cm14 for klte but I need klte or sm-g900t (or sm-g900t1) samsung galaxy S5 (snapdragon) driver binaries. Where to find. Ps thank you again for the the help in the past.and all that you do.
I believe the files i need are .sh files for the S5, but i'm not able to locate them so far.

Ok So my builds failed yesterday.
Today I m starting over. I mean completely.
I deleted the VM and reinstalled
I've got my plan for the build environment and how to set up. I'm still stuck at how I'm going to add the cm14 klte repo that I have git cloned
To the android nougat source repo.
my plans are below************************
sudo -i
master111
add-apt-repository "deb http://archive.canonical.com/ lucid partner" **************** not sure
apt-get update
apt-get install sun-java6-jdk ************ use sun-java9-jdk
apt-get install python
apt-get install git-core
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
or
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
ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
#The next step is optional, but can offer significant performance gains while compiling, by using ccache (a compiler
#cache tool), which caches the output of the compiler, to save time when compiling a file which has not been changed
#since the last compile.
#To enable ccache, edit your ~/.bashrc or ~/.profile file (or equivalent), and add the following line
export USE_CCACHE=1
#After you log out and back in again, this change will take effect.
#By default, the Android build process creates a subfolder named “out” within the root of your source tree. While for
#most users this is best, in some situations it can be advantageous to move the output directory to another file system.
#If, for example, you have a striped RAID array, it is beneficial to store the output directory on this array. All of the
#files within the out directory can be re-generated in the event of filesystem problems (if the sources were held on
#another filesystem).
#To change the output directory to another filesystem, use the command
export OUT_DIR_COMMON_BASE= "********"
#Within the defined output directory, a new folder will be created, named after your current source tree directory. For
#instance, if you have source trees as /source/master1 and /source/master2 and OUT_DIR_COMMON_BASE is set to /output, the
#output directories will be/output/master1 and /output/master2.
#It is therefore important to ensure you do not have multiple sources stored in directories with the same name, as they
#would end up sharing an output directory, with unpredictable results.
#This is only supported when building Jelly Bean (4.1) and newer.
mkdir ~/bin
PATH=~/bin:$PATH
curl $ http://commondatastorage.googleapis....downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
or
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
mkdir NOU_SOURCE
cd NOU_SOURCE
repo init -u https://android.googlesource.com/platform/manifest/ -b android-7.0.0_r6
?????????????????repo init -b master????????????????????
repo sync
https://github.com/TheMuppets/propri...or_samsung.git
or
https://github.com/CyanogenMod/andro...lte-common.git
***binaries
make clobber
*****BUILD TIME****
. build/envsetup.sh
lunch
*******SELECT device type*******to install
make -j1 otapackage

Greetings, assist is for new users to come and be guided to the correct forum to ask their question. You need to ask your question in the S5 forums, hopefully they can help you there.
Thread Closed
Sawdoctor

Related

[GUIDE] how to setup AOSP build envirnoment and download source

Here is a quick guide on how to set up aosp build envirnoment and download the source, there are video's below the guide
This guide is for Ubuntu, Xubuntu, Kubuntu and Lubuntu.
Setting up Build envirnoment
You will need python, git, java jdk, build packages
Python: (chekking version)
Code:
python --version
Git:
Code:
sudo apt-get install git-core
Java jdk6:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
The build packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils
Downloading the source
Installing 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
Installing repo client:
Code:
cd ~/Desktop
mkdir ics
cd ics
Code:
CM9:
repo init -u git://github.com/CyanogenMod/android.git -b ics
ICS:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
Downloading the source:
Code:
repo sync
Appreciate the work, but there are loads of guides like this, and this is the initial part that is already covered by android.com and wiki.cyanogenmod.com
Add something more, and it'ld be better
cdesai said:
Appreciate the work, but there are loads of guides like this, and this is the initial part that is already covered by android.com and wiki.cyanogenmod.com
Add something more, and it'ld be better
Click to expand...
Click to collapse
just wanted to share this here had some free time.
RafayelG said:
just wanted to share this here had some free time.
Click to expand...
Click to collapse
Then start getting more deep, as you are free!
cdesai said:
Then start getting more deep, as you are free!
Click to expand...
Click to collapse
ye but no phone atm and exams start next week made the video's yesterday evening.
RafayelG said:
ye but no phone atm and exams start next week made the video's yesterday evening.
Click to expand...
Click to collapse
Yea i know how it feels, the same here, best of luck for the exams

[CM7][MTD] CM7 EpicMTD Compile Script 12/22

Since there isn't any clear tutorial or guide on how to build CM7 EpicMTD from source, I put a simple to use script for anyone.
Either manually follow the script. Or copy and paste the code into a sh file. Execute.
Code:
#!/bin/sh
# EpicMTD CM7 Download and Compile script
# VERSION 1.1
# Install packages for Ubuntu/Debian
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
# 64 bit OS only (comment the next line if you are on 32 bit)
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
# Create directories
mkdir ~/bin
mkdir ~/android
mkdir ~/android/system
# Download CyanogenMod Repo
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j6
# Create EpicMTD local manifest
echo '# Install packages
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
# 64 bit OS only
#sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
# Create directories
mkdir ~/bin
mkdir ~/android
mkdir ~/android/system
# Download CyanogenMod Repo
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j6
# Create EpicMTD local manifest
echo '<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="EpicCM" fetch="https://github.com" />
<project
path="device/samsung/epicmtd"
name="EpicCM/android_device_samsung_epicmtd"
remote="EpicCM" revision="gingerbread"
/>
<project
path="vendor/cyanogen"
name="EpicCM/android_vendor_cyanogen"
remote="EpicCM"
revision="epiccm-rebase"
/>
</manifest>' > ~/android/system/.repo/local_manifest.xml
# Create local repo for EpicCM
repo start EpicCM --all
repo sync
# Get the RomManager
~/android/system/vendor/cyanogen/get-rommanager
# Plug in your Epic running CM to get the proprietary files
cd ~/android/system/device/samsung/epicmtd
./extract-files.sh
# Fix to allow successful compile
cd ~/android/system/vendor/cyanogen
git cherry-pick a4a5133
cd ~/android/system
# Update repos
repo sync
make clobber
# Compile
. build/envsetup.sh
brunch epicmtd
Thanks to hazridi for helping me start this.
Changelog
1.0: Initial release
1.1: Updated the local_manifest.xml to reflect new github
Good Work man.
I hope this will keep people busy hehe.
Rock on man, thanks for pulling it together and sharing with the community! Much appreciated!
Sent via Decadent Epic 4G CM7
Awesome.....just re-installed ubuntu today thinking i was gonna....now, no excuses.
Cheers!
You're welcome
(I wrote the info you used for this)
hazridi said:
You're welcome
(I wrote the info you used for this)
Click to expand...
Click to collapse
I forgot to add thanks for you. See the first post
It's cool, I wouldn't have figured it all out without deca, uber, noob, and rodd's input anyway.
awesome work ion. much appreciated. now, for a little light reading...

[HOW TO]Building Kernel Source For Any Device

Hello All. I have received several requests for how to build a kernel from source so I figured I would make a guide for anyone looking.
WARNING: I CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE YOU CAUSE TO YOUR PHONE, PERSONAL RELATIONSHIPS, LIFE, OR CAR. YOU HAVE ALREADY ROOTED YOUR DEVICE SINCE YOU ARE READING THIS SO YOU KNOW IT VOIDS YOUR WARRANTY.
Now that thats over. I will walk you through how to set up a kernel building environment and walk you through building a kernel.
I.) Requirements
1.)You will need a computer. Just about any computer running linux will work, even a Virtual Machine. I will be using Ubuntu Oneiric, Server Edition for my guide. (Most commands are the same across Ubuntu Editions as well as Linux in general.)
2.)Internet Access- the faster the better
3.)Knowledge of the android kernel and what does what.
4.)The Master Branch from Google as well as the source for your device.
5.)ALOT of time.
6.)Common Sense
II.) Installing The Necessary Tools
1.)First we must download the neccesary tools.
To install java, you need to know which version of android you will be developing for.
Froyo and Lower:
Code:
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
Gingerbread and Newer:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
2.)Next we willl download the tools needed(You need to know if you are on a 64 bit system or 32 bit.)
For 64 bit:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
Also you must link one thing based on your Ubuntu Version:
For 10.10:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
For 11.10:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
For 32 bit:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown libxml2-utils xsltproc
No linking is necessary.
NOTE: You can set up CCache on either setup. However, you will not need it necessarily due to the source is not that big compared to building a rom and therefore will not take as long.http://dnssearch.rr.com/index.php?origURL=http://www.goog.gl/&r=
III.) Downloading The Source
1.)If you already have an android Directory set up, then skip this step. If not, follow these commands. (NOTE:THIS GUIDE FOLLOWS AS IF YOU USE THIS STEP. BE CAREFUL)
Code:
$ cd $HOME
$ mkdir android
$ cd android
2.)Set up your source directory.
Code:
$ mkdir source
$ cd source
$ mkdir aosp (YOUR DEVICE)_kernel repo
$ cd repo
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ./repo
$ chmod 755 repo
$ export PATH=$PATH:$HOME/android/source/repo/
OR
$ sudo cp repo /usr/bin/repo
$ cd ../aosp
$ mkdir master
$ cd master
3.)You are now ready to grab the source. You will need the master branch. So while in the master directory:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
THIS WILL TAKE A WHILE SO SIT BACK AND RELAX.
4.)Now you need your specific devices source. So follow those steps accordingly to get the source into the directory for you device kernel @ $HOME/android/source/(YOUR DEVICE)_kernel
You now have all the source you need.
V.) Building The Kernel
1.)Now we will set up the environment for the build.
Code:
$ export ARCH=arm
$ export CROSS_COMPILER=arm-eabi-
$ export CROSS_COMPILE=arm-eabi-
$ export PATH=$PATH:$HOME/android/source/aosp/master/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
2.)Now you go into your device's kernel directory.
Code:
$ cd $HOME/android/source/(YOUR DEVICE)_kernel
3.)And begin the configuration.
If you like a gui like menu:
Code:
$ make menuconfig
If you like to answer questions:
Code:
$ make config
4.)Configure your kernel how you want it.
5.)Then, once thats done:
Code:
$ make -j4
This will build the kernel. This can take anywhere from 15 minutes to an hour and a half+.
VI.)Grabbing The Newly Made Kernel
1.) Your kernel will be located at:
Code:
$ $HOME/android/source/(YOUR DEVICE)_kernel/arch/arm/boot/zImage
2.) Your Wireless Module Will depend on your device. For the Ally, it would be:
Code:
$ $HOME/android/source/ally_kernel/drivers/net/wireless/bcm4329/wireless.ko
CONGRATULATIONS!!!
You have built your own kernel.
Now follow http://forum.xda-developers.com/showthread.php?t=748106 to flash it.
Any problems or questions, let me know. Either a PM or I'm almost always in #asus-transformer on IRC.
Wanna donate to me and help me with bills? Follow this link to Donate Via PayPal:
http://goo.gl/ReRPs
Gonna try this. Thanks for sharing...
Sent using my brain
Thanks for working on this. On first look, I think you intended to put a repo sync after the init command here:
3.)You are now ready to grab the source. You will need the master branch. So while in the master directory:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
THIS WILL TAKE A WHILE SO SIT BACK AND RELAX.
Click to expand...
Click to collapse
Android device
For the device, should it be what our device is named by the company for marketing, etc or is it what is in the build.prop under ro.product.device?? Thanks
pramathesh said:
Gonna try this. Thanks for sharing...
Sent using my brain
Click to expand...
Click to collapse
Sent using my brain <- lol, made my day !
android_owl said:
Sent using my brain <- lol, made my day !
Click to expand...
Click to collapse
glad you liked
@OP: Do I've to make any changes if I were to build from Glitch (SGS) sources for CM7?? Or everything remains the same?
what does (Your device) mean ? its name (example: samsung galaxy ace) or the codename ( example: GT-S5830) ????
Codename
Sent from my Galaxy Nexus using Tapatalk 2

[Q] How can I download CyanogenMod Source?

Hello
I want to build unoffical CyanogenMod 12 rom for my phone...
I installed Ubuntu 14.04 LTS and download repo and installed jdk and git-core.
Now what should I do for getting CyanogenMod Source?
Would you please give me some help?
Sent from my SHW-M250S using XDA Free mobile app
Follow the below steps
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Code:
sudo apt-get update
sudo apt-get install openjdk-7-jdk
java -version
you should see something like this
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
Click to expand...
Click to collapse
Code:
sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev 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 libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
mkdir ~/bin
curl h**ps://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
replace h**ps with https
Code:
sudo nano ~/.bashrc
now copy following in the last of bashrc
Code:
export PATH=~/bin:$PATH
reboot your pc
now
Code:
mkdir cm12
cd cm12
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
repo sync
Rich Village said:
Hello
I want to build unoffical CyanogenMod 12 rom for my phone...
I installed Ubuntu 14.04 LTS and download repo and installed jdk and git-core.
Now what should I do for getting CyanogenMod Source?
Would you please give me some help?
Sent from my SHW-M250S using XDA Free mobile app
Click to expand...
Click to collapse
k2wlxda said:
Follow the below steps
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Code:
sudo apt-get update
sudo apt-get install openjdk-7-jdk
java -version
you should see something like this
Code:
sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev 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 libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
mkdir ~/bin
curl h**ps://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
replace h**ps with https
Code:
sudo nano ~/.bashrc
now copy following in the last of bashrc
Code:
export PATH=~/bin:$PATH
reboot your pc
now
Code:
mkdir cm12
cd cm12
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
repo sync
Click to expand...
Click to collapse
Thank you so much!!

Guide To Building Custom Pixel 4a Roms(move if needed)

This is a place holder for anyone that can assist in helping of building custom roms for our pixel 4a. Please note this will need Linux version on how to setup an environment for the build and how to build the roms,. Anyone please that can help add infor mation on how to do these as i know there are many guides but we need one specifically for our device to get development moving along. Please post on stock aosp roms, lineage roms , miui roms etc. i will also try to update as much as i can , hopefully this thread doesnt get moved.
This is the setup from google to setting up an environment to build android aosp
Establishing a Build Environment | Android Open Source Project
source.android.com
​Establishing a Build Environment​
Important:Platform development on MacOS isn't supported as of June 22, 2021.
This section describes how to set up your local work environment to build the Android source files. You must use Linux; building under either MacOS or Windows isn't supported.
For an overview of the entire code-review and code-update process, see Life of a Patch.
Note: All commands in this site are preceded by a dollar sign ($) to differentiate them from output or entries within files. Use the Click to copyfeature located at the top right of each command box to copy all lines without the dollar signs, or triple-click each line to copy it individually without the dollar sign.
Choosing a branch​Some requirements for the build environment are determined by the version of the source code that you plan to compile. For a full list of available branches, see Build Numbers. You can also choose to download and build the latest source code (called master), in which case you simply omit the branch specification when you initialize the repository.
After selecting a branch, follow the appropriate instructions below to set up your build environment.
Setting up a Linux build environment​These instructions apply to all branches, including master.
The Android build is routinely tested in house on Ubuntu LTS (14.04) and Debian testing. Most other distributions should have the required build tools available.
For Gingerbread (2.3.x) and higher versions, including the master branch, a 64-bit environment is required. Older versions can be compiled on 32-bit systems.
Note: See Requirements for the complete list of hardware and software requirements, then follow the detailed instructions for Ubuntu below.
Installing required packages (Ubuntu 18.04)​You need a 64-bit version of Ubuntu.
sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig
Installing required packages (Ubuntu 14.04)​You need a 64-bit version of Ubuntu (14.04 is recommended).
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 libgl1-mesa-dev libxml2-utils xsltproc unzip
Note: To use SELinux tools for policy analysis, also install the python-networkx package.Note:If you're using LDAP and want to run ART host tests, also install the libnss-sss:i386 package.
Installing required packages (Ubuntu 12.04)​You may use Ubuntu 12.04 to build older versions of Android. Version 12.04 isn't supported on master or recent releases.
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)​Building on Ubuntu 10.04-11.10 is no longer supported, but may be useful for building older releases of AOSP.
sudo apt-get install git 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:
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
Configuring USB access​Install a community-maintained default set of udev rules for all Android devices by following the instructions to Set up a device for development.
Using a separate output directory​By default, the output of each build is stored in the out/ subdirectory of the matching source tree.
On some machines with multiple storage devices, builds are faster when storing the source files and the output on separate volumes. For additional performance, the output can be stored on a file system optimized for speed instead of crash robustness, because all files can be regenerated if the file system is corrupted.
To set this up, export the OUT_DIR_COMMON_BASE variable to point to the location where your output directories will be stored.
export OUT_DIR_COMMON_BASE=<path-to-your-out-directory>
The output directory for each separate source tree is named after the directory holding the source tree. For instance, if you have source trees /source/master1 and /source/master2 and if OUT_DIR_COMMON_BASE is set to /output, the output directories are /output/master1 and /output/master2.
Avoid having multiple source trees stored in directories that have the same name, as the source trees would end up sharing an output directory, with unpredictable results. This is only supported on Jelly Bean (4.1) and higher, including the master branch.
Next: Download the source​Your build environment is good to go!
How to Build a Custom ROM from Android Open Source Project - Appuals.com
If you’re familiar with rooting your Android phone or downloading custom ROMs, such as the highly popular CyanogenMod or its successor Lineage OS, you may
appuals.com
​Downloading the Android Source​The AOSP is hosted on Git, so we’re going to use a tool called Repo to communicate with Git.
First we need to setup a /bin folder in your Home directory. Type the following commands into the Linux terminal:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Now we will download the Repo tool, so type into the Linux terminal:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
After Repo is installed, we must now create an empty directory to hold your work files. So type this into the Linux terminal:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
Now we’ll configure Git with your name and email address – use a Gmail address that you check regularly, otherwise you will not be able to use the Gerrit code-review tool.
$ git config –global user.name “Your Name”
$ git config –global user.email [email protected]
Now we’ll tell Repo to pull the latest master manifest of AOSP from Git:
$ repo init -u https://android.googlesource.com/platform/manifest
If done successfully, you’ll receive a message that Repo has been initialized in your working directory. You’ll also find a “.repo” directory inside the client directory. So now we’ll download the Android source tree with:
$ repo sync
Building the Android Source
This is where the hardware binaries mentioned at the beginning of this guide come into play. Let’s head over to the AOSP drivers page and download the Pixel XL binaries for Android 7.1.0 (NDE63P). You want to download both the vendor image and the hardware components. These come as compressed archives, so extract them to your desktop and run the self-extracting script from the root folder. Choose to install the binaries to the root of the WORKING_DIRECTORY we created earlier.
Now type into your Linux terminal:
$ make clobber
$ source build/envsetup.sh
Now we’ll choose the target to build, so type:
$ lunch aosp_marlin-userdebug
$ setpaths
$ make –j4
There, we have now “built” an Android ROM from source. So let’s test it in the emulator, by typing into the terminal:
$ emulator
So play around in the emulator a bit. As you can see, a purely vanilla Android experience is quite minimal, and this is why manufacturers customize the AOSP to their needs. So you could flash this ROM we just built to your device if you wanted, but without adding any enhancements, a purely vanilla Android experience would be a very boring thing indeed.

Categories

Resources