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

0% found this document useful (0 votes)
7 views4 pages

Mad Unit 2

The document outlines various concepts related to Android development, including definitions of the Dalvik Virtual Machine (DVM) and Android Virtual Devices (AVD), as well as the process of building APK files. It also details the installation steps for Android Studio and the Android SDK, along with an explanation of the Android security model and differences between JVM and DVM. Each section provides specific information and marking schemes for evaluation purposes.

Uploaded by

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

Mad Unit 2

The document outlines various concepts related to Android development, including definitions of the Dalvik Virtual Machine (DVM) and Android Virtual Devices (AVD), as well as the process of building APK files. It also details the installation steps for Android Studio and the Android SDK, along with an explanation of the Android security model and differences between JVM and DVM. Each section provides specific information and marking schemes for evaluation purposes.

Uploaded by

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

SHREE RAMCHANDRA COLLEGE OF ENGINEERING, LONIKAND, PUNE 412216

UNIT 4

Subject Name: Mad Model Answer Subject Code: 22617

Q.No. Answer Marking


Scheme
a Define Dalvik Virtual Machine (DVM). 2M
Ans Dalvik Virtual Machine is a register-based machine that compiles byte code to get dex code (Correct
and that ensures that a device can run multiple instances efficiently definition 2 M)
b Define Android Virtual Devices (AVD). 2M
Ans An Android Virtual Device (AVD) is a configuration that defines the characteristics of an (Define : 2 M
Android phone, tablet, Wear OS, Android TV, or Automotive OS device that you want to ,any valid
simulate in the Android Emulator. The AVD Manager is an interface you can launch from definition
Android Studio that helps you create and manage AVDs. should be
considered)
c State how the APK files are built? 2M
Ans (For each step
generates a single .dex file 1/2 M
which is a platform specific tool.

creates an executable file with extension .apk.


ex files), resources, assets,
certificates, and manifest file.
d Explain Dalvik Virtual Machine and state its importance. 4M
Ans The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for mobile Explain 2 M
devices. Importance 2 M
Dalvik VM is also a virtual machine that is highly optimized for mobile devices.
Thus, it provides all the three things, that are memory management, high performance as
well as battery life.
It is strictly developed for Android mobile phones.

The Dex compiler converts the class files into the .dex file that run on the Dalvik VM.
Multiple class files are converted into one dex file. The javac tool compiles the java source
file into the class file. The dx tool takes all the class files of your application and generates a
single .dex file. It is a platform-specific tool. The Android Assets Packaging Tool (aapt)
handles the packaging process

Prof. Khandre H.D. Shree Ramchandra College of Engineering Page 1


