The ClassLoader of the path of the Android master

Source: Internet
Author: User

I don't like the generalities to say the metaphysical truths, and the more I don't like to remember the things that are established. By memory to make up for the thinking of the people, easy to fall into the situation, the end must be trapped by memory, and ultimately the demise of creativity. I hope this master of the road series can record my study of Android, a bit of summary. Thus sinks into the stream, gather for the river, becomes the sea.

The following is a combination of code analysis of ClassLoader this thing.

The Android app is a Dalvik virtual machine that loads files in DEX format. A file loaded in Dex format is intuitively understood to be what ClassLoader does. So, let's start with the application, because the application start-up must be inseparable from the ClassLoader.

We're talking about the launch of the app in the app on the Android Master Road From the application level analysis to the Process.Start method, start an activity call is the process of the Start method, the process of the Start method is called the zygote of some methods. Here, the process is fairly clear. The following process is a bit of a loop, as Android's Java is different from other Java, and every application is a process. In order to realize the ideal of applying a virtual machine "this ideal satisfies the possibility that the application can not be interfered by other applications, just to protect the application data from the other application is not violated and wasted so much effort, can see Google in order to the application of the security cost a lot of effort ah ... Because Google hit on this above the painstaking effort is more, so the follow-up must be Google set security mechanism thoroughly understand ". The security model of the JVM is not suitable for use on mobile phones. Rights Management is a big topic, in fact, there are two kinds of:

1. Implementation protection: Protect the Java code being executed is correct and not violated.

2. Data protection: Protect data from malicious intrusion.

1. First, protection of the implementation period. The security features of class-loaded architectures, class file inspectors, and Java virtual machines (and languages) work together to achieve a common purpose: to maintain the internal integrity of instances of Java virtual machines and the applications that it is running so that they are not violated by malicious or vulnerable code that is downloaded

2. The second type, data protection. This android has its own method of data protection. is the digital signature, similar to QQ landing.

Obviously, the first kind of protection has a great relationship with this classloader. The second protection is more or less related to ClassLoader, because the Dex file inside the APK file is also one of the private data.

And Android's ClassLoader and ordinary Java ClassLoader different. Then you have to analyze from the code, exactly what is classloader, and how does this mysterious god affect the authority problem?

Tired, typing really hard. Rest. Continue tomorrow. From the start of zygote start to look.

The ClassLoader of the path of the Android master

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.