Android-Binder Mechanism-binder framework Summary

Source: Internet
Author: User

 

The following articlesArticleIs a more in-depth analysis of the binder mechanism.

Directory

 

1.Android-Binder Mechanism-servicemanager

2. Android-Binder Mechanism-General Service Registration

3. Android-Binder Mechanism-get common service

4. Android-Binder Mechanism-interaction between client and common service

5. Android-Binder Mechanism-binder framework Summary

6. Android-Binder Mechanism-processstate and ipcthreadstate

7. Android-Binder Mechanism-driver

Android-Binder Mechanism-binder framework Summary

 

UML

Description

1. Take the vertical line of ixxx in the middle as the standard, and the client processes on the left. Their names are similar to BP *** and server processes on the right. Their names are similar to bn ***;
2. take a horizontal dotted line in the middle as the boundary line. The preceding line executes specific services, such as addservcie, getservice, and startpreview. They are all common services and data interaction is executed below, it means that the above business data is packaged into the data packet structure defined by the binder, and then sent or received through the binder driver;
3. in the first article, servicemanager is not built based on the BN *** class, but the version I used is not built like this. servicemanager can also be built using bn, built with BP *** and BN ***, letProgramReadingCodeIt is easier and the code structure is more concise, so it is basically done through BP *** and BN;
4. both bn *** and BP *** inherit two base classes: ixxx and bbinder (or bprefbase ), in fact, it is also explained that bpxxx and bnxxx both need to complete the tasks at the business layer and also need to execute the corresponding tasks of data transmission;
5. ipcthreadstate is a role that really deals with drivers. A process can have several;
6. The processstate task is very simple. One is to open the binder device for ipcthreadstate, and the other is to get servicemanager;
7. The client must have at least two servers: servicemanager and xxxservice;

Through this figure, have you found many rules for complicated binder;

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.