Android execution mechanism The comparison between JNI, Dalvik, and art. Android L Change the execution mechanism.

Source: Internet
Author: User

Android l uses the art execution environment by default. Fully compatible with 64-bit mobile processors. Google says it will be twice times more powerful than the previous Dalvik mode, but it will take up a lot of other memory space. Android has three modes of execution: JNI, Dalvik, ART. Dalvik is obviously the slowest, the total JNI pattern is the fastest but the development is difficult, art is in between. And it doesn't affect the existing development model, so Google chose art. Our technical project Master has made a technical interpretation of this:

1)JNI: In the development process, the compiler is used to compile the machine code directly into the C/D + + language. You can take advantage of system performance when executing, which is the fastest. Both the iOS object C and the Android NDK are the same pattern.

2)Dalvik: The Android L system before all the Android version number of the execution method, using the byte code. At the time of execution, the execution becomes machine code that can be recognized by the machine. The process is relatively slow.

3)ART: The new execution environment launched by Android 4.4, using the Dex2oat tool to convert DEX files directly to machine code files when the app is installed, executes in machine code mode, and can take full advantage of system performance; The improved memory recycling mechanism makes the memory recovery rate in art execution mode only 50% in Dalvik execution mode. You can also increase the system execution speed.


Although the speed of execution has increased. But art also has its drawbacks:

1) The app installation process will be slow;

2) The app takes up more storage space, and the system is more easy to have a lack of system space.

Google this year to the Android ecosystem security mentioned in a very important location, but the Android L system still has some congenital defects:

1) Malware and viruses continue to grow

The Android system has been plagued by a variety of malicious software since its inception. With the various types of operating system ROM preinstalled built-in and application market audit lax, and so on, the Android platform malware and virus number showed a straight upward trend. We started to focus on the malicious behavior of software on Android 5 years ago. Built the cloud of app behavior. Analyze the behavior of all kinds of apps in a static and dynamic manner.

From the monitoring data of CM security, a total of more than 4.5 million malicious samples were found. Contains malicious software and viruses. In the first half of 2014, the growth trend was over 150%. The security Battle of the Android platform is a protracted war.

2) system and third-party software vulnerability only Google patches is not enough

The Android L system adds googleplay support for system patches, but not all of the vulnerabilities can be patched through googleplay because of the fragmented distribution of the Android system version number and the various custom system ROMs. And for third-party software executed on the Android system, there are also a number of vulnerability risks (such as WhatsApp privacy leak vulnerability, Adobe Reader webview Arbitrary code execution Vulnerability, etc.), the vulnerability of these vulnerabilities, tightly googleplay patch mechanism, is unavoidable or completely patched, the risk of Android vulnerabilities remains grim.

3) The security of mobile phone theft is increasingly important

The US legislation has boosted smartphones ' support for anti-theft, and this feature has been enhanced in the Android L system to completely prevent two scalping or information theft after a phone theft. According to the U.S. Consumer report (Consumer Reports) data. More than 3 million smartphones were stolen in the United States in 2013, far exceeding 2012 years in 1.6 million.

4) The educational time of the privacy protection mechanism is based on the app behavior Cloud Analysis of the CM security lab, with approximately 200,000 applications (about 4.4%) Will ask users for unnecessary privacy rights, such as text messages, call log read and write permissions, user location data permissions. These apps secretly get the user's privacy in the background, causing the user's daily whereabouts to be exposed.

The Android l system provides a mechanism to adjust app permissions to avoid the risk of user privacy breaches. For ordinary users of the most popular face. Learning how to do the underlying settings to manage app permissions also requires a certain education cycle.

This article is from the network. If there is a violation. Please prompt to delete

Android execution mechanism The comparison between JNI, Dalvik, and art. Android L Change the execution mechanism.

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.