0% found this document useful (0 votes)
32 views66 pages

Operating System

The document discusses the Android operating system, including its origins as an open-source mobile OS based on Linux, its major releases over time, and key components of the Android SDK used for app development like the Java Development Kit, Android SDK tools, Android emulator, and Android Virtual Device manager.

Uploaded by

DESTROYER
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)
32 views66 pages

Operating System

The document discusses the Android operating system, including its origins as an open-source mobile OS based on Linux, its major releases over time, and key components of the Android SDK used for app development like the Java Development Kit, Android SDK tools, Android emulator, and Android Virtual Device manager.

Uploaded by

DESTROYER
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/ 66

 Operating System:

• An Operating System (0S) Is system software that manages computer hardware,


software resources, and provides common services for computer programs.
• An operating system acts as an intermediary between the user of a computer and
computer hardware.
• The purpose of an operating system to provide an environment in which a user
can execute programs in a convenient and efficient manner.
• An operating system is a software that manages the computer hardware. The
hardware must provide appropriate mechanisms to ensure the correct operation
of the computer system and to prevent user programs from Interfering with the
proper operation of the system.
• An operating system performs all the basic tasks like managing file, process, and
memory. Thus operating system acts as manager of all the resources, Le.
resource manager. Thus operating system becomes an interface between user and
machine.
The Android Operating System :
• Android is an open-source mobile operating system. It is a variant of Linux hence
providing extensive security, modularity and productivity at the mobile device level.
• Originally, Android was created by a company called Android Inc. Google acquired
this company in 2005. After then, Google made it open source.
• Android has seven major releases each having several minor revisions. In order to
follow these versions easier, developers name them with cookie names. The popular
versions of Android are Kitkat (Android 4.4), Lollipop (Android 5.1) and
Marshmallow (Android 6.0), Nougat (Android 7.0) is also gaining popularity.
• Android is a mobile operating system based on a modified version of the Linux
kernel and other open-source software, designed primarily for touchscreen mobile
devices such as smartphones and tablets.
• Android is developed by a partnership of developers known as the Open Handset
Alliance and commercially sponsored by Google. It was disclosed in November
2007, with the first commercial Android device, the HTC Dream, launched in
September 2008.
• It is free and open-source software. Its source code is Android Open Source Project
(AOSP), primarily licensed under the Apache License.
• However, most Android devices dispatch with additional proprietary software pre-
installed, mainly Google Mobile Services (GMS), including core apps such as
Google Chrome, the digital distribution platform Google Play and the associated
Google Play Services development platform.
 Java Development Kit(JDK):
