How To Install Lineage OS and Optionally, Build Lineage From Scratch - Nvidia Shield TV & Shield TV Pro (2019) Guides, Ne

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/

Related

[TUTORIAL] How to Compile Gummy for Toro

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

[TUTORIAL] How to Compile Gummy for Maguro

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_maguro-userdebug && make gummy -jX
Great work. Really appreciate the open-source spirit!
I'd just like to add that for folks with hyper-threaded processors (most newer Intel chips), it's faster if X is double the number of physical cores and you can even try doubling that again to find the fastest build times. In my limited testing, I was getting faster build times with -j4 compared to -j2 on my AMD dual-core system. YMMV and I'm sure there are a lot of factors involved.
From AOSP (http://source.android.com/source/building.html):
"Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32."

[TUTORIAL] How to Compile Gummy for Crespo4G

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

[GUIDE] Compile Cyanogenmod 7 For LGE P350

How to Compile Cyanogenmod 7 For LGE P350 ​
Kindly post only something useful,do not spam.
Compiling Gingerbread for our device. I'm giving a Brief Guide on Setting up your Development Computer. But first you need To Check your PC pass this Requirements :
RAM : Minimum 4 Gigs
Hard Disk : Minimum 50 GB Free
Processor : Intel core2duo or dual core or above ( any processors near to that will work )
Internet Speed : Minimum it is should be 2 MBPS ( You Gonna Download 4-5 GB Once ) ( Only Once )
OS : Linux ( Ubuntu 10.04 , Ubuntu 10.10 , Ubuntu 11.04 , Ubuntu 11.10 , Ubuntu 12.04) ( 64 Bit ) ( If you don't have you can Install it with this guide )
You Should be Ready to Compile
Click to expand...
Click to collapse
Here is Quick Guide Setting Up Your Computer For Development Computer :
For Using Ubuntu 10.04 64 bit For Development Use this Link :
Download Ubuntu For Your Computer From here : http://releases.ubuntu.com/lucid/ubuntu-10.04.4-desktop-amd64.iso
Click to expand...
Click to collapse
For Using Ubuntu 10.10 64 Bit For Development Use this Link :
Download Ubuntu 10.10 For Your Computer From Here : http://releases.ubuntu.com/maverick/ubuntu-10.10-desktop-amd64.iso
Click to expand...
Click to collapse
For Using Ubuntu 11.04 64 Bit For Development Use this Link
Download Ubuntu 11.04 For Your Computer From Here : http://releases.ubuntu.com/natty/ubuntu-11.04-desktop-amd64.iso
Click to expand...
Click to collapse
For Using Ubuntu 11.10 64 Bit For Development Use this Link :
Download Ubuntu 11.10 For Your Computer From Here : http://releases.ubuntu.com/oneiric/ubuntu-11.10-desktop-amd64.iso
Click to expand...
Click to collapse
For Using Ubuntu 12.04 64 Bit For Development Use this Link :
Download Ubuntu 12.04 For Your Computer From Here : http://releases.ubuntu.com/precise/ubuntu-12.04-desktop-amd64.iso
Click to expand...
Click to collapse
"After Getting It Downloaded You Need To Make It bootable With Pen Drive Or Burning CD or DVD I think you can do this stuff without guide "
So At the Time Of Installation You Will Need To Set up Your Partition In that You Need To Give Home Drive around 50 GB ! Please Google on how to give 50 gb to Home drive in Ubuntu
After Getting Your Ubuntu Ready !! Now You need To set up Your PC for Android Development So Follow this Steps :
Follow Next Post For Setting Up Your Development Computer
Setting Up Your Development Computer !!!!
​
After Getting Your Ubuntu Ready !! Now You need To set up Your PC for Android Development So Follow these Steps :
Python Setup: First Of all Open Terminal.
Hit ctrl + alt + T
or you can go through your applications to open it
Now You Need To Copy and Paste this Commands At Terminal :
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
sudo make install
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Note: You may be asked for password when you do sudo make install
Now Python Is configured !!!!
TIME FOR SUN JAVA 6 JDK.
CODES TO EXECUTE IN TERMINAL :
Note: This doesn't work on Ubuntu 12.04
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
If You Are Using Ubuntu 12.04 you must do this instead:
download jdk 6
once downloaded, cd to where it is downloaded
e.g.
Code:
cd ~/Downloads
then type these commands
Code:
chmod +x jdk-6u34-linux-x64.bin
sudo ./jdk-6u34-linux-x64.bin
sudo mv jdk1.6.0_34 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_34/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_34/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_34/bin/javaws 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
Guys Now Java JDK 6 is Installed !
to check it is installed:
Code:
java -version
the output should be
Code:
java version "1.6.0_34"
Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)
NOW GNU Make :
Codes For Terminal :
Code:
cd
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.81
./configure
sudo make install
Now Make GNU is installed !!!
Now We are going to install some of the dependencies...
Codes For Terminal :
Apply First This Code In Every Ubuntu Version :
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 gedit git schedtool
export USE_CCACHE=1
If You Are Using Ubuntu 10.10 Apply this Command too :
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
If You are Using Ubuntu 11.04 Apply this command too :
Code:
sudo apt-get install libx11-dev:i386
If you are Using Ubuntu 12.04 Use Need To Use this Command too :
Code:
sudo apt-get install libncurses5-dev:i386 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
TIME FOR SDK AND ADB
SDK :
download SDK for linux (i386) from this link
extract it to Home folder (or another folder as long as there are no spaces in any of the folder names)
When you have extracted it, change the folder name from "android-sdk-linux" to "sdk".
Open Terminal And Excuete This Code :
Code:
cd ~/sdk/tools/
./android sdk
When you run this, a window will pop up. You only need to install the packages "Android SDK Tools" and "Android SDK Platform-tools". Just check these two items and install them.And Let the process complete .
ADB:
Now run this command to see if your adb works. You have to have your android device connected, of course. and put your device in debugging mode.
CODE :
Code:
cd ~/sdk/platform-tools
./adb devices
NOW AFTER APPLYING THIS CODES IF U SEE THE OUTPUT AS BELOW GIVEN :
Code:
List of devices attached 0123456789ABCDEF device (SIMILAR TO THIS)
Well, if you do, yay you're done. You have working adb!
OR IF U SEE THIS TYPE OF OUTPUT THEN FOLLOW SOME MORE STEPS
Code:
List of devices attached ???????????? no permissions
THEN USE THIS:
Give Permission to the Device
Now, you create a file:
FOR CREATING OPEN THE TERMINAL AND TYPE DOWN GIVEN COMANDS
Code:
sudo -i
echo "SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"" >> /etc/udev/rules.d/51-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"" >> /etc/udev/rules.d/99-android.rules
exit
sudo chmod a+r /etc/udev/rules.d/99-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Now you restart adb and udev service to make the change.
CODES TO EXCUETE IN TERMINAL :
Code:
cd ~/sdk/platform-tools
sudo service udev restart
sudo ./adb kill-server
sudo ./adb start-server
RESTART UBUNTU AND START SDK
Code:
cd ~/sdk/platform-tools
./adb devices
NOW AFTER APPLYING THIS CODES IF U SEE THE OUTPUT AS BELOW GIVEN :
Code:
List of devices attached 0123456789ABCDEF device (SIMILAR TO THIS )
NOW YOUR ADB IS CONFIGURED. IF ANY PROBLEMS, JUST COMMENT HERE
5. Add the Path to the System (IMPORTANT STEP )
CODES TO EXCUETE IN TERMINAL :
Code:
sudo echo "export PATH=${PATH}:~/sdk/tools" >> .bashrc
sudo echo "export PATH=${PATH}:~/sdk/platform-tools " >> .bashrc
Now this Should Get your ADB working from any location. If it Says ADB command not found then Just Comment here
to test open terminal and type:
Code:
adb devices
Now your Computer is Ready For Android Development !!!
Now We will Download The Repo
​
Codes to type in Terminal :
Code:
mkdir ~/bin
PATH=~/bin:$PATH
sudo apt-get install curl
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Guys Now we will Download CyanogenMod 7 Source Code​
Code:
mkdir source
cd source
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Code:
sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -jX ( x = increase it as much as you want to have parrarel downloads ;) )
Source Code is Around 4 - 5 GB So Time For Downloading is According To Your Internet Speed and Server Load
Click to expand...
Click to collapse
Get Proprietaries for LGE P350
Now we are Having Source Code Of CM7 Now we Will Get Proprietaries for LGE P350
Note : You need to have CM7 Based Rom Flashed On Your Phone
Click to expand...
Click to collapse
Codes For Terminal :
Code:
cd source
. build/envsetup.sh && brunch p350
Now it will fetch device folder
When it completes fetching Press CTRL+C
cd device/lge/p350
Now Connect your phone and make sure usb debugging is enabled ;)
./extract-files.sh
cd ../../..
cd vendor/cyanogen
chmod 777 get-rommanager
./get-rommanager
cd ../..
Now You Are Ready to Start Compilation of CM7 ​
Guys Now We will Compile Start CM7 compilation ​
Follow this Commands to Start CM7 Compilation :
Code:
. build/envsetup.sh && brunch p350
Now Android is Building . You Gonna Go and Watch Some Movies Or Even Have your Sleep ! At The End You Will Get Zip and it's Path Written in Terminal. Just copy it To SD card and Flash it And Give us Results
Reserved for Getting Thanks hehe just kiddin
And Yeah Please Don't PM with Errors ! Just Reply Here for Fixing Them Otherwise They will be simply moved to trash
GB
First build tomorrow ....
Adb installed, I type "./adb
devices" and are the "???????????" I enter
a
Code:
sudo -i
echo "SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"" >> /etc/udev/rules.d/51
echo "SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"" >> /etc/udev/rules.d/99
exit
sudo chmod a+r /etc/udev/rules.d/99-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules
next
Code:
cd ~/sdk/platform-tools
sudo service udev restart
sudo ./adb kill-server
sudo ./adb start-server
Restart Ubuntu, fits " cd ~/sdk/platform-tools
./adb devices " and then there are those "????????". Phone connected in debug mode. Sorry my bad English
type only adb devices and does it come up ?
check it
rom2maru said:
Code:
cd source
. build/envsetup,sh && brunch p350
Click to expand...
Click to collapse
its something . build/envsetup.sh ( check it as you applied as (,) than using (.) at sh
yeaah it is my typo thanks for informing i ll fix it
If interrupted collection Repo or one can to continue? Do I have to charge of the new?
I don't get you bro
Configure for UBUNTU 12.10
Setting Up Your Development Computer for ubuntu 12.10 ( latest )
Python Setup: First Of all Open Terminal.
Hit ctrl + alt + T
or you can go through your applications to open it ( the same keyur given )
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
sudo make install
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Dont forget to update to new version of python (with ubuntu updater)
First you need to apply this command toward terminal
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 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc gedit git schedtool
Something like this
{
"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"
}
and then enter it takes few time to set up
Time to setup the java
Note: This is only for ubuntu 12.10
Code:
sudo add-apt-repository ppa:webupd8team/java
like this
and then
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
like this
It takes few fime to setup and youcan find them here on ubuntu search like here
or type
Code:
java -version
in terminal you can view like this
In case if you missed any thing try this
Code:
sudo apt-get install git-core libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
For sdk follow up the same configure that keyur given up here (nothing differ with version of ubuntu ) click here
Congratulations now your ubuntu 12.10 is configured for cm7 or cm9
If you face any problem just report us i will try my level best
I hope ubuntu 12.10 is best ever i experienced for good compilation for me may be you too
NOW GNU Make :
Codes For Terminal :
Code:
cd
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.81
./configure
sudo make install
Now Make GNU is installed !!!
Click to expand...
Click to collapse
keyur delete this stuff this will affect the processing core system so that you cannot build any thing (i found the review a not to use)..
Closed at OP's request

[How To] Build CyanogenMod For Andorid One Third Gen Gm 5 Plus Shamrock

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

Categories

Resources