Friday, July 30, 2010

android emulator support

SMS
    - external/qemu/telephony/modem_driver.c
    see http://developer.android.com/guide/developing/tools/emulator.html#sms for usage

MMS
    - N/A

Geolocation/GPS
    - external/qemu/android/gps.[c|h]

    - how to set
        - ddms :
            Emulator Control -> Location Controls -> {Manual, GPX, KML}

        - shell:
            $>telnet localhost
            gps fix
      
Sensor
    emulator has defined 4 sensors
    - acceleration
    - magnetic_field
    - orientation
    - temperature
    only accelerometer is enable, others need to be tested
    see external/qemu/android/hw-sensors.[c|h]
        external/qemu/android/avd/hardware-properties.ini
    for the changing orientation in emulator( Ctrl + F11),
    Android framework computes the orientation by looking at the accelerometer
    see external/qemu/android/hw-sensors.c _hwSensors_setCoarseOrientation

    for the measure units, see hardware/libhardware/include/hardware/sensors.h
  
Camera
    it forks a preview thread, and keeps generating a YUV422 SurfaceView

    see
    - frameworks/base/camera/libcameraservice/FakeCameara.[cpp|h]
    - frameworks/base/camera/libcameraservice/CameraHardwareStub.[cpp|h]
    to modify it to generate different preview screen


Vibration
    not implemented in emulator
    external/qemu/android/hw-control.c # hw_control_do_query only handles power:light:brightness
    and see /sys/class/timed_output/vibrator/enable on device

Backlight
    - external/qemu/android/hw-control.c

    there are 3 kinds of backlight:
        - lcd_backlight
        - keyboard_backlight
        - button_backlight
    but 'Documents' says only lcd_backlight is supported
    see extenal/qemu/docs/ANDROID-QEMUD-SERVICES.TXT #hw-control services

    but actually even lcd_backlight can not work
    because hardware module 'LIGHTS_HARDWARE_MODULE_ID' is only available when
    TARGET_BOARD_PLATFORM is msm7k or qsd8k_dirs
    see hardware/
  
    also see /sys/class/leds on device

Battery Level
    the implementation is in external/qemu/hw/goldfish_battery.c
    - adb shell dumpsys battery

    also it will create a file /sys/class/power_supply/battery on device

Signal Strength
    the implementation is in external/qemu/telephony/android_modem.c
    see the line
    '{ "+CSQ", "+CSQ: 7,99", NULL },  /* XXX: TODO: implement variable signal strength and error rates */'
    modify 7 to change to signal strength

CPU frequency
    N/A
    but we can get cpu usage by issuing adb
    - adb shell dumpsys cpuinfo

    before cupcake, in Development.apk, there's a option for displaying cpu usage on screen,
    but this isn't supported anymore
    see frameworks/base/libs/surfaceflinger/SurfaceFlinger.cpp  #SurfaceFlinger::onTransact

2 comments:

Anonymous said...

Hi

What do you thing about below diet supplement? I'm going to buy something good for muscle growth. Please give me a piece of advice.

[url=http://www.suplementy-trec.pl/clagreen-tea.php]Trec CLA[/url]

Anonymous said...

Seems to [b][url=http://pradaoutlet.hidear.org/#44381]プラダ 財布[/url][/b]
coddle to the nowadays fashion[b][url=http://pradas.hidear.org/#44411]プラダ 財布[/url][/b]
"counterfeit fur" thriving [b][url=http://prada.hidear.org/#44511]プラダ 長財布[/url][/b]
ambience, this [b][url=http://pradaoutlet.hidear.org/#44501]プラダ 財布 新作[/url][/b]
collection of hand-made Teddy Brook Tricks strap, the paramount delve into[b][url=http://pradas.hidear.org/#44371]プラダ 長財布[/url][/b]
simulation fur and leather recycling. Tricks wearing magnificent, fraction ungoverned, amphibole and Caizhu of garnishment is reminiscent [b][url=http://pradaoutlet.hidear.org/#44461]グッチ マフラー[/url][/b]
of the ruffian era. Their neck,[b][url=http://prada.hidear.org/#44471]プラダ 財布 新作[/url][/b]
script and foot of each intersection can be on the go, and hugely of fun. Media published [b][url=http://bestshopping.hidear.org/#44481]プラダ 長財布[/url][/b]
lone approximate of $ 195.