• The Android SDK was developed using the Java programming
language.
• Similarly, Android applications are also developed using Java. As a
result, the Java Development Kit (JDK) is the first component that
must be installed.
• Android development requires the installation of version 7 or above of
the Standard Edition of the Java Platform Development Kit. Java is
provided in both development (JDK) and runtime (JRE) packages.
• How Java and Android work together?
• The android application source files are written in either Java(*.java files) or 
Kotlin(*.kt files) programming languages.
• Syntax of writing the code in these 2 languages are different but their compilation
process is almost the same.
• Both programming languages generate code that can be compiled to Java byte-
code which is executable on JVM(Java Virtual Machine).
• In an android environment, the process begins with the compilation of Java
source code into the Java class file. The class files have the extension *.class and
it contains the java byte-code(represents Java assembly). This compilation task is
carried out by the javac  compilers for the Java.
• The generated Java class(*.class) file is executable on Java Virtual
Machine(JVM).However, this code format is not suitable for Android devices and thus
Android has its own unique byte-code format known as Dalvik byte-code. 
• Dex compiler translates the Java byte-code into the Dalvik byte-code. 
• During the compilation process, dx command ties up all the .class files as well as .jar
files together and creates a single classes.dex file that is written in Dalvik byte-code
format.
• This file is now executable on the virtual machine in the Android operating system
known as Android Runtime(or Dalvik Virtual Machine(DVM) .
 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.
• Whenever Google releases a new version or update of Android Software, a
corresponding SDK also releases with it. In the updated or new version of SDK,
some more features are included which are not present in the previous version.
• Android SDK consists of some tools which are very essential for the development
of Android Application. These tools provide a smooth flow of the development
process from developing and debugging. Android SDK is compatible with all
operating systems such as Windows, Linux, macOS, etc.
• SDK comes as part of the Android Studio and includes a comprehensive set of
development tools including a debugger, software libraries of prewritten code, a
device emulator to run your Android applications. These tools are used to create
apps that look great and take advantage of the hardware capabilities.
• The Android Virtual Device manager that comes with the Android SDK enables to
test application with any version of Android.
• The Android SDK and Gradle tooling incorporate the needed tools to build, compile,
and package Android applications.
• For debugging Android applications, the Android Debug Bridge (adb) tool that
enables to connect to any virtual or real Android device.
• Here's the list of the important packages in the Android SDK:
I. SDK Tools
II. SDK Platform Tools
III. SDK Platform
IV. System Image
V. SDK Samples
 Android Developers Tool:
• Android SDK tool is a component of SDK tool. It consists of a set of tools which
and other Utilities which are crucial for the development of Android Application.
It contains the complete set of Debugging and Development tools for android.
• The android developer tools are used to 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 -
•  Android SDK Tools
Android SDK tool is an important component of Android SDK. It consists of a
complete set of development and debugging tools. Below are the SDK developer
tools:
•Android SDK Build tool.
•Android Emulator.
•Android SDK Platform-tools.
•Android SDK Tools.
• Android SDK Build-Tools
Android SDK build tools are used for building actual binaries of Android App. The
main functions of Android SDK Build tools are built, debug, run and test Android
applications. The latest version of the Android SDK Build tool is  30.0.3. While
downloading or updating  Android in our System, one must ensure that its latest
version is download in SDK Components.
•  Android Emulator
An Android Emulator is a device that simulates an Android device on your system.
Suppose we want to run our android application that we code. One option is that we
will run this on our Android Mobile by Enabling USB Debugging on our mobile.
Another option is using Android Emulator. In Android Emulator the virtual android
device is shown on our system on which we run the Android application that we
code. 
Thus, it simply means that without needing any physical device Android SDK
component “Android Emulator” provides a virtual device on the System where we
run our Application. The emulator’s come with the configuration for Various android
phones, tablets, Wear OS, and Android TV devices.
 
• Android SDK Platform-tools
Android SDK Platform-tools is helpful when we are working on Project and they will
show the error messages at the same time. It is specifically used for testing. It includes:
Android Debug Bridge (ADB), is a command-line tool that helps to communicate with
the device. It allows us to perform an action such as Installing App and Debugging App
etc.
Fastboot allows you to flash a device with a new system image.
Systrace tools help to collect and inspect timing information. It is very crucial for App
Debugging.
• SDK Platforms
For Each Android Software, one SDK platform is available as shown below:
                                                                                                                                                                                                                                    
Like in this Android 11.0(R) is installed.
These are numbered according to the android version. The new version of the SDK
platform has more features and more compatible but the old version is less
compatible with fewer features. Like in Android 11.0(R) have more compatible and
have more feature but the below versions like Android 10.0(Q),
Android4.4(KitKat) have less feature and is less compatible.
• SDK Update Sites
In SDK Update Sites, some sites are embedded in it which will check for Android
SDK Updates Tools. In this, one must ensure we don’t unclick the button below
because these are checked by default which will check for updates if we will
unclick it then it doesn’t check updates for those. 
 Android Virtual Device:
• An Android Virtual Device (AVD) is an emulator configuration that allows
developers to test the application by simulating the real device capabilities.

• An Android Virtual Device (AVD) is a configuration that defines the


characteristics of an Android phone, tablet, Wear OS, Android TV, or
Automotive OS device that you want to simulate in the Android Emulator.

• . An AVD may be configured to emulate a variety of hardware features including


options such as screen size, memory capacity and the presence or otherwise of
features such as a camera, GPS navigation support or an accelerometer.
• Android Virtual Device(AVD) is a software representation of an actual world
physical android device. In other words, it doesn’t have any physical existence but
behaves like a physical android device itself. It has everything which you think a
physical machine would have.Whether it’s storage, audio, notifications, applications,
etc., all are present in the android virtual device.
• We can create as many AVDs as we need, based on the types of device we want to
test for.
Features of Android Virtual Device(AVD):
• Android Virtual Device brings many features that make it so popular among
developers, gamers, and android users. Let’s see a few of the features of AVD before
proceeding with the setup.
1. It is self-configurable and allows users to pick up any android version of their choice.
2. It provides storage and also allows applications to be installed.
3. This behaves mostly like your actual physical device and provides most of the
functionalities.
4. You can alter the appearance of your android virtual device depending on your
needs.
5. Android Virtual Device is as secure as your physical device.
 Android Emulator:
• An Android emulator or an Android Virtual Device (AVD) is a software that
emulates Android OS and its functionality on your computer. Notably, it creates a
virtual representation of a phone or any other device. It then runs the Android
operating system as if it was running on a physical implementation of that device.
• An Android Emulator is a device that simulates an Android device on your
system. Suppose we want to run our android application that we code. One option
is that we will run this on our Android Mobile by Enabling USB Debugging on
our mobile.
• Another option is using Android Emulator. In Android Emulator the virtual
android device is shown on our system on which we run the Android application
that we code. 
• Thus, it simply means that without needing any physical device Android SDK
component “Android Emulator” provides a virtual device on the System where we
run our Application. The emulator’s come with the configuration for Various android
phones, tablets, Wear OS, and Android TV devices.
• In Android Virtual Emulator all  functions that are feasible on real Android mobile is
works on virtual Device like:
• phone calls, text messages.
• stimulate different network speeds.
• specify the location of a device
• access on google play store and lot’s more.
• But there is one disadvantage of this emulator is that. It is very slow when System’s
PC has less RAM. It works fine when a maximum GB of RAM is present on our
device.
• Android Emulator is used to run, debug and test the android application. If you don't
have the real device, it can be the best way to run, debug and test the application.
• An emulator is an application that supports a virtual device which prototypes,
develops and tests the applications without using a real device.
• It acts as all hardware and software features of device. It cannot make a real phone
call.
• It runs a full Android system stack, down to the kernel level. It includes a set of
preinstalled applications (such as the dialer, messenger) which can be accessed from
our applications.
• Each AVD is an independent device. It has its own storage and data. In each
configuration, an Android platform is specified which is to be run in the emulator
along with the set of hardware options, emulator skin, etc. when emulator is
launched, we specify the AVD configuration that we want to load. As soon as we
launch the emulator with an AVD configuration, it automatically loads the user data
and SD card data from the AVD directory. By default, cache, user data and SD card is
storedin AVD directory. AVD manager manages all the emulators.
 Dalvik Virtual Machine:
• Dalvik Virtual Machine is a Register-Based virtual machine. It was
designed and written by Dan Bornstein with contributions of other
Google engineers as part of the Android mobile phone platform.
• Register-based models are good at optimizing and running on low
memory.
• The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for
mobile devices. It optimizes the virtual machine for memory, battery
life and performance.
• Dalvik Virtual Machine uses its own byte-code and runs “.dex”(Dalvik
Executable File) file.
• Android Dalvik Virtual Machine is very similar to Java Virtual Machine(JVM).
JVM itself is widely used and provides quite a high performance and better memory
management. However, JVM is not compatible with working optimally with low-
powered handheld devices like smartphones, tablets, smartwatches, etc.
Due to this reason, the Android Dalvik Virtual Machine came into existence.
• A virtual machine is a software representation of an actual physical device. It implies
that you don’t have a physical device but have a model in your system. The
representation works quite similarly to how an actual physical device would work.
• Dalvik Virtual Machine is configured to work on low-powered devices optimally.
• Dalvik Virtual Machine provides high-performance features, better memory
management, and battery life for low-powered handheld devices. It was developed
exclusively for android devices and allowed several apps to execute on the virtual
machine.
• Role of Android Dalvik Virtual Machine:
There are several roles which a Dalvik Virtual Machine has to play on an android device.
•Providing better performance and memory management
•Working optimally with any low-powered devices and also optimizing the battery life.
•Converting java class files to .dex file through Dex Compiler which can inturn execute in
the Dalvik Virtual Machines
•Allowing multiple instances of the applications to run at the same time
•Allowing each application to have their instances
•Providing faster execution without affecting the battery life
• Working of Dex Compiler:
• Dex Compiler is a part of the Dalvik Virtual Machine and helps convert the java
class to executable .dex files. We need to understand the whole process of how
the source code is finally converted to a runnable APK file.
• Whenever you write your codes, they are immediately converted to a .class file
using the Java Compiler. After that, the Dex Compiler comes into the picture. The
dex compiler task converts the generated .class file into a .dex file (Dalvik Byte
Code). This .dex file is then converted to the .apk file with the help of AAPT
packaging.
Advantages
•DVM supports the Android operating system only.
•In DVM executable is APK.
•Execution is faster.
•From Android 2.2 SDK Dalvik has it’s own JIT (Just In Time) compiler.
•DVM has been designed so that a device can run multiple instances of the Virtual
Machine effectively.
•Applications are given their own instances.
Disadvantages
•DVM supports only Android Operating System.
•For DVM very few Re-Tools are available.
•Requires more instructions than register machines to implement the same high-level
code.
•App Installation takes more time due to dex.
•More internal storage is required.
 Difference between DVM & JVM:
Steps To Install and Configure Android studio and
SDK:
• 2.6.1 The development environment
• A development environment is a term that refers to having everything you need in
order to develop, set up, and be ready to go in one place.
• Android Studio is an integrated development environment (IDE) that takes care of
all the complexities of compiling our code and linking with the JDK and the
Android API.
• Once we have installed the JDK and Android Studio, we can do everything we
need inside this application.
• Installing the Java Development Kit (JDK):
• The Android SDK was developed using the Java programming language. Similarly,
Android applications are also developed using Java. As a result, the Java Development
Kit (JDK) is the first component that must be installed.
• Android Studio development requires the installation of version 8 of the Standard
Edition of the Java Platform Development Kit. Java is provided in both development
(JDK) and runtime (JRE) packages. For the purposes of Android development, the JDK
must be installed.
• JDK Installation:
• For windows JDK could be obtained from Oracle Corporation's website using the
following URL:
• http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-
2133151.html
• Once downloaded, launch the installation executable and follow the on screen
instructions to complete the installation
1.Click on Next to proceed with the installation.
3. Wait for the wizard to finish the installation process until the Successfully Installed message appears.
Click Close to exit the wizard.
Set Java environment variables to enable program compiling from any directory. To do
so, follow the steps below:
 In the System Properties window, under the Advanced tab, click Environment
Variables…
2. Under the System variables category, select the Path variable and click Edit:
3.Click the New button and enter the path to the Java bin directory:
4.In the Environment Variables window, under the System variables category, click
the New… button to create a new variable.
5.Name the variable as JAVA_HOME.
6. In the variable value field, paste the path to your Java jdk directory and click OK.

 7.Confirm the changes by clicking OK in the Environment Variables and System


properties windows.
 Setting up Android Studio:

• Android Studio is the official IDE (Integrated Development


Environment) for Android app developmentAndroid Studio is the
official IDE (Integrated Development Environment) for Android app
development.
• Android Studio provides many excellent features that enhance
productivity when building Android apps, such as:
• A blended environment where one can develop for all Android devices
• A flexible Gradle-based build system.
• A fast and feature-rich emulator.
System Requirements:
•Microsoft Windows 7/8/10 (32-bit or 64-bit)
•3 GB RAM minimum, 8 GB RAM recommended (plus 1 GB for the Android Emulator) 
•2 GB of available disk space minimum, 4 GB recommended (500 MB for IDE plus 1.5 GB for
Android SDK and emulator system image)
•1280 x 800 minimum screen resolution
•Installation Guide:
1. Visit
https://developer.android.com/studio/install
to get the Android Studio executable or zip file. 
2. Click on the Download Android Studio Button.
3. Click on the “I have read and agree with the above terms and conditions”
checkbox followed by the download button. 
4.Select Android Virtual Device and click on Next >
5.It will show the installation path, default it could be in C:\Program Files\Android\, If you
want to change the installation directory, you can freely use the Browse button and give the
location and click on Next.
6.Click on Install.
7.Actual installation in progress..

After completing installation process click on Next >


8.Tick on Start Android Studio and Click on Finish.

This is how, we can install Android Studio on windows 10, as we tick on Start Android Studio
option, the Android Studio will launch automatically as soon as we click on Finish button.
• This is how, we can install Android Studio on windows 10.
• as we tick on Start Android Studio option, the Android Studio will launch
automatically as soon as we click on Finish button.
• Now Lets move on to Android Studio Setup.
9.Here is the Welcome Screen.

Click on Next.
10. It will ask for the Android Studio installation type. Mostly we can go
with Standard setup, if you have any specific configuration setup then you can select
the Custom option to manual setup. Now choose Standard Setup, and click on Next.
11.It will ask for the UI Theme, by default it would be IntelliJ, then directly you can
click on Next.
12.It will download all necessary components to launch the Android Studio and setting
up the environment. 13. After download and installation click on Finish.
13.The Android Studio has been successfully configured. Now it’s time to launch and
build apps. Click on the Finish button to launch it. 
Step 9: Click on Start a new Android Studio project to build a new app. 
• Installaing Additional Android SDK Package:
• Once your Android Studio project is opened, go to Tools > SDK Manager (in
older versions of Android Studio, this option was Tools > Android > SDK
Manager)
Once you select SDK Manager option, Default Settings screen would be opened
with Android SDK option selected by default, as shown in the below image. Also,
please note that there are 3 main tabs in this screen – SDK Platform, SDK Tools and
SDK Update Sites. We will be checking only the first two tabs – SDK Platform and
SDK Tools
•  In SDK Platform tab, check that the latest version of Android is installed. Even if it
shows Update available, it means that the version is installed. It’s just that a new update
is also available.
• If you are working on real android devices then it doesn’t matter if your device’s OS
version doesn’t match with the OS version installed in Android SDK. For example, in the
below screenshot Android 7.1.1 is shown as installed, but you can use your real device
even if it runs on any other version, say Android 6.0.

• If you want to create an emulator on Android 5.1, then you need to install Android 5.1
from this Android SDK screen. If you intend to use real device, leave this screen as it is.
But if you want to use some emulator, then select the Android version you want to install
on that emulator.
• Click on SDK Tools tab. Verify that the components highlighted in the red boxes in the
below image are already installed.
• If all the components that are marked with red box in the above image are installed or in
Update Available status, then you can click on OK button to close this screen. If any of
these components is not installed, then you can click on the checkbox against that
component and then click on Apply button to install the component.
•  You now have all the necessary SDK tools and platforms installed on your machine.
You can now close Android Studio.
• Installation of Emulator:
1. Click ” Tools —> Device Manager ” in the top menu bar. Or click the Device
Manager icon directly in the android studio top toolbar.

2. Then the Devices Manager window will pop up. There are 2 tabs ( Virtual, Physical )
on the window top area.

3. Click the Virtual tab, if there do not have any existing AVD in the list, click
the Create device button to create one.

4. When you click Create device button, the Select Hardware window will pop up.


Choose device types such as TV, Phone, WearOS, Tablet, Automotive. Also choose the
virtual device’s brand, screen size, resolution, etc.
5. 5.If all the existing virtual devices do not fit your needs, click New Hardware
Profile or Import Hardware Profiles button to add your customized virtual
devices as you need. For normal use, choosing an existing one is enough.
6. Click the Next button, then the System Image window will be shown. This
window list various versions of android OS. Click the Download link to download
and install the OS image that you want to run.
7. Click the Next button, it will go to AVD Verify Configuration window. Click
the Show Advanced Settings button to see detailed settings data for this virtual
device.
8. Click the Finish button and wait for some time, the android virtual device will be
created completely.
9. To start it, click the green triangle button in the AVD list Actions column. To edit
it’s settings, click the pencil button.
10. When the AVD is started, the device simulator will be shown on the screen. This
means the AVD configuration is successful.

You might also like