Showing posts with label dvm. Show all posts
Showing posts with label dvm. Show all posts

The ADT Plug-in

The ADT plug-in for Eclipse simplifies your Android development by integrating the developer tools, including the emulator and .class-to-.dex converter, directly into the IDE. While you don’t have to use the ADT plug-in, it does make creating, testing, and debugging your applications faster and easier.

The ADT plug-in integrates the following into Eclipse:
-An Android Project Wizard that simplifies creating new projects and includes a basic application template.
-Forms-based manifest, layout, and resource editors to help create, edit, and validate your XML resources.
-Automated building of Android projects, conversion to Android executables (.dex), packaging to package fi les (.apk), and installation of packages onto Dalvik virtual machines.
- The Android Emulator, including control of the emulator’s appearance, network connection settings, and the ability to simulate incoming calls and SMS messages.
 - The Dalvik Debug Monitoring Service (DDMS), which includes port forwarding; stack, heap, and thread viewing; process details; and screen capture facilities.
- Access to the device or emulator’s filesystem, allowing you to navigate the folder tree and transfer files
- Runtime debugging, so you can set breakpoints and view call stacks
- All Android/Dalvik log and console outputs

If you’re using the ADT plug-in, running or debugging your application:
- Compiles the current project and converts it to an Android executable (.dex).
- Packages the executable and external resources into an Android package (.apk).
- Starts the emulator (if it’s not already running).
- Installs your application onto the emulator.
- Starts your application.

If you’re debugging, the Eclipse debugger will then be attached, allowing you to set breakpoints and debug your code.

ADT Tools from DDMS perspective:
-The Android Emulator: An implementation of the Android virtual machine designed to run on your development computer. You can use the emulator to test and debug your android applications.
- Dalvik Debug Monitoring Service (DDMS): Use the DDMS perspective to monitor and control the Dalvik virtual machines on which you’re debugging your applications.
- Android Asset Packaging Tool (AAPT): Constructs the distributable Android package files (.apk).
- Android Debug Bridge (ADB): The ADB is a client-server application that provides a link to a running emulator. It lets you copy files, install compiled application packages (.apk), and run shell commands.

-SQLite3: A database tool that you can use to access the SQLite database fi les created and used by Android.
-Traceview: Graphical analysis tool for viewing the trace logs from your Android application
-MkSDCard: Creates an SDCard disk image that can be used by the emulator to simulate an external storage card.
 dx Converts Java .class bytecode into Android .dex bytecode.
- activityCreator: Script that builds Ant build fi les that you can then use to compile your Android applications without the ADT plug-in.

The Android Software Stack

The Android software stack is composed of the elements shown in the figure . Put simply, a Linux kernel and a collection of C/C++ libraries are exposed through an application framework that provides services for, and management of, the run time and applications.

Linux Kernel: Core services (including hardware drivers, process and memory management, security, network, and power management) are handled by a Linux 2.6 kernel. The kernel also provides an abstraction layer between the hardware and the remainder of the stack.

Libraries: Running on top of the kernel, Android includes various C/C++ core libraries such
as libc and SSL, as well as:
-❑ A media library for playback of audio and video media
-❑ A Surface manager to provide display management
-❑ Graphics libraries that include SGL and OpenGL for 2D and 3D graphics
-❑ SQLite for native database support
-❑ SSL and WebKit for integrated web browser and Internet security

Android Run Time: What makes an Android phone an Android phone rather than a mobile is the Linux implementation is the Android run time. Including the core libraries and the Dalvik virtual machine, the Android run time is the engine that powers your applications and, along with the libraries, forms the basis for the application framework.

-Core Libraries: While Android development is done in Java, Dalvik is not a Java VM.
The core Android libraries provide most of the functionality available in the core Java
libraries as well as the Android-specifi c libraries.

Dalvik Virtual Machine: Dalvik is a register-based virtual machine that’s been optimized to ensure that a device can run multiple instances efficiently. It relies on the Linux kernel for threading and low-level memory management.

 Application Framework: The application framework provides the classes used to create Android applications. It also provides a generic abstraction for hardware access and manages the user interface and application resources.

Application Layer: All applications, both native and third party, are built on the application layer using the same API libraries. The application layer runs within the Android run time using the classes and services made available from the application framework.