Lecture 1: Intro to Android Architecture Flashcards

1
Q

What are the layers in the Android Architecture?

A
  • System Apps
  • Java API Framework
  • Native C/C++ Libraries
  • Android Runtime
  • Hardware Abstraction Layer (HAL)
  • Linux Kernel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the linux kernel layer responsible for?

A

For low level management of system resources

  • Starting/stopping background processes
  • Managing read/write operations on storage and memory
  • Initializing hardware interfaces
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the hardware abstraction layer responsible for?

A

Abstract the hardware of the system and bridging the gap between the software and the underlying hardware.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

HAL provides a standardized API-like interface for interacting with ___, meaning you dont have to ___

A
  • hardware drivers
  • manually manage drivers for your application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the Android RunTime layer responsible for?

A

For taking bytecode in the form of .dex files included in app packages and complies them into native machine code supported by the system processor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is ‘Ahead of Time’ compilation and what layer makes use of it?

A

Used by Android Runtime

Converts entire applications to machine code prior to use, allowing for faster execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the older runtime and how does it function?

A

The older runtime Dalvid used ‘Just-in-Time’ compilation to compile apps as they were being executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What languages do ART and Davlik run on?

A

native C/C++ libraries that have been integrated into the Android system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the process of taking Java code and turning it into a functioning Android application?

A
  • Java compiler takes the java code and compiles it into Java bytecode
  • Translate the Java bytecode into a dex file
  • dex bytecode is packaged into an APK file for distribution to users
  • ART precompiles the dex bytecode into native machine assembly that runs the application on the specific hardware of the user’s phone
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are .dex files?

A

A special form of bytecode designed for the Android system created by translating existing Java bytecode or built directly from the original Java code with a dedicated compiler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the advantage of .dex files?

A

Designed to be more space efficient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the benefits of androids system of compilation and execution?

A
  • Code can be distributed in general-purpose APKs that all users can install or use
  • Performance is better than it would be if the native Java virtual machine is used
  • Code can be written in a high-level language without needing to know about the users specific hardware or android version
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the Java API layer responsible for?

A

Various tasks such as
- Interfacing with hardware
- UI
- Multi tasking (background, foreground tasks)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly