How to Get Hardware and Software Information in Android

We have seen many apps on play store which provides the hardware and software information. In Android one can easily fetch the information programmatically using Build class. Build class in android provides the basic information like serial number, android SDK, brand, model no, manufacture, version code and etc. There are many other information you can get from a android device but here we will focus on some of the android properties.

Let’s Get it Working

In this tutorial we are going to learn how to get hardware and software information in android. To really understand how to get hardware and software information we will create an app. This app will contains the a screen which will contain a text view to show hardware and software information and a button on which clicks hardware and software information is fetched.


Step 1) Creating New Project

Create a new project in Android Studio from File ⇒ New Project Fill the required information like project name and package name of the project. When it prompts you to select the default activity, select Empty Activity and proceed.

Step 2) Update strings.xml

Add the below string values to the strings.xml located in res ⇒ values ⇒ strings.xml.

Step 3) Create activity_main.xml

Now create a layout file for the i.e activity_main.xml and add the below code in your layout file. The code will create a simple UI a scroll able text view which show the hardware and software information and a button to fetch the information.

activity_main.xml would result a screen like this:

Main Screen

Step 4) Create MainActivity class

Create a class named MainActivity and add below code. Here i have written the code to fetch android hardware and software information and display it to the textview.

Step 5) Run App

Register the above created MainActivity in AndroidManifest.xml as a main activity and run the app by clicking run button on Android Studio and you will see the UI mentioned above, click on “Get Information” button to display the hardware and software information of your android device.
Screen when app launches

Main Screen

Screen shows android device infromation when “Get Information” Button Clicked

Main Screen shows information


Please feel free to comment as well as ask questions. And, yeah! If this post helps you please do share!

Enjoy Coding and Share Knowledge

Show Buttons
Hide Buttons