cgjones/android-external-qemu — Issue #1: Add a "virtual vibrator" device to qemu that logs commands to an fd
Author: cgjones
Created: 2011-11-02 02:11:33+00:00
State: open

When the android Java Vibrator API is invoked, it ends up calling a C vibrate_on() interface in libhardware_legacy (IIRC). This interface is implemented in qemu builds by sending a message to a socket owned by the qemu VM. If I remember correctly, that message ends up in external/qemu/android/hw-control.c, but ends up being dropped because the emulator doesn't have an implementation of a virtual vibrator motor.

For testing, we would want to implement a virtual vibrator motor that logs when it's turned on. For now, it can simply log that information to /tmp/log.txt or some other file descriptor. The important part is having a virtual vibrator device in qemu that knows when the android OS tries to turn on the vibrator motor. Once our testing team makes more progress on the harness, we'll want to log the vibrator-on messages to an fd that our test harness can consume.