Installing the Android SDK is one of the basic tasks for anyone who wants to create their own application or make the most of their mobile capabilities. If you want to start in Android programming or want to change the ROM of your device, the first step is the one that we bring you today: how to download and configure the Android SDK.
If these programming issues push you back we must tell you that it is very simple. In fact, over the years Google has improved its services and today any user with minimal computer skills can now prepare your computer for the Android SDK. It does not matter if you have Windows, Mac OS or Linux, the method to install the SDK (Software Development Kit) is quite similar and will only change some locations where the files are saved.
Install Android Studio, the simplest method:
Android Studio was presented several years ago and it was a huge advantage for everyone when it came to programming on Android. This is the official development environment for Android created by Google itself and an improvement in accessibility level with respect to Eclipse, the most used service for programming in Java.Android Studio has already exceeded version 3.0 in its fully stable version. Why did we name Android Studio if we were talking about the Android SDK? Basically because through Android Studio we can easily download the entire Android SDK.
The first step is to download the Android Studio version corresponding to our operating system:
- Mac android-studio.dmg (463 MB)
- Linux [android-studio.zip] (https://developer.android.com/studio/#downloads (468 MB)
- Windows 64 bits android-studio.exe (451 MB)
Once the file is downloaded, we must install it on our computer. The complete configuration takes only a couple of minutes and a few clicks. The first step is to start the .DMG file on Mac, .exe on Windows or unzip the file on Linux under / usr / local /. The images in this tutorial have been made in Mac OS X, but the menus are equivalent in the rest of the operating systems.
In Mac, we will have to drag Android Studio inside the Applications folder and start the program. In Windows it is automatic and in Linux, you should go to the android-studio / bin/directory and run from the studio.s terminal. Once started, it asks us if we want to import previous configurations of Android Studio. If it's the first time you install it, we'll give it a go and start from scratch.
We must follow the steps that the application itself asks us to do. Next, next. It will inform us that we are installing Android Studio and then it will ask us directly to download the Android Emulator, the Android SDK, and several additional SDK components.
Option 2: directly download the Android SDK manager:
Once the files are downloaded, we will have everything ready for the next step. Before proceeding, we must take into account the Java requirements necessary to avoid problems. On Mac, it is recommended to be in Java 1.6 since the newer versions sometimes generate problems. In Windows we must configure the Java environment variable in the correct location: Start menu> Computer> System Properties> Advanced System Properties. Then Advanced> Environment Variables and add the path of your JDK folder as C: \ Program Files \ Java \ jdk1.8.0_77. to the java system variable.
As we see the method of Android Studio is the simplest. We recommend doing it through it to install the Android SDK, although it is not necessary since we can install it directly. To have the essential tools of the Android SDK will have to download the Android SDK Manager, save it in a specific location and then from Eclipse or the computer terminal itself we can start working with Android. If you do not want to install a full IDE like Android Studio, this option is cleaner.
- Mac SDK-tools-darwin.zip (82 MB)
- Linux SDK-tools-linux.zip (130 MB)
- Windows SDK-tools-windows.zip (132 MB)
Download the Android SDK packages through Android Studio:
We have already installed Android Studio and the Android SDK but this is not all. To take advantage of this software we need to install a series of tools, components and specialized packages to provide power to this programming environment. For this, we will have to download all these files but there is nothing to worry about since everything is done from the same menus.
The next step is to reopen Android Studio, click on configuration and there the SDK Manager. Then we will open a menu with many options, among them we must stay in the Android SDK tab.
Once here we must select the Android SDK Platform and the APIs of the Android version for which we want to program. For those who want to try the latest, we recommend you download the latest API available (in 2018 it is the API level 27). Once selected these versions and their files, we give OK.
When we install the Android SDK we should also select and download tools such as the Android SDK Tools, the Android SDK Platform-tools and the latest version of the Android SDK Build-tools, all of which are essential when we want to install ROMs and factory images like those of the Android preview.
In addition to this, we have several extra directories related to the Google APIs focused on the Android operating systems for accessories. We refer to Wear OS, Google Cast or Android TV. They also have their own APIs and are highly recommended.
Android Repository and Android Support are two very useful libraries that give us a large number of APIs compatible with most versions of Android and if we want to develop using Google Play Services we will have to download the Google Repository.
These recommendations are also extendable to the SDK Manager if we have opted not to install Android Studio. With the passage of time Android has more packages and APIs available, this facilitates the tasks when creating applications but for the initiates suddenly offers a huge amount of options that may end up confusing. It is something positive and every time we have separate packages so that the user only downloads what they need.
As a final step, once we have chosen the packages that we want to add to the Android SDK, we only need to download and install them. To do this you have to click on the blank box of each one and select them, then we give OK. Once here you will ask us to accept different licenses of use, then you will be able to download all the packages.
Once the loading process is finished, we will have everything ready to start creating Android applications or working with the factory images. And of course, if we want to add more packages at some point, we should only repeat the process.
What the Android SDK is for:
Installing the Android SDK allows us to mainly create applications for Android. From the simplest to any that our knowledge of programming allows us. The Android APIs make the task easier and Android Studio's own tool lets us download dozens of open source apps so we can see how everything works.
When we write an application we can see it live thanks to the Android Instant Run, a fast emulator that applies the changes without compiling the application. There is also a multitude of code templates, links to Github, tutorials and test frameworks. A huge amount of tools to get into the world of Android programming.
But beware, because having and dominating the Android SDK has more advantages. Several years ago it was used to be able to take screenshots of any Android device connected to the computer. Also to record the screen. To do this we have to have activated the USB Debugging options and from the terminal to execute the debug ddms application.
With the Android SDK, we also have access to the ADB and Fastboot tools, essential to control our Android from the computer. Here we leave some ADB commands very useful and that you can use thanks to the Android SDK these functions are included:
- flash - Rewrites a partition with another binary image saved on the computer.
- erase - Delete a specific partition.
- pull - Take a file from the mobile and move it to the computer
- reboot - Restart the device or return to the bootloader.30+
- devices - Displays the list of devices connected to the computer.
- format - Formats a specific partition.
Install ROMs and factory images:
Having the Android SDK installed is the first step to add ROMs, configure OTAs and install factory images to our Android. The SDK is the gateway to the world of ROMs, the updated versions, the Android O preview and, ultimately, everything that involves modifying the predefined software of the mobile and changing it for another. The SDK is also necessary to unlock the bootloader of our Android.
We hope that this little guide will encourage you to enter the world of Android Studio, ADB, fastboot and all the possibilities that are opened if we install the Android SDK on our computer.