Once established of Ubuntu, we proceed to configure it, which is necessary before you start to collect the firmware ...
1) Installing the JDK (Java Development Kit) Here it is necessary to establish first of all. And do not tell me that you already have some there JDK !!! Yes, indeed, in the same Linux Mint / Ubuntu is already predustanvlenny the OpenJDK, but I will say at once - it is for us to build an android is not suitable,
it needs JDK from Sun . And yet that was version 1.6! Why are old, there is a new 1.7 ?! The fact that the new JDK is not yet "friendly" with the current source and therefore need just version 1.6.
And so, go to the website
www.oracle.com, Checking in there ...
Next, go to
HEREand swing depending on the bit jdk-6u45-linux-i586.bin or jdk-6u45-linux-x64.bin.
Downloads? Okay, now let's say it's all good download to our home directory (/ home / username), and if you download, etc. Place premestite in the home directory for convenience. Now perform some manipulations with the downloaded file. Open the properties of the fyla on the 'Rules' tab, put a cross in puntke "Allow executing file as program."
Open the terminal and write:
1.1.
sh jdk-6u45-linux-i586.bin
or
sh jdk-6u45-linux-x64.bin
if you have a 64 bit system and a package ...
1.2. As a result, the directory will jdk1.6.0_45. For convenience, rename it to jdk. Binaries can be removed.
Now, so that the compiler knows where our Java lies, we indicate the path to it:
export PATH = $ PATH: ~ / jdk / bin
Each time not to write this line again, neobhozhimo throw it in the .bashrc file, it is located in your home directory. If such faylv not exist, create it.
Fine! With Java sorted out, we move on.
2) the installation package. 2.1. Execute the command:
sudo apt-get install -y git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool g ++ - multilib lib32z1-dev lib32ncur -dev lib32readline-gplv2-dev libxml2-utils u-boot-tools libc6-dev x11proto-core-dev libx11-dev: i386 libreadline6-dev: i386 libgl1-mesa-glx: i386 libgl1-mesa-dev mingw32 tofrodos python-markdown xsltproc
3) Android SDK, adb and fastboot. Let's go
HEREand swing Android SDK. Download, unzip and rename it for ease of sdk.
3.1. Update the SDK:
cd ~ / sdk / tools
sudo sh android update sdk -u
Now we wait until the updated SDK and download the necessary files ...
3.2. Put ADB:
cd ~ / sdk / tools && ./android update adb
3.3. Download fastboot binary
from here, Let down in the platform-tools, and then run the following command:
cd ~ / sdk / platform-tools / && sudo cp adb / usr / bin / adb && sudo cp fastboot / usr / bin / fastboot && sudo chmod 755 / usr / bin / adb && sudo chmod 755 / usr / bin / fastboot
3.4. To use fastboot, for example, we want to fill in the resulting firmware via fastboot, or just perform a manipulation device via adb, it is necessary to make so that the computer "see" our phone. On Windows, this is called "install usb-wood", and we have on Linux is called "zakonnektitsya of ADB": D
Execute the command:
sudo gedit /etc/udev/rules.d/51-android.rules
And in the open editor inserts the text:
SUBSYSTEM == "usb", ATTR {idVendor} == "xxxx", MODE = "0666", OWNER = "y"
How to determine what to insert for the place "xxxx" and "y"?
Instead of "xxxx" we inserted a 4-digit code of the vendor of our device. To get it, disconnect the device from the USB, run the following command:
Then connect the device to the USB and try again. You will see a new line. We need characters after the "ID" and before "". For example, for my HTC, there is such a line here:
Bus 003 Device 009: ID 0bb4: 3011
0bb4 - it is the vendor code.
Instead of "y" - the name of the owner and the group as a cat. he is in. Learn command:
Well, I think everything will be clear here without explanation))
Example. After all the manipulations, in relation to my HTC One X +, I got here is a 51-android.rules:
SUBSYSTEM == "usb", ATTR {idVendor} == "0bb4", MODE = "0666", OWNER = "nowenui"
Then in ~ / .android / adb_usb.ini you need to add the line:
0x "xxxx"
in relation to my HTC:
0x0bb4
Finally add in ~ / .bashrc (or enter the terminal if no .bashrc file)
export PATH = $ {PATH}: ~ / sdk / tools
export PATH = $ {PATH}: ~ / sdk / platform-tools
All. Save. Close. In this environment the setting is completed ...