init.ranchu.rc: Enable goldfish audio

On qemu-android, ${ro.hardware} evaluates to "ranchu", not "goldfish"
as on the classic emulator. This prevents AudioFlinger from loading the
goldfish audio HAL module (, which is present
in /system/lib/hw/ and /system/lib64/hw/), because it tries to find
audio.primary.${ro.hardware}.so, but does not

A quick inspection of hw_get_module_by_class() (hardware/libhardware/
hardware.c), which is called by AudioFlinger for loading audio HAL
modules, reveals that the function actually looks for


before trying <module_name>.${ro.hardware}.so. Therefore, set

at boot time so that goldfish audio can work.

Change-Id: I7c91d070ef2d8f582c9cf0e8cfd6512f75e83486
Signed-off-by: Yu Ning <>
1 file changed