Introduction: Why learn Android Framework

Framwork, as you all know, is a library, not a developer tool. It is a language development software, provides the framework of software development, so that the development of more engineering, simplicity and stability, it is widely used in various fields. Like drop frame monitoring, function instrumentation, slow function detection, ANR monitoring, start monitoring, all need to have a deep understanding of the Framework, in order to know how to do monitoring, using what mechanism to monitor, function insertion where to insert, reflection call reflection of which class which method which attribute……

In addition, the Framework, as the Android Framework layer, provides many APIS for the App to call, but many mechanisms are wrapped by the Framework for the App to use, if you do not know the principle of these mechanisms, it is difficult to optimize on this basis.

Speaking of how familiar I am with the Framework, I believe that the leaders of Alibaba still have a certain say, so the content shared today is the “limited notes” provided by Alibaba’s internal supply, which is really the most incisive and incisive writing of the essence of the Framework. I have to sigh: you deserve to be the technical officer of Alibaba, really convinced!

As for the limited notes of this Framework, due to space limitations, I can only show part of the chapter content and core screenshots in the article. If you need the complete PDF version, you can download it for free on GitHub.

Chapter 1 in-depth analysis of Binder

Section 1 Binder series – Introduction

1. An overview of the

2.Binder

3. Outline

4. Source directory

Section two Preliminary study of Binder Driver

1.Binder driver overview

2. Binder core method

3. The appendix

The third section of Binder Driver again

1. Introduction to Communication with Binder

2.Binder Communication protocol

3. Scene summary

Section 4 Binder starts the ServiceManager

1. An overview of the

2. Start the process

3. Core work

4. To summarize

Section 5 Obtaining the ServiceManager

1. An overview of the

2. Get the ProcessState object

3. Obtain BpBinder objects

4. Obtain BpServiceManager

5. To summarize

Section 6 addService

1. An overview of the

2. ProcessState

3. Service registration

4. Binder Driver

5. ServiceManager

6. Summary

Section 7 getService

**1.** Obtain services

2. Obtain the Media service

3. Summary

Section 8 framework layer analysis

1. An overview of the

2. The initialization

3. Registration services

4. Obtain services

Example 5.

Section 9 How to Use Binder

1. Native layer of Binder

2. The Framework layer of Binder

Section 10 How to Use AIDL

1.AIDL

2. Principle analysis

Section 11 Summary of Binder

Binder interview question 12

Chapter 2 delves into the Handler message mechanism

Section 1 Preheating

1. The original purpose of designing Handler

2. Some methods provided by Handler

3.Handler implementation principle – Theoretical analysis

4.Message source code analysis

The second section of MessageQueue source code analysis

The third section of Looper source code analysis

The fourth section handler source code analysis

The fifth section summarizes the implementation principle of Handler mechanism

Section 6 Handler interview questions

Chapter 3 Dalvik VM process system

Section 1 Android system startup – overview

1. An overview of the

2.init

3.Zygote

4.system_server

5.app

6. Enable log analysis

7. To summarize

Section 2 Init

1. An overview of the

2. Signal processing

3. Rc file syntax

4. Start the service

5. Attribute services

6. Summary

Section 3: Zygote

1. An overview of the

2.Zygote startup process

3. Access the Java layer

4. To summarize

Section four SystemServer part one

Section five SystemServer part two

Chapter 4 analyzes WMS in depth

Chapter 5 PackageMS Startup

Due to space constraints, I can only show part of the chapter content and core screenshots in the article. If you need a complete PDF version, you can download it for free on GitHub.