View Poll Results: Should I add repo tool in the script? [BUGGERS STAY AWAY]
Yes 3 100.00%
No 0 0%
Voters: 3. You may not vote on this poll

Post Reply

[TOOL][SCRIPT][LINUX/UBUNTU] Build Environment Setup Automater Script [TEAM RADIUM]

OP nolinuxnoparty

18th July 2013, 04:38 PM   |  #1  
OP Account currently disabled
XDA
Thanks Meter: 982
 
602 posts
Join Date:Joined: Jun 2013
NLNP's/Team Radium's Build Environment Setup Automater Script

What does this script do?

This script is made for people who are lazy like me. lol Jokes apart. This script will setup build environment on your PC running any linux distribution. I have tested it on Ubuntu 13.04 but it should work with almost all linux distros.
Requirements:
  • A good internet connection.
  • A PC with Linux x86/64 Bit Architecture. (64 Bit Preffered)
This is a list of packages that are going to get downloaded.
  • Python
  • JDK
  • GNU Make
  • Git
  • Required Packages for Android Build Environment.
  • Android SDK ADT Bundle
How to use this script?

*NOTE*: These instructions will change as per releases so you have to view version specific posts
  • Open terminal.
  • cd ~/<Directory where you have downloaded the script>
  • chmod 775 tr-be-script
  • ./tr-be-script
  • Follow the steps
Credits:
  • Me
  • cybojenix
  • My Team! (Team Radium)
  • XxLordxX (Special Thanks)
  • People whom I have missed.
  • All XDians who made guides on [HOW-TO] Setup Build Environment
Changelog:
  • 18/07/2013 - v1.0

    - Initial Release
    - Working
  • 19/07/2013 - v2.0

    - Cleaned up some parts
    - Added SDK Support
  • 19/07/2013 - v2.0.1

    - Fixed up git installing errors
  • 19/07/2013 - v2.5

    - Added missing sudo commands (Thanks to @broodplank1337)
  • 03/10/2013 - v3.0

    - See @broodplank1337's post!
Download from Github:
Find the repo
https://github.com/TeamRadium/tr-be-script
Last edited by nolinuxnoparty; 2nd October 2013 at 08:25 PM.
The Following 62 Users Say Thank You to nolinuxnoparty For This Useful Post: [ View ]
18th July 2013, 04:38 PM   |  #2  
OP Account currently disabled
XDA
Thanks Meter: 982
 
602 posts
Join Date:Joined: Jun 2013
This is the script! No need to download to view it

v1.0
Code:
#!/bin/bash
clear
echo "Linux Build Environment Setup Automater Script."
echo "Written by nolinuxnoparty."
echo "Released under supervision of Team Radium."
read -p "Press [Enter] key to continue..."

clear

echo "Entering Downloads Directory"
cd ~/Downloads
read -p "Press [Enter] key to continue..."
clear

echo "Installing Python!"
sudo apt-get install build-essential gcc
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
cd ..

read -p "Press [Enter] key to continue..."

clear

echo "Installing JDK 6!"
wget  --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
java -version

read -p "Press [Enter] key to continue..."

clear

echo "Installing GNU Make!"

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
cd ..

read -p "Press [Enter] key to continue..."

clear

echo "Installing Required Packages!"

apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool

read -p "Press [Enter] key to continue..."

clear

echo "Installing GIT!"

sudo apt-get install git
y

echo "Installing ADB Drivers!"
sudo apt-get install android-tools-adb

read -p "Press [Enter] key to continue..."

clear

echo "Cleaning up downloaded ****!"
rm Python-2.5.6.tgz
rm Python-2.5.6
rm make-3.81.tar.gz
rm make-3.81
rm jdk-6u45-linux-x64.bin
read -p "Press [Enter] key to continue..."
clear

echo "Done!"

echo "Cheers!"
echo ""
echo "Thanks for using this script!"
echo "Now, Enjoy compiling roms/kernels :)"
read -p "Press [Enter] key to exit..."
exit
v2.0
Code:
#!/bin/bash
clear
echo "Linux Build Environment Setup Automater Script."
echo "Written by nolinuxnoparty."
echo "Released under supervision of Team Radium."
read -p "Press [Enter] key to continue..."

