Analysis of the composition principle of Android applications

Source: Internet
Author: User

Android applications are developed in the java language and can only be developed in the java language. Google adopts a comprehensive and overlord management method for Android, which is not the development method of other open-source software, everything is decided by Google, and many places are monopolized.

The outside world is unknown ." I did not think that after just two days, worries become a reality. Greg Kroah-Harman, the maintainer of Linux Kernel, announced that the Android code will be deleted from the Linux kernel code base. This means that the development team of Linux Kernel does not recognize the contribution of Android, and there is a conflict between the two. After the message is published.

The outside world is generally surprised and pity. It's hard to have such a popular open-source mobile phone system. We should work together and develop it together. Why do we need to fight in the dark? What are the contradictions that cause the Linux Kernel team to remove Android code?

Greg Kroah-Harman wrote a detailed article explaining this decision. Let's take a look at what he said and what kind of system Android is. Before that, you 'd better know who Greg Kroah-Harman is. He is the core developer of Linux Kernel and is responsible for the release of the stable software package.

That is to say, every new version of Linux Kernel passes through his hands. In addition, he is responsible for the deployment of hardware drivers. His mobile phone Is HTC G1, Which is used every day. Therefore, he is absolutely qualified to discuss this issue. His views represent the Linux community's views on Android. First, he pointed out that Android is different from other Linux distributions:

This means that, compared with traditional Linux releases such as Ubuntu, Debian, and Redhat, only the underlying structure of the system is the same, and other things are different in Android, especially programmers have completely different programming interfaces. Therefore, all Android applications must be rewritten, and existing Linux programs cannot be transplanted. Therefore, in a strict sense, Android is a brand new system, which is far away from Linux than Mac OS and Linux.

It solves the long-standing headache for mobile phone manufacturers: the industry lacks an open-source Java Virtual Machine and unified application interfaces. Now, programmers only need to write a program once and can use it on various mobile phone hardware platforms ."

This section explains why Android applications must be developed in Java. If this is not done, the program cannot be unrelated to hardware. Slow down. Is that the reason? Traditional Linux systems do not depend on specific hardware! As long as the source code is compiled on different platforms, can the same program still be used in different hardware architectures and different Linux distributions?

Now the problem is: if you are a hardware vendor and want your hardware to run in Linux kernel, you must have a driver. If the program code of the driver is public, the same as the hardware specification is also public. Many vendors do not want to do this, so they provide compiled drivers, but do not provide the original code.

Android focuses on commercial applications. Google uses some methods to bypass this problem. They move the driver to "userspace". That is to say, they turn the driver into a Linux kernel and run it first, instead of running it together, so that they can avoid GPL. Then, open a small door on the kernel side so that the "userspace" program that could not be directly controlled by the hardware can also be touched, in this way, you just need to publish the program code of "opening a small door."

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.