About Android and Android applications

Source: Internet
Author: User
Tags least privilege

 

Android is an operating system designed for mobile terminals. It provides security, process management, memory management, network and driver models based on the Linux 2.6 kernel.

An android application can be installed on a mobile terminal of the Android system to meet users' requirements for certain functions. It must be supported by the Android system. To obtain support from the Android system, it must comply with the game rules of the Android system. The Android system is based on the Linux kernel. To put it bluntly, it relies on Linux to drive terminal devices to complete all underlying operations. Each operation is actually completed by a process in the system.

 

All the applications we can see are generally executable files, but when they run, they enter the system and become one or more processes, the central processor uses these processes in turn to achieve the purpose of application execution. Of course, sub-processes will also be generated in the process. How does the Linux system handle them? It assigns a unique ID to each process or sub-process and treats them as different users. In this way, an application is like a user group. Linux ensures resource access security by granting permissions to each user ID. There are dedicated services to manage the status of these processes. In order to better manage the system memory resources occupied by these processes. What about Android? The same is true.

 

Google explains the relationship between Android and Android applications as follows:

"The Android operating system is a multi-user Linux system, in which each application is a different user. "

"By default, the android system will assign a unique Linux User ID to each application, but this ID is only known to the Linux system, and the application itself does not understand ."

"The Linux system authorizes all files in an application so that these files can only be accessed by Linux users of the application. "

 

Google engineers added many modules and drivers on the basis of the Linux kernel. They did not encapsulate a more unified interface class library in the Linux kernel, so that applications do not have to directly access the Linux kernel.

 

Let's look at the Android app, which is compiled in Java and compiled together with data and resource files into an android package. Then, we installed the. APK.

Once these files are installed, each Android app has its own security sandbox Android runtime. The core function module class libraries of the operating system encapsulated by Dalvik Vm and Java are provided here. It effectively isolates Java applications and the Android system kernel while providing a more secure way to communicate with the kernel.

By default, each application runs in its own Linux Process. Android starts this process when any component in the application needs to run, and shut down those processes that are no longer needed or when the system has to release memory for other applications.

In this way, the android system implements the principle of least privilege. That is to say, by default, each application can only access components that require their work. In this way, it creates a very secure environment where the application cannot access any unauthorized content of the system.

 

This certainly does not meet the needs of application programs. Therefore, the android system provides another way for users to access system resource services and exchange their own data resources.

 

As mentioned before, each application has a Linux User ID. the Linux system authorizes users to access resources based on the user ID. So how can we achieve resource sharing and other system service calls?

 

In the Android system, two applications are allowed to share the same Linux User ID so that they can access their files. To save system resources, two applications that share the same Linux User ID can run in the same Linux Process and share the same VM, of course, they must have the same certificates issued by the system.

 

Our applications can request permission to access terminal data, such as the user's address book, SMS information, pluggable storage (SD card), camera, and Bluetooth. However, these licenses for all applications come from the permissions granted to users when they are installed. We must pay attention to the prompted protocol information when installing the Android Application !!!

 

It is said that Google said that android is Android, and it is no longer Linux. The road is different! Linux is hoping that android will return to Linux.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.