[Android] Warped420:
All by myself, I did it!!

STEP 4​

​

This next step is not easy, it is time-consuming. So if you chose a "Build Box" I understand..

Lucky for you, i have already found everything for you , So split your screen .

On one side a fresh terminal, on the other side my tutorial, and copy/paste from the beginning of part B).

HINT: When adding any file with apt-get. Watch for anything being removed and anything being added. Also copy any SUGGESTED programs to a text- editor ,research them and add them if you like..

Also when adding things with the command--- $ sudo apt-get install , numerous items can be added behind the command, but i recommend doing it one by one.

This is because of obsoleted software or missing software errors.

This is only going to be a basic list: Seperated in two parts, by A)what you need and B)how to get it.

A) TOOLS OF THE TRADE:

1. Compile Dependencies (libs)

2. Python 2.7.3 (3.2 and 3.3 opt.)

3. GNU MAKE (3.81 or 3.82)

4. Java JDK 6.xx ( not 7)

5. Android SDK

6. ADB & Fastboot

7. USB Configs

8. Repo command

9. Add everything to the PATH in ./bashrc

When you see this symbol "$", it means you are in terminal, but not as "ROOT"

Although if you see this symbol # , you are the "ROOT" user .

Your directory name will be in Red as well.

"But Warp, I don't know how to ROOT my Linux Box"

You don't say...

terminal: $ sudo passwd root

this will then open up Unix for you

add some passwords /confirm password /REMEMBER YOUR PASSWORD!!!

My password is ********** lol.

But Warp, I'm a brave "new user" I want "ROOT" access to file manager..

For Ubuntu

Terminal: $ gksudo nautilus

enter password-- DONE

For Mint (cinnamon)

Terminal: $ gksudo nemo

enter password-- DONE

For Mint (Mate)

Terminal: $ gksudo caja

enter password-- DONE!!!

B)

Libs

1..

$ sudo apt-get install git

sudo apt-get install git-core

sudo apt-get install gnupg

sudo apt-get install flex

sudo apt-get install bison

sudo apt-get install gperf

sudo apt-get install build-essential

sudo apt-get install zip

sudo apt-get install curl

sudo apt-get install zlib1g-dev

sudo apt-get install libc6-dev

sudo apt-get install lib32ncurses5-dev

sudo apt-get install ia32-libs

sudo apt-get install x11proto-core-dev

sudo apt-get install libx11-dev:i386

sudo apt-get install libreadline6-dev:i386

sudo apt-get install lib32z-dev

sudo apt-get install libgl1-mesa-glx:i386

sudo apt-get install libgl1-mesa-dev

sudo apt-get install g++-multilib

sudo apt-get install mingw32

sudo apt-get install tofrodos

sudo apt-get install python-markdown

sudo apt-get install libxml2-utils

sudo apt-get install xsltproc

sudo apt-get install readline-common

sudo apt-get install libreadline6-dev

sudo apt-get install libreadline6

sudo apt-get install lib32readline-gplv2-dev

sudo apt-get install libncurses5-dev

sudo apt-get install lib32readline5

sudo apt-get install lib32readline6

sudo apt-get install libreadline-dev

sudo apt-get install libreadline6:i386

sudo apt-get install bzip2

sudo apt-get install libbz2-dev

sudo apt-get install libbz2-1.0

sudo apt-get install libghc-bzlib-dev

sudo apt-get install lib32bz2-dev

sudo apt-get install libsdl1.2-dev

sudo apt-get install libesd0-dev

sudo apt-get install squashfs-tools

sudo apt-get install pngcrush

sudo apt-get install schedtool

sudo apt-get install python

sudo apt-get install gcc-4.7-multilib

sudo apt-get install ccache

sudo apt-get install eclipse

sudo apt-get install lzop

sudo apt-get install libwxgtk2.8-dev

sudo apt-get install liblzo2-dev

sudo apt-get install uuid

