Hi!
I'm trying to use the sensors API in Cupcake. Sadly, I find it is
somewhat poorly documented and not much example code is available.
Have used the overlay.cpp as a model for my sensor and I think I have
initialized what needs to be initialized.
However, my sensors module doesn't get loaded and I don't quite get
the problem. Would appreciate if anyone on the list could help me get
with the necessary information to get my module loaded 'cause
currently I don't have a clue :-(
BRs,
/Jocke!
Have updated hardware.c with a few extra LOGV(...) in hw_get_module
(...) to get the following output:
-- Modification to function:
for (i = 0; (status != 0) && (i < HAL_VARIANT_KEYS_COUNT); i++) {
/* Get variant or default */
LOGV("hal_module_info_get: variant_key[%d] = %s\n", i, variant_keys
[i]);
LOGV("Hal defautl variant = %s\n", HAL_DEFAULT_VARIANT);
-- end modification.
V/HAL ( 875): hal_module_info_get: Load module
id=sensors
V/HAL ( 875): hal_module_info_get: variant_key[0] =
ro.product.board
V/HAL ( 875): Hal defautl variant =
default
V/HAL ( 875): hal_module_info_get: variant_key[1] =
ro.board.platform
V/HAL ( 875): Hal defautl variant =
default
V/HAL ( 875): hal_module_info_get: variant_key[2] =
ro.arch
V/HAL ( 875): Hal defautl variant =
default
V/HAL ( 875): hal_module_info_get: X id=sensors hmi=0x0
status=-22
D/SensorManager( 1102): found sensor: null, handle=0
My sensor implementation lives in /system/lib/hw and is called
sensors.so
Output of objdump -T sensors.so:
sensors.so: file format elf32-little
DYNAMIC SYMBOL TABLE:
00000730 l d .text 00000000 .text
00000ae8 l d .rodata 00000000 .rodata
00000d60 l d .ARM.extab 00000000 .ARM.extab
00001000 l d .data.rel.ro 00000000 .data.rel.ro
000011a4 l d .data 00000000 .data
000011a8 l d .bss 00000000 .bss
000009a9 g DF .text 0000004c control_set_delay
00000001 DF *UND* 00000020 strerror
00000889 g DF .text 00000038 get_sensors_list
00000db8 g D *ABS* 00000000 __exidx_end
00000000 DF *UND* 00000018 __aeabi_unwind_cpp_pr0
00000001 DF *UND* 0000000c __errno
00000851 g DF .text 00000038 sens_control_close
000011ac g D *ABS* 00000000 _bss_end__
00000971 g DF .text 00000038 control_wake
00000000 DF *UND* 00000000 memcpy
00000001 DF *UND* 00000274 malloc
000011a8 g D *ABS* 00000000 __bss_start__
00000001 DF *UND* 0000006c __android_log_print
00000d60 g D *ABS* 00000000 __exidx_start
00000819 g DF .text 00000038 sens_data_close
000011ac g D *ABS* 00000000 __bss_end__
000011a8 g D *ABS* 00000000 __bss_start
00000000 DF *UND* 00000000 memset
000011ac g D *ABS* 00000000 __end__
00000001 DF *UND* 0000001e strcmp
000009f5 g DF .text 00000088 control_activate
00000a7d g DF .text 0000006c control_open_data_source
00000901 g DF .text 00000038 data_close
000011a8 g D *ABS* 00000000 _edata
000011ac g D *ABS* 00000000 _end
00000939 g DF .text 00000038 data_open
00000001 DF *UND* 0000002c open
00080000 g D *ABS* 00000000 _stack
00001000 g DO .data.rel.ro 00000084 HMI
000011a4 g D .data 00000000 __data_start
000008c1 g DF .text 00000040 data_poll
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---