Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
15 views21 pages

Unit 2

The document provides an overview of the Android operating system, including its components such as the Java Development Kit (JDK), Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Android Software Development Kit (SDK). It explains the roles of the Dalvik Virtual Machine (DVM) and the process of compiling Java source code into Dalvik bytecode for Android applications. Additionally, it details the installation and configuration of the Android emulator for testing apps on virtual devices.

Uploaded by

zurangeadesh5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views21 pages

Unit 2

The document provides an overview of the Android operating system, including its components such as the Java Development Kit (JDK), Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Android Software Development Kit (SDK). It explains the roles of the Dalvik Virtual Machine (DVM) and the process of compiling Java source code into Dalvik bytecode for Android applications. Additionally, it details the installation and configuration of the Android emulator for testing apps on virtual devices.

Uploaded by

zurangeadesh5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Unit no -2

Installation And
Configuration of
Android
Operating System
• An Operating System (OS) is an interface between a
computer user and computer hardware. An operating system
is a software which performs all the basic tasks like file
management, memory management, process management,
handling input and output, and controlling peripheral devices
such as disk drives and printers.
• An operating system is software that enables applications to
interact with a computer's hardware. The software that
contains the core components of the operating system is
called the kernel.
• The primary purposes of an Operating System are to enable
applications (software's) to interact with a computer's
hardware and to manage a system's hardware and software
resources.
Java JDK-
• Java Development Kit (JDK) is a cross-platformed software
development environment that offers a collection of tools and
libraries necessary for developing Java-based software
applications and applets. It is a core package used in Java,
along with the JVM (Java Virtual Machine) and the JRE
(Java Runtime Environment).
JVM (Java Virtual Machine)

• JVM stands for Java Virtual Machine. It's a virtual machine


that allows Java programs to run on multiple operating systems
and devices.
• A specification where working of Java Virtual Machine is
specified. But implementation provider is independent to
choose the algorithm. Its implementation has been provided by
Oracle and other companies.
• An implementation Its implementation is known as JRE (Java
Runtime Environment).
• Runtime Instance Whenever you write java command on the
command prompt to run the java class, an instance of JVM is
created.
Java Runtime Environment (JRE)
• Java Runtime Environment (JRE) is an open-access software
distribution that has a Java class library, specific tools, and a
separate JVM. In Java, JRE is one of the interrelated
components in the Java Development Kit (JDK).
• It is the most common environment available on devices for
running Java programs.
• Java source code is compiled and converted to Java
bytecode. If you want to run this bytecode on any platform,
you need JRE.
• The JRE loads classes check memory access and get system
resources. JRE acts as a software layer on top of the
operating system.
Android SDK

• Android SDK stands for Android Software Development


Kit which is developed by Google for Android Platform. With
the help of Android SDK, we can create android Apps easily.
• Android SDK is a collection of libraries and Software
Development tools that are essential for Developing Android
Applications.
Android virtual device (AVD)
• An Android virtual device (AVD) is a virtual machine that
runs the Android operating system. AVDs are used by
developers and testers to test apps and websites, and to
understand how apps work on real devices.
Android Emulator

• The Android emulator is an Android Virtual


Device (AVD), which represents a specific Android
device. We can use the Android emulator as a target
device to execute and test our Android application
on our PC. The Android emulator provides almost
all the functionality of a real device. We can get the
incoming phone calls and text messages. It also
gives the location of the device and simulates
different network speeds. Android emulator
simulates rotation and other hardware sensors. It
accesses the Google Play store, and much more
Install the emulator
The Android emulator is installed while installing
the Android Studio. However some components
of emulator may or may not be installed while
installing Android Studio. To install the emulator
component, select the Android
Emulator component in the SDK Tools tab of
the SDK Manager.
Run an Android app on the Emulator

• 1. In Android Studio, we need to create an


Android Virtual Device (AVD) that the
emulator can use to install and run your app.
To create a new AVD:-
• 1.1 Open the AVD Manager by clicking Tools >
AVD Manager.
1.2 Click on Create Virtual Device, at the bottom of the
AVD Manager dialog. Then Select Hardware page
appears.
1.3 Select a hardware profile and then click Next. If we
don? t see the hardware profile we want, then we can
create or import a hardware profile. The System
Image page appears.
1.4 Select the system image for the particular API level
and click Next. This leads to open a Verify
Configuration page.

1.5 Change AVD properties if needed, and then


click Finish.
DVM(Dalvik Virtual Machine)

• Dalvik Virtual Machine (DVM) is the custom program


introduced for Android apps. It takes the Java code and
creates an optimized version of it in a file
with .dex(extension) which is known as Dalvik
executable.
• This format allows the apps to run quickly with fewer
resources, i.e. on mobile phones and low-memory,
slower devices.
• This is different from a typical Java Virtual Machine (
JVM), as it optimized especially for Android to run
apps that use less memory and are compatible with the
millions of devices running on various versions.
• Java Source Code
The original development of Android apps is
mostly done using Java programming language
that developers use to write the instructions
your app executes.
• Compilation
We need to convert this textual Java code into
form understandable by computer. This is
commonly referred to as compilation. This Java
bytecode is an executable version of your code.
• Conversion to Dalvik Bytecode
The Java bytecode is transformed into a different
format known as Dalvik byte code. They use a
tool called dx, to do this and make the code run
smoothly on Android devices.
• Dalvik Virtual Machine (DVM)
Last, but not least the Dalvik bytecode is run on
the Dalvik Virtual Machine (DVM). DVM has
the special ability to run the applications on
mobile devices which have limited capabilities
of memory and battery.
Difference Between JVM and DVM

JVM(Java Virtual Machine) DVM(Dalvik Virtual Machine)


Source code files are first of all
compiled into Java bytecode format
Java source code is compiled into Java like JVM. Further, the DEX
bytecode format(.class file) that compiler(dx tool) converts the Java
further translates into machine code. bytecode into Dalvik
bytecode(classes.dex) file that will be
used to create the .apk file.

More information is required to the


Instruction size is larger as it needs to
VM for data loading and
manipulation as well as method encode the source and destination
loading in the stack data structure. register of the VM.
Compiled bytecode size is compact Compiled bytecode size is larger as
because the location of the operand is each instruction needs all implicit
implicitly on the operand stack. operands.

The executable file for the device The executable file for the device
is .jar file. is .apk file.

A single instance of JVM is The device runs multiple DVM


configured with shared processes and instances with a separate process in
memory space in order to run all shared memory space to deploy the
deployed applications. code of each application.

Supports multiple operating systems Support only the Android operation


like Linux, Windows, and Mac OS. system.

You might also like