Binder间进程通信的JAVA层接口,主要是通过JNI方法来调用Binder库的C/C++接口
在JAVA层,将Service组件称为JAVA服务,Service组件的代理称为JAVA服务代理。
一、ServiceManager的Java层代理对象(ServiceManagerProxy)的获取过程。
个人感觉JAVA层的ServiceManager的Java服务和Java服务代理的实现结构还是很像的,如下:
Java服务类关系图:
JSC4wvyAJATwhaEaJSC459+AICcELYgRKMUHGELAHJC2IIQjVJw8+fPnzJliu0qAKCACFsQolEKrqWlZdq0abarAIACImxBiEYpuLa2ttbWVttVAEABEbYgRKMAAJAEYQtCNAoAAEkQtiBEowAAkARhC0I0CgAASRC2IESjFNzixYsXL15suwoAKCDCFoRolIJrbm5ubm62XQUAFBBhC0I0SsERtgAgJ4QtCNEoBUfYAoCcELYgRKMUHGELAHJC2IIQjVJwfEEeAHJC2IIQjQIAQBKELQjRKAAAJEHYghCNAgBAEoQtCNEoAAAkQdiCEI1ScK2trW1tbbarAIACImxBiEYpuGnTprW0tNiuAgAKiLAFIRql4AhbAJATwhaEaJSCmzhx4oIFC2xXAQAFRNiCEI1ScGPHjuUfNQWAPBC2IESjFFxLS0t7e7vtKgCggAhbEKJRAABIgrAFIRoFAIAkCFsQolEAAEiCsAUhGgUAgCQIWxCiUQqOL8gDQE4IWxCiUQqOf/oBAHJC2IIQjVJwhC0AyAlhC0I0SsGNHDly2bJltqsAgAIibEGIRim44cOH850tAMgDYQtCNErBXXvttevXr7ddBQAUEGELQjQKAABJELYgRKMAAJAEYQtCNAoAAEkQtiBEowAAslRCEdluK79x+AqOL8gDqDLbqQC5sN1WfuPwFRz/9AOAKuPZXDCc0PQ4fAVXX1+/atUq21UAqCE8mwuGE5oeh6/gdtttt66uLttVAKghPJsLhhOanunwVe+vggGEq9rtAMgEfVswnND0CFuA66p2OwAyQd8WDCc0veiwVbVSAARwDcJH9G3BcELTI2wB7uIahI/o24LhhKZH2ALcxTUIH9G3BcMJTY+wBbiLaxA+8qVvzUXG2gVfdjmZYu9ddRC2AHdxDcJHxehb+S4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xCiUYBQHR0do0aNWrBgQeXCdevWfeQjHzn66KMXLFhQhX/9AYCzCFsQolEAk/b29uHDh7/xxhu9S+bNm3fYYYf9+te//p//+Z/dd9/929/+9quvvmqxQgC28AV5CBG2gAiBL8tPmjSp9+8Q//WvfzU3N3/yk5/8zGc+87Of/eydd96xVyYAwFGELSBa75flw/47xCVLlnz961/v37//+PHj77rrrs2bN1upEwDgIMIWILLzy/Lm/w5x69at999//5FHHtmvX79p06b99re/7enpqWaRAAAHEbYAkZ1flt9tt90k/x3ie++9d+211+6///7Dhg27+OKL//GPf1ShQgCAmwhbgFR7e3sp5v8P8S9/+cv06dOHDBny+c9//oYbbvjggw/yKw9AlfEFeQgRtoAYli9fnmCtHTt2PPXUUyeddFJdXd2kSZMefvjhbdu2ZV4bgCrjn36AEI0CVM+HH354++23jx07duDAgeedd96LL75ouyIAyRG2IESjABasWLFi9uzZe++996c+9amf/OQn//nPf2xXBCA2whaEaBTAphdffPG8884bOHDgl7/85ZaWlg8//NB2RQCkCFsQolEA+7Zt2/bwww9PmjSprq7u5JNPfvrpp7u7u20XBSACX5CHEGELcMgHH3wwZ86cAw88cMiQId///veXLVtmuyIAQFqELcBFb7zxxkUXXbTnnnvuv//+11577fvvv2+7IgBAQoQtwF09PT3PPffc1772tbq6uiOPPPL+++/funWr7aIAAPEQtgAPbNq0ad68eV/5ylf69+9/9tln//GPf7RdEQBAirAF+OS///3vz372s8985jN77bXXZZdd9u9//9t2RUDt4gvyECJsAV569dVXv/3tbw8ePLipqemWW27ZsGGD7YqAmsM//QAhGgXwWFdX12OPPTZlypS+ffsef/zxjz/+eFdXl+2igFpB2IIQjQIUwfr162+++eaDDz549913/853vvPnP//ZdkVA8RG2IESjAIWyfPnySy+99BOf+MTIkSOvuuqqd955x3ZFQGERtiBEowAF1NPT84c//OGss87q37//+PHj77777s2bN9suCigaviAPIcIWUGRbt2697777vvrVr/br1+/0009fvHhxT0+P7aIAoLYQtoCa8N577/3iF78YNWrUsGHDfvSjH7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LN69errr7/+c5/73NChQ3/4wx/+7W9/s10RahRhC0I0CgBf/e1vf/vhD384dOjQz33uc9dff/3q1attV4TaQtiCEI0CwG/d3d2LFi069dRT6+rqjjrqqPnz53d2dtouCjWBsAUhGgVAQWzatOk3v/nNYYcdNmDAgG984xvPP/+87YpQcHxBHkKELQBFs3LlyiuvvPLTn/50Q0PDj3/847feest2RQBqGmELQGEtXbr0ggsuGDRo0Je+9KVbb71148aNtisCUIsIWwAKbvv27Y8++uixxx7bt2/fqVOnPvnkkzt27LBdFIAaQtgCUCvWrVt34403jhkzpr6+/rvf/e5rr71muyIANYGwBaDm/POf/5w5c+bw4cM/+9nPXnPNNatWrbJdEbzEF+QhRNgCUKN6enp+97vfnXHGGf369ZswYcI999yzZcsW20XBJ/zTDxCiUQDUui1bttxzzz0TJkzo16/fmWee+fvf/76np8d2UfAAYQtCNAoA/K933333mmuu+exnPzt8+PBLLrnkn//8p+2K4DTCFoRoFAAIeu211y688ML6+vovfOELN91007p162xXBBcRtiBEowCA3o4dO5544okTTjihb9++xx133KOPPrp9+3bbRcEhfEEeQoQtAIiwYcOGuXPnfvGLXxw8ePAFF1ywdOlS2xUB8AlhCwCk3nrrrcsvv7yhoWGfffa58sorV65cabsiAB4gbAFAbH/605++8Y1vDBgwYNy4cXfeeeemTZtsVwTAXYQtAEios7Nz/vz5Rx11VF1d3Wmnnfbss892d3fbLgqAcwhbAJDW6tWrr7/++gMOOGDo0KEzZsz4+9//brsiVANfkIcQYQsAMvPXv/71Bz/4wR577DF69Ohf/vKXa9assV0RcsQ//QAhGgUAMtbd3f3MM8+ccsopdXV1Rx999IMPPrht2zbbRSF7hC0I0SgAkJeOjo477rjj0EMPHTBgwDnnnPP888/brghZImxBiEYBgNy9/fbbV1xxRWNj44gRI2bNmtXe3m67ImSAsAUhGgUAqufll18+//zzBw0adMghh9x2220bN260XRGS4wvyECJsAUC1bd++/ZFHHpk8eXJdXd2JJ564cOHCHTt22C4KQF4IWwBgzdq1a3/1q18ddNBBH/vYx773ve+9/vrrtisCkD3CFgDY9+abb/7oRz/6+Mc/vt9++/385z9ftWqV7YoAZIawBQCu6OnpWbx48emnn96vX78jjjji3nvv3bp1q+2iAKRF2AIA52zevPnuu+8+/PDD+/fvf9ZZZ/3hD3/o6emxXRSC+II8hAhbAOCud9999+qrr953330/8YlPXHrppcuXL7ddEf4//ukHCNEoAOCBtra2Cy+8cPfddz/44INvvvnm9evX264IhC1I0SgA4I2urq7HH3/8+OOP79u375QpUx577LGuri7bRdUuwhaEaBQA8M+GDRtuueWWpqamwYMHf+tb33rllVdsV1SLCFsQolEAwGP//ve/L7vssr322mufffb56U9/+t///td2RTWEL8hDiLAFAEXwxz/+8eyzz+7fv/9XvvKVefPmbdq0yXZFAP4XYQsAiqOzs/OBBx6YOHFiXV3d1772teeee667u9t2UUCtI2wBQAG9//7711133f7777/nnntedNFFb7zxhu2KgNpF2AKAIlu2bNn3v//9IUOGHHjggXPmzFmzZo3tioCaQ9gCgOLr7u5++umnTz755Lq6umOOOeahhx7atm2b7aK8xxfkIZQ8bJWAGpDhxQa4oKOjo6Wl5ctf/vLAgQPPPffcF154wXZFHuMWASHCFmCS4cUGOOU///nPT37yk0996lN777337NmzV6xYYbsi/3CLgFDasJVhKYBT6HDUiJdeeumb3/zmwIEDx44de/vtt3/44Ye2K/IGtwgIEbYAPTocNWXbtm2tra2TJ0+uq6s76aSTnnrqqR07dtguynXcIiBE2AL06HDUpg8++OCGG274/Oc/P2TIkOnTp//lL3+xXZG7+II8hAhbgB4djhr3j3/84+KLLx42bNioUaN+8YtfvPfee7YrAnxF2AL06HCgXC739PT89re/nTZtWr9+/b761a/ed999W7dutV0U4BnCFqBHhwOVNm/efNddd40fP75///5f//rXlyxZ0tPTY7sowA+ELUCPDge03nnnnauuumrkyJGf/OQnm5ub//Wvf9muCHAdYQvQo8OhSvnPtgEoMNOtI+VNJ/HqfpEfUOFUybZuWILMcYShyvE+DcBzpltHyptO4tU9EtjT6u+4eiIlpxYpcYSho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5OyoWG3THXHLY6x9CAxypUdAUAlSthyzCJOpv5eRkrKEQOlm9CMizZ7qRZ3bxrYTiG6u6oeKxCRVcAULketirnCTwRA/Obh6k5QF09MCDstXyqsGd5oM7Ibcl3M3J3tGdEXcgxVHdHpe4IQFcAUEXeGeyHrcoJM5zNd7GOhjls1ayUR4PHKlR0BQCV62Er7GOV2pTmaHAMd8qwozikUJUAIITp1pHyppN4dcBxdDhU9m7jAFxnunWkvOkkXh1wHB0OAMgEYQvQo8MBAJkgbAF6dDgAIBOELUCPDgcAZIKwBejR4QCATKQNW0CxZXixAQBqE2ELMMnwYgMA1CaeJQAAADkibAEAAOSIsAUAAJAjwhYAAECOCFsAAAA5ImwBAADkiLAFAACQI8IWAABAjghbAAAAOfp/igFLTRqLapgAAAAASUVORK5CYII=" alt="" />
java服务代理的类关系图:
DBAOi6IYbuSQaEAwE7bbbfdvHnzli9f3traWldXN2DAgLPPPpslK8+49zJ46gBY6NFHH91+++17f+zp6WlraxsxYgRLVp5x72Xw1AGw0DHHHHPllVcGj5f/Q43IG7YrGRQKAGzzySef9OnT57PPPpMOBHZhu5JBoQDANldcccWxxx4rHQWsw3Ylg0IBgG3q6+sff/xx6ShgHbYrGRQKAKzyyCOP7LDDDtJRwEZsVzIoFABY5eijj77qqquko4CN2K5kUCgAsEfpa4yq/ykUco7tSgaFAgB7XH755ccdd5x0FLAU25UMCgUA9th2222feOIJ6ShgKbYrGRQKACwxd+7cwYMHS0cBe7FdyaBQAGCJ0aNHT5kyRToK2IvtSgaFAgAbLFu2jK8xQo/tSgaFAgAbTJ48ecyYMdJRwGpsVzIoFADYYJtttpk/f750FLAa25UMCgUA4h5++OEdd9xROgrYju1KBoUCAHFHHXXU1VdfLR0FbMd2JYNCAYCsjz/+uE+fPp9//rl0ILAd25UMCgUAsi677LJf/epX0lHAAWxXMigUAAhas2bNoEGDnnzySelA4AC2KxkUCgAE/ec//9lpp52ko4Ab2K5kUCgAEHTkkUdec8010lHADWxXMigUAEj56KOP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Eu4q6BHNDg4sBF9qYsT5SLuGsoIIr0LQLisTdlpZ9lJCedO5AknX0OkL5FQDz2pqz0s4zkpHMHAJAa1nQAAKBEoQAAAJQoFAAAgBKFAgAAUKJQAAAAShQKAABAiUIBAAAoUSgAAACl/weyYOC4ZN5WYgAAAABJRU5ErkJggg==" alt="" />
ServiceManager代理对象的获取,是通过ServiceManager类的getIsServiceManager实现的,由ServiceManagerNative的asInterface将一个BinderProxy包装成ServiceManagerProxy实现。
而BinderProxy的获取,则是通过JNI调用android_os_BinderInternal_getContextObject得到的。Java层BinderProxy对象由该函数创建,并且保存在全局变量gBinderProxyOffsets中。
二、Java服务接口的定义与解析。
接口使用AIDL语言定义在.aidl文件中,会编译生成对应接口名称的Java文件。其中
I****Service.Stub 描述一个Java服务,需要被继承,以实现具体的业务。
onTransact用来实现进程间通信。
asInterface将一个BinderProxy包装为I****Service.Stub.Proxy。
I****Service.Stub.Proxy 描述一个Java服务代理对象
三、Java服务的启动过程
1、初始化,主要是在其父类Binder中调用init,进而通过android_os_Binder_init,在C++层中创建JavaBBinderHolder,并将其保存在了gBinderOffsets.mObject中。
2、将服务注册到ServiceManager中,调用ServiceManager的addService即可
四、Java服务代理对象的获取
使用ServiceManagerJava服务代理的getService
五、Java服务的调用
通过获得的服务代理,实际上暴露的为服务的接口,调用对应的功能。
综上:
android中Binder通信机制大体分为三层:
Java层封装的Binder: 使用JNI调用,实际上是通过C++层的Binder代理对象向Binder本地对象发出通信请求。
==============================================================
C++层的服务实现: Binder代理对象经由Binder驱动程序向Binder本地对象请求具体的操作,Binder本地对象
也可能会调用Java层的服务来完成功能。
==============================================================
Binder驱动程序,其实就是一个代理进程与服务进程交流的工具,一个传话筒,不负责具体的业务,其实现本质就是
向内核缓冲区写入定义好的命令协议代码和返回协议代码来协调C++和Java层的Server提供服务。