sudo apt-get install uuid-dev

sudo apt-get install zlib1g-dev liblz-dev

sudo apt-get install wmctrl

sudo apt-get install kernel-package

sudo apt-get install jfsutils

sudo apt-get install mcelog

sudo apt-get install xfsprogs

sudo apt-get install git git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs 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:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev gcc-4.6-multilib squashfs-tools pngcrush schedtool python ccache eclipse lzop libwxgtk2.8-dev wmctrl debhelper liblzo2-dev uuid uuid-dev zlib1g-dev liblz-dev kernel-package jfsutils mcelog xfsprogs

EXTRAS suggested by apt-- I wouldn't advise you installing anything unless you need them...

apport-gtk apport-kde valac gnome-user-guide desktop-base lightdm

gnome-sushi python-launchpadlib python3-launchpadlib ri ruby-dev

ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev ruby-switch

ubuntu-sso-client-gui ubuntuone-client-proxy zeitgeist-datahub

imagemagick-doc autotrace enscript ffmpeg gnuplot grads hp2xx html2ps

libwmf-bin povray radiance texlive-base-bin transfig ufraw-batch

libjline-java-doc librhino-java-doc xfonts-cyrillic

git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn

git-email git-gui gitk gitweb

bison-doc lib32mudflap0 ncurses-doc libasound2-doc pulseaudio-esound-compat libglib2.0-doc

dh-make debian-keyring g++-multilib g++-4.7-multilib gcc-4.7-doc

libstdc++6-4.7-dbg libstdc++6-4.7-doc libmail-box-perl lib32stdc++6-4.7-dbg libxcb-doc libxext-doc gcc-doc cpp-doc

python-markdown-doc ttf-bitstream-vera ghc-prof ghc-doc haskell-doc llvm-3.0 libghc-bzlib-doc libghc-bzlib-prof

libgmp10-doc libmpfr-dev distcc distccmon-gnome distcc-pump

ant-gcj ant-doc libbsf-java liboro-java libxalan2-java libjaxp1.3-java

liblog4j1.2-java jython antlr libbcel-java libjdepend-java libgnumail-java

libcommons-net-java javacc ant-optional-gcj junit-doc

libcommons-beanutils-java-doc libcommons-collections3-java-doc

libcommons-dbcp-java-doc libcommons-digester-java-doc

libcommons-httpclient-java-doc libavalon-framework-java

libcommons-logging-java-doc libexcalibur-logkit-java libdb5.1-java-gcj

libeasymock-java-doc ecj libecj-java-gcj libfelix-bundlerepository-java-doc

libfelix-gogo-command-java-doc libfelix-gogo-runtime-java-doc

libfelix-gogo-shell-java-doc libfelix-osgi-obr-java-doc

libfelix-shell-java-doc libfelix-utils-java-doc

libgeronimo-jpa-2.0-spec-java-doc libgeronimo-jta-java-doc

libgeronimo-osgi-support-java-doc libice-doc jetty8 libjetty8-java-doc

libjtidy-java-doc libosgi-compendium-java-doc libosgi-core-java-doc

libosgi-foundation-ee-java-doc libsm-doc libswt-gtk-3-java-gcj tomcat7

wx2.8-doc libgnomeprintui2.2-0 libxt-doc openjdk-7-demo openjdk-7-source

visualvm

i386 items

murrine-themes:i386 kde-config-gtk-style:i386 libpam-ldap:i386

libpam-winbind:i386 libnss-ldap:i386 libroar1:i386 libsndio0:i386

roaraudio-server:i386 libasound2-python:i386 nas:i386 glibc-doc:i386

locales:i386 libcanberra-pulse:i386 libdv-bin:i386 oss-compat:i386

pulseaudio-esound-compat:i386 rng-tools:i386 libgd-tools:i386 libglide3:i386 ibx11-doc:i386 xml-core:i386

