I'm running into a similar issue trying to get sensors to work on a htc_dream build (the Dev phone, "trout") of a recently updated Android distribution...
It looks like the error is being generated by a path built in 'mydroid/ hardware/libhardware/hardware.c', right here: mydroid/hardware/libhardware/hardware.c:152 hw_get_module() snprintf(path, sizeof(path), "%s/%s.%s.so", HAL_LIBRARY_PATH, id, variant); ... with this defined earlier in the file: mydroid/hardware/libhardware/hardware.c:33 #define HAL_LIBRARY_PATH "/system/lib/hw" Running logcat while the phone boots gives these errors: ... W( 61) load: module=/system/lib/hw/copybit.trout.so error=Cannot find library (HAL) ... W( 61) load: module=/system/lib/hw/overlay.trout.so error=Cannot find library (HAL) ... W( 61) load: module=/system/lib/hw/sensors.trout.so error=Cannot find library (HAL) ... I inserted some debugging lines in a couple of places, then tried to run an APK which checks for available sensors, which spit this out: D( 295) hw_get_module: module=sensors (HAL) D( 295) linker: loading /system/lib/hw/sensors.trout.so () W( 295) load: module=/system/lib/hw/sensors.trout.so error=Cannot find library (HAL) D( 295) hal_module_info_get: X id=sensors hmi=0x0 status=-22 (HAL) D( 295) found sensor: null, handle=0 (SensorManager) So, even though the sensors physically exist, any applications see NULL: no sensors available. Looking earlier in the logs, it looks like something is trying to add sensors using the same missing library: I( 61) New device: path=/dev/input/event4 name=compass id=0x10000 (of 0x1) index=1 fd=45 classes=0x0 (EventHub) D( 61) hw_get_module: module=sensors (HAL) D( 61) linker: loading /system/lib/hw/sensors.trout.so () W( 61) load: module=/system/lib/hw/sensors.trout.so error=Cannot find library (HAL) D( 61) hal_module_info_get: X id=sensors hmi=0x0 status=-22 (HAL) D( 61) found sensor: null, handle=0 (SensorManager) ... The directory '/system/lib/hw' doesn't exist, nor do any "*.trout.so" files. Are these libraries supposed to be there? How should they be generated? On Feb 3, 5:47 pm, sal de la tierra <salan...@gmail.com> wrote: > I am looking to fill in the sensor_default for the HAL layer. I have > several different kernel drivers for different sensor devices > (accelerometer, magnetometer, proximity, etc) and I am trying to get > them all to register. When I have done the build and try to invoke the > sensor manager, I get the following messages in the logcat: > > E/HAL ( 298): load: module=/system/lib/hw/sensors.default.so > error=Cannot find library > D/SensorManager( 298): found sensor: null, handle=0 > > I am trying to figure out where the /system/lib/hw/sensors.default.so > comes from and how to include it into my build. Any suggestions would > be appreciated. --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---