The market is saturated, you have to grasp the key point of breaking Android primary development---Framework

What should be learned to learn Android, many people have different 见解:
  • 一般程序员:Learn Android's UI controls and Android's API usage, etc.
  • 高级程序员:Study Android's FrameWork and the implementation principle of Android

I have just started Android development for a few years. With the development and accumulation of projects, I have become more and more aware of the importance of in-depth learning and understanding Framework核心. In this era of complete saturation of primary Android development, I want to make it out of the crowd 初级开发and study hard. This kind of advanced development knowledge is very important, and Frameworkthis is Android初级开发破局the key point.

When I first stepped into the maintenance and development of the Framework layer** 所需要注意和经历的阶段:**

The first stage: Familiar with the use of various basic tools (eg linux,git,sourceinsight,svn等等) Of course, basic programming knowledge is required.

The second stage: Familiar with the code of the required maintenance module, you can sort out the code process by locating the problem (mainly through log positioning at this time)

The third stage: The third stage is the bottleneck period. During this period, many people will feel good about themselves, gradually form inertia, and no longer pursue more knowledge, 开始躺平。but if they work in this way for five years, the ones that are optimized are often It is this! Because you don't have five years of work experience, you just used the experience you can achieve in one month to work for five years! ! !

The fourth stage: problem solving in pursuit of performance stability

The fifth stage: Android overall architecture, have their own understanding of the pros and cons of program design, and can propose better improvement programs

Points to note when reading the source code

In fact, it is very simple. The most important thing is to read more if you don't understand it, read less if it is not important, and think while reading. Not everything needs to be thought ( 一定要记得做笔记).

`1、高度抽象,构建框架
`2、重要函数,深究细节
`3、善用工具,及时总结

It is said that Framework is difficult to learn, so how to learn Framework? Here I also share with you a time-consuming Android Framework core learning knowledge point.

1.Framework communication ( 需要的直接找作者留【Framework】获取):

Emphasize: [Because of space problems: 文中只放技术点, if you need the full version, you can find the author to get it, leave a message: [Framework]]

Inter-process communication (Binder IPC mechanism)

  • Linux memory binder basics
  • Binder IPC Communication Principle
  • In-depth Binder driver
  • Binder Interview Summary (Ali)

In-process communication (Handler message mechanism)

  • Loop message pump mechanism
  • Message parsing
  • Handler Interview Sharing (Goose Factory)

Practical Enterprise Architecture Communication

  • LiveData event mechanism

2.Framework underlying services

Principle of AMS

  • SystemServer loads AMS
  • AMS data structure
  • AMS data structure
  • Activtiy stack management
  • AMS process for mobile phone startup
  • AMS process in App startup
  • Activtiy management
  • AMS Interview Collection
  • AMS principle in practice

Principle of PMS

  • Packagelnstaller installer process analysis
  • Interpretation of PMS source code
  • T10 level interview PMS summary

WMS mechanism

  • WMS kernel
  • Window creation process
  • Enterprise Toast and Window Architecture
  • Summary of WMS interviews for T10-level positions

3.Framework system resources

ServiceManager principle

  • The init.rc file starts key services
  • service_manager process entry
  • ServiceManager message rotation
  • svclist linked list of ServiceManager service storage
  • ServiceManager Interview Summary

4.Framework event mechanism

event distribution mechanism

  • Three processes of Android event handling
  • Event signal from kernel to IMS process
  • How IMS pushes data to ViewRootimp and transfers it to the upper layer
  • Chain of Responsibility Pattern of Android Handling Down Event
  • Android handles the Move event
  • Handwritten simulation of Android event distribution architecture

5.Framework UI mechanism

UI drawing principle

  • The core concept of setContentView loading data
  • Drawing management of ViewRootlmpl
  • Choreographer Choreographer
  • Measurement mechanism (onMeasure)
  • Placement mechanism (onLayout)
  • T10 level interview UI drawing summary

To emphasize again: [Because of space problems: 文中只放技术点, if you need the full version, you can find the author to get it, leave a message: [Framework]]

Guess you like

Origin blog.csdn.net/m0_64420071/article/details/126938551