Implement bluetooth A2dp Sink in Android4.2 (2) -- Port Android5.0 bluetooth protocol stack and android5.0
In Android, the structure of the Bluetooth system is shown in:
In this architecture, the ghost driver is the blue-tooth pick-up panel, which includes th.apk, Framework, and various Bluetooth applications. Among them, the driver in the kernel deals directly with the hardware, which is generally provided by the module vendor. The Protocol is the link between the Bluetooth protocol stack and the framework. The jni interface is used to communicate with the protocol stack implemented by the framework and c implemented by java, it also implements a state machine to control various working states of various profiles. Framwork provides various interfaces for applications. This function is not necessarily accurate, but I personally understand it.
The premise is that the module hardware must support A2DP Sink, so we need to communicate with the vendor before transplantation. We can see that the hardware does not support the Sink function.
Frameworks and frameworks must be simpler. In the process of transplantation, the protocol stack is copied from the original version 5.0. then, some modifications are made in the th.apk and Framework to work with the protocol stack. This is the general idea of porting.