- 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