Android Things: Android Internet of things tutorial

Android Internet of Things called Android Things is the new OS announced by Google. This is an Android-based OS for Internet of things (IoT). If you are new to IoT, give a look at my article about what is IoT.  As the name Android Things implies, it is a modified version of Android OS that runs on our smartphones. This OS joins the Android family with Android, Android TV and Android auto.

What is Android Things?

Android Things is the new OS developed by Google for IoT development. If we look at the past, Google made another attempt to jump into IoT ecosystem with Brillo that didn’t have a big success. Nowadays, Android Things is in stable version named Android Things 1.x. It introduces some important features that make it different from Brillo. Android Internet of things (Android Things) supports these IoT devices :

  • NXP i.MX8M
  • Qualcomm SDA212
  • Qualcomm SDA624
  • MediaTek MT8516

Moreover, Android Things 1.x supports the following development and prototyping boards:

  • Raspberry Pi 3 Model B
  • NXP i.MX7D

Android Things is a modified version of Android and it has a subset of Android API. This aspect is very important because Android developers can move to Android things smoothly. They use the Android development experience.  Of course, the APIs related to Maps, authentication is not supported.

The overall development process used for Android apps is still valid for Android Things, even the IDE is the same. All these aspects will have a great positive impact on this OS future. It is the first OS that uses Java as development language (as Android), while others OS or IoT boards are based on C/C++. Moreover, developers can reuse Google cloud platform components like Firebase in the development process.


How to install Android Things using Android Things console

Nowadays, Android Things installation process is very simplified if you use Android Things console. Once you access the Android Things console, in the left menu there’s the item Tools where you can download a file that guides you during the Android Things installation process.

android things console

How to install Android Internet of things: Manual installation

Now we know what is Android Internet of things known as Android Things we can start installing it. In this article, we will use Raspberry Pi 3 as a development board. What do we need?

This is the list of things we need to get started with Android Things OS:

  • Raspberry Pi 3
  • Micro SD Card 8 Gb or more
  • Windows or OS X

android internet of things tutorial


In the beginning, it is necessary to format the SD card using FAT 32. If you are using a Mac, go to Disk Utility and format the card:


android things setup

All done. You are ready to install the Android Things image. Download the image for Raspberry. Once the download is ready, we can install it:

[shell]sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskn[/shell]

One important step is to identify the disk number (n). You can do it using OS X Information and look for the Card reader device:


android things disk


The BSD number is the number we are looking for. In this case, n=1. During the installation process, you don’t have messages and you have simply to wait until the process is complete. At the end, you get a message saying that the disk is unreadable, it is ok, it works!

If you are a Linux user, please read the comment below (made by Dimitris) to know how to install it.

It is time to insert the new OS disk into your Raspberry Pi.

Verify Android Things installation on your Raspberry Pi

Finally, we can verify if the installation is correct powering on the Raspberry Pi. You can use a USB cable connected to your PC to start Raspberry. At the beginning, you need to connect Raspberry to the LAN using a cable and you need an HDMI cable to connect the board to a TV or monitor. If you don’t want to use an HDMI cable you can use Vysor a Chrome plugin.

When the boot process finishes, the result is shown below:


android things startup


If you get this screenshot it means that Android Internet of things is running on the Raspberry Pi 3.

Now, it is possible to connect to the Android Things using adb as we do in Android. Moreover, it is possible to get the device list using adb devices:


android things devices list


That’s all: Android Things is up and running. Now, you can start developing your first IoT project as we will see in the next article.

New API in Android Internet of things

Even if Android Things is a subset of Android, this new OS introduces some important APIs that are specific to the IoT domain. When we create an IoT project, we have to communicate with external sensors or actuators.  Thus, Android Things uses two industry standards in Peripheral I/O:

  • GPIO for sensors
  • PWM for DC motors, lights, etc.

Moreover, some content providers (Calendar, Telephony, etc.) are not supported.

An interesting aspect is that Android Things supports UI interface like a “normal” Android app.

Once you have correctly installed and configured Android Things on your device, you can start developing several projects that help you to better understand the power of Android Things. To this purpose, you should read how to synchronize Android Things with Firebase. In this post, you will find all the information you need to create a full working IoT app for Android Things.


After a few days, I can say that Android Things is an interesting IoT OS based on Android. This is very important because the development process is the same used for an Android app.  Developers can reuse the Android knowledge and experience. In this way, the transition is smooth. Of course, Android Things is still a developer preview so many things could change but the beginning is very promising.