gnome-keyring:i386 gnutls-bin:i386 gphoto2:i386 gtkam:i386 gpm:i386

krb5-doc:i386 krb5-user:i386 gstreamer-codec-install:i386

gnome-codec-install:i386 gstreamer0.10-tools:i386 jackd2:i386

libjasper-runtime:i386 liblcms-utils:i386 libmyodbc:i386

odbc-postgresql:i386 tdsodbc:i386 unixodbc-bin:i386 libportaudio2:i386

libroar-compat2:i386 ttf-baekmuk:i386 ttf-arphic-gbsn00lp:i386

ttf-arphic-bsmi00lp:i386 ttf-arphic-gkai00mp:i386 ttf-arphic-bkai00mp:i386

libqt4-declarative-folderlistmodel:i386 libqt4-declarative-gestures:i386

libqt4-declarative-particles:i386 libqt4-declarative-shaders:i386

qt4-qmlviewer:i386 libqt4-dev:i386 libicu48:i386 qt4-qtconfig:i386

libraw1394-doc:i386 librsvg2-bin:i386 hpoj:i386 hplip:i386

libsane-extras:i386 sane-utils:i386 libsasl2-modules-otp:i386

libsasl2-modules-ldap:i386 libsasl2-modules-sql:i386

libsasl2-modules-gssapi-mit:i386 libsasl2-modules-gssapi-heimdal:i386

speex:i386 libxcb-doc:i386

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

After you do all this, may be a good idea to add $ sudo apt-get upgrade

2. I don't get this step. Python is already on there, and if it ain't when you input "sudo apt-get install python" it will be...

3. Gnu Make , Your suppose to get this inside of build-essential , I like to know i got the newest one ,so i do it like this.

go to http://ftp.gnu.org/gnu/make/

Download GNU MAKE 3.82

Open up file manager

go to download folder

cut file

go to home directory

paste

extract

close file manager

Open Terminal:

$ cd <name of gnu make folder(exact)>

then it will look something like this

gnu make $

$ ./configure

$ make

# make install

# make clean...DONE

4. Get rid of pre-installed "JAVA"

$ sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*

Add new Oracle JAVA 6

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java6-installer

If you want to check the version after it is done

Terminal: $java -version

http://developer.android.com/sdk/index.html#download

5.Terminal: $ wget http://dl.google.com/android/android-sdk_r22-linux.tgz

When that finishes downloading

Terminal: $ tar -xvzf android-sdk_r22-linux.tgz

After extracting the package, run the command below to change into the tools directory.

cd ~/android-sdk-linux/tools

Finally, run the commands below to begin the installation.

./android update sdk

./android

"wget" is the same thing as "curl"

6. This may seem like a pointless step.

Warp, I already have ADB & Fastboot when I installed SDK, but do you have the 4.2.2 update ??

Just to make sure..

Terminal: $ sudo apt-get install android-tools-adb android-tools-fastboot

7. Create a folder in Home dir "51-android.rules" .

Now open a terminal and input: $ gksudo gedit /etc/udev/rules.d/51-android.rules

When another screen pops up copy and paste this inside--

#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"

Save & Close text-editor.

Now fire up another terminal

To set proper permisisons: (Provide read permission to all users, in addition to whatever other permissions are pre-set)

input:

Terminal: $ sudo chmod a+r /etc/udev/rules.d/51-android.rules

8. Terminal: $ mkdir -p ~/bin

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

Terminal: $ chmod a+x ~/bin/repo

Terminal: $ export PATH=${PATH}:~/bin

9. You can make this change to the path permanent for all future Terminal sessions:

Terminal: gedit ~/.bashrc

add export PATH=${PATH}:~/bin, on its own line, then save the file.

If you ever have problems with repo.. try this

- Make sure you have a bin/ directory in your home directory and that it is included in your path: (Very Important)

$ PATH=~/bin:$PATH

- Next,

$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

$ chmod +x ~/bin/repo