clear

echo "Entering Downloads Directory"
cd ~/Downloads
read -p "Press [Enter] key to continue..."
clear

echo "Installing Python!"
sudo apt-get install build-essential gcc
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
cd ..

read -p "Press [Enter] key to continue..."

clear

echo "Installing JDK 6!"
wget  --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
java -version

read -p "Press [Enter] key to continue..."

clear

echo "Installing GNU Make!"

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
cd ..

read -p "Press [Enter] key to continue..."

clear

echo "Installing Required Packages!"

apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool

read -p "Press [Enter] key to continue..."

clear

echo "Installing GIT!"

sudo apt-get install git
y

echo "Installing ADB Drivers!"
sudo apt-get install android-tools-adb

read -p "Press [Enter] key to continue..."

clear

echo "Downloading and Configuring Android SDK!!"
echo "Which version of linux are you using?"
echo "[ 1 ] 32 bits"
echo "[ 2 ] 64 bits"

echo "Making sure unzip is installed"
sudo apt-get install unzip
read bits
	if [[ "$bits" == "1" ]]; then
		echo "Downloading SDK for 32bit Linux System"
		wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130522.zip
		echo "Download Complete!!"
		echo "Extracting"
		unzip adt-bundle-linux-x86-20130522.zip
		echo "Configuring"
		cd ~/adt-bundle-linux-x64-20130522/tools
		./configure
		echo "Done!!"
		
	elif [[ "$bits" == "2" ]]; then
		echo "Downloading SDK for 64bit Linux System"
		wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130522.zip
		echo "Download Complete!!"
		echo "Extracting"
		unzip adt-bundle-linux-x86_64-20130522.zip
		echo "Configuring"
		cd ~/adt-bundle-linux-x86_64-20130522/tools
		./configure
		echo "Done!!"
fi

read -p "Press [Enter] key to continue..."

clear

echo "Cleaning up downloaded ****!"
rm Python-2.5.6.tgz
rm Python-2.5.6
rm make-3.81.tar.gz
rm make-3.81
rm jdk-6u45-linux-x64.bin
rm adt-bundle-linux-x86-20130522
rm adt-bundle-linux-x86-20130522.zip
rm adt-bundle-linux-x86_64-20130522
adt-bundle-linux-x86_64-20130522.zip
read -p "Press [Enter] key to continue..."
clear

echo "Done!"

echo "Cheers!"
echo ""
echo "Thanks for using this script!"
echo "Now, Enjoy compiling roms/kernels :)"
read -p "Press [Enter] key to exit..."
exit
v2.0.1
Code:
#!/bin/bash
clear
echo "Linux Build Environment Setup Automater Script."
echo "Written by nolinuxnoparty."
echo "Released under supervision of Team Radium."
read -p "Press [Enter] key to continue..."

clear

echo "Entering Downloads Directory"
cd ~/Downloads
read -p "Press [Enter] key to continue..."
clear

echo "Installing Python!"
sudo apt-get install build-essential gcc
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
cd ..

read -p "Press [Enter] key to continue..."

clear

echo "Installing JDK 6!"
wget  --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
java -version

read -p "Press [Enter] key to continue..."

clear

echo "Installing GNU Make!"

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
cd ..

read -p "Press [Enter] key to continue..."

clear

echo "Installing Required Packages!"

apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool

read -p "Press [Enter] key to continue..."

clear

echo "Installing GIT!"

sudo apt-get install git

echo "Installing ADB Drivers!"
sudo apt-get install android-tools-adb

read -p "Press [Enter] key to continue..."

clear

echo "Downloading and Configuring Android SDK!!"
echo "Which version of linux are you using?"
echo "[ 1 ] 32 bits"
echo "[ 2 ] 64 bits"

