[LG Optimus Me P350] kD:
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 :

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

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.

cd ~/Downloads

then type these commands

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:

java -version

the output should be

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 :

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 :

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 :

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 :

sudo apt-get install libx11-dev:i386

If you are Using Ubuntu 12.04 Use Need To Use this Command too :

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 :

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 :

cd ~/sdk/platform-tools
./adb devices

NOW AFTER APPLYING THIS CODES IF U SEE THE OUTPUT AS BELOW GIVEN :

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

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

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 :

cd ~/sdk/platform-tools
sudo service udev restart
sudo ./adb kill-server
sudo ./adb start-server

RESTART UBUNTU AND START SDK

cd ~/sdk/platform-tools
./adb devices

NOW AFTER APPLYING THIS CODES IF U SEE THE OUTPUT AS BELOW GIVEN :

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 :

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:

adb devices

Now your Computer is Ready For Android Development !!!