backlight emulation works as follows in 1.5 (this may change in future
system images though):

1/ hardware/qemu/liblights/lights.c is compiled into /system/lib/hw/
liblights.goldfish.so
2/ libhardware recognize at runtime that it is running in the emulator
("goldfish") system, then loads it
3/ the code in lights.c will be used by the system due to this, and will
send messages to the emulator through the qemud channel to the "hw-control"
service.
4/ the emulator receives it and emulates a change of backlight

If you don't know what QEMUD and QEMUD services are, see:

http://android.git.kernel.org/?p=platform/external/qemu.git;a=blob;f=docs/ANDROID-QEMUD.TXT
http://android.git.kernel.org/?p=platform/external/qemu.git;a=blob;f=docs/ANDROID-QEMUD-SERVICES.TXT

you can debug that things are working as intended with:

emulator -debug-hw-control => dumps all messages sent to the "hw-control"
QEMUD service received by the emulator.
emulator -debug-qemud  => dumps all traffic on the QEMUD serial port
multiplexing channel.

I can imagine several reasons why this is not working for you:

- the system image doesn't have emulator-specific binaries in it (this is
the case for "user" builds, you will need "userdebug" or "eng" instead)
- you don't have /system/etc/init.goldfish.rc and/or /system/etc/
init.goldfish.sh and the emulation support is not started properly
- you don't have /system/lib/hw/liblights.goldfish.so for some reason
- you're not running under a "goldfish" kernel in the emulator, so
liblights.goldfish.so is never loaded/used.

Hope this helps

On Wed, Jun 10, 2009 at 11:42 AM, ming <[email protected]> wrote:

>
> Dear All,
> Before we make any real platform system images, we try to build
> a generic version of emulator from source. But the emulator don't
> support backlight (we can't turn off or adjust the backlight for the
> emualtor) as the emulator in SDK 1.5 does. Why?
> Any clue?
> Ming-
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to