tsvietOK / Instruction-How-to-create-build-for-jactivelte

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Environment

  • Tested and Working on Ubuntu - 16.04 (64-bit)
  • Decent hardware (minimum of at least a dual core CPU and 8 GB of RAM)
  • A storage unit of any kind (We recommend utilizing SSDs as Mechanical HDDs slow down the build proccess drastically and the minimum storage size is 150GB. Having more will be useful with CCache[More on that later])
  • Required Packages should have been installed

Required Packages

Simply copy and paste this in a terminal window:
$ sudo apt-add-repository ppa:openjdk-r/ppa -y; sudo apt update -y; sudo apt install git-core python gnupg flex bison gperf libsdl1.2-dev \
squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-8-jre openjdk-8-jdk pngcrush \
schedtool libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32ncurses5-dev \
gcc-multilib liblz4-* pngquant ncurses-dev texinfo gcc gperf patch libtool ccache \
automake g++ gawk subversion expat libexpat1-dev python-all-dev bc libcloog-isl-dev \
libcap-dev autoconf libgmp-dev build-essential gcc-multilib g++-multilib pkg-config libmpc-dev libmpfr-dev lzma* \
liblzma* w3m android-tools-adb maven ncftp htop repo lib32z1-dev -y
Make directory for the repo binary
 $ mkdir ~/bin
Add directory for the repo binary to its path
 $ PATH=~/bin:$PATH
Downloading repo binary and placing it in the proper directory
 $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Giving the repo binary the proper permissions
 $ chmod a+x ~/bin/repo
Creating directory for where the repo will be stored and synced
 $ mkdir ~/lineage 
 $ cd ~/lineage
Initializing the repo and downloading the manifest

######Config Git(paste your name and email into fields)

 $ git config --global user.name "YOUR NAME" 
 $ git config --global user.email "YOUR EMAIL ADDRESS"

#####Now you must choose the rom that you want tot build

######If you choose is LineageOS 15.1 from me

 $  repo init -u git://github.com/tsvietOK/android.git -b lineage-15.1
Syncing the source

[Hint: This might take a long time as the source is ~25GB]

 $  repo sync -f --force-sync --no-clone-bundle

###Building

  • Preparing Required Binaries and Device Drivers
  • Setting Up CCache (Optional)
  • Building
Setting Up CCache
  • CCache is a method of utilizing a specified storage space to speed up building. It can be referred to as the same caching your android device does to speed up application and system boot times. In this case, CCache will help build faster than standard build times (Able to cut-down 50% of time taken to build).

  • To set up CCache, follow the following:

      $ echo "export USE_CCACHE=1" >> ~/.bashrc
    
      $ ccache -M 50G
    

    -M 50G The number before the letter G at the end specifies the amount of space CCache can use in your storage unit. As such, ensure that not too much of space is specified as this might result in unexpected errors although, the more storage you have, its recommended to have more CCache as it will increase the build times. Most efficient build systems are able to utilize CCache to about 120G or more.

To build ROM
  $ cd ~/lineage
  $ . build/envsetup.sh && brunch jactivelte
Obtaining the zip created from the build process

To get the zip file that has been built, navigate to the following directory and find for the zip file:

  $ cd ~/lineage/out/target/product/jactivelte/

If you found it, then congratulations! If you didn't, try retrying the build process but before doing so, ensure you do the following to make sure your next build is clean;

  $ cd ~/lineage
  $ make clean
  $ repo sync --force-sync

After doing so, redo everything stated from the Building Section.

About