Android - Developer Tools

The android developer tools let you create interactive and powerful application for android platform. The tools can be generally categorized into two types.
  • SDK tools
  • Platform tools

SDK tools

SDK tools are generally platform independent and are required no matter which android platform you are working on. When you install the Android SDK into your system, these tools get automatically installed. The list of SDK tools has been given below −
Sr.NoTool & description
1android
This tool lets you manage AVDs, projects, and the installed components of the SDK
2ddms
This tool lets you debug Android applications
3Draw 9-Patch
This tool allows you to easily create a NinePatch graphic using a WYSIWYG editor
4emulator
This tools let you test your applications without using a physical device
5mksdcard
Helps you create a disk image (external sdcard storage) that you can use with the emulator
6proguard
Shrinks, optimizes, and obfuscates your code by removing unused code
7sqlite3
Lets you access the SQLite data files created and used by Android applications
8traceview
Provides a graphical viewer for execution logs saved by your application
9Adb
Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device.
We will discuss three important tools here that are android,ddms and sqlite3.

Android

Android is a development tool that lets you perform these tasks:
  • Manage Android Virtual Devices (AVD)
  • Create and update Android projects
  • Update your sdk with new platform add-ons and documentation
android [global options] action [action options]

DDMS

DDMS stands for Dalvik debug monitor server, that provide many services on the device. The service could include message formation, call spoofing, capturing screenshot, exploring internal threads and file systems e.t.c

Running DDMS

From Android studio click on Tools>Android>Android device Monitor.

How it works

In android, each application runs in its own process and each process run in the virtual machine. Each VM exposes a unique port, that a debugger can attach to.
When DDMS starts, it connects to adb. When a device is connected, a VM monitoring service is created between adb and DDMS, which notifies DDMS when a VM on the device is started or terminated.

Making SMS

Making sms to emulator.we need to call telnet client and server as shown below
Android Developer Tools Tutorial
Now click on send button, and you will see an sms notification in the emulator window. It is shown below −
Android Developer Tools Tutorial

Making Call

In the DDMS, select the Emulator Control tab. In the emulator control tab , click on voice and then start typing the incoming number. It is shown in the picture below −
Android Developer Tools Tutorial
Now click on the call button to make a call to your emulator. It is shown below −
Android Developer Tools Tutorial
Now click on hangup in the Android studio window to terminate the call.
The fake sms and call can be viewed from the notification by just dragging the notification window to the center using mouse. It is shown below −
Android Developer Tools Tutorial

Capturing ScreenShot

You can also capture screenshot of your emulator. For this look for the camera icon on the right side under Devices tab. Just point your mouse over it and select it.
As soon as you select it , it will start the screen capturing process and will capture whatever screen of the emulator currently active. It is shown below −
Android Developer Tools Tutorial
The eclipse orientation can be changed using Ctrl + F11 key. Now you can save the image or rotate it and then select done to exit the screen capture dialog.

Sqlite3

Sqlite3 is a command line program which is used to manage the SQLite databases created by Android applications. The tool also allow us to execute the SQL statements on the fly.
There are two way through which you can use SQlite , either from remote shell or you can use locally.

Use Sqlite3 from a remote shell.

Enter a remote shell by entering the following command −
adb [-d|-e|-s {<serialNumber>}] shell
From a remote shell, start the sqlite3 tool by entering the following command −
sqlite3
Once you invoke sqlite3, you can issue sqlite3 commands in the shell. To exit and return to the adb remote shell, enter exit or press CTRL+D.

Using Sqlite3 directly

Copy a database file from your device to your host machine.
adb pull <database-file-on-device>
Start the sqlite3 tool from the /tools directory, specifying the database file −
sqlite3 <database-file-on-host>

Platform tools

The platform tools are customized to support the features of the latest android platform.
The platform tools are typically updated every time you install a new SDK platform. Each update of the platform tools is backward compatible with older platforms.
Some of the platform tools are listd below −
  • Android Debug bridge (ADB)
  • Android Interface definition language (AIDL)
  • aapt, dexdump , and dex e.t.c

Post a Comment

Previous Post Next Post