Android Flashcards
What is a Service in Linux?
In Linux a service is just another name for a daemon, which is a client / server application that runs in the background. A service is continuously listening for incoming requests and sends a response based on the request given.
A Linux service is an application (or set of applications) that runs in the background waiting to be used, or carrying out essential tasks. I’ve already mentioned a couple of typical ones (Apache and MySQL). You will generally be unaware of services until you need them. …
What is a Process in Linux?
A process is simply an application or a script which can be running in the foreground or the background.
Processes carry out tasks within the operating system. A program is a set of machine code instructions and data stored in an executable image on disk and is, as such, a passive entity; a process can be thought of as a computer program in action.
What are the four main components of Android apps?
Activities
Services
Content Providers
Broadcast Receivers
A single focused thing a user can do. They are the main building blocks of Android GUI applications.
Activity
A component that runs in the background and has no user interface. Typically used to perform some long-running operation, without blocking the user interface. (like downloading a file or playing music).
Service
What;s the difference between a system service and an application service?
System services, which are part of the OS, are always running.
App services are started and stopped on demand.
Content Providers
An interface to app data, which is typically stored in a database or files.
Accessed via IPC
Mainly used to share data with other apps.
What is a Broadcast Receiver?
An app component that responds to system-wide events call broadcasts.
What is a broadcast?
A system-wide event that can originate from the system of from an app.
System ex. - Announcing changes in network connectivity.
App ex. - Announcing that background data update has completed.
What is Binder?
How does it work?
An IPC mechanism.
Binder manages address space of each process. Acts as a middle-man.
inter-process communication (IPC)
How does Binder prevent privilege escalation?
Binder automatically adds process ID (PID) and user ID of the calling process to the transaction data.
Identity can’t be faked because the kernel provides the PID and UID.
What is an Intent?
Commands with associated data that are delivered to components across process.
Built on top of binder.
What is a contentprovider (component)?
Components that expose a cross-process data management interface.
Built no top of binder.
What is SELinux?
It’s a MAC implementation of the Linux kernel.
Security Enhanced Linux
What does Mandatory Access Control do?
MAC ensures that access to resources conforms to a system-wide set of authorization rules called a policy.