SHREE RAMCHANDRA COLLEGE OF ENGINEERING, LONIKAND, PUNE 412216
UNIT 4
e Describe various installation steps of android studio and its environment. 4M
Ans Step 1: steps 4 mark
Go to Android https://developer.android.com/studio to get the Android Studio executable or
zip file.
Step 2:
● Click on the Download Android Studio Button.
● Click on the “I have read and agree with the above terms and conditions” checkbox
followed by the download button
● Click on the Save file button in the appeared prompt box and the file will start
downloading.
Step 3:
After the downloading has finished, open the file from downloads and will prompt the
following dialog box. Click on next. In the next prompt, it‟ll ask for a path for installation.
Choose a path and hit next.
Step 4:
It will start the installation, and once it is completed, it will be like the image shown below.
Step 5:
Once “Finish” is clicked, it will ask whether the previous settings need to be imported [if the
android studio had been installed earlier], or not. It is better to choose the „Don‟t import
Settings option‟. Click the OK button.
Step 6:
This will start the Android Studio. Meanwhile, it will be finding the available SDK
components.
Step 7:
After it has found the SDK components, it will redirect to the Welcome dialog box. Choose
Standard and click on Next. Now choose the theme, whether the Light theme or the Dark
one. The light one is called the IntelliJ theme whereas the dark theme is called Dracula.
Choose as required. Click on the Next button.
Step 8:
Now it is time to download the SDK components. Click on Finish. Components begin to
download let it complete. 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.
f Explore all steps to install Android studio and SDK 4M
Ans Pre-Installation Check List Android studio
1. Before installing Android SDK, there is need to install Java Development Kit installation 2 M
(JDK). Ensure that JDK is at or above 1.8. SDK installation
2. Uninstall older version(s) of "Android Studio" and "Android SDK", if any. 2M
We need to install two packages:
1. Android Studio (IDE), which is an Integrated Development
Environment (IDE)
2. Android SDK (Software Development Kit) for developing and
running Android apps.
Steps to install Android studio:
Download Android Studio
1. Click Download Android Studio. The Terms and Conditions page with
the Android Studio License Agreement opens.
2. Read the License Agreement.
3. At the bottom of the page, if you agree with the terms and conditions,
select the I have read and agree with the above terms and conditions checkbox.
Prof. Khandre H.D. Shree Ramchandra College of Engineering Page 2
SHREE RAMCHANDRA COLLEGE OF ENGINEERING, LONIKAND, PUNE 412216
UNIT 4
4. Click Download Android Studio to start the download.
5. When prompted, save the file to a location where you can easily locate it,
such as the Downloads folder.
6. Wait for the download to complete.
Install Android Studio
a. Open the folder where you downloaded and saved the Android Studio
installation file.
b. Double-click the downloaded file.
c. If you see a User Account Control dialog about allowing the installation to
make changes to your computer, click Yes to confirm the installation.
d. Click Next to start the installation.
e. Accept the default installation settings for all steps.
2. Click finish when installation is done.
Installing Android SDK
Within Android Studio, you can install the Android SDK as follows:
1. Click Tools > SDK Manager.
2. In the SDK Platforms tab, select Android Tiramisu Preview.
3. In the SDK Tools tab, select Android SDK Build.
4. Click OK to install the SDK.
g Elaborate Android Security Model. 4M
Ans 2 M for
mechanism. explanation , 2
M for
user ID assigned to it, which means the application code runs in isolation explaining
from the code of all other applications. permissions, any
2 permissions
expected
Know the owner of the application is unique.

an application is installed in the phone is assigned a user ID, thus avoiding it


from affecting it other applications by creating a sandbox for it.

user ID are allowed to run in a single process.

compromise the data of the genuine application.


andatory for an application to list all the resources it will Access during
installation. Terms are required of an application, in the installation process
should be user-based or interactive Check with the signature of the
application Declaring and Using Permissions
The purpose of a permission is to protect the privacy of an Android user.
Android apps must request permission to access sensitive user data (such as
contacts and SMS), as well as certain system features (such as camera and
internet). Depending on the feature, the system might grant the permission
automatically or might prompt the user to approve the request.
Permissions are divided into several protection levels. The protection level affects whether
runtime permission requests are required. There are three
protection levels that affect third party apps: normal, signature, and
dangerous permissions.
Normal permissions: Normal permissions cover areas where your app needs
to access data or resources outside the app‟s sandbox, but where there‟s very
little risk to the user‟s privacy or the operation of other apps. For example,
Prof. Khandre H.D. Shree Ramchandra College of Engineering Page 3
SHREE RAMCHANDRA COLLEGE OF ENGINEERING, LONIKAND, PUNE 412216
UNIT 4
permission to set the time zone is a normal permission. If an app declares in
its manifest that it needs a normal permission, the system automatically
grants the app that permission at install time. The system doesn‟t prompt the
user to grant normal permissions, and users cannot revoke these permissions.
Signature permissions: The system grants these app permissions at install
time, but only when the app that attempts to use permission is signed by the
same certificate as the app that defines the permission.
Dangerous permissions: Dangerous permissions cover areas where the app
wants data or resources that involve the user‟s private information, or could
potentially affect the user‟s stored data or the operation of other apps. For
example, the ability to read the user‟s contacts is a dangerous permission. If
an app declares that it needs a dangerous permission, the user must explicitly
grant the permission to the app. Until the user approves the permission, your
app cannot provide functionality that depends on that permission. To use a
dangerous permission, your app must prompt the user to grant permission at
runtime. For more details about how the user is prompted, see Request
prompt for dangerous permission.
h Differentiate between JVM and DVM. (Any four points) 4M
Ans Any 4 points of
differences :1 M
each

Prof. Khandre H.D. Shree Ramchandra College of Engineering Page 4

You might also like