English 中文(简体)
Android Basics

Android - User Interface

Android Advanced Concepts

Android Useful Examples

Android Useful Resources

Selected Reading

Android - Developer Tools
  • 时间:2024-09-17

Android - Developer Tools


Previous Page Next Page  

The android developer tools let you create interactive and powerful apppcation 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 pst of SDK tools has been given below −

Sr.No Tool & description
1 android

This tool lets you manage AVDs, projects, and the installed components of the SDK

2 ddms

This tool lets you debug Android apppcations

3 Draw 9-Patch

This tool allows you to easily create a NinePatch graphic using a WYSIWYG editor

4 emulator

This tools let you test your apppcations without using a physical device

5 mksdcard

Helps you create a disk image (external sdcard storage) that you can use with the emulator

6 proguard

Shrinks, optimizes, and obfuscates your code by removing unused code

7 sqpte3

Lets you access the SQLite data files created and used by Android apppcations

8 traceview

Provides a graphical viewer for execution logs saved by your apppcation

9 Adb

Android Debug Bridge (adb) is a versatile command pne 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 sqpte3.

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 cpck on Tools>Android>Android device Monitor.

How it works

In android, each apppcation 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 cpent and server as shown below

Android Developer Tools Tutorial

Now cpck 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 , cpck on voice and then start typing the incoming number. It is shown in the picture below −

Android Developer Tools Tutorial

Now cpck on the call button to make a call to your emulator. It is shown below −

Android Developer Tools Tutorial

Now cpck 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 ecppse 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.

Sqpte3

Sqpte3 is a command pne program which is used to manage the SQLite databases created by Android apppcations. The tool also allow us to execute the SQL statements on the fly.

There are two way through which you can use SQpte , either from remote shell or you can use locally.

Use Sqpte3 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 sqpte3 tool by entering the following command −

sqpte3

Once you invoke sqpte3, you can issue sqpte3 commands in the shell. To exit and return to the adb remote shell, enter exit or press CTRL+D.

Using Sqpte3 directly

Copy a database file from your device to your host machine.

adb pull <database-file-on-device>

Start the sqpte3 tool from the /tools directory, specifying the database file −

sqpte3 <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 pstd below −

    Android Debug bridge (ADB)

    Android Interface definition language (AIDL)

    aapt, dexdump , and dex e.t.c

Advertisements