Android HIDL lshal

https://source.android.google.cn/devices/architecture/vintf/resources?hl=zh-cn

 

LSHAL
LSHAL 是一种设备端工具,可以列出向 hwservicemanager 注册的所有 HAL 以及设备上所有可用的直通实现(例如 [email protected])。它还可以根据该列表生成设备清单文件:

adb shell su 0 /system/bin/lshal –init-vintf

 

 

130|rk3399pro_firefly_aiojd4:/ # lshal
All binderized services (registered services through hwservicemanager)
Interface                                                                               Thread Use      Server  Clients
[email protected]::IDisplayService/default                          0/1             279     237
[email protected]::ISchedulingPolicyService/default               0/4             577     237
[email protected]::ISensorManager/default                            0/4             577     237
[email protected]::IEffectsFactory/default                              0/3             261     388 237
[email protected]::IDevicesFactory/default                                     0/3             261     388 237
[email protected]::IBluetoothHci/default                                   0/2             262     237
[email protected]::ICameraProvider/legacy/0                          0/3             263     389 237
[email protected]::IMediaCasService/default                                      0/2             264     237
[email protected]::ISurfaceFlingerConfigs/default                        0/2             265     718 1200 739 944 577 279 237
[email protected]::ICryptoFactory/default                                        0/2             266     237
[email protected]::ICryptoFactory/widevine                                       0/2             267     237
[email protected]::IDrmFactory/default                                           0/2             266     237
[email protected]::IDrmFactory/widevine                                          0/2             267     237
[email protected]::IGnss/default                                                0/1             259     577 237
[email protected]::IAllocator/default                             0/4             269     263 279 237
[email protected]::IComposer/default                               0/4             270     279 237
[email protected]::IKeymasterDevice/default                                0/1             250     393 237
[email protected]::ILight/default                                              0/1             271     577 237
[email protected]::IOmx/default                                            0/5             402     237
[email protected]::IOmxStore/default                                       0/5             402     237
[email protected]::IDevice/armnn                                      0/1             272     237
[email protected]::IDevice/ovx                                        0/2             273     237
[email protected]::IPower/default                                              0/1             274     577 237
[email protected]::ISensors/default                                          1/2             275     577 237
[email protected]::ISoundTriggerHw/default                              0/3             261     388 237
[email protected]::IWifi/default                                                0/1             276     577 237
[email protected]::IWifi/default                                                0/1             276     577 237
[email protected]::IAllocator/ashmem                                           0/1             260     263 237
[email protected]::IBase/armnn                                                      0/1             272     237
[email protected]::IBase/ashmem                                                     0/1             260     263 237
[email protected]::IBase/default                                                    0/4             577     237
[email protected]::IBase/legacy/0                                                   0/3             263     389 237
[email protected]::IBase/ovx                                                        0/2             273     237
[email protected]::IBase/widevine                                                   0/2             267     237
[email protected]::IServiceManager/default                                       1/1             237     577
[email protected]::IServiceManager/default                                       1/1             237     577
[email protected]::ITokenManager/default                                           1/1             237  
[email protected]::INetd/default                                              0/1             398     237
[email protected]::IKeystore/default                                     0/1             393     237

All interfaces that getService() has ever return as a passthrough interface;
PIDs / processes shown below might be inaccurate because the process
might have relinquished the interface or might have died.
The Server / Server CMD column can be ignored.
The Clients / Clients CMD column shows all process that have ever dlopen'ed 
the library and successfully fetched the passthrough implementation.
Interface                                                                               Thread Use      Server  Clients
[email protected]::IEffectsFactory/default                              N/A             261     261
[email protected]::IDevicesFactory/default                                     N/A             261     261
[email protected]::IBluetoothHci/default                                   N/A             262     262
[email protected]::ICameraProvider/legacy/0                          N/A             263     263
[email protected]::ICryptoFactory/default                                        N/A             266     266
[email protected]::IDrmFactory/default                                           N/A             266     266
[email protected]::IGnss/default                                                N/A             259     259
[email protected]::IAllocator/default                             N/A             269     269
[email protected]::IComposer/default                               N/A             270     270
[email protected]::IMapper/default                                   N/A             N/A     263 270 279 577 718 739 944 1200
[email protected]::IKeymasterDevice/default                                N/A             250     250
[email protected]::ILight/default                                              N/A             271     271
[email protected]::IPower/default                                              N/A             274     274
[email protected]::ISensors/default                                          N/A             275     275
[email protected]::ISoundTriggerHw/default                              N/A             261     261
[email protected]::IMapper/ashmem                                                 N/A             N/A     397 402 577 739