echo "Making sure unzip is installed"
sudo apt-get install unzip
read bits
	if [[ "$bits" == "1" ]]; then
		echo "Downloading SDK for 32bit Linux System"
		wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130522.zip
		echo "Download Complete!!"
		echo "Extracting"
		unzip adt-bundle-linux-x86-20130522.zip
		echo "Configuring"
		cd ~/adt-bundle-linux-x64-20130522/tools
		./configure
		echo "Done!!"

	elif [[ "$bits" == "2" ]]; then
		echo "Downloading SDK for 64bit Linux System"
		wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130522.zip
		echo "Download Complete!!"
		echo "Extracting"
		unzip adt-bundle-linux-x86_64-20130522.zip
		echo "Configuring"
		cd ~/adt-bundle-linux-x86_64-20130522/tools
		./configure
		echo "Done!!"
fi

read -p "Press [Enter] key to continue..."

clear

echo "Cleaning up downloaded ****!"
rm Python-2.5.6.tgz
rm Python-2.5.6
rm make-3.81.tar.gz
rm make-3.81
rm jdk-6u45-linux-x64.bin
rm adt-bundle-linux-x86-20130522
rm adt-bundle-linux-x86-20130522.zip
rm adt-bundle-linux-x86_64-20130522
adt-bundle-linux-x86_64-20130522.zip
read -p "Press [Enter] key to continue..."
clear

echo "Done!"

echo "Cheers!"
echo ""
echo "Thanks for using this script!"
echo "Now, Enjoy compiling roms/kernels :)"
read -p "Press [Enter] key to exit..."
exit
v2.5
Code:
#!/bin/bash
clear
echo "Linux Build Environment Setup Automater Script."
echo "Written by nolinuxnoparty."
echo "Released under supervision of Team Radium."
read -p "Press [Enter] key to continue..."

clear

echo "Entering Downloads Directory"
cd ~/Downloads
read -p "Press [Enter] key to continue..."
clear

echo "Installing Python!"
sudo apt-get install build-essential gcc
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
cd ..

read -p "Press [Enter] key to continue..."

clear

echo "Installing JDK 6!"
wget  --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
java -version

read -p "Press [Enter] key to continue..."

clear

echo "Installing GNU Make!"

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
cd ..

read -p "Press [Enter] key to continue..."

clear

echo "Installing Required Packages!"

sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool

read -p "Press [Enter] key to continue..."

clear

echo "Installing GIT!"

sudo apt-get install git

echo "Installing ADB Drivers!"
sudo apt-get install android-tools-adb

read -p "Press [Enter] key to continue..."

clear

echo "Downloading and Configuring Android SDK!!"
echo "Which version of linux are you using?"
echo "[ 1 ] 32 bits"
echo "[ 2 ] 64 bits"

echo "Making sure unzip is installed"
sudo apt-get install unzip
read bits
	if [[ "$bits" == "1" ]]; then
		echo "Downloading SDK for 32bit Linux System"
		wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130522.zip
		echo "Download Complete!!"
		echo "Extracting"
		unzip adt-bundle-linux-x86-20130522.zip
		echo "Configuring"
		cd ~/adt-bundle-linux-x64-20130522/tools
		./configure
		echo "Done!!"

	elif [[ "$bits" == "2" ]]; then
		echo "Downloading SDK for 64bit Linux System"
		wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130522.zip
		echo "Download Complete!!"
		echo "Extracting"
		unzip adt-bundle-linux-x86_64-20130522.zip
		echo "Configuring"
		cd ~/adt-bundle-linux-x86_64-20130522/tools
		./configure
		echo "Done!!"
fi

read -p "Press [Enter] key to continue..."

clear

echo "Cleaning up downloaded ****!"
rm Python-2.5.6.tgz
rm Python-2.5.6
rm make-3.81.tar.gz
rm make-3.81
rm jdk-6u45-linux-x64.bin
rm adt-bundle-linux-x86-20130522
rm adt-bundle-linux-x86-20130522.zip
rm adt-bundle-linux-x86_64-20130522
adt-bundle-linux-x86_64-20130522.zip
read -p "Press [Enter] key to continue..."
clear

echo "Done!"

echo "Cheers!"
echo ""
echo "Thanks for using this script!"
echo "Now, Enjoy compiling roms/kernels :)"
read -p "Press [Enter] key to exit..."
exit
Last edited by nolinuxnoparty; 19th July 2013 at 07:28 PM.
The Following 29 Users Say Thank You to nolinuxnoparty For This Useful Post: [ View ]
18th July 2013, 04:39 PM   |  #3  
OP Account currently disabled
XDA
Thanks Meter: 982
 
