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
Related
Compiling Gummy on Ubuntu 10.04
All work here is done from Ubuntu 10.04.. Newer releases may require slightly different packages.
Installing dependencies:
Install Ubuntu 10.04 and install all updates
Install Java SDK (type or copy the commands into the terminal exactly as you see them here )
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner”
Code:
sudo apt-get update
Code:
sudo apt-get install sun-java6-jdk
Install Git
Code:
sudo apt-get install git-core
Install the rest of the needed files
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 pngcrush
Setting up and syncing Gummy’s Repo
Enter the commands in the terminal exactly as they are displayed to setup your PATH
Code:
mkdir ~/bin
Code:
PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Create your Gummy source directory and then go to that directory
Code:
mkdir ~/Gummy
Code:
cd ~/Gummy
Initialize and sync the Gummy repo (where X is put the number of cores for your CPU such as “repo sync -j4” for a quad core)
Code:
repo init -u https://github.com/teamgummy/platform_manifest.git -b master
Code:
repo sync -jX
Take a break and enjoy an ice cold beer
Go to the fridge
Pull out your favorite brand of beer
Open with care
Drink with pleasure
Otherwise its going to take a while ( a long while )
Preparing to Gummy and compiling
Get prebuilts (Term)
Code:
cd ~/Gummy/vendor/Gummy
Code:
./get-prebuilts
Code:
cd ~/Gummy
Compile (dont forget the . and also make sure you again change the X to the number of cores you have)
Code:
. build/envsetup.sh && lunch Gummy_toro-userdebug && make gummy -jX
_____________________________________________________________
Compiling Gummy on Ubuntu 11.10
Some of these instructions were taken directly from here..
First up:
Install Ubunutu 11.10 and install all the updates
Installing java:
Download the java JDK make sure you select accept the licence agreement and grab the jdk-6u30-linux-x64.bin
enter these commands exactly as they are listed
Code:
sudo chmod a+x ~/Downloads/jdk-6u30-linux-x64.bin
Code:
sudo cp ~/Downloads/jdk-6u30-linux-x64.bin /usr/lib
Code:
cd /usr/lib
Code:
sudo ./jdk-6u30-linux-x64.bin
Code:
sudo mv /usr/lib/jdk1.6.0_30/ /usr/lib/jvm/
Determine if any other JVMs are installed, and count how many, if any
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_30/jre/bin/java 1
Code:
sudo update-alternatives --config java
Be sure to select /usr/lib/jvm/jdk1.6.0_30/jre/bin/java (number 2 in my build environment)
We need create symbolic links to a few Java binaries in /usr/bin
Code:
cd /usr/bin
Code:
sudo ln -s /usr/lib/jvm/jdk1.6.0_30/bin/javac
Code:
sudo ln -s /usr/lib/jvm/jdk1.6.0_30/bin/jar
Code:
sudo ln -s /usr/lib/jvm/jdk1.6.0_30/bin/javadoc
We need to ensure that the AOSP build process can locate the JDK, so we will set a variable it uses to locate the JDK.
Code:
nano ~/.bashrc
Add the following lines at the botton:
ANDROID_JAVA_HOME=/usr/lib/jvm/jdk1.6.0_30
export ANDROID_JAVA_HOME
pres CTRL + X then Y to save your changes
Installing dependencies:
Enter these commands exactly as they are listed
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 lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc pngcrush
Just to be sure reboot
Setting up and syncing Gummy’s Repo
Enter the commands in the terminal exactly as they are displayed to setup your PATH
Code:
mkdir ~/bin
Code:
PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Create your Gummy source directory and then go to that directory
Code:
mkdir ~/Gummy
Code:
cd ~/Gummy
Initialize and sync the Gummy repo (where X is put the number of cores for your CPU such as “repo sync -j4” for a quad core)
Code:
repo init -u https://github.com/teamgummy/platform_manifest.git -b master
Code:
repo sync -jX
Take a break and enjoy an ice cold beer
Go to the fridge
Pull out your favorite brand of beer
Open with care
Drink with pleasure
Otherwise its going to take a while ( a long while )
Preparing to Gummy and compiling
Get prebuilts (Term)
Code:
cd ~/Gummy/vendor/Gummy
Code:
./get-prebuilts
Code:
cd ~/Gummy
Compile (dont forget the . and also make sure you again change the X to the number of cores you have)
Code:
. build/envsetup.sh && lunch Gummy_toro-userdebug && make gummy -jX
Thanks for the guide I will try to play with this
Sent from my Galaxy Nexus using xda premium
You realize steps 2.3, 3.1 and 4.1 can all be combined into one?
I have added the lucid partner repo, did apt-get update and the extra needed packages still don't want to install. It says they're missing. On Ubuntu 10.04 everything is updated.
donlad said:
I have added the lucid partner repo, did apt-get update and the extra needed packages still don't want to install. It says they're missing. On Ubuntu 10.04 everything is updated.
Click to expand...
Click to collapse
are you using 10.04 64 bit?? I know stupid questions but I need to ask.
kejar31 said:
are you using 10.04 64 bit?? I know stupid questions but I need to ask.
Click to expand...
Click to collapse
Nope I'm using 32-bit
Edit: I also checked in software sources to make sure the repo was added correctly and it was.
donlad said:
Nope I'm using 32-bit
Edit: I also checked in software sources to make sure the repo was added correctly and it was.
Click to expand...
Click to collapse
you will need to use 64 bit... Sorry I should have included that in the OP... Will update now.
To compile android on anything above 2.3 you need to compile it on a 64 bit OS
kejar31 said:
you will need to use 64 bit... Sorry I should have included that in the OP... Will update now.
To compile android on anything above 2.3 you need to compile it on a 64 bit OS
Click to expand...
Click to collapse
Well that's a bit of a letdown..because I went ahead and let it sync your repo last night. lol.
Oh well...
donlad said:
Nope I'm using 32-bit
Edit: I also checked in software sources to make sure the repo was added correctly and it was.
Click to expand...
Click to collapse
Ive heard that youll need a 64-bit to do this from TMartin...
Sent from my Galaxy Nexus
ok updated the original OP to include how to compile on Ubuntu 11.10..
As an fyi you should always use the 64bit version of Ubuntu
Compiling Gummy
All work here is done from Ubuntu 10.04.. Newer releases may require slightly different packages.
Installing dependencies:
Install Ubuntu 10.04 and install all updates
Install Java SDK (type or copy the commands into the terminal exactly as you see them here )
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner”
Code:
sudo apt-get update
Code:
sudo apt-get install sun-java6-jdk
Install Git
Code:
sudo apt-get install git-core
Install the rest of the needed files
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 pngcrush
Setting up and syncing Gummy’s Repo
Enter the commands in the terminal exactly as they are displayed to setup your PATH
Code:
mkdir ~/bin
Code:
PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Create your Gummy source directory and then go to that directory
Code:
mkdir ~/Gummy
Code:
cd ~/Gummy
Initialize and sync the Gummy repo (where X is put the number of cores for your CPU such as “repo sync -j4” for a quad core)
Code:
repo init -u[url="https://github.com/teamgummy/platform_manifest.git"][color=#000000] https://github.com/teamgummy/platform_manifest.git[/color][/url] -b master
Code:
repo sync -jX
Take a break and enjoy an ice cold beer
Go to the fridge
Pull out your favorite brand of beer
Open with care
Drink with pleasure
Otherwise its going to take a while ( a long while )
Preparing to Gummy and compiling
Get prebuilts (Term)
Code:
cd ~/Gummy/vendor/Gummy
Code:
./get-prebuilts
Code:
cd ~/Gummy
Compile (dont forget the . and also make sure you again change the X to the number of cores you have)
Code:
. build/envsetup.sh && lunch Gummy_crespo4g-userdebug && make gummy -jX
Nice! Thanks for this
(First)
•°NS4G • ICS°•
2nd!
Now THIS is something... Awesome...Thanks man!
Thanks bro! Gonna try this on my PC tonight
Sent from my IceCreamSammich Nexus S 4G
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
Hello
You need packages for compiling cyanogenmod
Several "build packages" are needed to build CyanogenMod. You can install these using the package manager of your choice.
Code:
sudo apt install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop maven openjdk-7-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev android-tools-adb android-tools-fsutils android-tools-fastboot android-tools-adbd
In addition to the above, for 64-bit systems, get these:
Code:
sudo apt install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
For Ubuntu 15.10 (wily) and newer, substitute:
lib32readline-gplv2-dev → lib32readline6-dev
For Ubuntu 16.04 (xenial) and newer, substitute (additionally see java notes below):
libwxgtk2.8-dev → libwxgtk3.0-dev
openjdk-7-jdk → openjdk-8-jdk
Ubuntu 16.04 (Xenial Xerus) or newer and OpenJDK: Since OpenJDK 1.7 was removed from the official Ubuntu repositories, you have a couple options:
Obtain OpenJDK 1.7 from the openjdk-r PPA
Enable experimental OpenJDK 1.8 support in CyanogenMod 13.0 (not available in earlier version). To enable OpenJDK 1.8 support, add this line to your $HOME/.bashrc file: export EXPERIMENTAL_USE_JAVA8=true.
Code:
$ mkdir -p ~/bin
$ mkdir -p ~/android/system
Code:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Initialize the CyanogenMod source repository
Enter the following to initialize the repository:
Note: Make sure the cm branch entered here is the one you wish to build and is supported on your device.
Code:
$ cd ~/android/system/
$ repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
$ repo sync
Download Device And Vendor Tree
Code:
$ cd android/system/device/
$ git clone https://github.com/cyanogenmod/android_device_qcom_common.git -b cm-13.0
$ cd android/system/device/google
$ git clone https://github.com/yavuz21/android_device_google_shamrock.git -b master
$ cd android/vendor/google
$ git clone https://github.com/yavuz21/proprietary_vendor_google_shamrock -b master
$ mkdir kernel/google/
$ cd kernel/google
$ git clone https://github.com/yavuz21/android_kernel_google_lego -b cm13.0
Rename folders and replace your romservice.xml looks like https://github.com/yavuz21/google_shamrock_manifest/blob/master/local_manifest.xml
Now Start Compiling
Code:
$ cd android/system
$ source build/envsetup.sh
$ export USE_CCACHE=1
$ prebuilts/misc/linux-x86/ccache/ccache -M 50G
$ export ANDROID_CCACHE_DIR="$HOME/android/.ccache"
$ export ANDROID_CCACHE_SIZE="50G"
$ lunch cm_shamrock-userdebug
$ croot
$ brunch shamrock
if you get
/obj permisson error wait stop error log and down ctrl+c keys stopp compling and restrat command
if you get error on framework assemblies you need linux system language change to english
if you get error install-recovery.sh you need copy stock rom system/bin/install-recovery.sh to android/system/out/ota_temp/system/bin folder
Builded cm https://mega.nz/#!Qh1iWJ7A!ADtWnPqC2VS7ucvH2vlb1jozQXuGvdRJe27mSZn0shA
rez
Thank you for this great guide. I'll try it. :good:
edit: Here's the first error
Code:
$ sudo apt install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop maven openjdk-7-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev android-tools-adb android-tools-fsutils android-tools-fastboot android-tools-adbd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package openjdk-7-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Unable to locate package libwxgtk2.8-dev
E: Couldn't find any package by glob 'libwxgtk2.8-dev'
E: Couldn't find any package by regex 'libwxgtk2.8-dev'
E: Package 'openjdk-7-jdk' has no installation candidate
nhmanas said:
Thank you for this great guide. I'll try it. :good:
edit: Here's the first error
Code:
$ sudo apt install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop maven openjdk-7-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev android-tools-adb android-tools-fsutils android-tools-fastboot android-tools-adbd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package openjdk-7-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Unable to locate package libwxgtk2.8-dev
E: Couldn't find any package by glob 'libwxgtk2.8-dev'
E: Couldn't find any package by regex 'libwxgtk2.8-dev'
E: Package 'openjdk-7-jdk' has no installation candidate
Click to expand...
Click to collapse
Hi this error Package manager because Your ubuntu is a new version you try this packages
libwxgtk2.8-dev → libwxgtk3.0-dev
openjdk-7-jdk → openjdk-8-jdk
thank you for guide
Hello Friends!
Today I wanted to re-write a guide for installing Lineage OS on the 2019 Pro.
This guide will be more to the point and have only the needed tools.
The SOURCE for the Lineage zip shared in the download section below.
Spoiler: INSTALLING LINEAGE ON THE SHIELD
Spoiler: DOWNLOAD
DOWNLOAD (636MB):
lineage.zip
drive.google.com
{
"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"
}
NOTE YOU MAY NEED TO RUN THIS CODE IF YOU GET THE MORE THAN ONE DEVICE ERROR, OR IF THE BATCH WINDOW CLOSES BEFORE ACTUALLY FLASHING LINEAGE
Code:
adb kill-server
Spoiler: BATCH FILE CODE
You do not have to download anything I share, here is the code for the batches:
BootTw.bat:
Code:
fastboot boot tw.img
SendOnlyLineage.bat:
Code:
adb push lineage.zip /sdcard
.SendGapps&Lineage.bat:
Code:
adb push gapps.zip /sdcard
adb push lineage.zip /sdcard
Therefore you can download your own TWRP, gapps, and lineage, rename them and use the provided code.
Spoiler: PREREQUISITES
Please see the Prerequisites section on this THREAD if you need help with unlocking the bootloader, adb, or the usb driver.
You can have any firmware installed for this in theory. It was tested recently on 8.2.3
Spoiler: GUIDE
HOW TO USE:
Boot your shield to the bootloader menu.
Unzip Lineage.zip
Now run .bootTW.bat to load teamwin on the shield.
Swipe to allow modifications on the shield, this will allow our device to be adb accessible.
Now run your choice of .SendGapps&Lineage.bat or .SendOnlyLineage.bat
This will push lineage and optionally gapps to the /sdcard folder on the shield.
Now in TWRP select the INSTALL button, go down to sdcard and select Lineage.
When Lineage is complete, you may install GAPPS if you want playstore access.
After rebooting, your machine will now post into Lineage!
Fully installed without GAPPS it is a Blank Slate. Beautiful XD
Spoiler: NOTES
SOME NOTES:
This is not a beginner's OS. There will be problems.
Also the AI upscaling feature doesn't come with this OS.
The version of Lineage used in this guide is 17.1, Android 10
The ORIGINAL Guide if you want to see how much harder I made things not knowing what to do
This may be useful to locking the bootloader while lineage is installed!
The next two comments are notes about porting to different OSs and downloading the original source code. They are not full guides as I have not personally succeeding in fully building anything myself yet, just initiating repos and data gathering but will update when we get there..
Spoiler: BUILDING LINEAGE FROM SCRATCH
The original guides are included below so you can learn what every step does in detail if you like.
Spoiler: BUILDING LINEAGE 17.1 UNOFFICIAL- MDARCY
Nvidia Shield TV 2019 Pro (mdarcy) - LineageOS ROMs
Latest LineageOS roms for Nvidia Shield TV 2019 Pro (mdarcy) with full tutorial how to install it.
lineageosroms.com
Code:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install adb bc bison brotli build-essential bzr \
curl fastboot flex g++-multilib gcc-multilib git gnupg gperf imagemagick \
lib32ncurses5-dev lib32readline-dev lib32z1-dev libc6-dev libelf-dev libgl1-mesa-dev \
liblz4-tool libgl1-mesa-glx:i386 libncurses5 libncurses5-dev:i386 libreadline6-dev:i386 \
libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync libx11-dev:i386 \
lzop mingw-w64-i686-dev python3-markdown rsync schedtool tofrodos squashfs-tools \
x11proto-core-dev xsltproc zip zlib1g-dev:i386 python-is-python3 -y
mkdir -p ~/bin
echo export PATH=\$PATH:\$HOME/bin >> ~/.bashrc
source ~/.bashrc
mkdir -p ~/android/lineage
cd ~/android/lineage
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+rx ~/bin/repo
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
repo init -u https://github.com/LineageOS/android.git -b lineage-17.1
repo sync --force-sync
make otatools
source build/envsetup.sh
breakfast mdarcy
If you experience any error with breakfast, run this code:
Code:
repo sync
breakfast mdarcy
Download Lineage for MDARCY
Code:
mkdir ~/android/system_dump/
cd ~/android/system_dump/
unzip ~/Downloads/lineage-17.1-20220202-nightly-mdarcy-signed.zip
brotli --decompress --output=system.new.dat system.new.dat.br
brotli --decompress --output=vendor.new.dat vendor.new.dat.br
git clone https://github.com/xpirt/sdat2img
python sdat2img/sdat2img.py system.transfer.list system.new.dat system.img
python sdat2img/sdat2img.py vendor.transfer.list vendor.new.dat vendor.img
mkdir system/
sudo mount system.img system/
sudo mount vendor.img system/vendor/
cd ~/android/lineage/device/nvidia/mdarcy
./extract-files.sh ~/android/system_dump/
cd ~/android/lineage
breakfast mdarcy
croot
brunch mdarcy
cd $OUT
Spoiler: BUILDING LINEAGE 18.1 UNOFFICIAL - FOSTER
Build for foster | LineageOS Wiki
wiki.lineageos.org
Code:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install adb bc bison brotli build-essential bzr \
curl fastboot flex g++-multilib gcc-multilib git gnupg gperf imagemagick \
lib32ncurses5-dev lib32readline-dev lib32z1-dev libc6-dev libelf-dev libgl1-mesa-dev \
liblz4-tool libgl1-mesa-glx:i386 libncurses5 libncurses5-dev:i386 libreadline6-dev:i386 \
libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync libx11-dev:i386 \
lzop mingw-w64-i686-dev python3-markdown rsync schedtool tofrodos squashfs-tools \
x11proto-core-dev xsltproc zip zlib1g-dev:i386 python-is-python3 -y
mkdir -p ~/bin
echo export PATH=\$PATH:\$HOME/bin >> ~/.bashrc
source ~/.bashrc
mkdir -p ~/android/lineage
cd ~/android/lineage
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+rx ~/bin/repo
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1
repo sync --force-sync
make otatools
source build/envsetup.sh
breakfast foster
If you experience any error with breakfast, run this code:
Code:
repo sync
breakfast foster
Download Lineage for FOSTER
Code:
mkdir ~/android/system_dump/
cd ~/android/system_dump/
unzip ~/Downloads/lineage-18.1-20221214-nightly-foster-signed.zip
brotli --decompress --output=system.new.dat system.new.dat.br
brotli --decompress --output=vendor.new.dat vendor.new.dat.br
git clone https://github.com/xpirt/sdat2img
python sdat2img/sdat2img.py system.transfer.list system.new.dat system.img
python sdat2img/sdat2img.py vendor.transfer.list vendor.new.dat vendor.img
mkdir system/
sudo mount system.img system/
sudo mount vendor.img system/vendor/
cd ~/android/lineage/device/nvidia/foster
./extract-files.sh ~/android/system_dump/
cd ~/android/lineage
breakfast foster
croot
brunch foster
cd $OUT
Spoiler: NVIDIA SHIELD ANDROID SOURCE CODE
HOW TO DOWNLOAD THE FIRMWARE YOURSELF:
Select a firmware you want to download from here: https://developer.nvidia.com/shield-open-source
Will provide you with the repo code, you can initialize this in a linux machine with this code:
Some of this code may be unneeded, I am no Linux expert. I just recognized the repo code was similar to how we would initiate for Lineage, and I borrowed the code from doing that.
Code:
sudo dpkg --add-architecture i386
sudo apt update
#dependencies- paste the whole paragraph below, all at once:
sudo apt install adb bc bison brotli build-essential bzr \
curl fastboot flex g++-multilib gcc-multilib git gnupg gperf imagemagick \
lib32ncurses5-dev lib32readline-dev lib32z1-dev libc6-dev libelf-dev libgl1-mesa-dev \
liblz4-tool libgl1-mesa-glx:i386 libncurses5 libncurses5-dev:i386 libreadline6-dev:i386 \
libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync libx11-dev:i386 \
lzop mingw-w64-i686-dev python3-markdown rsync schedtool tofrodos squashfs-tools \
x11proto-core-dev xsltproc zip zlib1g-dev:i386 python-is-python3 -y
#install google repo client to bin and set it to PATH:
mkdir -p ~/bin
echo export PATH=\$PATH:\$HOME/bin >> ~/.bashrc
source ~/.bashrc
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+rx ~/bin/repo
#setup git, you can either use your real info or literally paste the commands below:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
#change the 8.2.3 to the name of the firmware you are downloading:
mkdir -p ~/nvidia/8.2.3
cd nvidia/8.2.3
#change this line out with the repo you want to download, the one below is 8.2.3:
repo init -u git://nv-tegra.nvidia.com/manifest/android/binary.git -b rel-32-shield-r1-opensource -m tlk/t210.xml
repo sync -c -j5
Spoiler: UBUNTU PORT KNOWLEDGE
edit--- for those rolling on a 2015-2017 shield, someone awesome already has a port for you. for the rest of us, there is knowledge there in their guide
[DEV] Ubuntu 18.04 LTS Bionic (Linux for Tegra) for SHIELD Android TV
This is a full featured port of NVIDIA L4T R32.7.2 (Ubuntu 18.04) for the SHIELD TV (2015, 2017). It has full hardware support including: GPU acceleration Wifi/Bluetooh USB 3.0 HDMI with audio microSD (supported models) Power management etc...
forum.xda-developers.com
Porting instructions - a work in progress
Introduction - UBports documentation
Spoiler: UBPORT USING HALIUM 10.0 - MDARCY
Code:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install adb bc bison build-essential bzr \
curl fastboot flex g++-multilib gcc-multilib git gnupg gperf imagemagick \
lib32ncurses5-dev lib32readline-dev lib32z1-dev libc6-dev libelf-dev libgl1-mesa-dev \
liblz4-tool libgl1-mesa-glx:i386 libncurses5 libncurses5-dev:i386 libreadline6-dev:i386 \
libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync libx11-dev:i386 \
lzop mingw-w64-i686-dev python3-markdown rsync schedtool tofrodos squashfs-tools \
x11proto-core-dev xsltproc zip zlib1g-dev:i386 python-is-python3 -y
mkdir -p ~/bin
echo export PATH=\$PATH:\$HOME/bin >> ~/.bashrc
source ~/.bashrc
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+rx ~/bin/repo
mkdir halium && cd halium
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
repo init -u https://github.com/Halium/android -b halium-10.0 --depth=1
repo sync --force-sync
Spoiler: EDITING THE MANIFEST
Go into /halium/devices/manifests and rename one of the unused manifests to match your device.
"nvidia_mdarcy" for this example.
Erase the contents and replace with:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/nvidia/mdarcy" name="LineageOS/android_device_nvidia_mdarcy" />
<project path="device/nvidia/foster" name="LineageOS/android_device_nvidia_foster" />
</manifest>
Code:
./halium/devices/setup mdarcy
hybris-patches/apply-patches.sh --mb
source build/envsetup.sh
breakfast mdarcy
#copied the mdarcy folder extracted from lineage 17.1 zip
mka mkbootimg
Spoiler: KALI LINUX NETHUNTER PORT KNOWLEDGE
Kali Nethunter Porting Source
"In order to port NetHunter to a new device, it’s important to understand how NetHunter is separated. NetHunter is divided by the rootfs (also known as the chroot but will be referred to here as rootfs) and the kernel. For the most part, the rootfs is not important to your Android device as it only contains Kali Linux. The kernel is integral to getting things like Bluetooth, wireless USB, and HID keyboard (etc) working."
Local Config Example
Spoiler: NOTES
This is a section for me to work through understanding what in the world to do with the source code i got from nvidia.
https://releases.ubuntu.com/18.04/ubuntu-18.04.6-desktop-amd64.iso
Code:
sudo apt update
mkdir aosp
cd aosp
repo init -u https://android.googlesource.com/platform/manifest -b master
sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -c -j8
When done, remove the repo so you can sync others without conflict:
rm -rf .repo
Downloading the Source | Android Open Source Project
source.android.com
Hi I am planning to get a Nvidia shield pro 2019. I want to install lineageos and root it but would like to have all HDR & 4k codecs still supported and use the AI upscaling feature. Since you have experience with the device, could you tell me if this is all possible in one and if not what alternatives you know?
AP12345 said:
Hi I am planning to get a Nvidia shield pro 2019. I want to install lineageos and root it but would like to have all HDR & 4k codecs still supported and use the AI upscaling feature. Since you have experience with the device, could you tell me if this is all possible in one and if not what alternatives you know?
Click to expand...
Click to collapse
Sorry.. I do not know the answer to this, I am just learning these things myself and writing notes here publicly for anyone to pickup but here is the actual main thread for lineage os on the shield and the dev is very active https://forum.xda-developers.com/t/rom-official-lineageos-for-the-shield-android-tv.3632652/