当前位置:网站首页>2022 | framework for Android interview -- Analysis of the core principles of binder, handler, WMS and AMS!

2022 | framework for Android interview -- Analysis of the core principles of binder, handler, WMS and AMS!

2022-06-11 11:27:00 Little fish learning Android

Usually as a Android APP developer , We don't care Android Source code implementation of , But as the Android More and more developers , Companies are screening Android As a programmer, he is more and more interested in a programmer for Android Understanding and thinking at the bottom , The bottom here is mainly Android Framewok How each component works in .

Here's a share of 《Android Framework Uncover secrets of development 》, thorough Android Exploration of underlying principles . The content includes : System startup process analysis 、Binder analysis 、Handler analysis 、AMS analysis 、WMS analysis 、PKMS Android10.0 Source code interpretation .

Each chapter will be about a Framework Analyze the knowledge points in detail , It also includes the detailed analysis of relevant interview questions . Help everyone consolidate Framework Review the common interview questions of knowledge points at the same time .( Free collection at the end of the document ~)

Chapter one System startup process analysis

Section 1 Android Launch overview
In the second quarter init.rc analysis
In the third quarter Zygote
The fourth quarter, Interview questions

Chapter two Binder analysis

Section 1 Macro understanding Binder
In the second quarter binder Of jni Methods registration
In the third quarter binder drive
The fourth quarter, data structure
Section 5 start-up service_manager
Section 6 obtain service_manager
Section 7 addService technological process
Section 8 Binder Full analysis of interview questions

The third chapter Handler analysis

Section 1 Source code analysis
In the second quarter Difficult questions
In the third quarter Handler Often ask interview questions

Chapter four AMS analysis

Section 1 introduction
In the second quarter Android framework
In the third quarter communication mode
The fourth quarter, System startup series
Section 5 AMS
Section 6 AMS Analysis of interview questions

The fifth chapter WMS analysis

Section 1 Activity And Window Relevant concepts
In the second quarter Calculation Activity Process analysis of window size
In the third quarter Analysis of the organization of the window
The fourth quarter, Management analysis of input method window
Section 5 Management analysis of wallpaper window
Section 6 Calculation window Z Process analysis of axis position
Section 7 Show Activity Process analysis of component startup window
Section 8 Switch Activity Process analysis of window
Section 9 Analysis of the principle of displaying window animation

Chapter six PKMS Android10.0 Source code interpretation

Section 1 Preface PKMS What is it? ?
In the second quarter PKMS Overview information
In the third quarter PKMS Role location
The fourth quarter, PKMS Start process analysis
Section 5 APK Scan
Section 7 PMS Permission scanning
Section 8 PackageManagerService Big comprehensive notes

need 《Android Framework Uncover secrets of development 》、 Android Framework Interview questions ( With answer analysis ) Friends of information , You can click here to get... For free !

Framework Relevant interview questions

The system starts

  • android System startup process
  • SystemServer,ServiceManager,SystemServiceManager The relationship between
  • Why don't you leave it to SystemServer To do it , And specially designed one Zygote
  • Zygote Of IPC Why the communication mechanism is used socket Instead of using binder

Binder

  • Android The relationship between processes and threads in , difference
  • Why is it necessary to IPC, What problems may occur with multi process communication
  • Android in IPC There are several ways 、 Advantages and disadvantages of various ways
  • Why add Binder As the main IPC The way
  • What is? Binder
  • Binder Principle ,Binder Driver How to make a copy in kernel space ?
  • Use Binder The specific process of data transmission
  • Binder In the frame ServiceManager The role of
  • What is? AIDL
  • AIDL Steps used
  • AIDL What data types are supported
  • AIDL The key class of , Methods and workflow
  • How to optimize the use of multiple modules AIDL The situation of
  • Use Binder The maximum data transmission limit is , What problems will be caused when it is full
  • Binder What are the important steps in the driver loading process
  • System services and bindService The difference between started Services
  • Activity Of bindService technological process
  • Not through AIDL, Manual coding to achieve Binder Communication for

Handler

  • Handler Implementation principle of
  • Whether the sub thread can directly new One Handler, Why can the main thread Main thread Looper First call loop Method , When , What kind of
  • 3.Handler Causes of memory leakage and its solutions
  • 4. There can be several threads Handler, How many? Looper, How many? MessageQueue object
  • 5.Message How objects are created & difference ?Message.obtain() How to maintain the message pool ?
  • Handler What are the ways to send messages
  • Handler Of post And sendMessage The differences and application scenarios
  • handler postDealy What happened to the message queue after , Hypothesis first postDelay 10s, Again postDelay 1s, How to deal with this 2 Bar message
  • MessageQueue What is the data structure
  • Handler How to do one thread corresponds to one Looper, How to ensure that there is only one MessageQueue,ThreadLocal stay Handler The role of the mechanism
  • HandlerThread What is it? & benefits & principle & Use scenarios
  • IdleHandler And its usage scenarios
  • The message barrier , Synchronous barrier mechanism
  • Whether the child thread can update UI
  • Why? Android The system does not recommend child thread access UI
  • Android Why does the main thread not because Looper.loop() The loop is stuck ,MessageQueue#next When there is no message, it will block , How to restore ?
  • Handler In the message mechanism , One looper How to distinguish multiple Handler Of , When Activity There are many. Handler When , How to distinguish the current message from which Handler Handle , Handle message How do you know where you're going when you're callback To deal with the
  • Looper.quit/quitSafely The difference between
  • adopt Handler How to switch threads
  • Handler How to communicate with Looper The associated
  • Looper How to communicate with Thread The associated
  • Looper.loop() Source code
  • MessageQueue Of enqueueMessage() Method to synchronize threads
  • MessageQueue Of next() The internal principle of the method
  • Can I use MainLooper To create Handler,Looper and Handler Whether it must be in a thread
  • ANR and Handler The connection of

WMS

  • What is? WMS
  • WMS How to manage Window Of
  • IWindowSession What is it? ,WindowSession What is the creation process of
  • WindowToken What is it?
  • WindowState What is it?
  • Android Windows are roughly divided into several types ? What is the principle of grouping
  • Dialog Of Context Can only be Activity Of Context, It can't be Application Of Context
  • App How the application works with SurfaceFlinger communication ,View How to transfer data to SurfaceFlinger Of
  • What is the specific implementation of shared memory
  • relayout How to SurfaceFlinger apply Surface
  • What is? Surface

AMS

  • ActivityManagerService What is it? ? When was it initialized ? What's the role ?
  • ActivityThread What is it? ?ApplicationThread What is it? ? Their differences
  • Instrumentation What is it? ? and ActivityThread What's the relationship ?
  • ActivityManagerService and zygote How process communication is implemented
  • ActivityRecord ProcessRecord
  • ActivityManager ,ActivityManagerProxy The relationship between
  • Simplified version of handwriting AMS

Limited article space , need 《Android Framework Uncover secrets of development 》、 Android Framework Interview questions ( With answer analysis ) Friends of information , You can click here to get... For free !

原网站

版权声明
本文为[Little fish learning Android]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203012157095781.html