602 posts
Join Date:Joined: Jun 2013
@abhisahara
@broodplank1337
@devstaff
@Adi Aisiteru Reborn
@DD-Ripper
@<CyberAnarchy>
@amal das
@Divaksh
@Miustone
@XxLordxX
@Mohamed.Anwar [Not working till 8/2014]
@slaid480
@Kris Groove
Last edited by nolinuxnoparty; 2nd October 2013 at 08:29 PM.
The Following 16 Users Say Thank You to nolinuxnoparty For This Useful Post: [ View ]
18th July 2013, 04:40 PM   |  #4  
OP Account currently disabled
XDA
Thanks Meter: 982
 
602 posts
Join Date:Joined: Jun 2013
Unicorns boomed here.
The Following 11 Users Say Thank You to nolinuxnoparty For This Useful Post: [ View ]
18th July 2013, 04:51 PM   |  #5  
slaid480's Avatar
Recognized Developer / Recognized Contributor
Flag Meknes
Thanks Meter: 6,036
 
3,116 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Nice one would help on organizing the work.
The Following User Says Thank You to slaid480 For This Useful Post: [ View ]
18th July 2013, 06:54 PM   |  #6  
Miustone's Avatar
Senior Member
Flag WIN 8.1
Thanks Meter: 321
 
307 posts
Join Date:Joined: Jul 2012
Donate to Me
More
GREAT!
Awesome Thread nolinuxnoparty ! This is one of the first things i make after get Linux working
(Edited my Sig.)

Last edited by Miustone; 18th July 2013 at 07:01 PM.
The Following User Says Thank You to Miustone For This Useful Post: [ View ]
18th July 2013, 07:14 PM   |  #7  
OP Account currently disabled
XDA
Thanks Meter: 982
 
602 posts
Join Date:Joined: Jun 2013
Quote:
Originally Posted by Miustone

Awesome Thread nolinuxnoparty ! This is one of the first things i make after get Linux working
(Edited my Sig.)

Same here

Done pushing it to github

Now its easy for me to update

https://github.com/TeamRadium/tr-be-script
The Following 3 Users Say Thank You to nolinuxnoparty For This Useful Post: [ View ]
18th July 2013, 07:42 PM   |  #8  
OP Account currently disabled
XDA
Thanks Meter: 982
 
602 posts
Join Date:Joined: Jun 2013
v2 Time

Changelog:
- Cleaned up some parts
- Added SDK Support

Download:
http://tinyw.in/vjwd

Github:
https://github.com/TeamRadium/tr-be-...09e31e41f10c7f

Using:
cd ~/<Download Directory>
chmod 775 tr-be-script-v2
./tr-be-script-v2

EDIT:

v2 had some mistakes so I am updating with v2.0.1 right away

Changelog:

- Fixed some git installing errors.

Download:
http://tinyw.in/r5D4

Github:
https://github.com/TeamRadium/tr-be-...56da4ba3b83b7a
Last edited by nolinuxnoparty; 18th July 2013 at 08:09 PM.
The Following 3 Users Say Thank You to nolinuxnoparty For This Useful Post: [ View ]
19th July 2013, 01:21 PM   |  #9  
OP Account currently disabled
XDA
Thanks Meter: 982
 
602 posts
Join Date:Joined: Jun 2013
V2.5

Changelog:
- Added missing sudo commands (Thanks to @broodplank1337)

Downloads:
http://tinyw.in/rdSX

Usage:
cd ~/<DownloadDirectory>
chmod 775 tr-be-script-v2.5
./tr-be-script-v2.5

Github:
https://github.com/TeamRadium/tr-be-...29fffcfe6048da
The Following 10 Users Say Thank You to nolinuxnoparty For This Useful Post: [ View ]
19th July 2013, 07:17 PM   |  #10  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Flag Nijmegen
Thanks Meter: 10,046
 
4,941 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Good job scripts like these are always wanted

The Following 2 Users Say Thank You to broodplank1337 For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
build, build environment setup, nolinuxnoparty, rom, script, team radium, tool
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Software Development by ThreadRank