Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

Getting Started with Android Things

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Basically, Android Things refers to the summation of Android and the Internet of Things. IoT is very autonomous it means the Internet of Things, whatever the IoT device is, it can sense through sensors and do its respective task without very much human interaction and Android Things revolves around IoT devices. For IoT devices, sensors play the most important role in sending and analyzing data into the cloud. It comes with the idea that any device which we use in our daily life can be connected to the Internet. Now, to build those products there has to be an element of computing power inside those devices and there we need a computer, a chip, and an Operating System which have internet connectivity so there come Android Things. Google has made it very easy for software to connect with the hardware by releasing Android Things OS. Anyone who has knowledge of android and java can use it to build IoT devices to connect the hardware to the internet and get the task done.

Getting Started with Android Things


Get the board and flash Android Things into the board, you can choose from the following:

  1. Raspberry Pi 3: It uses a quad-core cortex a53 chip at 64 bit.
  2. Intel Edison: It uses an Intel x86 chip.
  3. NXP Pico: It uses a cortex a7 based chip.
  4. Peripherals: Includes a breadboard, resistor, jumper wire, LED, switch, etc.
  5. A Rainbow HAT: for Android Things
  6. Power Supply: with a minimum of a 5volt.
  7. SD card

Getting Started

While there are many boards available in the market but in this article, we will mainly focus on Raspberry Pi 3 because it is very reliable.

1. Assembling the Hardware

Plug the Rainbow HAT into your Raspberry Pi. Make sure the pins are lined up and not off by one row. and then connect it to the power supply.

2. Installing Android Things:

  • Visit Android things Console using Google or any web Browser.
  • Select tools from the menu in the top-left corner.
  • Now, click on the download button to download the setup utility tool.
  • Now, unzip the downloaded file and choose according to your environment (Windows, Linux, or Mac).
  • Open Terminal and navigate to that downloaded folder and then mount an SD card. Now run the script, for example in mac OS
sudo ~/android-things-setup-utility/android-things-setup-utility-macos  
  • Some options will flash on your terminal screen. Choose Option one to install Android Things.
  • Select the Hardware you are using.
  • Now you’ll see an option that allows you to choose a custom image or default image, for beginners use the default image. The default image will be downloaded.
  • As soon as you download the image, make sure to plug in your SD card and then press enter. Select the drive by using arrow keys and press Enter. Type y to confirm your selection and press Enter. The image will be copied into your SD card.
  • Once it’s completed, it’ll say Setup Complete. Type n in the terminal to select that you don’t want to set up the Wi-Fi. You’ll connect the board to the Wi-Fi later. You can safely eject the SD card from the computer now.

3. Connecting:

For Raspberry Pi, you will need an HDMI monitor, an HDMI cable, and a mouse. Follow the steps:

  • Insert your SD card into the Raspberry pi board and connect your external monitor to the board via the HDMI cable. Now, connect your mouse to a USB port and make sure the board is connected to the power supply.
  • Click Continue.
  • You will see the option for pairing.
  • Install the Android Things toolkit app (companion app) on your android phone from the Google play store. After installing open it.
  • Set up your account and accept the terms.
  • And then tap on pair your device, and then pair your device using the code that will be flashed on your monitor screen.
  • Select on Wi-Fi network and connect it to your  Wi-Fi network using its password.
  • After that you can test the peripherals like Rainbow Hat etc.
  • Click Finish.
  • After this, a screen will pop up tap on NOT NOW.
  • In your Monitor, in the network section, there will be your saved network to which you are connected and the IP address.
  • Open terminal and type the following command
adb connect ip-address # your ip address 

You will be connected to the internet. 

4. Exploring Android Things Projects:

Update your SDK tools. Import Things library. Android Things library will be included and the android manifest file will already be updated with the IOT_LAUNCHER intent filter so that it launches automatically on boot.

provided ‘’                                

 and in android manifest

<activity android:name=”.ButtonActivity”>
<action android:name=”android.intent.action.MAIN” />
<category android:name=”android.intent.category.LAUNCHER” />
<! — Launch activity automatically on boot →
<action android:name=”android.intent.action.MAIN”/>
<category android:name=”android.intent.category.IOT_LAUNCHER”/>
<category android:name=”android.intent.category.DEFAULT”/>

5. Communication with Hardware:

Android Things helps in communicating between the peripherals I/O API and the sensors and the actuators.

My Personal Notes arrow_drop_up
Last Updated : 05 Aug, 2021
Like Article
Save Article
Similar Reads
Related Tutorials