All available passthrough implementations (all -impl.so files)
Interface                                                                               Thread Use      Server  Clients
[email protected]::I*/* (/vendor/lib/hw/)                               N/A             N/A     261
[email protected]::I*/* (/vendor/lib64/hw/)                             N/A             N/A  
[email protected]::I*/* (/vendor/lib/hw/)                                      N/A             N/A     261
[email protected]::I*/* (/vendor/lib64/hw/)                                    N/A             N/A  
[email protected]::I*/* (/vendor/lib/hw/)                                  N/A             N/A  
[email protected]::I*/* (/vendor/lib64/hw/)                                N/A             N/A     262
[email protected]::I*/* (/vendor/lib/hw/)                            N/A             N/A     263
[email protected]::I*/* (/vendor/lib64/hw/)                          N/A             N/A  
[email protected]::I*/* (/vendor/lib/hw/)                                        N/A             N/A     266
[email protected]::I*/* (/vendor/lib/hw/)                                       N/A             N/A  
[email protected]::I*/* (/vendor/lib64/hw/)                                     N/A             N/A     259
[email protected]::I*/* (/vendor/lib/hw/)                         N/A             N/A  
[email protected]::I*/* (/vendor/lib64/hw/)                       N/A             N/A     269
[email protected]::I*/* (/vendor/lib/hw/)                          N/A             N/A  
[email protected]::I*/* (/vendor/lib64/hw/)                        N/A             N/A     270
[email protected]::I*/* (/vendor/lib/hw/)                            N/A             N/A     263 387
[email protected]::I*/* (/vendor/lib64/hw/)                          N/A             N/A     270 279 386 577 718 739 930 944 1162 1176 1200 1216 1255 1289 1323 1341 1364 1382
[email protected]::I*/* (/vendor/lib/hw/)                                  N/A             N/A  
[email protected]::I*/* (/vendor/lib64/hw/)                                N/A             N/A     250
[email protected]::I*/* (/vendor/lib/hw/)                                      N/A             N/A  
[email protected]::I*/* (/vendor/lib64/hw/)                                    N/A             N/A     271
[email protected]::I*/* (/vendor/lib/hw/)                                      N/A             N/A  
[email protected]::I*/* (/vendor/lib64/hw/)                                    N/A             N/A     274
[email protected]::I*/* (/vendor/lib/hw/)                                    N/A             N/A  
[email protected]::I*/* (/vendor/lib64/hw/)                                  N/A             N/A     275
[email protected]::I*/* (/vendor/lib/hw/)                               N/A             N/A     261
[email protected]::I*/* (/system/lib/hw/)                                         N/A             N/A     397 402
[email protected]::I*/* (/system/lib64/hw/)                                       N/A             N/A     577 739

rk3399pro_firefly_aiojd4:/ # 
rk3399pro_firefly_aiojd4:/ # 

 

 

 

 

130|rk3399pro_firefly_aiojd4:/ # /system/bin/lshal --init-vintf


   
        android.hardware.audio
        hwbinder
        2.0
       
            IDevicesFactory
            default
       

   

   
        android.hardware.audio.effect
        hwbinder
        2.0
       
            IEffectsFactory
            default
       

   

   
        android.hardware.bluetooth
        hwbinder
        1.0
       
            IBluetoothHci
            default
       

   

   
        android.hardware.camera.provider
        hwbinder
        2.4
       
            ICameraProvider
            legacy/0
       

   

   
        android.hardware.cas
        hwbinder
        1.0
       
            IMediaCasService
            default
       

   

   
        android.hardware.configstore
        hwbinder
        1.0
       
            ISurfaceFlingerConfigs
            default
       

   

   
        android.hardware.drm
        hwbinder
        1.0
       
            ICryptoFactory
            default
            widevine
       

       
            IDrmFactory
            default
            widevine
       

   

   
        android.hardware.gnss
        hwbinder
        1.0
       
            IGnss
            default
       

   

   
        android.hardware.graphics.allocator
        hwbinder
        2.0
       
            IAllocator
            default
       

   

   
        android.hardware.graphics.composer
        hwbinder
        2.1
       
            IComposer
            default
       

   

   
        android.hardware.graphics.mapper
        passthrough
        2.0
       
            IMapper
            default
       

   

   
        android.hardware.keymaster
        hwbinder
        3.0
       
            IKeymasterDevice
            default
       

   

   
        android.hardware.light
        hwbinder
        2.0
       
            ILight
            default
       

   

   
        android.hardware.media.omx
        hwbinder
        1.0
       
            IOmx
            default
       

       
            IOmxStore
            default
       

   

   
        android.hardware.neuralnetworks
        hwbinder
        1.0
       
            IDevice
            armnn
            ovx
       

   

   
        android.hardware.power
        hwbinder
        1.0
       
            IPower
            default
       

   

   
        android.hardware.sensors
        hwbinder
        1.0
       
            ISensors
            default
       

   

   
        android.hardware.soundtrigger
        hwbinder
        2.0
       
            ISoundTriggerHw
            default
       

   

   
        android.hardware.wifi
        hwbinder
        1.1
       
            IWifi
            default
       

   

   
        0.0
   


rk3399pro_firefly_aiojd4:/ # 
rk3399pro_firefly_aiojd4:/ # 
rk3399pro_firefly_aiojd4:/ # 

 

 

 

 

 

 

 

https://devarea.com/android-hidl-and-project-treble/#.XTWcS_mAShE

 

编写客户端要使用该服务,我们将编写一个简单的客户端应用程序 通常,它将成为Google编写的Android框架的一部分。 例如,如果通用框架想要访问振动器服务:在文件框架/ base / services / core / jni / com_android_server_VibratorService.cpp中

static sp mHal;
 
...
 
mHal = IVibrator::getService();
...
Status retStatus = mHal->on(timeout_ms);
...
Status retStatus = mHal->off();

 

 

 

 

 

 

你可能感兴趣的:(Android,HIDL)