History log of /external/qemu/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
496168ed6e29479bcc2c5cac2ade6f045013a59c 12-Jul-2014 David 'Digit' Turner <digit@google.com> Remove obsolete android/protocol/ directory.

This feature was never really completed, and impedes refactoring.
The corresponding sources were used to try to implement the separation
of UI and emulation engine into two separate processes, but never
truly worked. The lack of DSL to generate protocol stubs/proxies
was also very painful.

The feature could be revived in the future with a very different
implementation, if desirable.

Change-Id: I516d6627ee5d649bbcbf140b6274f1ff1b57fdd3
mdline-options.h
onsole.c
elp.c
ain-common-ui.c
ain-common.c
pengles.c
rotocol/attach-ui-impl.c
rotocol/attach-ui-impl.h
rotocol/attach-ui-proxy.c
rotocol/attach-ui-proxy.h
rotocol/core-commands-api.h
rotocol/core-commands-impl.c
rotocol/core-commands-impl.h
rotocol/core-commands-proxy.c
rotocol/core-commands-proxy.h
rotocol/core-commands-qemu.c
rotocol/core-commands.h
rotocol/core-connection.c
rotocol/core-connection.h
rotocol/fb-updates-impl.c
rotocol/fb-updates-impl.h
rotocol/fb-updates-proxy.c
rotocol/fb-updates-proxy.h
rotocol/fb-updates.h
rotocol/ui-commands-api.h
rotocol/ui-commands-impl.c
rotocol/ui-commands-impl.h
rotocol/ui-commands-proxy.c
rotocol/ui-commands-proxy.h
rotocol/ui-commands-qemu.c
rotocol/ui-commands.h
rotocol/ui-common.h
rotocol/user-events-impl.c
rotocol/user-events-impl.h
rotocol/user-events-protocol.h
rotocol/user-events-proxy.c
rotocol/user-events-proxy.h
emulator.c
emulator.h
kin/window.c
7654e7efee943bdbaf167170a087388c54681366 11-Jul-2014 David 'Digit' Turner <digit@google.com> emulator-arm64: ARM64 wrapper for QEMU executable.

This patch adds two new binaries (emulator-arm64 and emulator64-arm64)
which act as a wrapper for QEMU-based emulation engines for ARM64
emulation (and ARM64 _only_).

The (prebuilt) qemu binary must be located under:

$PROGRAM_DIR/qemu/$SYSTEM/qemu-system-aarch64$EXE

Where:

$PROGRAM_DIR is the location of the 'emulator-arm64' binary.
$SYSTEM is a host system tag (e.g. linux-x86 or linux-x86_64)
$EXE is the host executable extension.

The program is in charge of parsing command-line arguments,
computing AVD configuration, then calling the QEMU program
with a (very long) list of configuration arguments.

See https://qemu-android.googlesource.com/qemu-ranchu/ for
scripts used to rebuild the QEMU prebuilt binary from
sources.

Change-Id: Ifcb9dd50fc5d83a864a1f957d12b1c199e0504fb
vd/util.c
vd/util_unittest.cpp
ain-emulator.c
emu-launcher/emulator-qemu.cpp
tils/system.h
d174434fbf6fbfce54f7eabaa54b8296f55527b8 11-Jul-2014 David 'Digit' Turner <digit@google.com> android-constants.c: Move constants to single file.

This patch refactors the sources slightly to reduce dependency
drag between various functions and constant definitions. This
is general cleanup work for future patches.

Change-Id: I5fc0f53f5c933bc89ddf1a43d67a309d03a03c2d
ndroid-constants.c
elp.c
ain-common-ui.c
ain-common.c
c5f12b935ced6c029244b1a3230edc9b7646da97 11-Jul-2014 David 'Digit' Turner <digit@google.com> main-common.h: Add reassign_string().

Simple patch to introduce a convenience function that can
reassign heap-allocated string pointers in place.

Change-Id: If810fe10d4149749202d73f3cf2c9cfef0298754
ain-common.c
ain-common.h
ain.c
57b2a766f7af808f7670aecbe57a18373a903a0d 11-Jul-2014 David 'Digit' Turner <digit@google.com> android/: Add proper C++ inclusion guards.

Change-Id: Ie3f03d967323448eda87f7b4454345323d5bfec0
mdline-option.h
elp.h
ain-common.h
47cdf4186795848aa4f64f9f4cebf5fb43df339a 11-Jul-2014 David 'Digit' Turner <digit@google.com> android/avd: Add proper C++ inclusion guards.

Change-Id: I59c1c4fc4559967b8f9a5fa0f56dfda62684a0a7
vd/hw-config.h
vd/info.h
f0c747e01328e713891f2fa66c4f9df64f580dc2 11-Jul-2014 David 'Digit' Turner <digit@google.com> android/utils/: Proper C++ inclusion guards.

This patch ensures that all headers under android/utils/ have proper
C++ inclusion guards, by using "android/utils/compiler.h" and the
macros it defines (ANDROID_BEGIN_HEADER / ANDROID_END_HEADER).

Just general cleanup before further work.

Change-Id: If37e346a1846af43bfd01dd7fc6999e188a6d025
tils/bufprint.h
tils/debug.h
tils/dirscanner.h
tils/dll.h
tils/filelock.h
tils/ini.h
tils/intmap.h
tils/jpeg-compress.h
tils/lineinput.h
tils/list.h
tils/misc.h
tils/reflist.h
tils/refset.h
tils/stralloc.h
tils/tempfile.h
tils/timezone.h
tils/vector.h
tils/win32_cmdline_quote.h
6e3432669ee1ad2cf74919208be6840923cbab03 04-Jul-2014 David 'Digit' Turner <digit@google.com> android/utils/filelock.c: Handle stale Win32 lock directories.

Win32 and other platforms do not use the same implementation of
file locks (due to platform differences), in particular, Win32
creates ....file.lock as a directory, while Unix creates it
as a single file.

If someone starts an emulator instance under Wine, which crashes,
the stale directory lock make another non-Wine emulator instance,
to enter an infinite loop.

These conditions are pretty difficult to obtain, but it's not
so unusual to get there during emulator development / testing.

This patch detects this edge case and prints a warning, failing
to lock the file, which allows the new emulator instance to
proceed (even if the locking fails).

Change-Id: Iae99be629020e95b2f57b0c10ab0e1317fdca2f5
tils/filelock.c
0e5ff1bd3073e3847ac8400ba46814878beb8605 04-Jul-2014 David 'Digit' Turner <digit@google.com> memcheck: Remove feature entirely

This patch removes the memcheck feature from the Android emulator
code base. This is for several reasons:

- Supporting the feature impacts many QEMU-specific emulation files
in subtle ways, that make it difficult to refactor this code to
integrate upstream changes.

- The feature only works for ARM (32-bit), has no unit tests, and
generates massive amounts of false positive messages coming
from the platform.

- Barely anyone uses it.

This feature might make a comeback in the future, but this will be
under a different life-form that will have adapted to the new state
of the code.

+ As a bonus, fix the build!

Change-Id: Idd19a3bc7923379cb1e82850f14499549b6a991b
mdline-options.h
onfig/config.h
elp.c
ain-common.c
ain.c
emu/memcheck/memcheck.c
emu/memcheck/memcheck.h
emu/memcheck/memcheck_api.h
emu/memcheck/memcheck_common.h
emu/memcheck/memcheck_logging.h
emu/memcheck/memcheck_malloc_map.c
emu/memcheck/memcheck_malloc_map.h
emu/memcheck/memcheck_mmrange_map.c
emu/memcheck/memcheck_mmrange_map.h
emu/memcheck/memcheck_proc_management.c
emu/memcheck/memcheck_proc_management.h
emu/memcheck/memcheck_util.c
emu/memcheck/memcheck_util.h
5a1137164fc33460113d31ba5b96ce81558280b8 25-Jun-2014 David 'Digit' Turner <digit@google.com> Merge "Warn/Panic with x86_64 emulation without CPU acceleration."
4a889871cabf4709264abda76ed7b4d565896401 25-Jun-2014 David 'Digit' Turner <digit@google.com> Warn/Panic with x86_64 emulation without CPU acceleration.

x86_64 emulation currently requires KVM/HAX, i.e. trying to boot
with -no-accel will not work at all. This is a bug that hasn't
been widely documented yet, and has burnt a few people, so add
a check that will:

- Panic at startup when trying to emulator an x86_64 AVD
without proper CPU acceleration.

- If -no-accel of '-accel off' is used explicitly though,
just print a warning. Might be useful for debugging the
issue itself.

BUG=15445856

Change-Id: Ifb565bd95926a9534087187bc2d1dc425a854d67
ain.c
257b04adee7b17300cc57281d1e72e56d499f326 24-Jun-2014 Vince Harron <vharron@google.com> added include file to fix gcc 4.8 error

Change-Id: Ib33b1bd016e4e2a5173a6ee73273adb78b419a71
ilesystems/testing/TestSupport.cpp
d1f4f0958b2a25dfde90ff84952061a5ecb225a4 23-Jun-2014 David 'Digit' Turner <digit@google.com> androidPartitionType_fromString(): new function.

Change-Id: I6bbc2e3149dd8710afef241a3811c0ff659f33f9
ilesystems/partition_types.cpp
ilesystems/partition_types.h
ilesystems/partition_types_unittest.cpp
c8e89b5a1998ce74a4863989f0cde2e8925bed06 23-Jun-2014 David 'Digit' Turner <digit@google.com> android/filesystems/fstab_parser.h: New file.

This patch adds a tiny parser for Linux fstab files in order
to extract the format of a given partition. This will be used
in the future to extract from ramdisk.img the exact partition
format of each partitionm image, instead of trying to guess it
from API levels.

Change-Id: Ia9d986d1487ea092e05af567fd4abb42b58cc1f6
ilesystems/fstab_parser.cpp
ilesystems/fstab_parser.h
ilesystems/fstab_parser_unittest.cpp
716e5e10b4f8c30c4195411e868aa8745d24f59c 21-Jun-2014 David 'Digit' Turner <digit@google.com> android/filesystems/ramdisk_extractor.h: new file.

This patch introduces a new function that can be used to
extract single data file content from an Android ramdisk.img
image.

This will be used to extract fstab.goldfish in a future patch
to reliably determine the format of each partition image before
the emulator is run.

Change-Id: I4e8178ce1cedf0e93b852c632003d089bcd41701
ilesystems/ramdisk_extractor.cpp
ilesystems/ramdisk_extractor.h
ilesystems/ramdisk_extractor_unittest.cpp
ilesystems/testing/TestRamdiskImage.h
ilesystems/testing/create_ramdisk_test_data.sh
fb8aca0ae8f679e356ee0b06fe206e9df4408f9e 21-Jun-2014 David 'Digit' Turner <digit@google.com> Fix emulation of old platform images.

A previous patch introduced a regression that prevented the
emulator from properly booting older platform images.

The root cause of the problem is that old SDK platforms
(e.g. Gingerbread), do not provide a build.prop file.

For these, the target API level is extracted from the
AVD's config.ini file instead.

A series of recent changes made the emulator initialization
code overwrite this value from the one extracted from build.prop,
and unfortunately, when this file didn't exist, an API level value
of 1000 was returned.

This made the emulator misconfigure the emulation parameters,
in particular, the cache partition was configured to be ext4,
while the safety code later detected the image to be yaffs2
and refused to go-on.

This fixes the issue by avoiding the overwrite.

Change-Id: I529ff991a9e8df42957c40e1e5929c0472773b14
vd/info.c
vd/util.c
vd/util_unittest.cpp
0cadcd089dafa412543773c695e10936c9d796a4 20-Jun-2014 David 'Digit' Turner <digit@google.com> emulator: Special case x86_64 emulation engine.

As a special case, if the target AVD CPU is 'x86_64', the
'emulator' launcher program will first try to locate a backend
named 'emulator-x86_64', and if not available, will try to find
'emulator-x86' as a fallback.

Other target CPU architectures are not affected.

The main goal here is to experiment mixing emulator binaries from
the master branch to support x86_64, as well as stable/idea133
binaries for other CPU architectures.

Change-Id: I5d30aa7c6ac1cf6a41ed97f8872ccd0ade90901f
ain-emulator.c
9cab753165f6d4d473e32d4c1a4ca76bbee4549f 19-Jun-2014 David 'Digit' Turner <digit@google.com> Fix YAFFS2 support auto-detection logic.

A simpler algorithm is to look at the API level.

BUG=15732708

Change-Id: Ifdc5e458735db8734a631835ed593fda85853866
vd/info.c
ain.c
e49c26a1fbc70f5c3920ee3ca8433a6cb440193d 18-Jun-2014 Vince Harron <vharron@google.com> AdbdCommunicationMode: choose default from API level

propertyFile_getAdbdCommunicationMode: If API level <16, force
"ro.adb.qemud" to 0. If API level >= 16, use value from
"ro.adb.qemud" or default to 1

(commit c13daef7bdc0982084 "Use QEMU pipe for ADB communication"
was first released in API 16 system images)

Refactored integer parsing, memory management and validation code into
propertyFile_getInt

Added unit tests for propertyFile_getInt/ApiLevel/AdbdCommunication

Change-Id: I32e3e16aa4e183546936c4841d071bd709c0780e
vd/util.c
vd/util.h
vd/util_unittest.cpp
b72ae03a20146da5fa15bb710e0d765bedf183c9 18-Jun-2014 David 'Digit' Turner <digit@google.com> Fix: create missing partition images on demand.

The previous patch introduced a regression where, if the userdata
partition image was not present (e.g. userdata-qemu.img), it was
no longer created at startup, and the emulator would fail to run.

This patch fixes the issue.

As an added bonus, it also fixes -wipe-data to ensure that this
option also clears the cache partition, if any. For some reason
the latter was never properly cleared.

Change-Id: Ic97ffa0468da6a8889d64623efaf05148099311f
ain.c
83942739a98f55db1e83ad39ddee6d294ad329f2 17-Jun-2014 David 'Digit' Turner <digit@google.com> android/filesystems/partition_types.h: new header

This patch introduces a new header to handle several types of
partition images through a simple common interface. This will be
used in a future patch to rework the way these images are setup
in vl-android.c

+ Move test support stuff to android/filesystems/testing/
+ Add unit tests.

Change-Id: Icc1c32258e37731283079adf0e5407fa2e48f661
ilesystems/ext4_utils_unittest.cpp
ilesystems/partition_types.cpp
ilesystems/partition_types.h
ilesystems/partition_types_unittest.cpp
ilesystems/testing/TestExt4ImageHeader.h
ilesystems/testing/TestSupport.cpp
ilesystems/testing/TestSupport.h
cc5804ca118e802842bbd91a3f4f8dfbc1c4303b 12-Jun-2014 David 'Digit' Turner <digit@google.com> Support EXT4 cache partition images.

Recent Android kernels (3.10) do not support YAFFS2 anymore, as such
the cache partition must be formatted as EXT4 when they are used.

This patch adds the necessary code to do the following:

- Auto-detect whether a YAFFS2 or EXT4 cache partition is needed
based on the kernel version.

- Add a hardware property to override the auto-detected result,
in case of problem (kernel.supportsYaffs2)

- Create either an empty YAFFS2 or EXT4 cache partition when the
file doesn't exist yet in the AVD's content directory.

This uses the new android_createEmptyExt4Image() function that
was introduced in a previous patch.

Change-Id: Idd0e49501422993f655f77f14db651d5d2eb4ca2
vd/hardware-properties.ini
vd/hw-config.c
vd/hw-config.h
ain.c
dddfa6426c2a3385aea685a200a7a4df1932b207 12-Jun-2014 David 'Digit' Turner <digit@google.com> Add android_createEmptyExt4Image()

This patch adds a new function to the emulator to create an
empty EXT4 partition image of a given size in bytes.

+ Basic unit test.

Change-Id: I5b709c5697fe4a57be76b4344413aff3447b616a
ilesystems/ext4_utils.cpp
ilesystems/ext4_utils.h
ilesystems/ext4_utils_unittest.cpp
74efb2c2aa3475d937f631eb8d81aa21e197c049 17-Jun-2014 David 'Digit' Turner <digit@google.com> resolve merge conflicts of c5f5903 to master.

Conflicts:
android/main-emulator.c

Change-Id: Iffc6f5aaa95a1cdfcc81a26c43172e6c5ba8111a
ee57375c96822790cc7f837b4fdf64a9c1d69b3a 17-Jun-2014 David 'Digit' Turner <digit@google.com> android/utils/host_bitness.c: android_getHostBitness()

This patch moves the host bitness detection code to android/utils/
and also improves it to work properly on Windows, in preparation for
Win64 executables.

+ Ensure 'emulator' launcher uses it.
+ Add basic unit test.

Change-Id: I7d55397efeb749b72c502241c4da4cd16696c082
ain-emulator.c
tils/host_bitness.c
tils/host_bitness.h
tils/host_bitness_unittest.cpp
bead081e026dc21d65afa0d8c024f0f4a748af9f 12-Jun-2014 David 'Digit' Turner <digit@google.com> resolve merge conflicts of 598e05b to master.

Change-Id: I1e393281f09fed776cf4d856f4858638287dd600
81edfa7cecb129367d98e4bf9c2ea9a8a5ddc9b9 11-Jun-2014 Greg Hackmann <ghackmann@google.com> Revert "android: support generating ext4 partition images"

This reverts commit 44f06dffd84c0a626f6c3d539d16a0891240028d.

Change-Id: I7694f8373eb91c7c7e3afea202c7f6f8b43bf406
ilesystems/ext4_utils.cpp
ilesystems/ext4_utils.h
1fce7f92b5c7c1d41475ffea86231d9b99cad4b7 12-Jun-2014 David 'Digit' Turner <digit@google.com> Read build.prop file when provided in AVD.

Ensure that the build.prop is read for both platform builds
and AVDs, this helps ensure that the right target CPU ABI is
extracted.

This fixes an issue where an ARMv7-A based system image / kernel
might be mistaken for an ARMv5TE one. The end result being the
inability to properly boot the kernel.

Change-Id: I8206c03a069e7de96670dad735e9414da1c74bc7
vd/info.c
9669d49a5ebbd71870873c4d09fe40c7e184bade 12-Jun-2014 David 'Digit' Turner <digit@google.com> Simplify build of 64-bit binaries.

This slightly simplifies the build files when it comes to 64-bit
module declarations. This is a preliminary change to be able to
build Win64 binaries with the new prebuilt w64 toolchain.

Change-Id: I61a03b7a23cff24d96e2651c3d797ec233bf0ffc
uild/binary.make
uild/definitions.make
acf419ae0ea113758326604ea0aac77e070c742e 12-Jun-2014 David 'Digit' Turner <digit@google.com> android-configure.sh: Fix linker probe check.

Do not assume 'gcc' is a valid linker when cross-compiling.
This fixes an issue when trying to use a newer version of the
Windows w64 cross-toolchain.

Change-Id: I874b36e20146aebc9fb465e80d0a62945137b4e8
uild/common.sh
44f06dffd84c0a626f6c3d539d16a0891240028d 10-Jun-2014 Greg Hackmann <ghackmann@google.com> android: support generating ext4 partition images

Defer generation to libext4_utils, built using the existing sources in
the same style as libgtest. With the emulator now generating valid ext4
images, re-enable support for ext4 cache partitions.

Bug: 13115061

Change-Id: I8770f2ddbc95f6beb4ca9655ebf9d8f8a7bdd1b0
Signed-off-by: Greg Hackmann <ghackmann@google.com>
ilesystems/ext4_utils.cpp
ilesystems/ext4_utils.h
fb594d8e4f24f9c845d49ed72ed15e92df46130b 21-May-2014 David Turner <digit@android.com> Merge "Allow using dynamic skin from android build" into idea133
Auto-merge: 3e9ec80

* commit '3e9ec80327f4550c041b9218cdf3a0232e07cc02':
Allow using dynamic skin from android build
6338cf39a8985a86923a6325457086f701bdc1bc 21-May-2014 David Turner <digit@android.com> Merge "Read config.ini for Android build too" into idea133
Auto-merge: 0640d15

* commit '0640d1551eeaba4cdff68633ebcf6c789d6541b8':
Read config.ini for Android build too
916f9cc4b9adf4eca98b4a6cc4366d43c4971617 15-May-2014 Ji-Hwan Lee <jihwan@google.com> Allow using dynamic skin from android build

Bug: 14981377
Change-Id: Ifeb281216008aa163aa81d1179af72e2843abd90
vd/info.c
vd/info.h
ain-common.c
874512319361370762ddbe02039077ad5ea377b6 15-May-2014 Ji-Hwan Lee <jihwan@google.com> Read config.ini for Android build too

This allows providing default configuration on Android build more easily.

Bug: 14981377
Change-Id: Ic9db366c0fd74a747ad86112125f949e40a87a0e
vd/info.c
27e413296790de8ed7cf0b3eaf1972659690944a 12-May-2014 David 'Digit' Turner <digit@google.com> android-rebuild.sh: Add --out-dir=<path> option.

This patch adds an option to android-rebuild.sh and
android-configure.sh which allows one to specify a specific
output directory for all objects / binaries, instead of using
the default of 'objs' under the current source directory.

Tested for both regular and mingw builds.

Change-Id: I8c5ddfac8fb9899a2ff59a43e6cb5b9d8c45cef1
(cherry picked from commit a96cc267b82bde959b1738fb679ee5ac964f3f5f)
uild/common.sh
a96cc267b82bde959b1738fb679ee5ac964f3f5f 12-May-2014 David 'Digit' Turner <digit@google.com> android-rebuild.sh: Add --out-dir=<path> option.

This patch adds an option to android-rebuild.sh and
android-configure.sh which allows one to specify a specific
output directory for all objects / binaries, instead of using
the default of 'objs' under the current source directory.

Tested for both regular and mingw builds.

Change-Id: I8c5ddfac8fb9899a2ff59a43e6cb5b9d8c45cef1
uild/common.sh
27ff62a645346c58826ce3e7d08727832c1a9e58 05-May-2014 David 'Digit' Turner <digit@google.com> Merge "Disable 64-bit Darwin platform build." into idea133
Auto-merge: 5e25267

* commit '5e2526706be97ceee436e6f0b7e6c1c35619b851':
Disable 64-bit Darwin platform build.
Add '-accel <mode>' and 'no-accel' options.
Add misc android/base/ helper classes.
Windows: Fix libSDLmain compilation
9554550a3ecf2987af84d98d4b683757c74d8b93 05-May-2014 David 'Digit' Turner <digit@google.com> package-release.sh: Add --copy-prebuilts=<path> option.

This patch adds a new option to the package-release.sh script to
copy prebuilt 64-bit binaries for Linux and Darwin to an AOSP
checkout, under $AOSP/prebuilts/android-emulator/<system>/

For the record, this currently adds up to 18 MB (which includes
binaries for both platforms).

This is required to remove the emulator sources / build from the
platform build, and switch to prebuilt binaries instead.

+ Fix the 'emulator' launcher program to probe for either 32-bit
or 64-bit GPU emulation libraries (the copied prebuilts are only
64-bits to save space).

Change-Id: I5a4360da736172b5c35e2622fc02fb753853156b
ain-emulator.c
045bdbe2e68c305f5f819744ccbe75c7478e4e8b 28-Apr-2014 David 'Digit' Turner <digit@google.com> Add '-accel <mode>' and 'no-accel' options.

This patch adds two new options to better control CPU emulation
acceleration (i.e. KVM and HAX). More specifically:

'-no-accel' can be used to disable acceleration if available.
'-accel off' does the same.
'-accel on' forces to run with acceleration, or refuses to start
the emulator.
'-accel auto' probes the system for a working accelerator and uses
it when possible (i.e. when emulating x86 or x86_64 images only).

Also print some information with -verbose or -debug-init.

Note: This adds QEMU-independent probing code for KVM and HAX
under android/emulation/ (C++), as well as some glue to
use it from C under android/cpu_accelerator.[hc].

Note: HAX is no longer enabled by default when reaching the QEMU
main function.

Change-Id: Ic91db7a3b213d69296c50fec35cd29a32a8e5779
mdline-options.h
pu_accelerator.cpp
pu_accelerator.h
mulation/CpuAccelerator.cpp
mulation/CpuAccelerator.h
mulation/CpuAccelerator_unittest.cpp
elp.c
ain.c
97502faffa2e99bf717749a2d249ba3e57d7da4d 28-Apr-2014 David 'Digit' Turner <digit@google.com> Add misc android/base/ helper classes.

This patch adds a few new helper classes under android/base/ that
will be used by future patches.

- Add a 'clear' method to String class.

- Add StringFormat() function to generated String instances
from formatted string input, and StringAppendFormat() to
append some to an existing instance.

- Add ScopedFd to implement a scoped file descriptor wrapper.

- Add ScopedHandle to implement a scoped Win32 HANDLE wrapper.

Change-Id: I0ae2a1de1123586b23e4faca8f394c6b4dff622e
ase/String.h
ase/StringFormat.cpp
ase/StringFormat.h
ase/StringFormat_unittest.cpp
ase/String_unittest.cpp
ase/files/ScopedFd.h
ase/files/ScopedFd_unittest.cpp
ase/files/ScopedHandle.h
ase/files/ScopedHandle_unittest.cpp
7891dd35fa2439a70f43ab8572778a398365bf24 28-Apr-2014 David 'Digit' Turner <digit@google.com> Support building with newest Mingw64 cross-toolchain.

This modifies android-configure.sh to detect the new Mingw64-based
cross toolchain (i.e. x86_64-w64-mingw32-gcc) and use it when it
is in the user's path.

Note that this only builds a 32-bit Windows binary, it just uses
a different toolchain to do it. A future patch will add support
for building both Win32 and Win64 binaries at the same time
(which the new toolchain supports).

Since this switches from GCC 4.2 to 4.8, this introduces a ton of
new warnings that require some cleanups in the sources too.

Only the most important warnings are fixed here.

Change-Id: Iec8c9b8332d4a38a2cb8acf368c8aa5341cf77be
uild/common.sh
ain-emulator.c
ockets.c
tils/compiler.h
tils/filelock.c
tils/path.c
tils/system.c
tils/system.h
86b1fb06ee6ef53d8961ce96343ba4aa37518840 21-Mar-2014 David 'Digit' Turner <digit@google.com> tcg: Upgrade to upstream version.

This switches the full TCG implementation to the upstream version
from the following upstream commit:

1a8e80d7e82aa385ad887dba5d039e399a18264b

Note that this requires completely reqwriting the softmmu_template.h
declarations to adapt to the new world order where all ld/st helpers
now accepts a CPUArchState* value as their first parameter.

+ This also gets rid of the REGPARM macro, which means that on
i386, parameters are now passed on the stack instead of using
registers. As surprising as it is, this doesn't seem to affect
emulation performance in significant ways when starting the
emulator with -force-32bit, compared to the latest SDK emulator
binary. This may be due to the improved binary translator.

Note that this doesn't switch the emulation to use the new
MemoryRegion API, so there are still a few minor differences
with upstream softmmu_*.h headers.

The target-*/ sources have been minimally modified to accomodate
for the changes, and everything seems to work. However, not that
CONFIG_ANDROID_MEMCHECK_MMU hasn't been tested yet.

+ get rid of obsolete softmmu_outside_jit.c

NOTE: There are two important differences with the upstream sources:

- An '#undef small' in tcg.c used to build the Windows binaries
with mingw32 on Linux.

- The declaration of cc_compute_all and cc_compute_c helpers in
target-i386/helper.h use TCG_CALL_NO_SE instead of
TCG_CALL_NO_SE_RWG. Otherwise, it's impossible to boot
an x86 system image properly.

Change-Id: I6ed5c58f237493d29b1cefaff3e0db6f58977fbf
emu/memcheck/memcheck_util.c
204bcdd6f782556ee86c872151fc9f3cc3e17412 14-Apr-2014 David 'Digit' Turner <digit@google.com> android/varint.c: Remove obsolete file.

This source was only useful to implement the -trace option which
was removed eons ago.

Change-Id: I0fac06f5a0106184d262589336a6812a913cccc1
arint.c
arint.h
55a32e90f89ec0903d376b98f24d3713a9e23b0b 04-Apr-2014 David 'Digit' Turner <digit@google.com> dyngen-exec.h: Remove obsolete file!

It is finally possible to remove dyngen-exec.h entirely since
there are no longer functions using the global AREG register
variable. This should allow compiling the emulator with Clang,
since it never supported this GCC-specific "feature".

Note that TCG still generates JIT-ed code that reserves a global
register and places the value of 'cpu_single_env' in it, but we
can now replace it with an upstream version that doesn't do that,
and generates better code.

Change-Id: Ic962f9f590dee6418b49fde307108efe841f4e0d
emu/memcheck/memcheck_util.c
a889d35e76c8ea18caf70c738fd585c64b857369 20-Mar-2014 David 'Digit' Turner <digit@google.com> target-*/exec.h cleanup

This patch gets rid of target-*/exec.h headers by moving the corresponding
definitions either inside target-*/op_helper.c, or dyngen-exec.h for the
global register-based 'env' value, which will be removed in future patches.

Upstream 3e4571724fb92c77de81d8b54957de8232be6706

Change-Id: I513d5c27c01c6dc727c1ce6fb7f3a7a5dc03800f
emu/memcheck/memcheck_util.c
emu/memcheck/memcheck_util.h
eca7bc24e45fb6809582795ff88f13384b5ce7df 14-Mar-2014 David 'Digit' Turner <digit@google.com> softmmu_header.h: Pass CPUArchState to helper routines.

This patch modifies the functions defined in softmmu_header.h
to accept a CPUArchState as their first parameter, then it
adjusts every caller appropriately.

This gets up closer to upstream, and remove the obsolete
softmmu_outside_jit.h that was used to do the same thing.

Change-Id: I9eef01e95b7233c8c6f6da43d17262b9a9ebcd99
emu/memcheck/memcheck_util.c
f8f7375ff1f9101ebd22e4bc61109e50bab124e6 14-Mar-2014 David 'Digit' Turner <digit@google.com> Move elff to distrib/elff/

The library is mostly generic and is actually also used to build
the Android NDK's 'ndk-stack' program, so treat it as a third-party
even if the main implementation lives here.

Change-Id: I4248c1f3d248207f2f8cfaf5ecc65b28e1681fa3
emu/memcheck/memcheck.c
5bb450ee9cc5da0c6582e63f41c504c7861e2788 14-Mar-2014 David 'Digit' Turner <digit@google.com> Rename CONFIG_MEMCHECK to CONFIG_ANDROID_MEMCHECK

Change-Id: I9b0edcc1e243111f86f18c22eecbebb23219c297
mdline-options.h
onfig/config.h
elp.c
emu/memcheck/memcheck_api.h
96e493a7f0be0193cb17b24c3492d998411b5031 14-Mar-2014 David 'Digit' Turner <digit@google.com> Move memcheck implementation to android/qemu/memcheck/

Change-Id: I806820d2c3d3f1436bbca54e53a7fa1a0e0a4dba
emu/memcheck/memcheck.c
emu/memcheck/memcheck.h
emu/memcheck/memcheck_api.h
emu/memcheck/memcheck_common.h
emu/memcheck/memcheck_logging.h
emu/memcheck/memcheck_malloc_map.c
emu/memcheck/memcheck_malloc_map.h
emu/memcheck/memcheck_mmrange_map.c
emu/memcheck/memcheck_mmrange_map.h
emu/memcheck/memcheck_proc_management.c
emu/memcheck/memcheck_proc_management.h
emu/memcheck/memcheck_util.c
emu/memcheck/memcheck_util.h
d8792d87d04bfecf9d3e0612d3bf701e69aa185e 09-Apr-2014 David 'Digit' Turner <digit@google.com> Merge "Fix x86 un-accelerated emulation."
d4d92023693207788ef78b5fe6799f0caec83df2 04-Apr-2014 Xavier Ducrohet <xav@android.com> Merge "Fix build on OS X Mavericks" into idea133
Auto-merge: 17dbf21

* commit '17dbf210c9fa08326f3c4c42d3c1e70ac8e49388':
Fix build on OS X Mavericks
261c18d69b75388958b8fd9364b9df21003909c3 29-Mar-2014 Ji-Hwan Lee <jihwan@google.com> Fix build on OS X Mavericks

- Import individual headers instead of QTKit.h, to avoid
QTMovieModernizer.h which does not compile with current toolchain.

- Patch SDL_QuartzVideo.h to comment out removed CGDirectPaletteRef.

Bug: 13119079
Change-Id: Ibcb752523ad964bbfc03ad4fc4f336ef17161af4
amera/camera-capture-mac.m
7666d5ff750aa2da0e23f05fee360d6ed2cdd826 01-Apr-2014 David 'Digit' Turner <digit@google.com> Fix x86 un-accelerated emulation.

Emulating an x86 system image was broken since the commit that
added support for 64-bit Intel CPUs, because the default CPU model
changed from 'qemu32' to 'qemu64'. Unfortunately, this prevents
existing x86 SDK system images from booting properly when using
un-accelerated emulation (i.e. without KVM or HAXM).

This patch fixes the issue by auto-configuring the CPU model
to "qemu32" if the target architecture is "x86". Note that "qemu64" will
still be used if the target architecture is "x86_64", so this should
not affect Intel 64-bit emulation.

Change-Id: Ib1fde3d7daa447b85f5b63393d6899b904948927
vd/info.c
ain.c
71b3674fea4e770056ec294db60752e3bfa43927 01-Apr-2014 David 'Digit' Turner <digit@google.com> Don't expect an -x86_64 suffix for Intel 64-bit kernels.

The corresponding kernel image is now properly placed under
prebuilts/qemu-kernel/x86_64 in the platform tree, so there is
no need to expect an -x86_64 anymore.

Change-Id: I762ec3124bf38f688bd7a5dff8ab007b7d5c91d4
vd/info.c
fd442bdd16c9debca9088780a78100a7dd1a3ca7 01-Apr-2014 David 'Digit' Turner <digit@google.com> Improve backend selection based on target AVD CPU.

This change improves the way the 'emulator' launcher program
chooses the emulation backend, based on the target AVD CPU
architecture.

+ Introduce emulator_getBackendSuffix and appropriate
unit test.

+ Use it in android/main-emulator.c

+ Remove the hack that forced a target ABI of 'x86_64' to
be mapped internally to 'x86'.

Change-Id: Ifbda9c8e4c032df5e8ca089f1e9272c844c00c32
vd/util.c
vd/util.h
vd/util_unittest.cpp
ain-emulator.c
01174a2daca341a893afa33988dd6129418f9dcf 01-Apr-2014 David 'Digit' Turner <digit@google.com> emulator: Enable verbose mode when -verbose is used.

Before this patch, the only way to print debug messages from the
'emulator' launcher program was to define ANDROID_EMULATOR_DEBUG=1
in your environment.

This patch modifies the program to detect one of the following
on the command-line to also enable these debug messages:

-verbose
-debug-all
-debug all

Change-Id: Ide96680f7eb4295cd69a903c5f9c576d7d0f7e88
ain-emulator.c
e1ae40089f70ab2b857afbf91e44c7ac976ccd81 27-Mar-2014 David 'Digit' Turner <digit@google.com> kernel_utils.cpp: Fix glibc-2.11 compilation issue.

With more recent GLibc, ::strstr() returns a const char*, not a char*

Change-Id: Id329ff6b7c0c876bd73bc2b18c1cc7267e666986
ernel/kernel_utils.cpp
1af1c4585e5fabf53cd0656a8417c71773c584c0 18-Mar-2014 Greg Hackmann <ghackmann@google.com> android: avd: add -x86_64 to kernel filename on x86_64

Change-Id: I488c21048d0d4a1637db2457312042a8d1d7b236
Signed-off-by: Greg Hackmann <ghackmann@google.com>

Conflicts:
android/avd/info.c
vd/info.c
99579ce28b7ee342797e01afe8a9cb16163b812d 18-Mar-2014 Greg Hackmann <ghackmann@google.com> android: avd: add -x86_64 to kernel filename on x86_64

Change-Id: I488c21048d0d4a1637db2457312042a8d1d7b236
Signed-off-by: Greg Hackmann <ghackmann@google.com>
vd/info.c
96ed653a4e942b03c8bf492881cea778bbf5c222 15-Mar-2014 David 'Digit' Turner <digit@google.com> Merge "Support GPU emulation standalone build." into idea133
Auto-merge: 58832a1

* commit '58832a1fc20a4be57480241e283163b9ee1d7442':
Support GPU emulation standalone build.
1af8215c58e5c94432f04ec87d34e429fe7cd7a6 03-Mar-2014 David 'Digit' Turner <digit@google.com> Support GPU emulation standalone build.

This patch modifies the emulator's standalone build system
to rebuild all GPU emulation libraries directly from sources,
assuming their are located under ../../sdk/emulator/opengl/
or ../opengl/

Change-Id: I2ac8fc4bc2d06561dc52298689840f74171397aa
uild/binary.make
uild/clear_vars.make
uild/common.sh
uild/definitions.make
uild/host_executable.make
uild/host_shared_library.make
uild/host_static_library.make
c6e0caedac5585546cb68605418eedc9e726b44b 07-Mar-2014 David 'Digit' Turner <digit@google.com> Support kernels with version >= 3.10

Newer Android Linux kernels modify the way certain devices are
named, i.e.:

/dev/qemu_pipe is renamed as /dev/goldfish_pipe.
/dev/ttyS<num> is renamed as /dev/ttyGF<num>

This patch adds support code to the emulator to deal with this
as transparently as possible:

1) Add a new hardware property 'kernel.newDeviceNaming', a string
which can only take the values 'autodetect', 'no', and 'yes'.

2) Support code to probe the type of a kernel image.
IMPORTANT: The kernel implementation depends on the host
/usr/bin/file to properly recognize kernel files and extract
their version number. This really only works on Linux and
OS X, and only for x86 and x86_64 kernel images.

A future patch will implement more robust detection by
essentially doing its own probing through libmagic or equivalent.

Note that there doesn't seem to be any existing libmagic rules
to recognize ARM and MIPS kernel images at the moment :-(

See android/kernel/kernel_utils*

3) Modify the emulator startup code to perform auto-detection
when possible (broken on Windows, and non Intel archs, see
comment above).

4) Modify the kernel command line generation to handle the new
TTY device naming

5) Modify the Goldfish pipe virtual device implementation
(since the device name presented to the kernel also changed).

This should be enough to auto-detect Linux 3.10+ x86_64 kernel
images on Linux.

Change-Id: Ied517f8a1fdeb18d84fa9a12ebcdc3daa1f41d9a
vd/hardware-properties.ini
vd/hw-config.c
vd/hw-config.h
vd/info.c
ernel/kernel_utils.cpp
ernel/kernel_utils.h
ernel/kernel_utils_testing.h
ernel/kernel_utils_unittest.cpp
ain.c
tils/path.h
dc78122d7b55c6970b9756b8aeaaf0da9d088ae0 07-Mar-2014 David 'Digit' Turner <digit@google.com> Enable x86_64 emulation support.

At last, we can support x86_64 targets by simply adding
TARGET_X86_64 1 in target-x86/config.h.

+ Recognize 'x86_64' as a valid CPU ABI in build.prop
and associate it with 'emulator-x86' properly.

+ Remove obsolete definition of TARGET_PHYS_ADDR_SPACE_BITS,
since this is now handled by target-*/cpu.h anyway.

+ Add missing util/host-utils.c required by x86_64 helper
functions in target-i386/op_helper.c

+ Remove obsolete VPATH entry in top-level Makefile.

This replaces the patches:
https://android-review.googlesource.com/80370
https://android-review.googlesource.com/80371

NOTE: This still only supports 3.4 kernels, for 3.10 and
higher, a future patch will address required changes.

Change-Id: Iad221ac96b68fd1a1a8ca89650ef5db69c74c312
vd/util.c
onfig/config.h
onfig/target-x86/config.h
48fbbc097293db01bdfb3be6511a8a40451b4db0 07-Mar-2014 David 'Digit' Turner <digit@google.com> Cleanup HOST_LONG_BITS, HOST_I386 and HOST_X86_64

HOST_LONG_BITS is now computed automatically in
include/qemu-common.h so remove all the configuration/probing
that was required before this patch to get the correct value.

Also get rid of HOST_I386 and HOST_X86_64 since they are not
needed anymore.

Change-Id: I61823a896033e38938346242b7aea78d3e832826
onfig/darwin-x86/config-host.h
onfig/darwin-x86_64/config-host.h
onfig/freebsd-x86/config-host.h
onfig/linux-ppc/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
pengles.c
5cb5c0b8c5145dc0002b24e1421a3fa7a697475e 17-Feb-2014 David 'Digit' Turner <digit@google.com> savevm.c: Getting closer to upstream.

This patch refactors savevm.c considerably to get much closer
to upstream. The main benefit is the introduction of savevm_register()
and savevm_unregister() functions, which allow the client to provide
a description of the state through a VMStateDescription structure.

The 'legacy' register_savevm() and unregister_savevm() are still
provided (just like upstream does). Future patches will 'upgrade'
our virtual devices to the new interface.

NOTE: Since DeviceState is not implemented properly yet, qdev_get_path()
is stubbed to always return NULL.

Change-Id: I7bfa201da40a0e470fafde6ccc002a4216ecd9c1
w-qemud.c
af061c540b1fe78626ef7d3923bb98e98483f0fd 28-Feb-2014 David 'Digit' Turner <digit@google.com> Build system refinements.

This patch contains changes to the standalone build system
that are preparing for the ability to build the GPU emulation
libraries directly from sources with it.

This requires several patches to said GPU emulation sources
though.

+ Add support for auto-generated C++ files.
+ Add support for host shared libraries.
+ Cleanup 64-bit build conditionals.
+ Build SDL and SDLmain as their own static libraries.

Change-Id: I88dca965d47432dc6b41428d39869f628632d33d
uild/binary.make
uild/clear_vars.make
uild/definitions.make
uild/host_executable.make
uild/host_shared_library.make
a95a4dc1d37f9fa2f133e750312ee5c3440c4710 26-Feb-2014 Arthur Blume <arthurb@google.com> b/13188424: Add support for onion in Android emulator skins
Layout file can now include onion { } section.

Change-Id: I2fa4e975bee3ce4fc0390e3c7ce3f4edd268241a
kin/file.c
kin/file.h
kin/window.c
2cab5d516a046dd00ab967f4bfa73cb07adee1ed 27-Feb-2014 David 'Digit' Turner <digit@google.com> Allow 64 concurrent emulators to run easily.

This increases the threshold from 16 to 64.

Note that a similar change is needed to let the ADB server
see more than 16 existing emulator instances when it starts
after them.

Change-Id: I61b9ebd7241764c479c3d2571f79499be17443d6
lobals.h
emu-setup.c
d2c0852277077455c30ec405d02db34f64b67381 26-Feb-2014 David 'Digit' Turner <digit@google.com> package-release.sh: Add --darwin-ssh=<host> option

It is now possible to package Darwin binaries from Linux,
using SSH to connect to a remote host where the build will
happen. To do so, use --darwin-ssh=<host>.

Alternatively, one can define ANDROID_EMULATOR_DARWIN_SSH
in its environment to get the same effect by default.

+ android-configure.sh: Always try to use the host ccache,
if available, if USE_CCACHE is not set to 0. Useful to
speed up remote builds.

+ android-configure.sh/android-rebuild.sh will strip all
generated binaries, unless --debug is used.

+ Properly cleanup temporary files created by android-configure.sh
to avoid polluting /tmp with android-<pid>-test* files.

Change-Id: If4147d35e55ca393463e2f1084841f02bac1fd63
uild/common.sh
e87cd78d4634396f2734c381f5ac77fd70e8858e 26-Feb-2014 David 'Digit' Turner <digit@google.com> Fix Darwin build.

OS X doesn't provide malloc_usable_size() but malloc_size() instead.
Also include <malloc/malloc.h> instead of <malloc.h> on this platform.

+ Factor the detection/declaration of USE_MALLOC_USABLE_SIZE in
a header to avoid repetitions.

Change-Id: Id9a391f07b14a2459a3fe510c89ad52ba4d3a3fd
ase/String.cpp
ase/containers/PodVector.cpp
ase/memory/MallocUsableSize.h
ase/memory/MallocUsableSize_unittest.cpp
c005246ed03de874fdc432073ba8e5e8ebfed922 25-Feb-2014 David 'Digit' Turner <digit@google.com> Remove trailing spaces in misc sources.

Change-Id: I573d4e816112b7401b3c824fbe773b85a8601531
vd/info.c
vd/util.c
vd/util.h
ase/EintrWrapper_unittest.cpp
ase/Log.cpp
ase/Log.h
ase/Log_unittest.cpp
ase/StringView.h
ase/StringView_unittest.cpp
ase/files/PathUtils.cpp
ase/files/PathUtils_unittest.cpp
ase/memory/ScopedPtr.h
ase/memory/ScopedPtr_unittest.cpp
mdline-option.c
onfig/check-esd.c
onfig/check-pulseaudio.c
oadpng.c
ain-emulator.c
ain.c
ser-config.c
tils/file_data.c
tils/file_data_unittest.cpp
tils/property_file.c
tils/property_file_unittest.cpp
d3f2c27ff9f611e5047a35cb20ed53f548214fed 19-Feb-2014 David 'Digit' Turner <digit@google.com> New C++ helper classes.

This adds a few useful C++ helper classes to android/base/
that will be used in the future by other patches.

+ Add android/base/String.h, a slightly more efficient version
of std::string.

+ Add android/base/containers/StringVector.h, an optimized
vector of strings that is much more efficient than
std::vector<std::string> and should use less memory.

+ Add android/base/containers/PodVector.h which defines
an efficient std::vector<> equivalent for POD-struct
compatible types.

+ Modify PathUtils.h to use StringVector instead of
std::vector<std::string>.

+ Modify android/utils/file_data.c to get rid of valgrind
complaints when running the unit test suite.

+ Add android/base/Limits.h to get reliable integer
limit macros in C++.

Change-Id: Id9374aec658383c29be70a798ba17867664f69d3
ase/Limits.h
ase/String.cpp
ase/String.h
ase/StringView.h
ase/String_unittest.cpp
ase/containers/PodVector.cpp
ase/containers/PodVector.h
ase/containers/PodVector_unittest.cpp
ase/containers/StringVector.cpp
ase/containers/StringVector.h
ase/containers/StringVector_unittest.cpp
ase/files/PathUtils.cpp
ase/files/PathUtils.h
ase/files/PathUtils_unittest.cpp
tils/file_data.c
890f46464b0a35cbee882a5d62bd86a49879cabc 24-Feb-2014 David 'Digit' Turner <digit@google.com> Fix Ext4 filesystem support.

This patch fixes the way the emulator handles Ext4 partition images.

Before the patch:

- The hardware property 'hw.useext4' was used to determine whether
the partition images use yaffs2 (for 'no') or ext4 (for 'yes').
The default value was based on the API level, since ext4 is
used since Android 4.4 (API level 19), but it was easy to get
confused, resulting in the inability to properly boot the
AVD. The symptom was not trivial, i.e.:

- Mounting /system with the disk image failed, so the
system kept using the ramdisk mount.

- Later, logcat contained plenty of complaints that some
stuff couldn't be found under /system/bin/

After the patch:

- The partition format is simply auto-detected by probing the
start of the disk image. The hardware property has not been
removed because doing this breaks snapshots, but it is now
tagged as deprecated.

+ Move the ext4 probing code from android/avd/util.* to
android/filesystems/ext4_utils.* and add proper unit tests.

Change-Id: Iab24191e491d4cb8589dd13408618a0d13efeb76
vd/hardware-properties.ini
vd/hw-config.c
vd/info.c
vd/util.c
vd/util.h
ase/files/ScopedStdioFile.h
ase/files/ScopedStdioFile_unittest.cpp
ilesystems/ext4_utils.cpp
ilesystems/ext4_utils.h
ilesystems/ext4_utils_unittest.cpp
naphost-android.c
6aff02b9b67f734329c58db3c2da6304aeb770bf 18-Feb-2014 David 'Digit' Turner <digit@google.com> opengl: Simplify emulator build.

This patch simplifies the emulator build configuration to support
OpenGLES emulation. More precisely:

- Remove the include of <libOpenGLRender/render_api.h> and provide
the corresponding declarations in android/opengles.c in a way
that make them easy to call indirectly after using dlopen()/dlsym()
to resolve the symbols.

This makes the emulator much easier to build as a standalone
program (it now only depends on external/gtest, and that's only
for unit tests).

- Fix android-configure.sh to properly detect the location of
host libraries (it was broken for Windows). Also do not error
if the libraries cannot be found, since the emulator will simply
not enable GPU emulation if they are not available at runtime.

- Remove CONFIG_ANDROID_OPENGLES, QEMU_OPENGLES_INCLUDE and
QEMU_OPENGLES_LIBS from the build, since they are not needed
anymore.

Change-Id: Ifd300400df5833091e1f06e56d0507de2b973390
onfig/darwin-x86/config-host.h
onfig/darwin-x86_64/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
pengles.c
4403db3f183398aa4cfc252c3b22441f43f41b09 17-Feb-2014 David 'Digit' Turner <digit@google.com> Merge aosp/master into aosp/idea133

Get latest refactoring changes into our stable tree.
Should not alter performance or features at this point.

Change-Id: I6af284e7bba7fbbbb969752c97571d772ec1dc4c
dcda949f769a11b197f4784fe299a448d87e6e14 16-Feb-2014 David 'Digit' Turner <digit@google.com> qemu-timer.c: Use upstream version.

This completely modifies the implementation of timers to match upstream,
the only difference is that the oddly-placed qemu_gpoll_ns() function is
disabled (it's not used yet).

Most of the changes here (but not all), were applied through the following
sed script:

s|qemu_get_clock\s*(\s*vm_clock\s*)|qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)|g
s|qemu_get_clock\s*(\s*rt_clock\s*)|qemu_clock_get_ms(QEMU_CLOCK_REALTIME)|g
s|qemu_get_clock_ns\s*(\s*vm_clock\s*)|qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)|g
s|qemu_get_clock_ns\s*(\s*rt_clock\s*)|qemu_clock_get_ns(QEMU_CLOCK_REALTIME)|g
s|qemu_get_clock_ms\s*(\s*vm_clock\s*)|qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL)|g
s|qemu_get_clock_ms\s*(\s*rt_clock\s*)|qemu_clock_get_ms(QEMU_CLOCK_REALTIME)|g
s|qemu_get_clock_ms\s*(\s*host_clock\s*)|qemu_clock_get_ms(QEMU_CLOCK_HOST)|g
s|qemu_get_clock_ms\s*(\s*SHAPER_CLOCK\s*)|qemu_clock_get_ms(SHAPER_CLOCK)|g
s|qemu_mod_timer\s*(|timer_mod(|g
s|qemu_del_timer\s*(|timer_del(|g
s|qemu_free_timer\s*(|timer_free(|g
s|qemu_new_timer_ms\s*(\s*rt_clock,|timer_new(QEMU_CLOCK_REALTIME, SCALE_MS,|g
s|qemu_new_timer_ns\s*(\s*rt_clock,|timer_new(QEMU_CLOCK_REALTIME, SCALE_NS,|g
s|qemu_new_timer_ms\s*(\s*vm_clock,|timer_new(QEMU_CLOCK_VIRTUAL, SCALE_MS,|g
s|qemu_new_timer_ns\s*(\s*vm_clock,|timer_new(QEMU_CLOCK_VIRTUAL, SCALE_NS,|g
s|qemu_new_timer_ms\s*(\s*host_clock,|timer_new(QEMU_CLOCK_HOST, SCALE_MS,|g
s|qemu_new_timer_ns\s*(\s*host_clock,|timer_new(QEMU_CLOCK_HOST, SCALE_NS,|g
s|qemu_new_timer_ms\s*(\s*SHAPER_CLOCK\s*,|timer_new(SHAPER_CLOCK, SCALE_MS,|g
s|qemu_put_timer\s*(|timer_put(|g
s|qemu_get_timer\s*(|timer_get(|g
s|qemu_timer_pending\s*(|timer_pending(|g
s|qemu_clock_next_deadline\s*(\s*vm_clock|qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL|g
s|qemu_clock_next_deadline\s*(\s*rt_clock|qemu_clock_deadline_ns_all(QEMU_CLOCK_REALTIME|g
s|qemu_clock_next_deadline\s*(\s*host_clock|qemu_clock_deadline_ns_all(QEMU_CLOCK_HOST|g

+ Disable icount-based clock warping/adjustments. It will be re-enabled in the future
after cpu emulation has been completely refactored.

Change-Id: Ifbcf4a52654eed3a08dfe59b0546a75d4627f758
w-sensors.c
ooper-qemu.c
haper.c
5ea914899e5dbef4e8a7454b40a3c6648173f086 13-Feb-2014 David 'Digit' Turner <digit@google.com> Add boot.prop support.

This patch allows one to specify a custom list of boot properties that
will be injected into the guest system at boot time. The properties
must be placed in a file named 'boot.prop', which can appear in the
following locations:

For AVDs:

1) In the AVD's content directory.
2) Otherwise in the system image's directory.

For Android platform builds:

1) In the $ANDROID_BUILD_OUT directory.
Note that this is different from build.prop which will be read
from $ANDROID_BUILD_OUT/system/ instead (and isn't used to
inject any properties).

Note that any '-boot-property <name>=<value>' on the command-line will
be injected after the content of 'boot.prop', overriding it unless it
begins with a 'ro.' prefix.

The patch refactors a little how information is retrieved for builds
and AVD configurations. It also fixes a few bugs in the auto-detection
logic for the target architecture / ABI.

BUG=12819077

Change-Id: I9f41f21d9de3e4d25de427f0e5a6bb517f34c5ba
vd/info.c
vd/info.h
vd/util.c
vd/util.h
ain-emulator.c
ain.c
tils/file_data.c
tils/file_data.h
tils/file_data_unittest.cpp
tils/property_file.c
tils/property_file.h
tils/property_file_unittest.cpp
11823980b127b345cac5fdf1e2ef0a3bb6c951cb 11-Feb-2014 David 'Digit' Turner <digit@google.com> android/base/files/PathUtils.h: add new header.

This patch adds a new header containing utility routines used
to manage file system paths in a consistent way.

Change-Id: I77bac2ca1834ab08a500d0f786fb800d0cd97b93
ase/files/PathUtils.cpp
ase/files/PathUtils.h
ase/files/PathUtils_unittest.cpp
26aa443200a9267433c92ae83bed88ac4ce90361 11-Feb-2014 David 'Digit' Turner <digit@google.com> android/base/EintrWrapper.h: EINTR handling C++ helper.

This is the C++ equivalent of android/utils/eintr_wrapper.h, but
this one uses CHECK() from android/base/Log.h instead to abort in
case of excessive looping.

Change-Id: I9715c850606367a02d988b926b229cdcb4f40f9a
ase/EintrWrapper.h
ase/EintrWrapper_unittest.cpp
f9077a88a0b9edca081b0810dde73d108db087a6 10-Feb-2014 David 'Digit' Turner <digit@google.com> Move main loop logic to main-loop.c

This patch moves most of the logic dealing with the internal main loop
into the main-loop.c file, to match upstream. Note however that the actual
implementation is not changed, and is still _very_ different from upstream.

However, this decouples a few more things to make upcoming refactors
significantly easier. This should not affect performance in any way.

+ Move the log rotation logic, which is specific to QEMU, to
log-rotate-android.c and include/android/log-rotate.h, it's likely
that the use of SIGUSR1 will not be maintained in the future, because
upstream uses that to signal virtual CPU threads internally instead.

Change-Id: I7bc886778fa70742c165b1dfe77637564910764e
naphost-android.h
494b129f77a2254e235244c605fe8a21f7188edd 05-Feb-2014 David 'Digit' Turner <digit@android.com> util/compatfd.c: upstream implementation.

Change-Id: I1b4eceddfe65d1112e007f9a440eeb2349e7d396
onfig/linux-x86/config-host.h
171dd0bf53f93e64b71d3edc958e15f40c96748d 04-Feb-2014 David 'Digit' Turner <digit@android.com> Remove CONFIG_TRACE support.

It was limited to ARMv5, and didn't work correctly. Moreover, it
made integrating upstream changes difficult, so remove it for now.

Change-Id: I7da7a1e00b241d452c6dff5a318ccfedc5d7a8a4
onfig/config.h
onfig/darwin-x86/config-host.h
onfig/darwin-x86_64/config-host.h
onfig/linux-ppc/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
ain.c
rotocol/core-commands-qemu.c
emulator.c
race.c
aa1180ca05774398245953deb306c0e25829afee 28-Jan-2014 David 'Digit' Turner <digit@android.com> stub monitor implementation.

This removes monitor.c and replaces it with a smaller monitor-android.c
which implements only the minimum stubs required for the Android emulator
(really snapshot support).

NOTE: After this change, the 'monitor' command in the Android console
will always return with a KO.

Change-Id: I8b631b017d7418cbc3fd3ba36e55147ce2630459
onsole.c
c79de3c66b3506a1c6b00daedaea9b616b3e140c 23-Jan-2014 David 'Digit' Turner <digit@android.com> Get QEMUFile implementation to upstream level.

Change-Id: I0c5003876c7df0246118cb903cf6b834fac82687
oot-properties.c
9b3a4b03315af9bcdf282243059e8fd1ce1c5c70 23-Jan-2014 David 'Digit' Turner <digit@android.com> qemu-common.h: Remove include of cpu.h

The "qemu-common.h" included "cpu.h" when NEED_CPU_H was defined, which
introduced some nasty circular header dependency issues that affect later
patches in this series.

This patch removes the include, and fixes all other sources to include
"cpu.h" as needed instead.

+ Move loader declarations to "hw/loader.h"
+ Move some stuff from "qemu/timer.h" to "exec/cpu-all.h"

Change-Id: Ida1a4eccd889bae450b35ee32a931273ffe1f8d8
ain.c
73dd5fc7da33280597dc6302ad8116d3723ebf3e 04-Feb-2014 David 'Digit' Turner <digit@android.com> Rename android/config.h to android/config-file.h

This is to avoid naming conflicts later when including
"config.h" in android/main.c to get the correct definition
of TARGET_X86 and other macros.

Change-Id: I4743bf207597721612386213208efe0c7e2f41c5
onfig-file.c
onfig-file.h
onfig.c
onfig.h
ain-common.h
ain.c
emulator.h
kin/file.h
kin/keyboard.h
kin/keyset.h
94cf4e227249b0575c2f1b945357cf500864bb6e 16-Jan-2014 David 'Digit' Turner <digit@android.com> android/hw-pipe-net.c: Remove compiler warning

Change-Id: I3b1cadfacaab4973f21a83333e66704027fbbabb
ockets.c
a2c14f947951612b45024095afd2210aa7368773 04-Feb-2014 David 'Digit' Turner <digit@google.com> Cleanup: Remove 100+ compiler warnings.

This is a big cleanup that removes compiler warnings by performing
the following:

- Remove unused functions or variables.
- Change pointer cast to be alias safe using unions.
- Use __attribute__((unused)) on some local variable definitions
when their usage depends on conditional defines that are not
always true when compiling the same source several times.
- Fix a couple array indexing bugs.

There are still a few warnings from the JSON lexer, libjpeg and
the TCG helpers though, but the overall compilation is much cleaner.

BUG=NONE

Change-Id: Ic4483e6402b266ecfd7bca8c92a73d8fcf392a1f
vd/info.c
onsole.c
w-pipe-net.c
w-qemud.c
ain-common.c
ain-emulator.c
kin/image.h
kin/surface.c
tils/dll.c
tils/eintr_wrapper.c
tils/path.c
af81d7432594d8459c4fb9f76c5e8a981f69a94c 03-Feb-2014 David 'Digit' Turner <digit@google.com> Add android/utils/eintr_wrapper.h

Add a new Android-specific header that defines two macros to
handle EINTR in a consistent way, as well as allow detecting
when a system call loops too many times and exit with a fatal
error message when that happens.

+ Unit tests.

+ Update existing code under android/ which uses to deal directly
with EINTR to use the new HANDLE_EINTR() and IGNORE_EINTR()

+ Remove EINTR checks for functions that call socket_xxx() functions
which already loop around EINTR.

Change-Id: I1d2ee64d9743a2edc506f616465ea091878db620
sync-socket.c
sync-utils.c
amera/camera-capture-linux.c
amera/camera-common.h
onfig.c
onsole.c
ain-common.c
rotocol/fb-updates-impl.c
rotocol/ui-commands-impl.c
napshot.c
ockets.c
ync-utils.c
tils/eintr_wrapper.c
tils/eintr_wrapper.h
tils/eintr_wrapper_unittest.cpp
tils/filelock.c
tils/mapfile.c
tils/mapfile.h
tils/panic.h
tils/path.c
tils/system.h
tils/timezone.c
ef00997efb352a0ab282c9d7bb960be500d3de8b 29-Jan-2014 David 'Digit' Turner <digit@google.com> Fix crash when -snapshot-list is used on 64-bit systems.

The implementation of the -snapshot-list option casted a uint32_t* to time_t*.
On 64-bit systems, time_t is 64-bit so any load from the same address used to
collect random bits in the higher half of the value.

This resulted, in localtime() returning NULL, because the read value was too
high in certain cases, and thus a crash.

This patch fixes the issue and makes snapshot_format_create_date() more resilient
to invalid time_t values read from the snapshot (which could happen with a
corrupted snapshot file).

http://b.android.com/34233 (though this bug also describes other crashes).

Change-Id: I194ff961bbbeef4dc9e77dae72fae3e8f8536f33
napshot.c
7745b32edeb9ec1c2763030bb42a8fc0c3e6d8c4 22-Jan-2014 David 'Digit' Turner <digit@google.com> Fix Windows command-line quoting.

When the 'emulator.exe' program invokes the real emulation program
(e.g. 'emulator-arm.exe' or 'emulator-x86.exe'), it passes its own
command-line arguments through execv().

Unfortunately, on Windows this doesn't work, as the command-line
arguments must be quoted in a special way. This is describ
is described in detail in the MSDN blog post named
"Everyone quotes command line arguments the wrong way" [1]

The code under android/main-emulator.c had several problems:

- It only quoted the first parameter (the program name), but
not any other one.

- The quoting was too naive to work in the general case.

This patch adds a utility function named win32_cmdline_quote()
to perform correct quoting, and changes android/main-emulator.c
to use it.

Fix for http://b.android.com/18317

[1] http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx

Change-Id: I7cfd6ddd10706c7aeb6c7df56e20398277d78409
ain-emulator.c
tils/assert.h
tils/compiler.h
tils/system.h
tils/win32_cmdline_quote.c
tils/win32_cmdline_quote.h
tils/win32_cmdline_quote_unittest.cpp
a07421fecfcd0b34d60ff41da7a8621c92cbf220 18-Jan-2014 David 'Digit' Turner <digit@google.com> Fix OSX standalone build to use the right XCode SDK.

XCode changes the location of the SDKs, so use the same logic
as the platform build to detect it and select the "older" SDK
found on the machine.

+ Add missing configuration headers for the standalone
Darwin 64-bits build.

Change-Id: I27a0f533732123044d0598a17301985c24256c68
uild/common.sh
onfig/darwin-x86_64/SDL_config.h
onfig/darwin-x86_64/config-host.h
7342c8a36068977855b3becfe1bc994147e837bb 21-Jan-2014 David 'Digit' Turner <digit@google.com> Fix Windows unittests build.

Turns out that emulator_common depended on a symbol (android_verbose)
that was declared outside of the module, for no good reason. This
broke the Windows build of emulator_unittests, so fix the glitch
by moving the symbol declaration to the appropriate location.

Change-Id: I325e79435c0c2cfcfa9850689bd6d0b09c40eac1
ain.c
tils/debug.c
tils/debug.h
57deae3dd6a33ede5b9c7daebaabf795f3525fc3 21-Jan-2014 David 'Digit' Turner <digit@google.com> Introduce GoogleTest-based unit tests.

This patch introduce the first GoogleTest-based unit test for the emulator
sources. The goal here is to be able to easily automate the testing of the
Android-specific code in the emulator (i.e. really what's under android/),
since making the same for QEMU is essentially impossible.

+ Introduce 'emulator-libgtest' and 'emulator64-libgtest' host static
libraries, built from the sources from extern/gtest. The reason the
Android.mk module definitions in this directory are not used are
mainly because we need to build both the 32-bit and 64-bit libraries
at the same time, which the platform build doesn't support easily.

Also, this will be reused later for the GPU emulation libraries
when built with the standalone build.

+ Only a single test is added here, more as a proof-of-concept.
To run the test suite, invoke the 'emulator_unittests' or
'emulator64_unittests' program(s).

+ Note that unit-tests are written in C++, adding more tests might
require fixing our headers to be included in this language.

BUG=NONE

Change-Id: If518ba30e38f202a4214ffd258fa5a07d6e48868
uild/definitions.make
tils/bufprint.h
tils/bufprint_unittest.cpp
7275548a990c6ef0db47b791e839f231d2d991a4 21-Jan-2014 David 'Digit' Turner <digit@google.com> Fix ADB bridge port number being sent to ADB.

When the emulator starts up, it tries to connect to the ADB server on the
host and send it the port number of the ADB bridge that was setup. That
allows ADB to know that a new emulator instance started, and communicate
with it.

This patch fixes two bugs:

- The previous code could only deal with port numbers of exactly 4 digits,
which is ok when using the '-port <port>' option, which only supports
values between 5554 and 5584, at the moment, but fails when using
'-ports <console>,<adb>', where the values of <console> and <adb> can
be larger than 10000.

- Second, even when using 'ports <console>,<adb>', it always reported
'<console> + 1' as the ADB bridge port, which is generally incorrect.

See https://code.google.com/p/android/issues/detail?id=60024

Change-Id: I3ffc641967f56ee20f01aa0e36af605e17f81722
emu-setup.c
baf99eed1bde1af072679f77930bc9210fba267b 08-Feb-2014 David 'Digit' Turner <digit@google.com> android/base/memory/ScopedPtr.h: new helper class.

Change-Id: I170b87c15ea7cb294ef66bf3c7a74706b06a8869
ase/Compiler.h
ase/memory/ScopedPtr.h
ase/memory/ScopedPtr_unittest.cpp
ef457d2a39ce5f164b1b95c10181e4a99f620a19 07-Feb-2014 David 'Digit' Turner <digit@google.com> android/base/StringView.h: Another C++ helper class.

Change-Id: I744ad9de0c088238655c786c75261baf9c9c9deb
ase/StringView.cpp
ase/StringView.h
ase/StringView_unittest.cpp
7a41eef6b64b2a07cf170844c897e4ae1cda998e 07-Feb-2014 David 'Digit' Turner <digit@google.com> android/base/Log.h: Add C++ Logging helper class.

Android-specific portions of the emulator are going to gradually
switch to C++ to make the code easier to structure, test and
refactor. This shall not impact anything that QEMU depends on.

This is the first patch in a series that will gradually operate
these changes. It introduces "android/base/Log.h", which provides
useful macros to perform logging and error checks.

Change-Id: I3d25bd029009d3e428ed2b5b3a02ac41313325c0
ase/Log.cpp
ase/Log.h
ase/Log_unittest.cpp
cef730bbc330b4a0ad84d12c71fdcb010ddb3772 04-Feb-2014 David 'Digit' Turner <digit@google.com> Cleanup: Remove 100+ compiler warnings.

This is a big cleanup that removes compiler warnings by performing
the following:

- Remove unused functions or variables.
- Change pointer cast to be alias safe using unions.
- Use __attribute__((unused)) on some local variable definitions
when their usage depends on conditional defines that are not
always true when compiling the same source several times.
- Fix a couple array indexing bugs.

There are still a few warnings from the JSON lexer, libjpeg and
the TCG helpers though, but the overall compilation is much cleaner.

BUG=NONE

Change-Id: Ic4483e6402b266ecfd7bca8c92a73d8fcf392a1f
vd/info.c
onsole.c
w-pipe-net.c
w-qemud.c
ain-common.c
ain-emulator.c
kin/image.h
kin/surface.c
tils/dll.c
tils/eintr_wrapper.c
tils/path.c
52e9942c2e0ffac6f7ccc2d2c916c855ad62c33d 03-Feb-2014 David 'Digit' Turner <digit@google.com> Add android/utils/eintr_wrapper.h

Add a new Android-specific header that defines two macros to
handle EINTR in a consistent way, as well as allow detecting
when a system call loops too many times and exit with a fatal
error message when that happens.

+ Unit tests.

+ Update existing code under android/ which uses to deal directly
with EINTR to use the new HANDLE_EINTR() and IGNORE_EINTR()

+ Remove EINTR checks for functions that call socket_xxx() functions
which already loop around EINTR.

Change-Id: I1d2ee64d9743a2edc506f616465ea091878db620
sync-socket.c
sync-utils.c
amera/camera-capture-linux.c
amera/camera-common.h
onfig.c
onsole.c
ain-common.c
rotocol/fb-updates-impl.c
rotocol/ui-commands-impl.c
napshot.c
ockets.c
ync-utils.c
tils/eintr_wrapper.c
tils/eintr_wrapper.h
tils/eintr_wrapper_unittest.cpp
tils/filelock.c
tils/mapfile.c
tils/mapfile.h
tils/panic.h
tils/path.c
tils/system.h
tils/timezone.c
0cfc1fdd0eb6476613be6ca811acf3dac65f2328 29-Jan-2014 David 'Digit' Turner <digit@google.com> Fix crash when -snapshot-list is used on 64-bit systems.

The implementation of the -snapshot-list option casted a uint32_t* to time_t*.
On 64-bit systems, time_t is 64-bit so any load from the same address used to
collect random bits in the higher half of the value.

This resulted, in localtime() returning NULL, because the read value was too
high in certain cases, and thus a crash.

This patch fixes the issue and makes snapshot_format_create_date() more resilient
to invalid time_t values read from the snapshot (which could happen with a
corrupted snapshot file).

http://b.android.com/34233 (though this bug also describes other crashes).

Change-Id: I194ff961bbbeef4dc9e77dae72fae3e8f8536f33
napshot.c
f14f75e43b3eb4bc42dd45efa71d149c48ccb136 23-Jan-2014 David 'Digit' Turner <digit@google.com> Merge "Fix OSX standalone build to use the right XCode SDK." into idea133
60d0a1536e4e75cee039c09da65a2e994be2e106 22-Jan-2014 David 'Digit' Turner <digit@google.com> Fix Windows command-line quoting.

When the 'emulator.exe' program invokes the real emulation program
(e.g. 'emulator-arm.exe' or 'emulator-x86.exe'), it passes its own
command-line arguments through execv().

Unfortunately, on Windows this doesn't work, as the command-line
arguments must be quoted in a special way. This is describ
is described in detail in the MSDN blog post named
"Everyone quotes command line arguments the wrong way" [1]

The code under android/main-emulator.c had several problems:

- It only quoted the first parameter (the program name), but
not any other one.

- The quoting was too naive to work in the general case.

This patch adds a utility function named win32_cmdline_quote()
to perform correct quoting, and changes android/main-emulator.c
to use it.

Fix for http://b.android.com/18317

[1] http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx

Change-Id: I7cfd6ddd10706c7aeb6c7df56e20398277d78409
ain-emulator.c
tils/assert.h
tils/compiler.h
tils/system.h
tils/win32_cmdline_quote.c
tils/win32_cmdline_quote.h
tils/win32_cmdline_quote_unittest.cpp
be7c3c544ba429acf6b98a98fc9e79a85d0de761 18-Jan-2014 David 'Digit' Turner <digit@google.com> Fix OSX standalone build to use the right XCode SDK.

XCode changes the location of the SDKs, so use the same logic
as the platform build to detect it and select the "older" SDK
found on the machine.

+ Add missing configuration headers for the standalone
Darwin 64-bits build.

Change-Id: I27a0f533732123044d0598a17301985c24256c68
uild/common.sh
onfig/darwin-x86_64/SDL_config.h
onfig/darwin-x86_64/config-host.h
a13a4d45ccdaf02d033bb9d8ea82d7b35a8a5834 21-Jan-2014 David 'Digit' Turner <digit@google.com> Fix Windows unittests build.

Turns out that emulator_common depended on a symbol (android_verbose)
that was declared outside of the module, for no good reason. This
broke the Windows build of emulator_unittests, so fix the glitch
by moving the symbol declaration to the appropriate location.

Change-Id: I325e79435c0c2cfcfa9850689bd6d0b09c40eac1
ain.c
tils/debug.c
tils/debug.h
76256c273e124a7973a6d3bc406b6631b1ca773a 21-Jan-2014 David 'Digit' Turner <digit@google.com> Merge "Introduce GoogleTest-based unit tests." into idea133
c491b52a8b60aaf537654ab1ffcea796328bf03a 21-Jan-2014 David 'Digit' Turner <digit@google.com> Introduce GoogleTest-based unit tests.

This patch introduce the first GoogleTest-based unit test for the emulator
sources. The goal here is to be able to easily automate the testing of the
Android-specific code in the emulator (i.e. really what's under android/),
since making the same for QEMU is essentially impossible.

+ Introduce 'emulator-libgtest' and 'emulator64-libgtest' host static
libraries, built from the sources from extern/gtest. The reason the
Android.mk module definitions in this directory are not used are
mainly because we need to build both the 32-bit and 64-bit libraries
at the same time, which the platform build doesn't support easily.

Also, this will be reused later for the GPU emulation libraries
when built with the standalone build.

+ Only a single test is added here, more as a proof-of-concept.
To run the test suite, invoke the 'emulator_unittests' or
'emulator64_unittests' program(s).

+ Note that unit-tests are written in C++, adding more tests might
require fixing our headers to be included in this language.

BUG=NONE

Change-Id: If518ba30e38f202a4214ffd258fa5a07d6e48868
uild/definitions.make
tils/bufprint.h
tils/bufprint_unittest.cpp
3237fe08f1504d817a02747d2eba8e28e1d3400b 21-Jan-2014 David 'Digit' Turner <digit@google.com> Fix ADB bridge port number being sent to ADB.

When the emulator starts up, it tries to connect to the ADB server on the
host and send it the port number of the ADB bridge that was setup. That
allows ADB to know that a new emulator instance started, and communicate
with it.

This patch fixes two bugs:

- The previous code could only deal with port numbers of exactly 4 digits,
which is ok when using the '-port <port>' option, which only supports
values between 5554 and 5584, at the moment, but fails when using
'-ports <console>,<adb>', where the values of <console> and <adb> can
be larger than 10000.

- Second, even when using 'ports <console>,<adb>', it always reported
'<console> + 1' as the ADB bridge port, which is generally incorrect.

See https://code.google.com/p/android/issues/detail?id=60024

Change-Id: I3ffc641967f56ee20f01aa0e36af605e17f81722
emu-setup.c
77fe76405619b0793a5fb07d7307b993c9279b57 13-Jan-2014 Stuart Scott <stuartscott@google.com> Adding 400dpi support to emulator.

Change-Id: I7d04988e539f29028b86ba6c4daae5bae3be9543
w-lcd.c
w-lcd.h
aa8236dc1b1ea300ab18716db5b8fab42aca3ca7 10-Jan-2014 David 'Digit' Turner <digit@android.com> qemu-malloc.c: Remove qemu-specific heap routines.

Remove all uses of qemu_malloc/malloc0/realloc/free/strdup/etc to use
the equivalent GLib functions (g_malloc, g_free, ...) as per upstream.

This also removes qemu-malloc.c since it's no longer required.

Change-Id: I3c36a0396b73dd114b8da385b43f56a2e54dbb15
ooper-qemu.c
rotocol/core-commands-impl.c
rotocol/core-commands-qemu.c
rotocol/ui-commands-proxy.c
haper.c
6ba28da38c1b175e4535774051f4ae9ff0943b03 10-Jan-2014 David 'Digit' Turner <digit@android.com> Update doc to reflect new Goldfish source locations

+ update docs/ANDROID-QEMU-PIPE.TXT to include missing
description of "parameters block" access mode.

Change-Id: I02b96ebd484d524410b4c5d8a780cf36596d908b
ndroid.h
ultitouch-screen.h
kin/window.c
f0665425f3d93ce5c43147e00d8d5259708f0176 17-Dec-2013 David 'Digit' Turner <digit@android.com> hw/goldfish_* -> hw/android/goldfish/*

Change-Id: I96fd376258e3bcd8357625373176ba53cdde12d0
ain.c
f5bc01c356e1fa924ed07aadf589b3663873593e 17-Dec-2013 David 'Digit' Turner <digit@android.com> hw/goldfish_*.h -> include/hw/android/goldfish/*.h

Change-Id: If7f9a46496fad5d936800215b21794bbab185b8a
onsole.c
w-pipe-net.c
w-qemud.c
13209b93e7cf3eb65cd45c930931fc7b3002a30e 17-Dec-2013 David 'Digit' Turner <digit@android.com> varint.[hc] -> android/

Change-Id: Ia18e0311b0eed344d0b88978abb26de6637bc355
arint.c
arint.h
6e2eb78f2b52b6fff73a72995bc4356d6e67e773 15-Dec-2013 David 'Digit' Turner <digit@android.com> Move tcpdump.h -> include/android/tcpdump.h

+ tcpdump.c -> android/qemu-tcpdump.c

Change-Id: Ib3a19f62f910b6562285fab3bcc98178ea9a4e9e
onsole.c
emu-tcpdump.c
e7216d82dbaa19892ad62b07402d512234559a6e 15-Dec-2013 David 'Digit' Turner <digit@android.com> qemu-char.h -> include/sysemu/char.h

Change-Id: I8e3d6e9a73a347978789a98035e89ea1e03b59aa
harpipe.c
onsole.c
ps.c
w-control.c
w-kmsg.c
w-qemud.c
w-sensors.c
ooper-qemu.c
ockets.c
e1e03df288d5a44bfbffbd86588395c7cbbc27df 15-Dec-2013 David 'Digit' Turner <digit@android.com> Move more headers.

cbuffer.h, charpipe.h -> include/android/
cbuffer.c, charpipe.c -> android/
qemu_debug.h -> include/android/qemu-debug.h
block.h, block_int.h -> include/block/
elf.h -> include/
hax.h -> include/exec/
qemu-lock.h -> include/exec/spinlock.h
readline.h -> include/monitor/readline.h
qemu-common.h - include
qemu-barrier.h -> include/qemu/atomic.h
qemu-log.h -> include/qemu/log.h

Change-Id: I86b998932461caa35d347cd71b40bd6e4ec7d84d
buffer.c
harpipe.c
w-control.c
w-kmsg.c
w-qemud.c
ockets.c
34c48ff1e3ad5cd2084ca40188754d45f423750b 15-Dec-2013 David 'Digit' Turner <digit@android.com> Move headers to incude/sysemu/

+ arch_init.h, balloon.h, blockdev.h, dma.h, kvm.h,
sysemu.h -> include/sysemu/

+ kvm-android.h -> include/android/kvm.h

Change-Id: I3d334e1b6eea836fdcee9f36fe693cf4c74be54f
onsole.c
ain.c
rotocol/fb-updates.h
emu-setup.c
6af6765e2f3bc930d0dce21d752bea570a1b1362 14-Dec-2013 David 'Digit' Turner <digit@android.com> Move monitor.h to include/monitor/

+ monitor-android.h -> include/android/monitor.h

Change-Id: Iad8afa71461dd70c6997902516fbf4ef7cb8babe
onsole.c
d4e803c5e928790b14704ae7f0b048da7ba47fab 14-Dec-2013 David 'Digit' Turner <digit@android.com> Move android-trace.h to include/android/

+ android-trace_common.h -> include/android/trace_common.h
NOTE: trace_common.h is still in the top-level directory because
the qtools first need to be updated to include the header
at include/android/trace_common.h

+ trace.c -> android/
+ user-events.h -> include/android/
+ user-events-qemu.c -> android/

Change-Id: Idbf59c8b1a5cc2872f035eb3fa7f9922755f357d
onsole.c
eycode-array.c
ain.c
ultitouch-screen.c
rotocol/core-commands-impl.c
rotocol/core-commands-qemu.c
rotocol/user-events-impl.c
rotocol/user-events-proxy.c
emulator.c
kin/trackball.c
kin/window.c
race.c
ser-events-qemu.c
d413fa5f2916a2a46494edb320340486b262644c 14-Dec-2013 David 'Digit' Turner <digit@android.com> Move iolooper.h to include/android/

+ Move iolooper-select.c to android/

Change-Id: I5154aa491132b43c3b80c248bb8dd968f4d41c2a
db-server.c
sync-socket-connector.c
sync-socket.c
olooper-select.c
ooper-generic.c
ain.c
rotocol/core-connection.c
dk-controller-socket.c
ync-utils.c
1634ff531961026312bec4b66463bbd8a689c6ea 14-Dec-2013 David 'Digit' Turner <digit@android.com> Move dynlink.h to include/android/

+ Move dynlink-static.c to android/
+ Move loadpng.c to android/
+ Move linux_keycodes.h to android/

Change-Id: Ibaede71e37223e86393cecc5bc86ac97ea1c97e6
ynlink-static.c
inux_keycodes.h
oadpng.c
cc330d4169441727fecf1da08aee806fc021c4e2 14-Dec-2013 David 'Digit' Turner <digit@android.com> Move net.h to include/net/

+ Move net-android.c and net.c to net/
+ Rename net-checksum.c to net/checksum.c
+ Move sockets.h and shaper.h to include/android/
and sockets.c + shaper.c to android/

+ Move vgafont.h to ui/

Change-Id: I2659a919a316d3f95aac0f9924833eeee4cb5592
db-server.c
sync-utils.h
onsole.c
ore-init-utils.c
w-pipe-net.c
ooper-generic.c
ooper-qemu.c
ain.c
rotocol/attach-ui-impl.h
rotocol/core-commands-proxy.h
rotocol/core-connection.c
rotocol/ui-commands-impl.h
haper.c
ockets.c
ync-utils.c
ync-utils.h
1c31e3e43ce4cca85a707dfff631e5e102fdeced 14-Dec-2013 David 'Digit' Turner <digit@android.com> Even more moves.

include/ui + ui/
include/qapi/qmp/ + qobject/

Change-Id: Ief236a08cb234d9dd692e85907757678ef32f035
isplay-core.h
isplay.h
ain-common.c
ain.c
rotocol/core-commands-proxy.c
rotocol/fb-updates-proxy.c
rotocol/user-events-proxy.c
7a78db75ad42aea283f5073f51891464104a9fc3 14-Dec-2013 David 'Digit' Turner <digit@android.com> Move qemu-timer.h to include/qemu/timer.h

Note: upstream still puts qemu-timer.c in the top-level
directory, so no need to move it

Change-Id: I475309d6f0040b4fd2277e52a2526825c112e91f
w-sensors.c
ooper-qemu.c
845691383dd6a0ff71acf7aee0736adba350f6a9 13-Dec-2013 David 'Digit' Turner <digit@android.com> Move osdeps.h to include/qemu/osdep.h

and osdep.c to util/osdep.c

Change-Id: Icaf5cd7dfc8f75cbe7eb324cc9ca91a976f35d57
tils/ini.c
6e9d1d4fc96a32fbac14d3e489cce32f5c69ade1 13-Dec-2013 David 'Digit' Turner <digit@android.com> Move bswap.h to include/qemu/bswap.h

Before integrating upstream patches, we need to move source
files around to match the new directory structure used there.
This is the first of such changes.

Change-Id: Ib42669003851aa5a5295dd66cfebb307c63f054f
napshot.c
5ed60d1e0865d948f3e7bba38c98bcfbb58fc24b 20-Nov-2013 Jesse Hall <jessehall@google.com> Handle long library search paths

Before launching the arch-specific emulator, the emulator wrapper adds
a directory to the library search path (LD_LIBRARY_PATH or PATH).
There were two problems that this change fixes:

- The new path was assembled in a 2048 byte buffer. If the assembled
path was longer than that, it would be truncated, in effect removing
some directories. This change dynamically allocates the buffer so
truncation doesn't happen.

- On Windows, the new directories were appended instead of prepended
to the existing search path. If the path was truncated due to the
previous problem, the new directory wouldn't be added to the path,
and the arch-specific emulator would fail to load. This isn't a real
problem now that truncation doesn't occur, but this change makes
the Windows version prepend the directory for consistency's sake.

Bug: http://b.android.com/33336
Change-Id: I13068c4871254f8507eea265f6a1b698e5e1e3ce
ain-emulator.c
7703f5500464e18216ed77291ef70608ec6b59d2 11-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Add support for xxhdpi and xxxhdpi when injecting a skin dpi.

Change-Id: I5c89b33ac317b804abb88a7f29faf51809dda1d2
w-lcd.c
w-lcd.h
185231afe57ba2ed56bb7c77a39ce8bbd64d38d1 07-Oct-2013 Nick Kralevich <nnk@google.com> emulator: Add option to control SELinux enforcement.

This change adds the following command line
options to the emulator:

-selinux disabled
-selinux permissive

This configures SELinux in either permissive or disabled modes.

"disabled" completely disables userspace support for SELinux. No
policy is ever loaded, nor is the SELinux filesystem /sys/fs/selinux
ever mounted.

"permissive" loads the SELinux policy, but puts SELinux into
permissive mode. SELinux policy violations are logged, but not rejected.

Change-Id: I97974deb5b39d5caab36032e8b282281c1e478ea
mdline-options.h
elp.c
ain.c
b5b78438ae9ff3b90aafdab0f4f25585affc22fb 23-Sep-2013 Logan Chien <tzuhsiang.chien@gmail.com> Auto-detect ext4 image file.

Although the existing code can detect the usage of ext4 file
system by the API level. However, there might be some
problem when we are building and running the emulator in
the source tree.

This CL workaround this issue by checking the magic word in
the ext4 header. If the system.img has the magic word at
0x438, then add hw.useext4 to the hardware-qemu.ini.

Related Issue:
http://code.google.com/p/android/issues/detail?id=38561

Change-Id: I0b3606911cba5f52d92157accaaba3b2caef85c1
vd/info.c
vd/util.c
vd/util.h
04b20f411ba9398fc2bfac3d93f0997cd93a86f9 11-Sep-2013 Deepanshu Gupta <deepanshu@google.com> Change sizes for ext4 images

Change page_size to 512 and extra_size to 0. This is needed to use ext4
filesystem, which is used beyond apiLevel 18, on goldfish. A new
hardware property has been added to specify which filesystem to use:
ext4 or yaffs2. The default for this property is to use yaffs2 if
apiLevel <= 18 and use ext4 otherwise. It can be overridden in AVD's
config.ini by specifying "hw.useext4=yes".

Bug: http://b.android.com/38561
Change-Id: I978afe0f742795beef66e7eaee59a8d9e76d4602
vd/hardware-properties.ini
vd/hw-config.c
cf9426292dc19d91bcf11f72d30613f83dbc3d6c 28-Nov-2012 Raphael Moll <ralf@android.com> SDK emulator: support relative path in avd root ini files.

Change-Id: I0488a930c0975dfb605fddba857739c36477286f
vd/info.c
vd/keys.h
vd/util.c
tils/path.c
6e86d77975dde8f6bb06544f0639a448d7b4f862 23-Oct-2012 Raphael Moll <ralf@android.com> Fix background color: remap ARGB depending on surface.

Change-Id: I27a2aa2477e245f43ec76fc2c5cccf5c4ebc47df
kin/window.c
d899918690d5e392897e001abfb00b151ba2b13e 09-Oct-2012 Siva Velusamy <vsiva@google.com> Show dynamic skin if enabled in AVD settings

Change-Id: I083db22b677878919a2e88bfb0df000d2ca1fda6
vd/info.c
vd/info.h
ain.c
09aa9774a68528f2269813833e2313e20d60d0d3 09-Oct-2012 Siva Velusamy <vsiva@google.com> Obtain path to dynamic skin layout folder from sdk root

Change-Id: Id83e082238f696aaa0c330020e3310b20ebe5a32
ain-common.c
ffdea0dc7537b21472d89f42cbcd230fd8d17857 08-Oct-2012 Siva Velusamy <vsiva@google.com> Display basic controls in the dynamic skin.

Change-Id: If7266ec7562aa430f676c6ae8e72e1b485538838
ain-common.c
2abcdc47688227d5683938938b0f4eecd21b3bc4 05-Oct-2012 Siva Velusamy <vsiva@google.com> Support dynamic skin layout

This CL adds support for a skin whose layout section is
generated at runtime based on the hardware configuration.

Change-Id: I5f81f665b49ce0f3ec5795d922a08b30c1f34b98
mdline-options.h
elp.c
ain-common.c
fd86ec1a03668d3187790de940cbd0fba41640dd 25-Jul-2012 Tor Norbye <tnorbye@google.com> Merge "Fix typos"
9e81591f411e4245eb29c27203fbfa6a0c2d2524 24-Jul-2012 Tor Norbye <tnorbye@google.com> Fix typos

Change-Id: Ib40b9c88cf8a9a7e37e3f40249b78fa01cd41ab4
http://code.google.com/p/android/issues/detail?id=35283
http://code.google.com/p/android/issues/detail?id=35284
vd/hardware-properties.ini
74b55003f76dbca96e4a26d98fe464081ca5341f 18-Jul-2012 Jesse Hall <jessehall@google.com> Handle SDL windows with BGRA color

The switch to CoreGraphics on OSX (instead of QuickDraw) in SDL 1.2.15
means the SDL-created window now has BGRA color order instead of ARGB.
This change makes the r5g6b5 and xbgr32 format converters handle
whatever channel ordering the main SDL surface has. Skin regions don't
need to change, since we draw them into auxiliary surfaces we created
with ARGB order, and SDL does the conversion when we blit them into
the main window.

Change-Id: I2ae0529c66c11b60b3ade7a7a742368a2ab614bd
kin/scaler.c
kin/window.c
055adab0b70c70890634649a27c12b2c25afcaca 12-Jul-2012 Jesse Hall <jessehall@google.com> Use a per-process server address for the GLES server

Previously we used a hardcoded address (tcp port, unix pipe path,
etc.) for the OpenGLRender system. Multiple emulators would all try to
listen on the same address, with the system non-deterministically (?)
choosing which one accepted each new connection. This resulted in
frames going to the wrong emulator window, one emulator shutting down
another's OpenGL system, etc.

Now the OpenGLRender server requests an unused tcp port or derives a
path from the pid, and reports the address back to the emulator client
to use for future connections from the guest.

Change-Id: I139d32615200b36b87f2d2ede4abb4060ec02776
w-pipe-net.c
pengles.c
pengles.h
342a01fc826881e6b12b7673c7d2c280295f4d9e 21-Jun-2012 Duane Sand <duanes@mips.com> [MIPS] Fix startup segfault in emulator64-mips

Avoid truncation of 64-bit host addresses for 32-bit Mips physaddrs.
Revert workaround I17fe688d19e3cd7f328721e6363bacd6e6689ca;
allow emulator to again default to emulator64-mips.

Change-Id: I0c83d8bf60fc52a758b84d8131b2bad53375aa61
Signed-off-by: Duane Sand <duanes@mips.com>
ain-emulator.c
741dc13597ac064e6a48bb2a6ec069cbc1cd0dbb 09-May-2012 Bhanu Chetlapalli <bhanu@mips.com> [MIPS] Add Goldfish target support

Basic Goldfish support for MIPS.

Also, Fix host CPU consumption when guest is idle

When the CPU is in wait state, do not wake-up if an interrupt can't be
taken. This avoid host CPU running at 100% if a device (e.g. timer) has
an interrupt line left enabled.

Also factorize code to check if interrupts are enabled in
cpu_mips_hw_interrupts_pending().

CPU consumption based on a patch from
Edgar E. Iglesias <edgar.iglesias@gmail.com>

Change-Id: Ie8371c8d0c9af1e0c8ba4cac419979350de0f5d9
Signed-off-by: yajin <yajin@mips.com.cm>
Signed-off-by: Douglas Leung <douglas@mips.com>
Signed-off-by: Bhanu Chetlapalli <bhanu@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
vd/util.c
onfig/target-mips/config.h
ain.c
cf9ba9a06006592bf47ce5837188986172e1a925 06-Jun-2012 Andrew Hsieh <andrewhsieh@google.com> Merge "Mark gles pipe connected after callback invoked"
23a322d55622b2045eaeb94ebcf5b26e8ef51369 08-May-2012 Jesse Hall <jessehall@google.com> Track started and initialized states separately

Several OpenGL ES renderer functions are called blindly by the
emulator and are supposed to do nothing if the renderer isn't running.
They were checking whether the libraries were loaded instead of
whether the renderer was started. This causes problems when the
renderer is started and then stopped (for stats collection) since the
libraries aren't unloaded.

Change-Id: Ia6c0d2e5b618ff982b55caf35c38bda9aad30ee1
pengles.c
33f5c65179d1d6608463aec013c30e18811913c8 28-Apr-2012 Jiang, Yunhong <yunhong.jiang@intel.com> Mark gles pipe connected after callback invoked

Currently the net pipe is mark connected right after initialization
through asyncConnector_run invokation. However, asyncConnector_run is
intended only invoked when callback through select.

In some extrem situation, this will cause the qemu pipe driver begin
send buffer before the connection is setup.

Change this to be asyncConnector_run usage correct, and sendBuffer will
check the connection status.

Change-Id: Ib10e72e56e1ed5017fc3654b0fce8cacf484c8f8
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
w-pipe-net.c
1129b0b97f1c204bd86ee6d19cbf3b4c2275762b 15-May-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Improve FB update protocol.

As it turned out, emulator has been sending Fb updates faster than MT handler on the
device could process them. This lead to significant screen lag between the emulator
and the device. With this CL emulator will not send FB updates to the device until
the device has fully proccesed the previous FB update.

Change-Id: I9a39e9f358f87d5bd6baaa2617a79e7de59ae99e
ultitouch-port.c
ultitouch-screen.c
ultitouch-screen.h
6df71197252e119baccbe4dd060935222af4f8ba 15-May-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Refresh stale SdkController screen.

When MT handler gets deactivated, and then activated again, it shows a stale emulator
display, since it didn't have a chance to catch up with emulator display updates. This
CL ensures that entire emulator display is pushed to the device when MT handler gets
activated.

Change-Id: I58c1680f50e2af3e6afa0518f6bcaa3ed087638d
ultitouch-port.c
ultitouch-screen.c
ultitouch-screen.h
8de6a30e3b2035b39f308febe2f9536671547096 11-May-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Catch up with OpenGLES API changes.

It turned out, that OpenGLES framebuffer update callback is expensive, and since it's
used rather rarely (since multi-touch emulation is usually off), it's a waste to have
that callback always active. So OpenGLES has now an ability to enable / disable framebuffer
update callback, and emulator needs to catch up with that change.

Change-Id: Iee028ed79f1d9472c3f31bbfbcb5676c4716c34c
ultitouch-port.c
2c4c30e62aac9f55cf2287feb0ef6ed81c5430d3 11-May-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fix --no-gles config, and ease the pain of standalone emulator build

1. Apparently, emulator build fails when configured with --no-gles option due to
missing android_setPostCallback implementation.
2. It's painful to configure standalone emulator build WITH OpenGLES, since it requires
explicit using of --gles-include, and --gles-lib when launching android-configure.sh
To ease that pain, just use default location for standalone emulator build.

Change-Id: I2d9ed56d68a4ab1cb1ec294817f22dca80d33223
pengles.c
6674489666e2a5ca2f12a1c1015cd0bf3bd36494 11-May-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fix emulator's UI build

When building emulator-ui, build fails complaining that android_startOpenglesRenderer
implementation doesn't match routine declaration. Fixing that.

Change-Id: I5f3f588969c1b4c9a59035f8abddb63cc6c917ad
pengles.c
ba5c1f674511aff458dae69927a1c61d60e66aa1 09-May-2012 Jesse Hall <jessehall@google.com> Remove init-time GLES per-frame callback

The GLES renderer interface now allows the per-frame callback to be
registered after initialization. This change updates the emulator to
use the new interface. Since reading back completed frames is slow
(due to pipeline flush/stall), a future change will enable the
callback only while multitouch emulation is actually in use.

Change-Id: I7ad23b4bebe1bd3077863da4d50333cc0578519e
pengles.c
pengles.h
b70acae117c40df87181fd0107b24b610d1737c5 08-May-2012 Andrew Hsieh <andrewhsieh@google.com> Fixed standalone emulator when ANDROID_BUILD_TOP is present

With ANDROID_BUILD_TOP android-configure.sh searches for prebuilt
directories later used for locating ccache. At this moment, ccache
is located in different location between AOSP and internal tree.
Beside, "prebuilt" is gone in internal tree.

Change-Id: Ib14b8c91c9f8026605617f2abf94c3bee9ddadb6
uild/common.sh
2485e9e3412fbe9e27bb2d44950106349988dca6 07-May-2012 Andrew Hsieh <andrewhsieh@google.com> am 9d26d64c: Merge "Emulator64-mips segfaults, disable it for now."

* commit '9d26d64c356817e2f320e8aee958012ee6c5bed5':
Emulator64-mips segfaults, disable it for now.
9e15745b9f828db4eedf90a811becac95e02d5d3 04-May-2012 Duane Sand <duanes@mips.com> Emulator64-mips segfaults, disable it for now.

Signed-off-by: Duane Sand <duanes@mips.com>

Change-Id: I17fe688d19e3cd7f328721e6363bacd6e6689ca2
ain-emulator.c
afb0118a8be2a3fd271b2af51ccc13a2429a5078 04-May-2012 Andrew Hsieh <andrewhsieh@google.com> Fixed link-error for standalone emulator when CONFIG_ANDROID_OPENGLES == 0

Added a fake android_getOpenglesHardwareStrings (called in vl-android.c)
when CONFIG_ANDROID_OPENGLES is not set or zero. This happens when
./android-configure.sh can't locate GLES include and libs.

Change-Id: I1f99644adcc78b9872d7e9c6e1e7bd7b2a654119
pengles.c
1efe36f95c788400c8b504b9055173bc8f9a4d15 03-May-2012 Jesse Hall <jessehall@google.com> Merge "Provide GL strings from renderer to ddms ping"
7f661af7cfca4b7857d30d598923dd2095f78ff0 02-May-2012 Andrew Hsieh <andrewhsieh@google.com> Fixed compilation error with new x86_64-w64-mingw32 compiler

Fixed the following for the new compiler
1. android/camera/camera-capture-windows.c:
Added "#include <windows.h>"
2. SetClassLong() is deprecated. GCL_HICON doesn't exist in _WIN64.
Replacted it with SetClassLongPtr(h, GCLP_HICON, icon)
3. [v]asprintf now actually exisit in libray. Changed the prototype
to match the standard ones but will remove them later for GCC 4.5 and up.
4. Renamed _set_errno to set_errno because it exists in stdlib.h.
Renamed _fix_errno to fix_errno for consistency.
5. EAI_NODATA and EAI_NONAME become the same things.
6. ddk/*h don't exisit. tap-win32.c actually only needs winioctl.h which
provide constants. I have make sure they got the same constants in
both old and new mingw compilers
7. #undef DELETE before redefining it for KEY_CODE in hw-events.h because
DELETE is defined to be a constant in standard header.

The above don't break the old one (ie. /usr/bin/i586-mingw32msvc-*)

Change-Id: Ic7d13fd0fd237d433f923ee01c6ce50f5c02f095
amera/camera-capture-windows.c
w-events.h
ain-common.c
509433edf704644190bc6715adcb1272a1955da3 01-May-2012 Andrew Hsieh <andrewhsieh@google.com> Fixed emulator fails to load lib*GL when launched from its own directory

When emulator is lunched from its own directory (ie. cd out/*/bin; ./emulator),
emulator fails to locate shared libraries lib*GL at out/*/lib because utility
function path_parent(".", 1) incorrectly returns NULL instead of "..".
Fixed that case.

Change-Id: I86f8e5d655107ae8cd2237d59518180ce6e69c53
tils/path.c
733fffaac9ccebfc424fccf9467b22475f71a2f8 26-Apr-2012 Jesse Hall <jessehall@google.com> Provide GL strings from renderer to ddms ping

Change-Id: I59c9e58c568a70855783e57514fec80b711d6a64
ndroid.h
pengles.c
pengles.h
emu-setup.c
5b658a4b19c685bcde26551e408bd3991a8d6618 01-May-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Fix adb client protocol"
39a1158197072f846301a8263e2851e892962e64 01-May-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fix adb client protocol

There are cases when 'accept' message that guest adbd sends via qemu pipe to the emulator
get broken into pieces: once 4 bytes are delivered, and then the remaining two. This breaks
the protocol, as emulator assumes that all 6 bytes would be delivered in one chunk. This CL
adjusts that by accumulating messages in a buffer, and analyzing them only when collected
message length reaches certain point.

Change-Id: Ice25625f65bbaa2b07677c3285bf75e7bf46fbb7
db-qemud.c
4732aee0622005bc612f75d0319e6e3a057301b4 30-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fix Windows build

Change-Id: I732fa0d756656ad9976eddd06b16644e208aa512
sync-socket-connector.c
dk-controller-socket.c
7136b053b7fc7840ec64e01d1d19ab822e1f949a 10-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Use new SdkController communication protocol for emulation ports

android/sdk-control-socket.* has replaced android/android-device.* as the back-bone
of communicating with SDK controller on the device. The major differences are:

- New communication protocol uses just one (async) socket connection to communicate
with the device (the old one used two sockets: one sync, and another - async).
- New communication protocol connects to one TCP port (1970 in this CL) for all emulation
ports. Channel multiplexing is done by using port names, and assigning a separate socket
for communication inside each separate port. The old protocol had separate TCP ports for
each emulation ports (1968 for sensors, and 1969 for multi-touch)

Change-Id: I779fcbdfba2f9b4c433a9d76a567975708b00469
ndroid-device.c
ndroid-device.h
sync-socket-connector.c
sync-socket-connector.h
sync-socket.c
sync-socket.h
w-sensors.c
ultitouch-port.c
ultitouch-port.h
ultitouch-screen.c
ultitouch-screen.h
dk-controller-socket.c
dk-controller-socket.h
ensors-port.c
ensors-port.h
6f50aa39e741a1d1f3081665d0b7f8d56b7b793c 26-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Add an option to set custom size for cache partition

Change-Id: I1be43697ee04f46c5839c4d23e461d54eefc450f
mdline-options.h
elp.c
ain.c
183e927350a14945e13ab217e16ab5dce20349f3 27-Apr-2012 Jesse Hall <jessehall@google.com> Fix standalone emulator build.

- Allow building with OpenGL ES acceleration disabled, avoiding a
dependency on stuff outside the QEMU project.
- Allow the standalone configure.sh to provide the include/lib path
for the OpenGL ES libraries.
- Update the default OpenGL ES include path for standalone builds.

Change-Id: I03f4627af4c271783b65a116ceb5934385c68cdc
onfig/darwin-x86/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
pengles.c
07ca7c270f22a2b1676395dd88bca340a46dc5d8 26-Apr-2012 Jesse Hall <jessehall@google.com> Rename a declaration to fix Mac SDK build

GCC on OS X is flagging a duplicate declaration error even though GCC
on Linux isn't even warning about it. Not sure why. The declaration is
duplicated, but identical. Renaming one of the two.

Change-Id: I946b5f3a4e410b66e9ab2ae3160ff1bec4e0ddd7
pengles.c
pengles.h
bad93459e688146b35bd3ac12a97742655721b4b 25-Apr-2012 Jesse Hall <jessehall@google.com> Merge "Publish and use libOpenglRender interface header"
22bcf1dad2be0fff58d67cb30599f6918a93baec 24-Apr-2012 Jesse Hall <jessehall@google.com> am c135d75d: Merge "Reword -help-gpu text for clarity and accuracy"

* commit 'c135d75d5ae774d7349f1cf346eee03072047179':
Reword -help-gpu text for clarity and accuracy
6c6413d40ea9b8a658f4f1f2fa7303736fd156c6 19-Apr-2012 Xavier Ducrohet <xav@android.com> Merge "Fix skin issue when launching emulator from tree."
689d1147b1994be1d8e33ee4d1a8ec76742bb4a6 19-Apr-2012 Xavier Ducrohet <xav@android.com> Fix skin issue when launching emulator from tree.

When launching the emulator with just -skin from the dev tree
the fake AVD was not using the hardware.ini config from the skin
due to creating it before resolving skinDir and skinName from the
command line options.

This change updates the AVD after doing so.

Change-Id: Ia0912d72775e26f080f763b29629a3691c253c43
vd/info.c
vd/info.h
ain.c
88078b8875dab47abf9fe80488503f60d9835eaf 19-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Increate default partition size to 200MB

Change-Id: I2996197e7ec4c36c7e46b35edab5b10d7f103c10
ain.c
7e959f0ba6515b7998d00eb1b79d613b2550eb3c 19-Apr-2012 Jesse Hall <jessehall@google.com> Reword -help-gpu text for clarity and accuracy

Change-Id: If950c52919039e85874fefe3415e59aa8ec02c96
elp.c
6699b688d7dbd7ad4a07ca1c1f77db864012010a 18-Apr-2012 Jesse Hall <jessehall@google.com> Publish and use libOpenglRender interface header

The emulator opengles.c file duplicated the function declarations from
libOpenglRenderer's render_api.h instead of including it directly.
This led to multiple bugs since the declarations didn't actually
match, but there was no way for the compiler or dynamic loader to
check this.

This change makes opengles.c include render_api.h to get function
pointer prototypes, and changes the prototypes/implementation as
necessary to make both sides actually match. It should be much more
difficult to introduce interface mismatch bugs now.

Two bugs this change would have prevented:
(a) The interface mismatch caused by inconsistent branching which led
to GPU acceleration crashing on Windows. With this change, we
would have caught the problem at compile time.
(b) The emulator verbose log has always been printing "Can't start
OpenGLES renderer?" even when the renderer started fine. This is
because the renderer was returning a bool (true == success) but
the emulator's declaration said it returned int, and the emulator
assumed 0 meant success. This difference in return type should now
be caught at compile time.

Change-Id: I5b3c70c9a40854332d67e37333acd6edb6ad01f6
pengles.c
bdd020b108b63fcfccefb2905b9d0401f739981a 12-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes debug output using an unitialized string buffer.

Change-Id: I1fee7e9f70600da4540744aa11f927bfc9c759e1
vd/util.c
1a820e90d8848c6b0ac7c78b5a2e8b28c9738a3a 11-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Enable multi-touch emulation with -gpu on

This CL implements a callback that gets invoked by OpenGLES emulator on it framebuffer
updates. This allows transferring framebuffer changes to the supporting device.

Proper implementation of this new callback also required changes to JPEG compression,
addressing:

1. OpenGLES framebuffer format is RGBA8889, which required implementing line conversion
for this format.
2. OpenGLES framebuffer is (or at least could be) bottom-up arranged. This requires changes
to the compressor, so it compresses the FB starting from the bottom, so the resulting
image is up-bottom.

Change-Id: Icd4efbe4a251c838adfa3518decbfc43a7ef06c8
ultitouch-port.c
ultitouch-port.h
ultitouch-screen.c
ultitouch-screen.h
tils/jpeg-compress.c
tils/jpeg-compress.h
c8aa2c570d30098da59f1967d5158024ed28570d 06-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Implements SDKCtlSocket that implements communication protocol wih SdkController

In addition, this CL contains some minor tweaks to async-socket, and
async-socket-connector that improve tracebility.

Change-Id: Ib1309b19dcd02e96379155fea7015019d93160e7
sync-io-common.h
sync-socket-connector.c
sync-socket-connector.h
sync-socket.c
sync-socket.h
dk-controller-socket.c
dk-controller-socket.h
ensors-port.c
tils/debug.h
ef4ccd385650612a830a098f4b1eac48482b65b3 03-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Make all async I/O object referenced.

Since it's hard to control lifespan of an object in asynchronous environment, we
should make all AsyncXxx objects a referenced objecst, that will self-destruct
when its reference count drops to zero, indicating that the last client that
used the object has abandoned it.

Change-Id: I6f8194aa14e52a23a8772d827583782989654504
sync-socket-connector.c
sync-socket-connector.h
sync-socket.c
sync-socket.h
sync-utils.c
sync-utils.h
6dc5c2cef91004488f04fc6e9c0946f6d3a29705 02-Apr-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Refactor asynchronous socket APIs

The initial implementation was a bit too complex in two ways:
1. Each component (the connector, and async socket) had its own set of state and
action enums, which was confusing, required value translation, and was not really
needed. So, all these enums have been combined into two common enums that are now
declared in android/async-io-common.h
2. Too many callbacks, which really complicated implementation of the clients. It is
much more efficient to have just two callbacks (one to monitor connection, and another
to monitor I/O), letting the client to dispatch on particular event (success/timeout/etc.)

This CL fixes these two issues.

Change-Id: I545c93dee2e9e9c72c1d25e6cd218c8680933ee3
sync-io-common.h
sync-socket-connector.c
sync-socket-connector.h
sync-socket.c
sync-socket.h
a7383ef4eb8d3863c8d582ea0d6b2ddb42125cba 29-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Implements asynchronous socket API

This is pretty basic API that allows to asynchronously connect to a socket, and
perform asynchronous read from / write to the connected socket.

Since all the operations (including connection) are asynchronous, all the
operation results are reported back to the client of this API via set of
callbacks that client supplied to this API.

Change-Id: I2a18f5b9c575ab7825c9e5a086f4cd9fb6b130ec
sync-socket.c
sync-socket.h
tils/debug.h
14a4131fde5542634aede4f358cfb4761330b69a 28-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes bug in qlooptimer_startAbsolute for qemu-looper

When setting absolute time, the routine wrongly assumed that qemu_mod_timer takes
time in nanosec, while in reality, qemu_mod_timer takes time in millisec.

Change-Id: Ife707bb5d236457f65e7dc6ccfb3235e0b93f058
ooper-qemu.c
300dc988021a26ea93e3f87e15e70fdcb9cb9359 28-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Implements an asynchronous socket connector with retries"
9d36fe7e6f0c5ece4de1b29ec78a15c37c158b1d 26-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Implements an asynchronous socket connector with retries

The typical usage of the API is as such:

1. The client creates an async connector instance by calling async_socket_connector_new
routine, supplying there address of the socket to connect, and a callback
to invoke on connection events.
2. The client then proceeds with calling async_socket_connector_connect that
would initiate connection attempts.

The main job on the client side falls on the client's callback routine that
serves the connection events. Once connection has been initiated, the connector
will invoke that callback to report current connection status.

In general, there are three connection events passed to the callback:
1. Success.
2. Failure.
3. Retry.

Typically, when client's callback is called for successful connection, the
client will pull connected socket's FD from the connector, and then this FD
will be used by the client for I/O on the connected socket. If socket's FD
is pulled by the client, it must return ASC_CB_KEEP from the callback.

When client's callback is invoked with an error (ASC_CONNECTION_FAILED event),
the client has an opportunity to review the error (available in 'errno'), and
either abort the connection by returning ASC_CB_ABORT, or schedule a retry
by returning ASC_CB_RETRY from the callback. If client returns ASC_CB_ABORT
from the callback, the connector will stop connection attempts, and will
self-destruct. If ASC_CB_RETRY is returned from the callback, the connector
will retry connection attempt after timeout that was set by the caller in the
call to async_socket_connector_new routine.

When client's callback is invoked with ASC_CONNECTION_RETRY, the client has an
opportunity to cancel further connection attempts by returning ASC_CB_ABORT,
or it can allow another connection attempt by returning ASC_CB_RETRY.

The client has no control over the lifespan of initialized connector instance.
It always self-destructs after client's cllback returns with a status other
than ASC_CB_RETRY.

Change-Id: I39b0057013e45ee10d1ef98905b8a5210656a26c
sync-socket-connector.c
sync-socket-connector.h
tils/debug.h
9dcf03fda8001a74016a316b0aa223f6675dff37 27-Mar-2012 Jesse Hall <jessehall@google.com> Merge "EmuGL: Add OnPost callback to OpenGL renderer"
efc1f78eb19df182e8d6cd49e228c15f360691d4 23-Mar-2012 Andrew Hsieh <andrewhsieh@google.com> Merge "New option '-force-32bit' to always use 32-bit emulator on 64-bit platforms"
7105d422d800a624b4257798e0d81ec2045491d8 21-Mar-2012 Jesse Hall <jessehall@google.com> EmuGL: Add OnPost callback to OpenGL renderer

Match the interface changes in the OpenGL renderer that add a
per-frame callback. The callback isn't used in this change.

This change is co-dependent on Idae3b026d52ed8dd666cbcdc3f3af80175c90ad3
in development/.

Change-Id: Idae3b026d52ed8dd666cbcdc3f3af80175c90ad3
pengles.c
pengles.h
11c29fbcb16ef22a469a6014039888e0980b186e 22-Mar-2012 Jesse Hall <jessehall@google.com> Merge "Revert "EmuGL: Add OnPost callback to OpenGL renderer""
82cb5a041bfa5fa0495e8c9e570371bf708af11a 22-Mar-2012 Jesse Hall <jessehall@google.com> Revert "EmuGL: Add OnPost callback to OpenGL renderer"

This reverts commit 2f4361f1d63751f1f72e1a1f953acfb9c05727da
pengles.c
pengles.h
bfc88b6eabf744f1f3fd59f9d38bccc87146bb14 22-Mar-2012 Jesse Hall <jessehall@google.com> Merge "EmuGL: Add OnPost callback to OpenGL renderer"
2f4361f1d63751f1f72e1a1f953acfb9c05727da 21-Mar-2012 Jesse Hall <jessehall@google.com> EmuGL: Add OnPost callback to OpenGL renderer

Match the interface changes in the OpenGL renderer that add a
per-frame callback. The callback isn't used in this change.

This change is co-dependent on Idae3b026d52ed8dd666cbcdc3f3af80175c90ad3
in development/.

Change-Id: Idae3b026d52ed8dd666cbcdc3f3af80175c90ad3
pengles.c
pengles.h
ddd4ef7f7c8d07e95dc88ca897634f537666d5f3 21-Mar-2012 Andrew Hsieh <andrewhsieh@google.com> New option '-force-32bit' to always use 32-bit emulator on 64-bit platforms

Useful for both QA and trouble-shooting

Change-Id: I09eac8b94e29e8a201188bf17d3511c15cfee4b4
mdline-options.h
elp.c
ain-emulator.c
26f4784a1cc9214e6a99eb20cf41862b704d326d 21-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Use enum where appropriate in hw.ini

Change-Id: I8a85de939a89d373724cfb977141ca01e7d1ff34
vd/hardware-properties.ini
541a7b25951ed30c7411eda50cce3ff9fa0289e4 21-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Add 'enum' entry type to hw.ini file

'entry' type enumerates values that are allowed for the given type name.

Change-Id: Ic0f4021f761dfd78ff4dd9d2b58a2d811109b3c6
ools/gen-hw-config.py
62caadba077a31c08552fe23c0e0a0b70b2f6636 21-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Revert "Support 'enum' type in hardware-properties.ini file"

This reverts commit 1d57949ea5bae66b27febc2edcfc7ae0f10be716
ools/gen-hw-config.py
1d57949ea5bae66b27febc2edcfc7ae0f10be716 20-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Support 'enum' type in hardware-properties.ini file

This CL adds new 'enum' type to the types supported by the script.
Enumerated types should be formatted as such:

enum(type: val1[, val2[, ..., valN])

where:

- 'type' defines type of enumerated values, and must be one of the types
listed in typesToMacros
- 'val1'... 'valN' lists enumerated values, separated with a comma.
- '...' is a special value indicating that AVD editor may set property
value that doesn't match values enumerated in the .ini file. However,
default value set for the property must match one of the enumerated
values.

Change-Id: Id5c1c2940a956002e9e01a2d2456b6218f1f3742
ools/gen-hw-config.py
417c67d3c58c82d000b103070abf241c9de414b6 19-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes a hack that initialized event socket for async I/O

This CL provides proper handling for event socket async I/O initialization.

Change-Id: If02894a63e943c7f3db8efbab0713ed2861ecb38
ndroid-device.c
7485c2989d727a1d0c14a66fb75e140f885a1583 19-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Refactor HW config to use hw.camera_back, and hw.camera_front properties.

This is a continuation of an effort to simplify HW config, and make the UI for it clearer.
This CL gets rid of multiple camera emulation properties, combining everything into just
two properties:
- hw.camera_back that controls emulation of a camera facing back, and
- hw.camera_front that controls emulation of a camera facing front.

Change-Id: Ia114ae4caf2053685cbff00f39088e5b5be2952c
vd/hardware-properties.ini
amera/camera-service.c
mdline-options.h
elp.c
ain.c
863d1010d9c8fa4342b1b0ea860bcfb096806acc 16-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Cleanup harware properties.

1. Remove unused hw.camera.maxHorizontalPixels, and hw.camera.maxVerticalPixels parameters.
2. Combine hw.touchScreen, and hw.multiTouch under one property: hw.screen

Change-Id: I3cdf64f7d7e46486110cbc0769f9d98a61f0bea5
vd/hardware-properties.ini
vd/hw-config.c
vd/hw-config.h
elp.c
ain.c
emulator.c
10bc04fd968d7f80258bf1eec665babf28e9e47d 16-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes a hack that was enabling multi-touch emulation on Mac.

The issue was that on Mac there is a bug in select() implementation, that caused select()
to fail with EINVAL on condition that timeout exceeds 100000000 secods. So the real fix
was to clamp timout value to that limit when select() is called on Mac.

Change-Id: Icb9ead00a0060028957af1e6e22911d5e8e231c6
ndroid-device.c
facee1d1d0c3029915f5443c788cd32b9f5b9c83 16-Mar-2012 Andrew Hsieh <andrewhsieh@google.com> Merge "64-bit emulator"
46ff3eaff40952df50ee14056cae88a3e7396a81 15-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fix emulator crash on sensor emulation.

The reason for crash is that event socket's I/O looper has been used without
being properly initialized.

Change-Id: I4f6372a4c2e54d5ea80313eda5208da17fc84d1d
ndroid-device.c
a89252fb1e98161e9c5d4c1506eddda7dc93e6f8 14-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Fix snapshot autoconfig"
873c3cb5688092d2822837511cfb2b330d265801 14-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fix snapshot autoconfig

This CL should fix external issue 26839, where system gets loaded from a snapshot
even it is explicitly disabled in config.ini.

The reason for that was a bug in autoconfig generator that didn't respect config.ini
settings for snapshot.

Change-Id: I617e9de7f7472f8d5b75d544f81c5b160f81c2f8
vd/info.c
vd/info.h
ain.c
c7389bd69e570a2c8432b37399aff1976b021f0f 13-Mar-2012 Andrew Hsieh <andrewhsieh@google.com> 64-bit emulator

Patch to allow emulator searches for emulator64-${ARCH} first on
64-bit OS. If none is found, the original behavior which searchs
for 32-bit emulator-${ARCH} is performed as usual.

64-bit emulator (which still emulates Android built in 32-bit) offers
up to 20% speedup compared to its 32-bit counterpart.

Details:

android/main-emulator.c
1) search emulator64 based on the OS
2) dlopen lib64OpenglRender in 64-bit

Makefile.*
1) Rules to build 64-bit executable emulator64-{x86,arm} and libraries
emulator64-{libui,libqemu,target-i386,target-arm,libelff,common}
2) remove -Wa,-32
3) Changes prebuit toolchain path

android-configure.h
android/build/common.h
1) no longer force 32-bit build (because now prebuilts/tools/gcc-sdk/gcc
can now handle 64-bit
2) set ANDROID_PREBUILTS to correctly locate ccache

android/config/*/config-host.h
1) Detect HOST_X86_64 and HOST_X86_64/HOST_I386

Misc 64-bit porting clean-up
1) use %zx to print variable of type size_t in hex
2) use %zu to print variable of type size_t in dec
3) Initialize query_parm to NULL
4) use PRIu64 to replace PDUd64
5) use PRId64/PRIu64/PRIX64 to print 64-bit
6) drop PRUx64 because PRIx64 does the same
7) cast pointer arith to intptr_t before casting to int
8) fixed 1ULL<<63

Change-Id: Ife62a20063a6ec38d4a9b23977e840af1fce149a
uild/common.sh
amera/camera-service.c
onfig/darwin-x86/config-host.h
onfig/freebsd-x86/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
onsole.c
w-sensors.c
ain-emulator.c
ain.c
pengles.c
tils/system.c
tils/system.h
d4f5a3ae87a7246613188940c1667bf2880da402 08-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Increase default partition size, and fix data partition size calculation.

There is a (reasonable) demand from android development comunity to increase default
data partition size. It seems that 66MB doesn't match anymore user needs. So, with this
CL default data partition size will be increased to 12MB.

This CL also fixes a bug where data partition size set by the AVD manager has been wrongly
treated as an MB value, while it was a byte value.

Change-Id: I27c456a71299aff42bd4ca573d3660292a7d1d44
ain.c
025a347156acb6c22444f7d4d06c0f44da573c5e 05-Mar-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Multi-touch emulation support"
8dd31e8e10fc3ca10192368acf19d2345eeddde7 16-Feb-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Multi-touch emulation support

Change-Id: I311dc55fe10f41637775baa330a7c732ff317f51
ndroid-device.c
vd/hardware-properties.ini
mdline-options.h
elp.c
ain.c
ultitouch-port.c
ultitouch-port.h
ultitouch-screen.c
ultitouch-screen.h
emulator.c
tils/debug.h
tils/jpeg-compress.c
tils/jpeg-compress.h
c0040db4365a237d67bdc7d25c02944b74f76429 02-Mar-2012 SeongJae Park <sj38.park@gmail.com> Set value of hw.keyboard "no".

Commit for discuss at
https://groups.google.com/forum/?fromgroups#!topic/android-contrib/H_oodJPngHo

Because default value of hw.keyboard is "yes", emulator doesn't display
soft keyboard although text input widget has focus.

Developers can change value easily;
But users who doesn't know about property setting such as non-developer
can be confused a lot.
And, most devices has no H/W keyboard(Galaxy Nexus too).

So, set default value of hw.keyboard to "no".

Change-Id: Id3a6af23fe0525e4b8f6ccd8bbde2d6dd26e5d7d
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
vd/hardware-properties.ini
bf45fc2a26358b7ec52cb17bb9d6ed67d6483b01 27-Feb-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Enables ADBD tracing in emulator.

When running inside the emulator, guest's adbd can connect to 'adb-debug' qemud
service that can display adb trace messages on condition that emulator has been
started with '-debug adb' option.

This CL contains emulator code that enables that.

Change-Id: I6720deef0833fd02e2fe80deeaafbcf517de0c33
db-qemud.c
tils/debug.h
a3338e7214cd0c69912866c6d71d8700c6ab35e2 22-Feb-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes camera RTE on Windows

The root of the issue was that some cameras / camera drivers don't set
compression type in the bitmap header explicitly to a V4L2_XXX, but set
it to BI_RGB, which is unknown value for frame converters. To fix this,
this CL converts BI_RGB to an appropriate V4L2_XXX value.

Change-Id: Ifd70aa44138ab38fe66e8c80806a7dbb91725cf2
amera/camera-capture-windows.c
9242b33d3545e6632d21c1f416794a9f5d385c45 10-Feb-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Stop emulator when both, gpu and snapshots are on.

This is a temporary solution fixing emulator crash due to the difficulties in
implementing GPU state save to and reload from snapshot.

Change-Id: Id62830d3447538472d3c7a83ade97f4f09dfaa06
ain.c
9d5d34571cb8f596e6ed215e5778c94b8207a33b 02-Feb-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Fix problem with using clipboard in Windows camera emulation

This is a fix for a user reported issue #24794. In the nutshell, when emulator grabs
a frame from webcam it leaves its bitmap in the clipboard (which is global). So, when
user does a 'paste' somewhere else, that bitmap will be pasted there. Being bad by
itself, it gets worst, because 'copy / paste' will be globally broken while camera
application is running in the emulator. I.e, if you have camera app running in the
emulator, and at the same time you're editing a Word file (for example), copy / paste
will not work in Word.

This CL contains a fix such as when possible, camera emulator on windows will not use
clipboard to grab video frames, but will grab video frames using frame callback.

Change-Id: I115a9c653b252620cf5407173c1e1eec69b4a2ee
amera/camera-capture-windows.c
34f234393256163101b05c41ee4676bc68b57c65 30-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Implement asynchronous data send over 'event' socket.

Change-Id: Ifce399aec98540fca4e1cca8c3599142d9ff6887
ndroid-device.c
ndroid-device.h
562240d8235c122b1624713169cd0764d84956d2 26-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Expand the ways how a query can be sent to Android device."
720d4ae010c7b2dac83ac61b96a9bf7e6f02f440 25-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Expand the ways how a query can be sent to Android device.

Contains new routines that allow sending multiple blocks of data within a single
query. Also, these routines allow to avoid restriction on queries as zero-terminated
strings.

Change-Id: Ia5789a01a7eadbae5b1f5014a67864eea463af43
ndroid-device.c
ndroid-device.h
828b135787a028f6befe56470e7233329cc45e3f 24-Jan-2012 Jean-Baptiste Queru <jbq@google.com> Merge "New files to add HAX support"
2ae501556f90647e40466b6a1948f6f7f51cf251 23-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Refactor camera parameters parsing routines

Move routines that pulls values out of the parameter string from camera-service.c
to misc.c

Those are general purpose routines that are also used in multitouch emulation, so
it's better to keep it an an general utility file.

Change-Id: I02978075b64b42ff07f5042cda770bbef8939e24
amera/camera-service.c
tils/misc.c
tils/misc.h
ac7c3b18f8d3c472badd3f588565569eae53f2da 19-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Check for data partition init path on snapshot load."
237ade6beb817b5c73d496c69747ac02757cf897 19-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Check for data partition init path on snapshot load.

Makes sure that snapshots are not loaded if data partition for which the snapshot
has been saved is overwritten (with -wipe-data option for example). We want the
loaded snapshot to be consistent with the data underneath it.

Change-Id: I605c9b5a66870aad76ffd97d641a08c75730de7f
naphost-android.c
045b33e25f3c990054ec0960f1f3f2d99eb157ba 19-Jan-2012 Andrew Hsieh <andrewhsieh@google.com> Fixed typo in emulator -help-build-images

1. "<build-root>/prebuilt/android-arm/kernel/" -> "<build-root>/prebuilts/qemu-kernel/"
2. "<build-root>/sdk/emulator/skins/" -> "<build-root>/development/tools/emulator/skins/"

Change-Id: I46cf9f805506753271bf4b88cebd47faa3775f45
elp.c
e4a3c7801e0075a49674c79972394ad962b338f2 18-Dec-2011 Jun Nakajima <jun.nakajima@intel.com> New files to add HAX support

QEMU emulator interacts with the HAX kernel module. A HAX (Hardware-based Accelerated eXecution)
kernel module is required to use HAX support. Most guest instructions run in VMX non-root
(i.e. in hardware) mode and achieve near-native (relative to the host) performance.
QEMU still emulates PIO/MMIO instructions and non-PG (paging) mode operations.

HAX is supported only on Mac OS X and Windows hosts when Intel VT is present.

Change-Id: I8dd52a35e315437dc568f555742bb8ab7e9d8ab2
Signed-off-by: Zhang, Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Nakajima, Jun <jun.nakajima@intel.com>
onfig/target-x86/config.h
db450d73092add519efddcd6d55c7a0e7541ec70 12-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Respect HW configs when loading VM from snapshots.

Changing HW configuration properties may cause emulator / guest system crash on
condition that VM has been loaded from a snapshot. This CL addresses this issue
in the following way:

1. Each time a snapshot is saved, a backup copy of HW config is saved with it.
2. Each time a snapshot is loaded, emulator finds an appropriate HW config
backup, and compares current HW config with the one that was saved in the
backup, and if configs are different, emulator exits with an appropriate
error.

Change-Id: I730bec0afbe166e88189fdcc4804b76e109e4422
ain.c
naphost-android.c
naphost-android.h
tils/ini.c
tils/ini.h
bc456c52dcb71007841b734195f712191012c537 10-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Don't display warning when emulator is unable to connect to device.

Warning that is displayed when "realisting sensors emulation" component in emulator
is not able to connect to an application streaming sensor changes from an actual
device, that warning confuses users, making them think that emulator didn't
initialize properly. To avoid that confusion, hide that warning under -verbose,
displaying it only if -verbose option has been specified on emulator start.

Change-Id: If40cc726db9bec4ab631dcbdcd02fb98cc30d93a
w-sensors.c
4382d024a01df4888114e2e72605617371763a0d 06-Jan-2012 Jean-Baptiste Queru <jbq@google.com> am d3ed299f: am 8edd3e9e: am 18006f77: Reference kernels from their new location

* commit 'd3ed299f15c993bda873cbd56648eedabc7f45c9':
Reference kernels from their new location
4387517c83737958222d2b06aa238a0f52358bac 06-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Respect 'camera' flag in AVD"
d3ed299f15c993bda873cbd56648eedabc7f45c9 06-Jan-2012 Jean-Baptiste Queru <jbq@google.com> am 8edd3e9e: am 18006f77: Reference kernels from their new location

* commit '8edd3e9e2959868ec221a1f3c1d4f9f16eb91177':
Reference kernels from their new location
17d48cc1809075732813cd90eee10bc1efa4b52e 06-Jan-2012 Jesse Hall <jessehall@google.com> Merge "EmuGL: disable debug spam"
f8675c20db7625adc69800ca4ac54e72846ac9a8 06-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> Respect 'camera' flag in AVD

Turns of webcam emulation on condition that 'camera' AVD property is set to 'false'.
Note that command line options (-webcam) will enable webcam emulation even if
'camera' AVD property is set to 'false'

Change-Id: I493446f1d12b732ed49f9a5a9967b87b31b180f6
vd/hardware-properties.ini
amera/camera-service.c
ain.c
18006f77ef9e760c225d1aa0dbbbe9cf5401aa8e 05-Jan-2012 Jean-Baptiste Queru <jbq@google.com> Reference kernels from their new location
vd/info.c
4bcc1d92f4d49ee7331bd2eacd28d497e505c5c7 05-Jan-2012 Jean-Baptiste Queru <jbq@google.com> Explicitly use the top of the source tree to find the kernel.

This way, we don't rely on the relative position of the source
directory and the out directory, and the emulator works when
using OUT_DIR_COMMON_BASE

Change-Id: I319f4fffc9ffee676d8040ebbb017831db08f6b6
ain-common.c
6b32ee5f4307f68b668b5b46893ceb49ec16fa6e 16-Dec-2011 Jesse Hall <jessehall@google.com> EmuGL: disable debug spam

Change-Id: Idb86b2e8bbb396ee1bca606a32569b9b6b46dcb8
w-pipe-net.c
ba951b488cefd1dcb4512a39e323d5000fdafa4c 04-Jan-2012 Koan-Sin Tan <koansin.tan@gmail.com> Fix filename typo.

This goes invisible on case-insensitive filesystems, but fails
when XCode is installed on a case-sensitive filesystem.
amera/camera-capture-mac.m
d86c724b74e6c04a89219d87559d0b580e100445 10-Dec-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implement ADB communication over QEMU pipe

Change-Id: I62ff5898c7a955aaaa8af8f7ee7ed018af860f80
db-qemud.c
db-qemud.h
db-server.c
db-server.h
vd/info.c
vd/info.h
vd/util.c
vd/util.h
emu-setup.c
tils/debug.h
a743be75c49f94811e6c8960ee0d6a2d0a65c700 13-Dec-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Implements white balance and exposure compensation for emulated webcam"
98d32ba363442a963bac163496513329a44a7959 08-Dec-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implements double-linked circular list.

This is part of a bigger CL (coming later this week) that uses qemu pipes to
hook up host ADB with ADBD daemon running on the guest system.

Change-Id: I625b020531af636b9b9fa4e4aa52b7586749c693
tils/list.h
ef71cb8b3f97b6c985bda997759ce2113cdb893e 07-Dec-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes emulator crash due to premature pipe client destruction.

The pipe client should really be closed (and destructed) only when the guest closes
its handle to the pipe. When pipe client is closed from within the emulator, it
should only notify the guest about disconnection, and wait for the guest to
explicitly close the pipe handle.

Change-Id: I6bde3ae1e05ff5dc40e9903282c3fc46df0b9b57
w-qemud.c
37fb84f8b26e3061c1ccb404bf4c962eed5e6057 23-Nov-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implements white balance and exposure compensation for emulated webcam

Change-Id: Id2dbb227280f0c0e1b5708ef78b9f19b087f92d5
amera/camera-capture-linux.c
amera/camera-capture-mac.m
amera/camera-capture-windows.c
amera/camera-capture.h
amera/camera-format-converters.c
amera/camera-format-converters.h
amera/camera-service.c
4e61742d4f26cefb1baf8d2dc5e7dc8b85a78549 23-Nov-2011 David 'Digit' Turner <digit@google.com> Fix 64-bit build.

This fixes the 64-bit Linux build (i.e. ./android-rebuild.sh --try-64).
You can't really call _mm_empty() when your target CPU doesn't support MMX.

We should probably try to use XMM registers instead of MMX for this in
the future, but this should be good enough for now.

Change-Id: If5abf747939022ef47daf7eb4badf1798e22bf95
kin/argb.h
e080a45d3e29e41bce06669b79d5eb04f0fd05ef 15-Nov-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Add 320x240 frame support for Windows and Mac camera emulation

Change-Id: I54897ca86b372d98c7a30a47ecf88a4df8ee0fe9
amera/camera-capture-mac.m
amera/camera-capture-windows.c
8d9a7a5fa4bd32f9b8aeb7b9e3bd047a475539ab 15-Nov-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Add required frame dimensions for Win and Mac.

Camera framework requires that certain frame dimensions must be supported by the
camera devices. Since on Windows and Mac we have no way of knowing the real
webcam capabilities, but camera API there pretty much allows us to choose any
frame dimensions that we want, we will hard-code those that are required by
the camera framework.

Change-Id: I625381776f374103d2ac1c62fabae23b1c5afa88
amera/camera-capture-mac.m
amera/camera-capture-windows.c
9ef86366e076f45bb9a6e6e98651062bc3ad7da8 15-Nov-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Minor fix for debug output

Change-Id: I554de3610bbd28cc299fecae4bf0199f044edb5a
ensors-port.c
e857adfa4de0c143f3327d1e2b2dde827891064f 10-Nov-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes windows build

Change-Id: Ia2c29d890695186b04dd5d306c88aadfe084318f
ndroid-device.c
db611d57e0da9acd7ecf2a4a9b2a63e7620fe54d 02-Nov-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implements sensors emulation using a connected Android device

There are three major things in this CL:
1. Abstract a connection with an Android device that is connected to the host via
USB, and there is a TCP port forwarding to this device via 'adb forward' command.
This abstraction is implemented in android/android-device.*
2. A client for android device API that talks to an app on the connected device that
provides values for sensors available on the device. This is implemented in
android/sensors-port.*
3. Changes to the sensor emulation code in android/hw-sensors.c to use sensors port
(when available) for sensors emulation.

Change-Id: I12901e8db6b6a6262fc1703ed96a9f714335d666
ndroid-device.c
ndroid-device.h
sync-utils.c
sync-utils.h
vd/hardware-properties.ini
w-sensors.c
ensors-port.c
ensors-port.h
tils/debug.h
3e92c2d49cb0e8752ce8c9a3c879c84ac3299061 11-Oct-2011 David 'Digit' Turner <digit@google.com> Fix snapshot crash

- Add snapshot load/save support to QEMU Pipes

This adds the ability to save and load QEMU Pipe connections
with snapshots. Note that by default, all loaded pipe client
connections are force-fully closed on load.

We don't have a good way to save the state of network
connections to persistent storage.

Properly implements snapshot save / load for qemu pipe clients.

Change-Id: Ie5767f8ce40c8341b958cc5844e724dd4fc1ed2b
w-pipe-net.c
w-qemud.c
79570c3532503840855517494978082a99543a30 22-Oct-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix emulator crash.

Change-Id: I4f238bbd0175036b6003ebdf266de608d6acc6e7
amera/camera-capture-linux.c
04d90d093f6e552c8c0c77f8d4a08344c77a4fca 21-Oct-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Bound loop index

In some cases (when frame sizes for pixel formats are not available) the loop will
be not properly bounded, and may cause a crash.

Change-Id: I2f2380ab4e2f7454bff8eeabcaff4e3f238fe71e
amera/camera-capture-linux.c
cdd8d78b202e005691467296b9be98816ed4d4a9 20-Oct-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix emulator crash caused by bad 'printf'

Change-Id: I7c4830ba7606bedcf462e967adad3358723c44ba
amera/camera-capture-linux.c
amera/camera-service.c
955a99781dd7af82e7a55525a4e51ce5d0814021 13-Oct-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implemented Mac camera emulation

Change-Id: I01609e8bfcdd8ee5ef876344d0a334ecd69a2b7a
amera/camera-capture-mac.c
amera/camera-capture-mac.m
d0e2872813e1d37e8233befdfd13a4d6cb0d7431 05-Oct-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix snapshots

Change-Id: Ib3891704ece2cea0c5a80b468b2514e6c4d13216
w-qemud.c
fa0c8e25403290b545bb98735b1ece275c524361 04-Oct-2011 Xavier Ducrohet <xav@android.com> New AVD property to control presence of hw main keys.

This allows injecting a new runtime property into the system
running on the emulator to control whether to display the new
software back/home keys.

Change-Id: I2bf7cc5c291752090187463332219638e883d052
vd/hardware-properties.ini
33f89d05b375f18596fa5892acaaae356fbb0c0e 28-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix CPU architecture reported in HW config

Change-Id: I9221916514a39435d2710fa9dada92a87bdc4dab
ain.c
3d3fea0627b4dfb6119ee8173a40640ea8a401f2 23-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix windows build

Change-Id: I7387eea3639d63b278b702100ee2d4584f87f4e2
amera/camera-common.h
amera/camera-service.c
5f8faaeb1fc4aa1bc875ebc6ab6ad70867ab5321 23-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Check that first two cameras are facing in opposite direction.

Currently camera app will crash on an attempt to switch cameras if camera 0 and 1 are
facing in the same direction. So, user should be warned about that on emulator start.

Change-Id: Ic85da614d30295b04d2a318fb1c2015cc52f1140
vd/hardware-properties.ini
amera/camera-service.c
c68dbbef0118eab4256acfc0d9430f0e557a82a1 23-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Timeout frame capturing.

It has been observed on some of the MS camera devices, that device may got stuck on something
that would alwais return EAGAIN when queried for the next video frame. This requires us to
timeout the loop that repeats attempts to acquire first frame from the device. Also added
detection and reporting of I/O errors occurred during frame capturing.

Also, this CL contains some cosmetick changes to error and warning reporting.

Change-Id: I81edaf5ff8bfe147dbe4510e1446e77a87817f37
amera/camera-capture-linux.c
amera/camera-capture-mac.c
amera/camera-capture-windows.c
amera/camera-common.h
amera/camera-format-converters.c
amera/camera-service.c
e3b840cfa695c2f0b26625cf01149b9cc9079ce9 23-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Properly reset camera device between capture requests

Change-Id: Ia748fe3f38e8366d0507fcee995eac311dd8c72a
amera/camera-capture-linux.c
a83cf909c84fccbf99863446825014b871f74cec 22-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix video recording on Windows

Reseting capture windows on each "stop capture" + setting capture parameters allow to
change video frame dimensions.

Change-Id: I0ce8ed77dfa9838894acb9e9e84d84692bb3d520
amera/camera-capture-windows.c
6ef999d93532fdb0b9f22e14bf2095e4d3ee0355 22-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix captured frame pixel format on Windows

Apparently, bitmap obtained through the capXxx + clipboard API is formatted
with BRG, not RGB format.

Change-Id: Ib161be50d2d3258045a467b152a5a750e1a8fb42
amera/camera-capture-windows.c
ddd59b14583126d6282d2fab3142171934981e85 21-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix NV12, and NV21 format descriptors

Also adds support for YU12 pixel format that is used in video frames

Change-Id: I613beef8b3e2296fd1fab7e2b9d2956fba1ac788
amera/camera-capture-linux.c
amera/camera-format-converters.c
amera/camera-service.c
a8559e023df6c94eee98d90a6689f421873d91f7 21-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Print warning on invalid webcam name

Change-Id: I94939964890c4304a47ba86c582baf3a9544b5aa
amera/camera-service.c
77a662d7dc8ebed91e15e523dac691f54965f204 21-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix win/mac build

Change-Id: I8d074590bb1efd68789e341e37356bc9fb2c9c08
amera/camera-win.h
9ce8926ad430b6e3b5906fa422f5378651e302d2 21-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix Mac/Windows builds

Change-Id: I0acc651be93eb9b5bea49280a7dccd18c1386d48
amera/camera-win.h
26fafb586bdb4f0d82d13bf4bde882d3f51fc939 20-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implements converters for BAYER pixel format

Change-Id: I68abaa8b89e2b46dc57bff1d7dbd6d9fda213dc8
amera/camera-common.h
amera/camera-format-converters.c
b8dcaffaf7dcb0c795d2776abf3bb75196f8527c 17-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Add -webcam commandline option to control webcam emulation

-webcam name=<name>[,dir=<direction>] options controls web cameras to use for emulation.

Change-Id: I961fd399c7e041541adda040dd24f194cc383cb9
vd/hardware-properties.ini
amera/camera-capture-linux.c
amera/camera-capture-windows.c
amera/camera-common.h
amera/camera-service.c
amera/camera-service.h
mdline-options.h
elp.c
ain.c
d6362e54b7b116a42d45a1ef499ff180548c7674 17-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Refactor the converters to make them more manageable

The current conversion implementation was laking flexibility as far as adding support
for new formats was concerned. In particular, adding support for each new format meant
adding four converter routines: new format <--> RGB, new format <--> YUV. This was not
scalable, so had to be rewritten.

The new conversion implementation consists of four generic converters between different
flavors og RGB/YUV formats, and array of descriptors for each supported format. Each
descriptor contains information that is sufficient for the converter routines to perform
its job. So, adding new format is just creating a new descriptor for that format, and
adding it to the array of supported descriptors.

Change-Id: Ica107d14fa03fa8f41eb9192f2c023a97f54b62c
amera/camera-format-converters.c
916106df33bcbceceb81b582a331915f487ea21e 16-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Add support for NV21, and NV12 formats

Change-Id: I4bea0f3678b2ac21f3c6cf80581e997145e2a58d
amera/camera-format-converters.c
amera/camera-service.c
18a854f37b568fffb1a06919aa3caab89ffaef7d 15-Sep-2011 David Turner <digit@google.com> Merge "gles: use fast GLES pipe by default (Unix only)"
ce31fbc48a43ea4265be1d20f157e8749b3e11dd 14-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes "stop device" issue on Linux

Apparently, video driver doesn't allow frame size change, once it has been
explicitly set. In order to get around this we need to reset the handle to the
camera device by closing, and then reopening it.

Change-Id: Icfd37b3c196d2643507218b965c5015884ed455b
amera/camera-capture-linux.c
ae0d8136ce0d3c39ca80c64763e633b86b0c5453 13-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Add cmdline param to control fake camera emulation

- Enable / Disable fake camera
- Set fake camera facing direction: back, or front

Change-Id: Iab741a694daf2bf752e91e23df566a83ac7a97e7
vd/hardware-properties.ini
mdline-options.h
elp.c
ain.c
7b56a4a9a250573d5bdb8d04a2d8a64937432832 12-Sep-2011 David Turner <digit@android.com> gles: use fast GLES pipe by default (Unix only)

This improves performance of various benchmarks by 5%

Change-Id: If2d2be0e9849429ecffe52b7d482cfbee4008473
w-pipe-net.c
pengles.c
pengles.h
9da935dd0c616cfd9072d11080a622320497dc9e 12-Sep-2011 David Turner <digit@android.com> Add -gpu <mode> option to force GPU emulation

By default, GPU emulation is still disabled. You can
still try to force it with '-gpu on' for experimentation
purpose (alternatively, you can define hw.gpu.enabled to
'true' in your AVD config.ini)

Change-Id: I87efdf45337a80aeadd94b3922312b3f564c1608
mdline-options.h
elp.c
ain.c
9ff69721d24f81317183ddb2e9e352bb34650752 13-Sep-2011 David 'Digit' Turner <digit@google.com> Fix -ramdisk option handling.

For some reason, there was a bug, where the option was being ignored
if set from the command-line.

Change-Id: I61c6e3127b469f4ec661b834b15c4da0841551af
ain.c
dca64d13258f05ec3385403a99eff7da4773ce24 13-Sep-2011 David 'Digit' Turner <digit@google.com> emulator: fix Win32 runtime crash

Change-Id: I5ca4b1393211c1d8a5caba332c3f6164afb4661b
ain-emulator.c
e07ec9adfc33c0cfb2056180960d7e62fc5ea7c7 13-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix Mac build

Remove Windows artifact

Change-Id: I2ffd5979674619786742f14995edbf10edfff23a
amera/camera-capture-mac.c
b92b303b5f52b8d71687eef6eeee78dbae9d1d17 13-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix Mac build

Add dummy rutines implementing public camera API on Mac

Change-Id: Id3c9d99d863785b0e00d1bdf6deb0a1af49ce91c
amera/camera-capture-mac.c
cf1c2c70dd99e7d78816ba9a558f9ed8c016862b 04-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implements camera service in emulator

This is fully functional camera service implementation, that works (tested) on both,
Linux and Windows.

Fixed little/big endian bugs in the coverter code. Moved preview frames to use RGB32
instead of RGB565: RGB32 conversions are simpler and faster in the guest.

Made "payload size send" a separate routine

Change-Id: I96954f4c2cb4e4ef4dd6a20e41897d79c5037bae
amera/camera-capture-linux.c
amera/camera-capture-windows.c
amera/camera-capture.h
amera/camera-common.h
amera/camera-format-converters.c
amera/camera-format-converters.h
amera/camera-service.c
c646f5e40ddda3d49b581ac0c78cf748b5dee74c 04-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Camera service skeleton

Skeleton that implements camera emulation service over QEMU pipe. More meat
will be added as the guest camera emulation develops.

This is a patch taken from approved AOSP commit that didn't go through
because of a merge conflict.

Change-Id: I6f0a2e42be4f5f0bd86d3dbf0c2a609e74b200c2
amera/camera-service.c
amera/camera-service.h
1875d374acc7412b8b0aacaff073c8080d532924 07-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix for a _qemudPipe_recvBuffers bug

When filling in qemud buffers in the loop, current offset in the current qemud buffer
(off_in_buff variable) has not been accounted for when calculating number of bytes
to copy from the message to qemud buffer. This caused data corruption, because number
of bytes copied has exceeded the capacity of qemud buffer.

Also, off_in_buff has not been reset when switching to the next qemud buffer.

Also fixed _qemud_char_service_connect routine to accept a client parameter string

Change-Id: I2f5a7ca5924c0b79d8755f4777145044567f3e8d
w-qemud.c
cb88e79ecbd16dea5f2201fd12320db5945db83e 26-Aug-2011 David 'Digit' Turner <digit@android.com> Add hw.gpu.enabled hardware property

This patch adds a new hardware property to enable GPU emulation
(named hw.gpu.enabled). It is currently disabled by default.

It also modifies the UI code to display the GL output properly
inside the UI window. And sets the kernel parameter qemu.gles
to either 0 or 1 to indicate to the guest system's GLES libraries
whether to use GPU emulation or fallback to the software renderer.

A future patch will also add auto-detection of desktop GL capabilities.
For example, if the emulator is started on a headless server without
an X11/GL display, hw.gpu.enabled will be forced to 'no', forcing the
guest to use the software renderer.

Another patch will allow to change the property from the command-line
for debugging purpose.

NOTE: If you want to test GPU emulation, change the default value of
the property in android/avd/hardware-properties.ini from 'no'
to 'yes'. You will need to run a ToT master AOSP tree with
the following pending patches applied:

https://review.source.android.com/25797
https://review.source.android.com/25154
https://review.source.android.com/25759

Change-Id: I1fa3512be24395244fd5068f2bf59ad54db5c7d5
vd/hardware-properties.ini
w-pipe-net.c
pengles.c
pengles.h
kin/scaler.c
kin/scaler.h
kin/window.c
tils/debug.h
6a8b698fff4d328c2706776c1c09171cfadb8de4 26-Aug-2011 David 'Digit' Turner <digit@android.com> Fix a crash when GPU emulation doesn't work.

This patch fixes a simple segmentation fault in the case
where we can't connect to the GPU emulation rendering library.

Change-Id: I47df0cae9029aee4738fd89083750e3baca5f032
w-pipe-net.c
2c137e16a2be44d95bd02eca02f173b4b83998b2 28-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix premature boot-properties service disconnect.

Change-Id: I746147ab0c441a05055f7fc878eda3e035c0da14
oot-properties.c
4c414820910ba8553cab7ff30188575f972a9896 20-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Enable qemud clients to pass connection parameters to emulator.

This is useful for qemud pipe clients to be able to pass parameters to the
emulator service when connecting. In particular, this would be extremely
useful for camera emulation clients, which can pass name of the camera
device, and other parameters that may be required to connect to the
camera. Parameters are passed when opening the qemud pipe in form:
/dev/qemu_pipe/camera:/dev/video0
I.e. parameters follow the service name, separated from it by ':'

Change-Id: I67f0ef0ff27008e2b52652e58d72d5216b244646
oot-properties.c
w-control.c
w-qemud.c
w-qemud.h
w-sensors.c
fd16505ce923202f0abe74bfe7c3ba110d325ebe 25-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix qemu pipe's 'poll' callbacks

Throughout emulator's code pipe's 'poll' callback was returning PIPE_WAKE_XXX,
instead of PIPE_POLL_XXX flags. This created whole sort of issues with the
qemu pipe service <-> client communications.
This is also a fix for http://b/issue?id=5196348

Change-Id: I92202cf4ef4554559eb022c4410ee93923edec1b
w-pipe-net.c
w-qemud.c
6c13702fee11a40c72e71432c5438fc65602bd5d 24-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Fix the darwin build"
88fceb022e53ede2f6a7e57a8cbd63f5ac2e1bb3 24-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix the darwin build

Change-Id: I87bd356f7673bdbcc8e5f196f4a89182b3a36cbe
amera/camera-common.h
amera/camera-format-converters.c
fb81fbc2de3a70e509faf8a064554e01040bb40a 24-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Fix build break: make sure darwin build picks up on required declarations"
09e7673ce669c8dda0037f8e85d644f3f1a7c72f 24-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix build break: make sure darwin build picks up on required declarations

Change-Id: I801d56668d8591e599994c65fb47b9c3ea77ff73
amera/camera-common.h
amera/camera-win.h
e95ae1423e69481806f485fb5fd2b635ad4ba3fb 24-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Fix the build by #ifdefing linux-only includes"
0620f37593cc760cfab891defeff04e00be09260 24-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix the build by #ifdefing linux-only includes

Change-Id: Ia4b6b45ad305307f28858f834f284b07be7d134d
amera/camera-format-converters.c
bfcfa46044116a54ebe11ee2881142fd38a87939 24-Aug-2011 David 'Digit' Turner <digit@android.com> emulator: probe shared library search path

This patch modifies the 'emulator' launcher program to probe
for a adequate directory containing shared libraries that will
be required by the emulator core to implement GLES emulation
properly.

It does that by looking for a library named libOpenglRender.so
(or .dll, or .dylib depending on the platform) in various directories
around the one containing the executable program.

When such a directory is found, it modifies the value of the PATH
or LD_LIBRARY_PATH environment variable before calling exec()

This is necessary because there is no way to change the list
of search directories at runtime, i.e. between the program's start
and the moment it calls dlopen() to load such a library.

Change-Id: I7346d26597382f44931cdf08936b051e74d3641a
ain-emulator.c
816e53ca385b64c18c9c7cfca569c4d747634e97 17-Aug-2011 David 'Digit' Turner <digit@android.com> Add DLL-loading head <android/utils/dll.h>

This patch adds several functions to make loading shared libraries
dynamically easier. This will be used to load the GLES emulation
libraries.

Change-Id: Ib401af339530bc647bfa86fb23a2840fe0a201dd
tils/dll.c
tils/dll.h
tils/path.c
tils/path.h
1fa2c1c394ce25ff41c4525d8d07983e00851266 24-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Video capturing code for Linux, and Windows"
72d561178e62b74923cfe3bc0faa59bcb07c57c3 12-Aug-2011 Xavier Ducrohet <xav@android.com> Revert "Revert "Merge c80340 from master to r13: Move charmap to hardware properties"..."

This reverts commit cccd28ca5064a7bd14282cd774ee5bb7126d5845.

c80340 add a CL to tools_r13 that broken the build. It was therefore reverted
with cccd28. This revert was merged into tools_r13 but shouldn't have been.

This reverts the revert to put back the CL in master.

Change-Id: I95fcefedb77596cfdf76269f248b2ae80c85c830
vd/hardware-properties.ini
vd/info.c
vd/info.h
ain-common.c
ain.c
emulator.c
kin/keyboard.c
kin/keyboard.h
593853248510bda1bdb064780ef6046f3a50e582 19-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix an emulator crash due to closed qemud pipe

It looks like goldfish_pipe may make a call to the pipe after client
has been disconnected and QemudClient instance freed. This results
in a sudden death of the emulator, because _qemudPipe_recvBuffers
doesn't know that the client for that call is gone.

Change-Id: Ie1dd5481a01fd5bbb58d8c2d4e1bbe1ecfeca38a
w-qemud.c
4ed09fd35085c96ae8edbda87757187f75eeac8d 18-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Video capturing code for Linux, and Windows

Contains API that connects to a camera device, and pulls video frames from it
on request from the client.

Change-Id: If1d80c57611afff637a7734ce5c3a2c874cfc85a
amera/camera-capture-linux.c
amera/camera-capture-windows.c
amera/camera-capture.h
amera/camera-common.h
amera/camera-format-converters.c
amera/camera-format-converters.h
amera/camera-win.h
tils/debug.h
6d02d6cb12378599d949591d6c5070e2c96dd9dd 15-Aug-2011 David Turner <digit@android.com> opengles: improve throughput of TCP socket

Disable the TCP Nagle algorithm to drastically improve the
throughput of small packets when creating the TCP socket used
to talk with the OpenGLES renderer library.

Coupled with a corresponding change in the server part of the
code, this improves performance of most applications significantly.

+ get rid of shouldSetSockOpt field, by performing the buffer
adjustment just after the socket is created.

Change-Id: Ibacca834ff98d1e9a92fb735f450b925e373fdc0
w-pipe-net.c
6cb2c5af3d3d23d35072beae0edb3614e2c3deb8 12-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Fix fron report on unexpected qemud char channel close."
5297e197c131258f3b115d1fc4ab608224b39bb9 12-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix fron report on unexpected qemud char channel close.

Change-Id: Ib6a1f3ff7a77ae35d6b3b264752f9f62122e60fc
w-qemud.c
c462eb94f5e4f8b9dcb101ce4e4fcc714ddd7410 12-Aug-2011 The Android Open-Source Project <initial-contribution@android.com> merge from tools_r13

Change-Id: Iabd0b49a5c3ad991da1b4f636ecdf881b1c271aa
cccd28ca5064a7bd14282cd774ee5bb7126d5845 12-Aug-2011 Xavier Ducrohet <xav@android.com> Revert "Merge c80340 from master to r13: Move charmap to hardware properties". do not merge.

This reverts commit f490aee025b3bab5bcdb065e5fc1b1abecf16b97.

Change-Id: I59a0b2aebc8ab2b788a820a206c6eb4fc6e6e6d2
vd/hardware-properties.ini
vd/info.c
vd/info.h
ain-common.c
ain.c
emulator.c
kin/keyboard.c
kin/keyboard.h
7ffddd66de46c27c4e24d9af9b47fc0b9a8da8d1 05-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fic minor bug, and update docs.

Change-Id: Ifdc2b019c499d995c8dc493dd4684dd21d0cf995
w-qemud.c
f490aee025b3bab5bcdb065e5fc1b1abecf16b97 19-May-2011 David 'Digit' Turner <digit@android.com> Merge c80340 from master to r13: Move charmap to hardware properties

The name of the emulated charmap must be passed to the guest
kernel because it is used by the guest input handling code to
load the proper charmap files from the system partition.

This mandates that the name becomes a hardware property for
the sake of supporting proper snapshotting and ui/core separation.

From now on, the charmap name found in a skin will be ignored
completely. This shouldn't be a problem in practice because all
skins used the default name (qwerty2) anyway.

The only reason to change the default value would be if emulating
a guest system image that depends on a different charmap during
emulation.

Change-Id: If571684000b159ae9e9849661c9ff18e19b4cc75
vd/hardware-properties.ini
vd/info.c
vd/info.h
ain-common.c
ain.c
emulator.c
kin/keyboard.c
kin/keyboard.h
97d15562536c28f5a8bb079994cc526412cf506e 06-Jul-2011 Maciek Molerus <maciek@google.com> merge 62ffc42 from master to r13: Added GTV related keys

Adds the definitions for keys present in GoogleTV.
Standard linux definitions are used to send
notifications to emulated system.

Change-Id: Iafb84b68a270b6566361d1822b8e1098ee870280
eycode.h
emulator.c
kin/file.c
kin/keyset.h
kin/window.c
77e61ceb3ecd53d6c4de9631c9450b6183d9244b 04-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Enable QEMUD over pipe.

In addition to the currently implemented QEMUD over serial port, this CL adds
capability to connect with guest clients via pipe device. The connection is
established in request from the guest, that opens a "qemud:service-name" on
/dev/qemu-pipe, which in turn invikes a callback in the emulator requesting
to create a client for a service "service-name". Note that serial port version
of QEMUD is fully preserved here.

Change-Id: I6621f141cf9b4eb93bfa7cb1a689d80154922c87
w-qemud.c
e0b2b39121ec537ff86e7cab045e11a397ed1aca 15-Jul-2011 David Turner <digit@android.com> Fix Windows space-in-path handling for 'emulator'.

This is a back-port from master to tools_r13

This modifies the 'emulator' launcher program to work
correctly on Windows when it is installed in a path that
contains spaces.

The program computed the path of the program to be launched
correctly, but it turns out that the problem is in the
implementation of execv() in either mingw or MSVCRT.DLL:

experimentation shows that one needs to quote argv[0] when
it contains spaces. However, you must *not* quote the first
argument to execv(), otherwise the call will fail.

Change-Id: Icf66426c88424f2f5d6274a25fc8530ca489f908
Orig-Change-Id: If291c5a8bd507f96b40634ecbc946ba38346ee4e
ain-emulator.c
e6fffb54a71904ecd0a65f4e9616265326b1aad3 08-Jul-2011 David 'Digit' Turner <digit@android.com> Fix window scaling issue.

This is a back-port from master to tools_r13

This patch fixes a bug in the MMX scaling code. The MMX state was not
properly empties when we started the scaling functions. The end result
was that, if the hardware FPU was in a certain state, rendering would
be be erratic.

Fixes http://code.google.com/p/android/issues/detail?id=18299

This bug was hard to reproduce, but the fact that it never happens
when building a debug version (with -O0) of the emulator indicated
a problem in the generated instruction stream.

Glad this isn't a compiler error though :)

Change-Id: I19d3b35215120b41d92c85473e419b624ffa0f5f
Orig-Change-Id: Icea04a7152b8fa5d81cb70cc215c0cd95aed2142
kin/argb.h
41c787acecaa497b2ee5fd8297feb7be976d0f1d 23-Jun-2011 David 'Digit' Turner <digit@android.com> Fix -sysdir handling.

This is a back-port from master to tools_r13

This patch fixes the processing of the -sysdir option. Previously,
using -sysdir <path> would imply that the -system <path>/<path>/system.img
is used, which is incorrect.

Also fixes the skin search for the case where we are using the emulator
without a pre-existing AVD outside of platform builds (e.g. when running tests).

This happens with stuff like:

emulator -sysdir /path/to/known/sdk/platforms/<name>/images

The patch ensures that the /path/to/known/sdk/platforms/<name>/skins directory
is probed (this was the behaviour of the Tools R11 emulator).

Change-Id: Ibf7ad97de8e1da375f1049600807e0b3d30bfaaa
Orig-Change-Id: I32398bec0d7a28ead234f63c847d3ec95ed14b63
Orig-Change-Id: Id77ea9bdc55bb99c1bfbd2ade291ec41f31ec65d
vd/info.c
ain-common.c
ain.c
fd79a9a99d1fa1b811b65db366692fee00904021 26-May-2011 David 'Digit' Turner <digit@android.com> Auto-adjust scale and window position when needed.

This is a backport from master to tools_r13

This patch changes the emulator's default behaviour in two ways:

- Automatically compute the window scale to ensure that the emulator's
window can be displayed within the current screen. This ensures that
it remains usable when emulating a large-resolution device on a
small display (e.g. on a 13" laptop running at 1024x768).

This check and auto-correction do not happen if you use the
-scale or -dpi-monitor options.

- When re-centering an out-of-focus window, ensure that the top of
the window is visible (which generally includes the window's
title bar). This allows the window to be easily moved or minimized
by the user is needed.

This fixes three bugs:

http://code.google.com/p/android/issues/detail?id=16399
http://code.google.com/p/android/issues/detail?id=16398
http://code.google.com/p/android/issues/detail?id=16397

Change-Id: Ibbc3c8458bd99718e4902d0a032b154c7cff4757
Orig-Change-Id: I8e5a624446d064038b5b9ad16556db8328244906
emulator.c
kin/window.c
kin/window.h
e4a3bea51fc7b377234b5af7a6cecfd529962f2e 15-Jun-2011 Maciek Molerus <maciek@google.com> Fixes dataPartition size problem

This is a back-port from master to tools_r13

Fixes the problem when disk.systemPartition.size
avd setting gets overrided by default 66 MBytes
hardcoded in qEmu.

Change-Id: Ie15a820c60f48320ee8ca2ea60e4dcb65b762cf9
Orig-Change-Id: Ideb7ca172cb72076c83037f823b86ede2442d6f9
ain.c
add001c9d30ef442e87ee18ec59342929401bd49 15-Jul-2011 David Turner <digit@android.com> Fix Windows space-in-path handling for 'emulator'.

This modifies the 'emulator' launcher program to work
correctly on Windows when it is installed in a path that
contains spaces.

The program computed the path of the program to be launched
correctly, but it turns out that the problem is in the
implementation of execv() in either mingw or MSVCRT.DLL:

experimentation shows that one needs to quote argv[0] when
it contains spaces. However, you must *not* quote the first
argument to execv(), otherwise the call will fail.

Change-Id: If291c5a8bd507f96b40634ecbc946ba38346ee4e
ain-emulator.c
62ffc423bdf158d98ee2902916963c4fde7fbe47 06-Jul-2011 Maciek Molerus <maciek@google.com> Added GTV related keys

Adds the definitions for keys present in GoogleTV.
Standard linux definitions are used to send
notifications to emulated system.

Change-Id: Id87aebfc86c5ce8b7331314352f2640a00ef36ae
eycode.h
emulator.c
kin/file.c
kin/keyset.h
kin/window.c
e2790e0d387de88c7ff5e3c42229c659dbe34524 08-Jul-2011 Guy Zadickario <guy@graphtech.co.il> opengles qemu-pipe perforance on windows

Set the socket send buffer size to 128k on windows
to allow higher throuput when sending large blocks
over the pipe. On Linux the default value is already
128k. Might want to enable this for all 'tcp" pipes,
currently it is only for the opengles pipe.

Change-Id: I0c6868b6af54b4df1a0257bfe591baab6f76e14a
w-pipe-net.c
22ee8437f45a01c6e1d8e33dd85bb9df18ca1e8b 08-Jul-2011 David 'Digit' Turner <digit@android.com> Fix window scaling issue.

This patch fixes a bug in the MMX scaling code. The MMX state was not
properly empties when we started the scaling functions. The end result
was that, if the hardware FPU was in a certain state, rendering would
be be erratic.

Fixes http://code.google.com/p/android/issues/detail?id=18299

This bug was hard to reproduce, but the fact that it never happens
when building a debug version (with -O0) of the emulator indicated
a problem in the generated instruction stream.

Glad this isn't a compiler error though :)

Change-Id: Icea04a7152b8fa5d81cb70cc215c0cd95aed2142
kin/argb.h
e46907e57c3d74a391b993539bf76014b91406ed 07-Jul-2011 David 'Digit' Turner <digit@android.com> Merge "Fix a small bug in the -sysdir handling."
afe299d6284ecb86ba5c073d2c969aedd86597db 07-Jul-2011 David 'Digit' Turner <digit@android.com> hw-pipe-net.c: only support connecting to localhost ports.

Don't allow the 'tcp' pipe service to connect to anything other than
localhost IPv4 addresses, for security reasons.

Moreover, resolving host addresses is a blocking operation that
could freeze the emulation for significant time, which is not
acceptable.

Change-Id: I0151a4a72befdc9f1d1526e1f68ef99f0b9e4464
w-pipe-net.c
ea2837728272b04bd236a74cd1ea547ec6f63c20 07-Jul-2011 David 'Digit' Turner <digit@android.com> Fix a small bug in the -sysdir handling.

The issue was that auto-configuration would set the value of -system
to point to the full path of the system image (e.g. <sysdir>/system.img).

Later, the emulator would try to load the <sysdir>/<sysdir>/system.img due
to this.

Change-Id: Id77ea9bdc55bb99c1bfbd2ade291ec41f31ec65d
ain.c
c803400d45535925fb35c373e2d610fde522c546 19-May-2011 David 'Digit' Turner <digit@android.com> Move charmap to hardware properties

The name of the emulated charmap must be passed to the guest
kernel because it is used by the guest input handling code to
load the proper charmap files from the system partition.

This mandates that the name becomes a hardware property for
the sake of supporting proper snapshotting and ui/core separation.

From now on, the charmap name found in a skin will be ignored
completely. This shouldn't be a problem in practice because all
skins used the default name (qwerty2) anyway.

The only reason to change the default value would be if emulating
a guest system image that depends on a different charmap during
emulation.

Change-Id: If571684000b159ae9e9849661c9ff18e19b4cc75
vd/hardware-properties.ini
vd/info.c
vd/info.h
ain-common.c
ain.c
emulator.c
kin/keyboard.c
kin/keyboard.h
42fc4496541acdcaf49bcdf3fcffe247be985fe0 29-Jun-2011 David 'Digit' Turner <digit@android.com> hw-config-defs.h: Remove from source tree + auto-generate

This patch modifies the emulator's build system to place the
auto-generated file android/avd/hw-config-defs.h into the build
directory. Before that, the file was placed in the source tree.

+ Fix the standalone build system to properly deal with
generated source file dependencies + LOCAL_C_INCLUDES

Change-Id: I4e77cd20bf4ca21f79d5dd19f27724bd8be53a79
vd/hw-config-defs.h
uild/binary.make
uild/definitions.make
f816a75ca5b357563a4ecf996e95b24ffabd0b54 23-Jun-2011 David 'Digit' Turner <digit@android.com> Fix -audio <name> and -no-audio processing.

Turns out that the string passed to putenv() must not be modified :-/

We provide our own win32 implementation for emulator-ui that doesn't
embed the os-win32.c QEMU-specific file.

Change-Id: I7260fbc37d23a5340dab589dfde577ef5eb10005
ain-common.c
kin/window.c
tils/setenv.c
04fcb22aa936b2ca326d6e1e35f97b7afb23a3de 23-Jun-2011 David 'Digit' Turner <digit@android.com> android-configure.sh: Better platform build detection.

Change-Id: I3de10b579507165160e93c644023ce06bc557ba7
uild/common.sh
adc34fb9e9ad0700e9752ca67174c68925ca0c71 23-Jun-2011 David 'Digit' Turner <digit@android.com> Fix -sysdir handling.

This patch fixes the processing of the -sysdir option. Previously,
using -sysdir <path> would imply that the -system <path>/<path>/system.img
is used, which is incorrect.

Also fixes the skin search for the case where we are using the emulator
without a pre-existing AVD outside of platform builds (e.g. when running tests).

This happens with stuff like:

emulator -sysdir /path/to/known/sdk/platforms/<name>/images

The patch ensures that the /path/to/known/sdk/platforms/<name>/skins directory
is probed (this was the behaviour of the Tools R11 emulator).

Change-Id: I32398bec0d7a28ead234f63c847d3ec95ed14b63
vd/info.c
ain-common.c
82e6277377df841b6493d2ac5a30f2ab767fb156 21-Jun-2011 David 'Digit' Turner <digit@android.com> qemu pipes: fix Windows network pipes.

Never use read() or write() when using sockets on Windows, use
recv() / send() instead.

+ Remove compiler warning on Windows.

Change-Id: I53de04ceb3bad20dfebcbd8279506db87388a578
w-pipe-net.c
883f5bc37badb1bbd0d61823993911679feb1826 20-Jun-2011 David 'Digit' Turner <digit@android.com> Merge "Auto-adjust scale and window position when needed."
f758411e012389b1d9699e10cae6f1ac98cca419 15-Jun-2011 Maciek Molerus <maciek@google.com> Fixes dataPartition size problem

Fixes the problem when disk.systemPartition.size
avd setting gets overrided by default 66 MBytes
hardcoded in qEmu.

Change-Id: Ideb7ca172cb72076c83037f823b86ede2442d6f9
ain.c
7e48eceb9caa7eeae31461c0ada5ff5b4286d323 26-May-2011 David 'Digit' Turner <digit@android.com> Auto-adjust scale and window position when needed.

This patch changes the emulator's default behaviour in two ways:

- Automatically compute the window scale to ensure that the emulator's
window can be displayed within the current screen. This ensures that
it remains usable when emulating a large-resolution device on a
small display (e.g. on a 13" laptop running at 1024x768).

This check and auto-correction do not happen if you use the
-scale or -dpi-monitor options.

- When re-centering an out-of-focus window, ensure that the top of
the window is visible (which generally includes the window's
title bar). This allows the window to be easily moved or minimized
by the user is needed.

This fixes three bugs:

http://code.google.com/p/android/issues/detail?id=16399
http://code.google.com/p/android/issues/detail?id=16398
http://code.google.com/p/android/issues/detail?id=16397

Change-Id: I8e5a624446d064038b5b9ad16556db8328244906
emulator.c
kin/window.c
kin/window.h
2ed457ee5259b236bf39701404897f4c486326e8 15-Jun-2011 David 'Digit' Turner <digit@android.com> arm: Automic ARMv7-A support for platform builds.

This patches forces the emulator-arm program to emulate a Cortex A8
when it detects that it is launching a platform build that was built
for the ARMv7-A architecture.

This is done by parsing the build.prop file and comparing the target
ABI to the value 'armeabi-v7a'. When this is the case, this will also
automatically adjust which prebuilt kernel image is selected from the
Android tree.

Note that nothing is changed for SDK AVDs in this change. They will
still need to define 'hw.cpu.model = cortex-a8' in their config.ini
to enable ARMv7-A support.

Change-Id: Ibba2a9a4bafbea3c33cb2dd365a881d488de15a9
vd/info.c
vd/info.h
vd/util.c
vd/util.h
ain.c
2f8fa59403a3eed5ec1a63bc1ecb2c9f9083eb7b 10-Jun-2011 Xavier Ducrohet <xav@android.com> Update desc on hw.lcd.density to include 213/320

Change-Id: Ib5f7644242c9f02f3a8eed51aa1d24d1e98ff2aa
vd/hardware-properties.ini
736e01f86f4ec4049bb5795f1ddb979132b05333 10-Jan-2011 Tim Wan <tim.wan@sonyericsson.com> Sensor Command Line Interface implementation.

Implement an unified sensor command line interface(CLI) on emulator
to check all available sensors, and get/set specified sensor data.

Change-Id: Ibb3c3522dc6c88e42fa1c7dffa32fbb675596b08
onsole.c
w-sensors.c
w-sensors.h
049c72f0ffd9381b88bf9477fc41df5fc8c9a2a1 03-Jun-2011 Xavier Ducrohet <xav@android.com> Add support for the TV DPI.

This is the dpi for the 720p resolution used by
Google TV. It's a special dpi, not a bucket dpi like
the other one so the handling is a bit different.

Change-Id: Id9a245422855c2dba82c267beca203006f6fd864
w-lcd.c
w-lcd.h
406a59bd0a2e7a38cd840a5c08602e3a36bd2df8 12-May-2011 David 'Digit' Turner <digit@android.com> trace.h: rename to trace-android.h

This is done to allow for future integration of the
upstream auto-generated "trace.h" header file.

Change-Id: I9d1bba3320d9e8acfd7359540d3ed6695773061e
rotocol/core-commands-impl.c
rotocol/core-commands-qemu.c
280afa072a7b829e581d884c2b3276530a6014b7 11-May-2011 David 'Digit' Turner <digit@android.com> ramblocks: integrate upstream implementation (sophisticated)

Change-Id: I49e96e2d5ae571849b0b6fef0a30b41ecdee8d23
onfig/darwin-x86/config-host.h
onfig/freebsd-x86/config-host.h
onfig/linux-ppc/config-host.h
onfig/linux-x86/config-host.h
95a83ce7ee413954ba6325584ea659c6685edfd5 10-May-2011 David 'Digit' Turner <digit@android.com> savevm: Remove OutputBuffer hack.

It's easier to provide a fake Monitor object instead.

Change-Id: Ia45267061d489b147497add6120d3caa9234ac11
onsole.c
5973c775c853e26f684de58ad28c267281aaffd6 10-May-2011 David 'Digit' Turner <digit@android.com> qemu-timer.c: rename qemu_timer_new_scale()

Get rid of qemu_timer_new() implementation, and update all
callers to use qemu_timer_new_ms() or qemu_timer_new_ns()
instead.

Rename qemu_new_timer_scale() to qemu_new_timer() to follow
upstream conventions.

Change-Id: Id2c04f8597ec5026e02f87b3e2c5507920eb688e
w-sensors.c
ooper-qemu.c
45c3be00d4c1f85ba8bbf34827c024fbc636725f 09-May-2011 David 'Digit' Turner <digit@android.com> integrate: qemu-common.h changes

Change-Id: I4620b4560465ed105202332b59f91b708d91a525
onfig/darwin-x86/config-host.h
onfig/freebsd-x86/config-host.h
onfig/linux-ppc/config-host.h
onfig/linux-x86/config-host.h
bb0140b925cb2adce03ebc0885067ea3bfd19a20 28-May-2011 Jun Nakajima <jun.nakajima@intel.com> x86: Workaorund for the KVM GS_BASE MSR save/restore issue.

In some versions of the kvm module in Ubuntu, the host's GS_BASE MSR is not save/restored correctly
when running guests on 64-bit hosts if the qemu/emulator is 32-bit.
This patch implements a workaround in the emulator code.

Change-Id: If3ebe3cb49f377c5d0547c75f6ac3a3ceacdc375
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
onfig/linux-x86/config-host.h
e3273920a073db0f124f08bfd950e7ad0ae41b0c 26-May-2011 David 'Digit' Turner <digit@android.com> Fix Mac and Windows builds.

Silly me, KVM is only available on Linux hosts.

Change-Id: I983c87b1f5473e92823398b7812a574f56fc3a68
onfig/target-x86/config.h
36597756e589622ee6c6628efb47c1b130d5ee85 20-May-2011 David 'Digit' Turner <digit@android.com> x86: kvm: fix KVM build + enable auto-detection.

This patch fixes the build of KVM support in the x86 emulator by
copying official Ubuntu Lucid KVM headers into android/config/linux-*/

This removes the need to rely on the build machine's versions of these
headers, which caused various issues.

Also, by default, the emulator will now probe the system to see if it
can start in KVM mode automatically. See android-kvm.c for details.
You can see the result of the probing with the -verbose option.

IMPORTANT NOTE:
It looks like there is a bug in the KVM code when the emulator
is built as a 32-bit binary, running on a 64-bit kernel, so
we explicitely disable KVM when we detect this case. It's hard
to tell whether this is a bug in QEMU or some versions of the
KVM driver.

As such, KVM only works when building the emulator as a
64-bit program. For now, this is only possible with
"android-configure.sh --try-64", not the Android build system.

+ Add a new QEMU option (-disable-kvm) to explicitely disable KVM
if needed. This is an addition to -enable-kvm which already exists
(and forces usage of KVM).

Change-Id: I6a397cae29ab62b1c56fce95c1ee75a4664d6688
onfig/linux-x86/asm/kvm.h
onfig/linux-x86/config-host.h
onfig/linux-x86/linux/kvm.h
onfig/linux-x86_64/asm/kvm.h
onfig/linux-x86_64/linux/kvm.h
onfig/target-x86/config.h
cdca5efd64ac52af0d780b38976884cc3439223a 17-May-2011 Xavier Ducrohet <xav@android.com> Add support for xhdpi when injecting a skin dpi into the emulator.

Change-Id: I58f06af3c39efc1fcc7dd4e53a701136229379de
w-lcd.c
w-lcd.h
0a879bf9ba318562e41a1bd4a6f9547f124a9831 12-May-2011 David 'Digit' Turner <digit@android.com> Dump hardware config. with -verbose option.

This patch dumps the content of the hardware configuration
file when the -verbose option (or equivalent -debug-init)
is used.

This is useful to determine exactly what is launched when
debugging emulator issues.

Change-Id: I101b87cddb12c603b43420ea72bb357fc33f327d
ain.c
tils/lineinput.c
tils/lineinput.h
88935f701f51d84ed536cb55cc7b2ba391d7597e 09-May-2011 David 'Digit' Turner <digit@android.com> console: Fix 'event send' handling.

This patch fixes two bugs in the implementation of the 'event send'
command:

1/ It prevents a crash when using the '0:0:0' event triple
(note that the equivalent EV_SYNC:0:0 used in testing didn't crash)

2/ If fixes the parser to correctly handle several event triples on
the same line, as in:

event send <type1>:<code1>:<value1> <type2>:<code2>:<value2> ...

Change-Id: I26cb55dd2feb75fda4f50ba0d49c7c8ad8a9dcca
onsole.c
w-events.c
cee98de91c5380efbc321bf01a6025675fbed748 05-May-2011 David 'Digit' Turner <digit@android.com> Merge "Fix -snapshot-list option."
ec6cedb56251ce3d5703c43c352d373c0baaa76d 05-May-2011 David 'Digit' Turner <digit@android.com> Fix "avd name" bug.

The console's 'avd name' command returned "unknown" incorrectly.
This was due to a missing option when invoking the core, even in
the standalone case.

Fixes bug 3454261

Change-Id: I5d4e346591e13bd7f525ad81953fd2d17c8f27b7

NOTE: This is similar to the tools_r10 quick fix at
https://review.source.android.com/#change,22735,
only simpler.
onsole.c
d80a7861fe5e21e3dcb80480a77b033e6b307dd5 05-May-2011 David 'Digit' Turner <digit@android.com> Fix -snapshot-list option.

This patch makes -snapshot-list work properly. More specifically:

- If the AVD has snapshotting enabled, the emulator will find the
appropriate file if you don't use -snapstorage.

- If the AVD has no snapshot support, the emulator will print
a user-friendly message to explain that.

- If you're in the Android build, the emulator indicates that
-snapstorage <file> is mandatory.

Bug 4384430

Change-Id: I472b12f50b7f7da5a282b24036083c7598fe48eb
ain.c
napshot.c
d740d7090e30b00fdd2d26e6e6aefe7aac173005 04-May-2011 David 'Digit' Turner <digit@android.com> Merge "Fix ANDROID_SDK_HOME handling."
107be29100b6c422c8be58ca898687bf99534350 04-May-2011 David 'Digit' Turner <digit@android.com> Fix ANDROID_SDK_HOME handling.

A previous patch introducing the "emulator" launcher program
did regress the way ANDROID_SDK_HOME is parsed. Fix that by
actually trusting bufprint_config_path() to always do the right
thing :-)

Change-Id: I11a13fea95727ee9c487595fd4ae5e81805986da
vd/util.c
9fb360ec4c47d750711c8f1776c180e3802b0aab 04-May-2011 David 'Digit' Turner <digit@google.com> Correct fix for snapshot saving speed

QEMU is a weird animal. The "snapshot" property speeds-up snapshot
saving but also redirect all stores to a temporary file which is
deleted when the emulator exit.

Use a different property to get the desired speed-up. Note that
using "writeback" instead of "unsafe" forces the use of fdatasync()
which will still be horribly slow.

+ Argument checking in avd snapshot commands in the console.
(trying to load a name-less snapshot actually crashes the emulator).

Change-Id: Ie61f110f037bbb3539c7f9892cb03bee8bfec6bd
onsole.c
c0ac73377011befa8a3e6444d61a80cd6ada2659 02-May-2011 David 'Digit' Turner <digit@android.com> Document new QEMU pipe implementation.

+ Rename android/pipe-net.c to android/hw-pipe-net.c

Change-Id: Ia2e2466c3bf3ea812f36639420fad7ce2e0cb61d
w-pipe-net.c
w-pipe-net.h
ipe-net.c
ipe-net.h
5bdf6459919c143aef5f285927501629d1c596ca 03-May-2011 David 'Digit' Turner <digit@android.com> Merge "Add 'emulator' launcher program."
2d238fd9871687b1557f15b8878a6cf3e9634b57 25-Mar-2011 David 'Digit' Turner <digit@android.com> Add 'emulator' launcher program.

This patch renames the current ARM-specific emulator binary to 'emulator-arm'
and introduces a new tiny (less than 20KB) 'emulator' launcher program.

The role of 'emulator' is to launch either 'emulator-arm' or 'emulator-x86'
based on the target AVD or platform build being used.

This program will be replaced in the future by what is currently known
as 'emulator-ui', but is a good placeholder until this work is completed.

+ Move some utility functions from android/avd/info.[hc] to
android/avd/util.[hc] so that 'emulator' can use them directly.

IMPORTANT: For platform builds, the target architecture is detected
automatically by parsing the build.prop file.

For SDK AVDs however, there is no easy way to determine the
target architecture, so the patch adds a new hw.cpu.arch
property which can have value 'arm' or 'x86'

Change-Id: I0084c196695a75c8b9230ba716b3cd2e12610ded
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/info.c
vd/util.c
vd/util.h
ain-emulator.c
tils/path.c
tils/path.h
c0e96f0ec192eff4b36574f703e62030da028bbf 02-May-2011 David 'Digit' Turner <digit@android.com> Use user-specific directory for temporary files.

Instead of use /tmp/android/, use /tmp/android-$USER/ so that several
users can run the emulator easily on the same system.

Change-Id: Ifda1b773cc87a9e0d4ff7e256b74a3f93377d73a
tils/bufprint.c
d4d688e926097faba7fd3717d1c0d3f296bdb526 26-Apr-2011 David 'Digit' Turner <digit@android.com> New goldfish_pipe virtual device.

This adds a new virtual hardware device named "goldfish_pipe"
used to implement a very fast communication channel between the
guest system and the emulator.

IMPORTANT: This depends on a special kernel driver, see:

https://review.source.android.com/#change,22496

Usage from the guest is simply the following:

fd = open("/dev/qemu_pipe", O_RDWR);
const char* pipename = "pipe:<name>";
ret = write(fd, pipename, strlen(pipename)+1);
if (ret < 0) {
/* could not connect to service named <name> */
}
/* now you can read()/write()/close() as a normal
* file descriptor to exchange data with the service.
*/

In addition, this implements the following pipe services in the
emulator:

tcp:<port>
tcp:<hostname>:<port>
unix:<path>
opengles

The 'tcp:' and 'unix:' services simply redirect to a TCP or Unix
socket on the host with minimal

The 'opengles' service simply connects to tcp:locahost:22468 for now.
We may change this to be more configurable in the future, but that's
the port number used by the current experimental OpenGL ES hardware
emulation host libraries / programs.

Benchmarking with a simple ping-pong program shows that the
guest <-> emulator can achieve a roundtrip bandwidth of 192 MB/s
(on a 2.7 Ghz Xeon PC).

Using the tcp: service to talk to a ping-pong server listening
on localhost reaches 102 MB/s on the same machine, using a Unix
socket reaches 140 MB/s.

By contrast, using standard sockets in the guest reaches only
3.8 MB/s on the same machine (and requires special privileges
from the application anyway).
w-qemud-pipe-net.c
w-qemud-pipe.h
ipe-net.c
ipe-net.h
a65e41529e4e3900372d54859f8c559cf79d953c 28-Apr-2011 David 'Digit' Turner <digit@android.com> Add loopIo_poll() function.

This will be used later by the goldfish network pipe implementation.

Change-Id: I70c770efba15b2fd5ef7cc52450aa07163fa21f5
ooper-generic.c
ooper-qemu.c
ooper.h
ca9505992288636908169d0389087b3ca5277d07 27-Apr-2011 David 'Digit' Turner <digit@android.com> Fix -qemu -vnc startup.

Starting the emulator with something like "-qemu -vnc :1"
didn't result in a valid boot sequence, due to the way our
"hw-control" service is initialized.

This patch fixes the issue. Note however that since a VNC client
cannot send proper touch events, it can only be used as a viewer
at the moment.

Change-Id: Ib9b60ff7028892368547bff89b84f580344c2edd
w-control.c
w-control.h
rotocol/ui-commands-proxy.c
rotocol/ui-commands-qemu.c
470f6bd314acbf5c2c8a408f5f00b5ce55d5eab4 13-Apr-2011 Tim Wan <tim.wan@sonyericsson.com> Add support for hw.lcd.backlight

Change-Id: I02dc12caa76c86de5d294b6fc857ae37b74f0130
vd/hardware-properties.ini
vd/hw-config-defs.h
w-control.c
9b4029807c91ea42ff5e84e3616c90e2ce42d6f8 05-Apr-2011 David 'Digit' Turner <digit@android.com> Add OpenGLES pipe implementation.

Change-Id: I3ad498380de8438dbf430316af2d4391876057cc
w-qemud-pipe-net.c
bb1f432421288dae208c7189356643023ccbffbc 21-Mar-2011 David 'Digit' Turner <digit@android.com> qemud: prevent recursive closure of clients.

+ add android/hw-qemud-pipe.h

Change-Id: Icf7b316137cd9f1ce46e4c3642addccea6222a24
w-qemud-pipe.h
w-qemud.c
w-qemud.h
f9e333ade2529f257ced6bcff8e5824cb07eacf9 17-Mar-2011 David 'Digit' Turner <digit@android.com> Simplify async utils by removing extra LoopIo parameter.

This patch removes the LoopIo parameter from asyncReader_run() by
storing the initial pointer passed to asyncReader_init() inside the
object itself.

Same treatment is performed for:
- AsyncReader
- AsyncWriter
- AsyncLineReader
- AsyncConnector
- AsyncConsoleConnect

Change-Id: Ic74b817e4c326230ca1d38b3a5d8c4790c4f90c1
sync-console.c
sync-console.h
sync-utils.c
sync-utils.h
ain-common.c
rotocol/attach-ui-proxy.c
rotocol/core-commands-impl.c
rotocol/fb-updates-proxy.c
rotocol/ui-commands-proxy.c
rotocol/user-events-impl.c
2086c639648ccecc9081705a279249ce939d818b 05-Apr-2011 David 'Digit' Turner <digit@android.com> <android/utils/assert.h>: Small refactoring

Change-Id: If69874ace211e043d82ffd8349f54396fd334e94
tils/assert.h
bbb81047a39e39021b3b10e2d86af146d514bf8c 17-Mar-2011 David 'Digit' Turner <digit@android.com> Add <android/utils/intmap.h> which implements an integer-keyed map of pointers.

This will be used later to support QEMUD fast pipes.
tils/intmap.c
tils/intmap.h
50142ee2ba636acb48ef92776770bd3270d7bf9c 25-Mar-2011 David 'Digit' Turner <digit@android.com> Fix framebuffer width/height computation.

This patch fixes a bug in the skin parsing code that computes the
dimensions of the emulated framebuffer. The bug had the following
symptoms:

- The vertical framebuffer size reported by the 'events' device
was always 640 (the default), independent of the skin's
dimensions and emulated 'framebuffer' device dimensions.

As such, all touch event Y coordinates were scaled by the
system by 480/640 when running inside a HVGA screen.

Change-Id: I8c67f011ee3929ef25cbf2c858ee800f277c516c
ain-common.c
b64325d15d9e767c652491414c95f4fc148b0211 22-Mar-2011 David 'Digit' Turner <digit@android.com> Set hw.keyboard.lid default value to false for API level >= 12

This patch modifies the emulator to extract the target API level for
the AVD or the current platform release, and use it to set the
default value of hw.keyboard.lid.

This will *not* affect any existing AVD/platform that sets the value
explicitely in its config.ini (for AVDs) or hardware.ini (for platform
builds).

The change is beneficial for platform builds targetting API level >= 12,
because the input framework changed its the window orientation behaviour
depending on the availability of a hardware lid.

In short, this allows platform builds to be correctly oriented, even
if they don't provide a custom hardware.ini.

Fix for bug 4128604

Change-Id: I195135aae6f3c4cc11d2f01e1293f3cd6cad2f58
vd/hardware-properties.ini
vd/hw-config.c
vd/hw-config.h
vd/info.c
vd/info.h
ain.c
5e736937d49affc9131944d7c879246fbcba3b70 18-Mar-2011 David 'Digit' Turner <digit@android.com> Fix -shell and -logcat options.

They didn't work because the guest was trying to write to the wrong serial port.

Change-Id: Ibd68c4b63d0808afcb0cfaffa07c35898e21df9a
ain.c
e85871f98fe50edd8135e5ce8aff04c3ad518d1a 15-Mar-2011 David 'Digit' Turner <digit@android.com> Fix write of disk sizes in ini files.

The old implementation always expressed the size as multiples of kilobytes
due to an improper order to size checks. For example, 66MB was written as
'67584k' instead of '66m', which is correct but sub-optimal.

Change-Id: I6365bf4c269ed7d213043182a8ae501713798b8f
tils/ini.c
1321c76d96910c2c807207f3fdfeb560c598ca60 05-Mar-2011 Jun Nakajima <jnakajim@gmail.com> x86: Enable KVM mode for Android x86 emulator (update/rebase)

This patch enables KVM mode on x86 Linux to boost performance of x86 emulaiton
if the hardware-based virtualization feature is present on the host machine.

Change-Id: I4b24474b3ec115a3b9a7bf017801f4f610253b09
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
onfig/linux-x86/config-host.h
0a349b838d5106d0f1f39ae77792d4bdd7f8d35f 02-Mar-2011 David 'Digit' Turner <digit@android.com> Fix the standalone emulator build.

The previous commit broke it due to the way it handled LOCAL_AR.

Change-Id: I3458f9306b3fca9771d868673ae89f4d995aeec3
uild/clear_vars.make
uild/host_static_library.make
53eb66db4eba72d2e4fc951456be725e14243f25 01-Mar-2011 David 'Digit' Turner <digit@android.com> Move AVD name initialization to the core.

Use a hardware property to send the AVD name to the core.
The -android-avdname core option is still supported though.

Change-Id: I4daac5c9fb65ed5261b5c04c1e1a18daed057a3f
vd/hardware-properties.ini
vd/hw-config-defs.h
ain.c
062dd6a8b90c7c553a6a7257e9c245276b1dd969 01-Mar-2011 David 'Digit' Turner <digit@android.com> Move some serial ports initialization to the core.

This moves the initialization of the ports used by qemud
and the "kmsg" component to the core.

+ Gets rid of the -old-system option used to suppot pre-1.4
Android system. We don't officially support anything before 1.5
anyway.

Change-Id: Ied7e284d952adfd3419d96c39a7c48761f1b3f5c
mdline-options.h
elp.c
ain.c
tils/stralloc.c
tils/stralloc.h
fd59c330bec77e7b9241e478efb1e1c508480d1d 01-Mar-2011 David 'Digit' Turner <digit@android.com> Move data partition initialization to core.

Change-Id: I3c2b4668593391026da028194503fc87246e44ba
vd/info.c
vd/info.h
mdline-options.h
ain-common.c
ain.c
40841b2d221273a08abfe20824e7631211ade31d 01-Mar-2011 David 'Digit' Turner <digit@android.com> Move system image initialization to core.

Change-Id: Ic8da3ccaed9bab7dbb44c0bb341b0dba20b90980
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/info.c
vd/info.h
ain-common.c
ain.c
5f64b873605baa5519211b0d47a53c93df9d4868 28-Feb-2011 David 'Digit' Turner <digit@android.com> Move snapshot storage initialization to the core.

Change-Id: I2c2b782fe4711cc8c323433e7976222b878cf679
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/info.c
vd/info.h
ain-common.c
ain.c
48a3c66361158678f476fc7c2eca2bef025eae62 01-Mar-2011 David 'Digit' Turner <digit@android.com> Move the SD Card initialization to the core.

Change-Id: I2c8fa2a7df3d79ed4222296a93b787994a8ee11d
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/info.c
vd/info.h
ain-common.c
ain.c
c480cca8d2007f5df62a7431beda310911b963e6 25-Feb-2011 David 'Digit' Turner <digit@android.com> Move cache partition initialization to core.

Change-Id: I1f887e6f8fc38e43b1fff3f7bab3814b52542762
vd/info.c
vd/info.h
ain-common.c
ain.c
0b0194940523fa3f318c380d0693907bd522241c 01-Mar-2011 David 'Digit' Turner <digit@android.com> Move kernel/ramdisk initialization to the core.

The QEMU -kernel, -initrd and -append options are still supported for
overriding the hardware configuration.

Change-Id: I034d9e25d0a23341086aa052f449db5de50b2c8d
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/info.c
vd/info.h
ain-common.c
ain.c
25eb6557b94da066d6e137c07aeced39badf5aa6 25-Feb-2011 David 'Digit' Turner <digit@android.com> Rework AvdInfo processing.

This patch changes the code in android/avd/info.c to prepare
for future patches that will move initialization disk images
to the core (including locking and creating temporary files).

+ Remove AvdInfo structure dependencies on many of the
functions, to make them more generic/usable.

+ Remove skin-related processing from avdInfo_new() and
avdInfo_newFromBuild().

+ Remove avdInfo_getSkinName() and avdInfo_getSkinDir(), and
replace them with a single avdInfo_getSkinInfo().

+ Rename 'qemu-hardware.ini' to 'hardware-qemu.ini' to follow
the same naming convention than the one used for disk
images (e.g. "userdata-qemu.img" and "system-qemu.img")

Change-Id: I32cb0a5850f8c0b9df93d2630552941fd2b461c1
vd/info.c
vd/info.h
ain-common.c
ain-common.h
ain.c
e5af8a259e619973538f393011b1c26a3e2f4afb 24-Feb-2011 David 'Digit' Turner <digit@android.com> Remove CONFIG_ANDROID_SNAPSHOTS macro.

The feature is no longer optional.

Change-Id: I4558f12e3804e42069e8a3e6bcf0837d350206ed
vd/info.c
vd/info.h
mdline-options.h
onfig/config.h
onsole.c
elp.c
ain-common.c
ain.c
napshot.c
napshot.h
092361e19ecc2992965729538984354099eea8cb 01-Mar-2011 David 'Digit' Turner <digit@android.com> Remove un-needed "-netspeed full" and "-netdelay none".

This patch removes the use of "-netspeed full" and "-netdelay none"
when starting a core, since these values correspond to the default.

Usually, these were triggered by the values found in the skin files.

Change-Id: I88944c6736dc721a8645b1c7d87bc0cb949feec4
ain-common.h
ain.c
d543578f5d2e900ca9a95befaf15d49da163d5fb 01-Mar-2011 David 'Digit' Turner <digit@android.com> Remove un-needed -clock unix core option.

Remove the '-clock unix' used to start the core on Linux.
We do that by moving the problematic 'dynticks' clock to the
end of the list in qemu-timer.c.

The effect is that the unix clock will become the default
for normal usage. You can still use the dynticks one for
experimentation with -qemu -clock dynticks though.

Change-Id: Ia7a8b2b262c62e8b80a82d6dbadec25964774b57
ain.c
26d415322b75784f123d39f36616b8ebd1fbb359 01-Mar-2011 David 'Digit' Turner <digit@android.com> Prevent hardware-qemu.ini overwrites.

When launching two instances of the same AVD, we need to ensure that
we don't end-up overwriting the hardware-qemu.ini in the content
directory.

Note that this case is supported at the moment. Both the system and
data partition will be backed by a temporary file when this is detected.

Change-Id: I2c5d9195edc4c5be3b889c8da38cb1c7cae3662a
ain.c
26722dde31c3467cd31a078662810927eec05de5 24-Feb-2011 David 'Digit' Turner <digit@android.com> Quote concatenated QEMU options when -verbose is used.

Change-Id: I2d95fa0aa9a5f679372dfd1ae7c7cec906c3049d
ain.c
cd4f70aa8e109356fca32601c259d38024315837 28-Feb-2011 David 'Digit' Turner <digit@android.com> Merge "Fix sensor-related snapshot resume failure."
607461d262aaa756c2ea3a9c6eb03cff38294c70 24-Feb-2011 David 'Digit' Turner <digit@android.com> Fix sensor-related snapshot resume failure.

A snapshot saved with the Tools r9 emulator couldn't be restored properly
because we added another sensor (proximity) in Tools r10. Provide code to
deal with this case properly and avoid a nasty crash.

Change-Id: Ifc395c12496a599eb4ae02e089fe8e13a90865b4
w-sensors.c
w-sensors.h
aff94b88c4ec057f20950d5e7a88b90cc4d97dce 07-Feb-2011 David 'Digit' Turner <digit@android.com> Build arm and x86 binaries at the same time.

This patch modifies the way we build the emulator's various programs.
It reduces the number of static libraries generated, and better segregates
between common, ui, qemu and target-specific code.

Note that we build both the arm and x86 binaries at the same time in all
build scenarios for now. This is done to catch build regressions as soon as
possible.

Change-Id: I6240705041e137e32f207e1e2444c614c52aaf05
uild/definitions.make
onfig/config.h
onfig/target-arm/config.h
onfig/target-x86/config.h
bdb6f2dd35a4c749186e665d55d7b76375d7e71d 23-Feb-2011 David 'Digit' Turner <digit@android.com> Remove android/main-ui.c

The differences between android/main.c and android/main-ui.c are now
minimal, so remove the latter source file by moving the corresponding
code into android/main-common.c

Also add a -snapshot-no-time-update core option to implement the
emulator-ui -no-snapshot-update-time option. We're probably going to
clean this up a little in the future, but this is enough for now.

Change-Id: I868bb4e47c3d106ae7436ee3f5b2c0ff5fb6ea5c
ain-common.c
ain-common.h
ain-ui.c
ain.c
dd90991bb911bc61c885f710a848692b593b72c3 23-Feb-2011 David 'Digit' Turner <digit@android.com> Remove target-specific hard-coded macro.

This removes the hard-coding of the prebuilt architecture path in
android/avd/info.c, in order to build a single version of this source
that can work with any supported architectures.

NOTE: The target architeture is only useful in the case of the
Android build system. We check the target arch by parsing
$ANDROID_PRODUCT_OUT/system/build.prop and look for a line
that looks like:

ro.product.cpu.abi=<abi>

Change-Id: I4e573343fa532e66eb034c895a5759754f2d1aef
vd/info.c
462564f31bbdc9939bf1d2376e2782defa7ef655 23-Feb-2011 David 'Digit' Turner <digit@android.com> Minor cleanups for core/ui Makefile separation.

This patch contains minor cleanups that will be needed by
a few future patches that will improve the way core and ui
sources are separated and built.

- remove a few compiler warnings
- formatting
- remove the memcheck CONFIG_MEMCHECK checks (they later get in the way)
- refine hw/hw.h inclusion's of cpu.h (this comes from upstream)
- add missing definitions for PRUd64 and PRUx64 (used later)
- remove CONFIG_SHAPER test, replace with CONFIG_ANDROID instead.
- add missing strdup() calls.

Change-Id: Ic7d6681a51af718c298f0ee4bd884b1d8750f28e
ain-ui.c
ain.c
tils/system.h
83ffd66e78d290aa054ace5e484ae3766f638390 11-Feb-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Stuff hardware configuration with paths to image / partition files

Change-Id: Id26cd578fc3faf1fee1a55f4999c3613e47c0e96
vd/hardware-properties.ini
vd/hw-config-defs.h
ain-common.c
ain-common.h
ain-ui.c
ain.c
fb1698793fc07654b3498462e9aefec62f7aa809 22-Feb-2011 Stefan Hilzinger <hilzinger@google.com> Fixing the standalone build of the emulator.

Change-Id: I81567b512df04314d87dd3846b02d8895829937d
uild/definitions.make
7e61121b1801fdc63722a402bb9839746b63ddf9 20-Feb-2011 soledad penades <supersole@gmail.com> Enabled the camera button in the emulator

Change-Id: I1587d5e6ccc0bf092bb38b2c841eb19cb006f2e7
kin/file.c
2ee095966aba5003799675b2ccbb5d629dfc7dde 17-Feb-2011 The Android Open Source Project <initial-contribution@android.com> merge from tools_r10

Change-Id: I8730ebf34c07bf1a5167970ee1fdce4fb3094c54
8b9887163ce94928aec159956d1a61fc93bb949d 10-Feb-2011 David 'Digit' Turner <digit@android.com> Merge 59e8e196 into tools_r10. DO NOT MERGE.

Add hw.keyboard.lid

This is used to control the lid switch virtual device.

+ Add support for a "version <number>" field to the skin format.
This will later be used for skin format #3.

+ Fix a bug where string hw properties didn't work/compile

Change-Id: I27ff3293b439917a51c584a25139264ddb1aff12
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/info.c
kin/file.c
kin/file.h
tils/ini.c
tils/ini.h
6b8555cac04862908bf6c64565061f2c8e871ad7 17-Feb-2011 David 'Digit' Turner <digit@android.com> Fix "avd name" bug.

The console's 'avd name' command returned "unknown" incorrectly.
This was due to a missing option when invoking the core, even in
the standalone case.

Fixes bug 3454261

Change-Id: I7efcfc50792231f57dc76d3c11e7968faf057e12
NOTE: This is a quick fix for tools_r10. A proper fix should instead
move the AVD name to auto-generated qemu-hardware.ini instead of
using a core command-line option.
ain-ui.c
ain.c
fa190d3c996f3f71977b2efaaec1c2e63d17a105 15-Feb-2011 David 'Digit' Turner <digit@android.com> Merge 593d0ea0 into tools_r10. DO NOT MERGE.

hw-sensors.c: Reduce default delay between sensor updates.

This reduces the default delay used between sensor updates.
This is needed to fix orientation for Honeycomb emulation since
the framework's window orientation listener now discards events
if they are spaced by more than 1 second (which happened to be
the old default).

Change-Id: I4a29bc6f905ca048aa8b753130a7a1711c3a79f3
w-sensors.c
593d0ea0d2c851f099c5e7d16cbebc992b0bf152 15-Feb-2011 David 'Digit' Turner <digit@android.com> hw-sensors.c: Reduce default delay between sensor updates.

This reduces the default delay used between sensor updates.
This is needed to fix orientation for Honeycomb emulation since
the framework's window orientation listener now discards events
if they are spaced by more than 1 second (which happened to be
the old default).

Change-Id: I9194d93ab445302df1d887473b6ff5c446e13f98
w-sensors.c
59e8e1969c6543cc9375b1a4372ef2e3e8afa183 10-Feb-2011 David 'Digit' Turner <digit@android.com> Add hw.keyboard.lid

This is used to control the lid switch virtual device.

+ Add support for a "version <number>" field to the skin format.
This will later be used for skin format #3.

+ Fix a bug where string hw properties didn't work/compile

Change-Id: I678a0988d2cd24169dd0c2ece96e7ab0b2822104
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/info.c
kin/file.c
kin/file.h
tils/ini.c
tils/ini.h
5377c5bfde6ba62490417bb0a7d7c1be1151692e 10-Feb-2011 David 'Digit' Turner <digit@android.com> Correct auto-detection of default VM heap size.

This patch removes the need for the -m <memory> core option.
Instead, the RAM size is taken by default from qemu-hardware.ini.

Also, the default value of vm.heapSize is no longer 16MB, it is
now adjusted based on the RAM size (16/32/48 values)

+ Get rid of core -lcd-density option (use .ini file instead)

Change-Id: I93919926b61a132c7943a1bb2c41f7a3ab7f2d2f
vd/hardware-properties.ini
vd/hw-config-defs.h
ain-common.c
ain-ui.c
ain.c
emulator.c
emulator.h
2507cab8a78fb609461a2b9cc4708bab60fc53a4 10-Feb-2011 David 'Digit' Turner <digit@android.com> Get rid of -android-gui core option.

Instead, pass all LCD configuration in qemu-hardware.ini.

+ Make the latter file mandatory to launch a core. You can easily
generate one by launching "emulator <options>" though.

Change-Id: I81a1938217562517e4c2bbb828aef934033c29a5
vd/hardware-properties.ini
vd/hw-config-defs.h
ain-common.c
ain-common.h
ain-ui.c
ain.c
42074e5e184aed78dee0efb14d7376325516c070 10-Feb-2011 David 'Digit' Turner <digit@android.com> Write the core hardware configuration file to AVD's content directory.

Do not write the core's hardware configuration file to a temporary file.
Instead, stored it under the AVD's content directory with the name
qemu-hardware.ini. For platform builds, use $ANDROID_PRODUCT_OUT/qemu-hardware.ini

The purpose of this auto-generated file is to contain all hardware configuration
required to properly launch a core from the UI. Further patches will get rid of
special core command-line options (e.g. -android-gui) and rely on the content of
this file, by adding new hw properties.

Change-Id: Id761151c8c8990f1cfa7380779b720080f49469f
vd/info.c
vd/info.h
ain-ui.c
ain.c
fc8ed80ba1362d2ce500003625e1c9c39f765661 10-Feb-2011 Xavier Ducrohet <xav@android.com> Revert "Build arm and x86 binaries at the same time."

This fails to build on MacOS X

This reverts commit a39b10bd2574825a815d6ad854499dd127cfa9cb.
vd/info.c
vd/info.h
mdline-options.h
onfig/config.h
onfig/target-arm/config.h
onfig/target-x86/config.h
elp.c
ain-common.c
ain-ui.c
ain.c
tils/system.h
a39b10bd2574825a815d6ad854499dd127cfa9cb 07-Feb-2011 David 'Digit' Turner <digit@android.com> Build arm and x86 binaries at the same time.

Change-Id: I105c5a097c988cb964b47b40b71c7a08af0d9210
vd/info.c
vd/info.h
mdline-options.h
onfig/config.h
onfig/target-arm/config.h
onfig/target-x86/config.h
elp.c
ain-common.c
ain-ui.c
ain.c
tils/system.h
755811e67c266333807571f798b62b6916611f87 07-Feb-2011 David 'Digit' Turner <digit@android.com> Rename emulator_config_xxx to user_config_xxx

Change-Id: Icfcef72a02e388f2aa87b97f004ed43715fc9f30
ain-common.c
ain-common.h
ain-ui.c
ain.c
703d6db3372bf2dc422f968810e5d06b64269475 09-Feb-2011 David 'Digit' Turner <digit@android.com> Merge "emulator: Fix -no-window flag"
808fff9e4f2bbd137c0627eba7c75a1465edfff2 09-Feb-2011 David 'Digit' Turner <digit@android.com> Merge "android-configure.sh: Fix --cc=<compiler> option."
a1dcb6c0e428ecd409a64df1055be61a59344664 09-Feb-2011 David 'Digit' Turner <digit@android.com> emulator: Fix -no-window flag

Change-Id: Ibb06b7d412faeafa717de6d095a9eaae84d35ab4
emulator.c
ba313e080f0be3061b458075e8e66fc5ff700e3c 09-Feb-2011 David 'Digit' Turner <digit@android.com> android-configure.sh: Fix --cc=<compiler> option.

+ Fix LOCAL_GENERATED_SOURCES handling
+ Fix missing library dependencies for executables
+ Move generated library files to objs/libs/ (instead of objs/)

Change-Id: If3ebaa7ae856efa9bd3ff9e2c199389989db7f71
uild/binary.make
uild/clear_vars.make
uild/common.sh
uild/definitions.make
uild/host_executable.make
bac9add881e0b7cfa2da2b86242347c096329a4c 09-Feb-2011 Jun Nakajima <jnakajim@gmail.com> Fixing aborts caused by compute_fb_update_rect_linear() when the framebuffers
are large. Also, added a boot parameter for the goldfish kernel to use PIT,
rather than TSC.

Change-Id: I5824c7248e0c1a4c487aeb52da112d870846ae62
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
ain.c
17ecca637df2f573edc3ecb8246c0e38a5b32465 07-Feb-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix emulator core and UI on Windows

There are two parts in this CL:
1. Fixing the Windows build (missing set_fd_handler)
2. Replacing read/write with socket_recv/socket_send.

Change-Id: I5fa599774260257d481b738a892e1124135fc319
sync-utils.c
ain-ui.c
rotocol/fb-updates-impl.c
rotocol/ui-commands-impl.c
ync-utils.c
334ab475d2f27dbf6fbf836c2d4fb86dbb02a15c 03-Feb-2011 Jun Nakajima <jnakajim@gmail.com> x86: Add x86 support. Rebase the change (20906/1) due to a minor conflict.

Change-Id: Ic73cca0fc6c6e5cf74f63daa6080d00aa7c392bb
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
vd/info.c
uild/common.sh
onfig/config.h
w-qemud.c
ain.c
21cbdd244bfd12e16c034c910e2f667b44143de0 02-Feb-2011 David 'Digit' Turner <digit@android.com> Formatting / Code styling.

Rename implFb_xxx to fbUpdatesImpl_xxx for consistency
Avoid redundant global variable access

Change-Id: I783b52ade3ff3e9f04f34162684eeb9c4c4addac
rotocol/fb-updates-impl.c
rotocol/fb-updates-impl.h
rotocol/ui-commands-impl.c
b6c168bbb6477145e843bb4a2e56e72e6d47822d 02-Feb-2011 David 'Digit' Turner <digit@android.com> Remove QEMU-ism from UI code.

This gets rid of qemu_set_fd_handler() users in the UI
program. We can remove its implementation from vl-android-ui.c

+ Really remove qemu-timer-ui.c :-)

Change-Id: I490df8ad5d5eea36b332bf54e2b156f6b5872bf4
rotocol/fb-updates-impl.c
rotocol/fb-updates-impl.h
rotocol/ui-commands-impl.c
rotocol/ui-commands-impl.h
07db34976ba1dd045a51c4ab2c7f52479cddcc57 02-Feb-2011 David 'Digit' Turner <digit@android.com> Simplify UI-only sources.

Get rid of console-ui.c, qemu-timer-ui.c and modify vl-android-ui.c
to use a generic Looper object instead of a crummy event loop.

We still need to implement qemu_set_fd_handler for two sources under
android/protocol/ but this will be cleaned up later.

Change-Id: Icd0762675ca2f54e720a9cec40f96caea500b52f
ramebuffer.c
ramebuffer.h
ooper-generic.c
ain-common.c
ain-ui.c
rotocol/ui-commands-impl.c
emulator.c
7a5ee57895822a769f48ab40e590711a2459e2d1 02-Feb-2011 David 'Digit' Turner <digit@android.com> Simplify core framebuffer management.

Remove one layer of indirection between the core's DisplayState
and a ProxyFramebuffer object. The main ideas behind this patch
are that:

- We don't need a QFrameBuffer object when in the core process,
each proxy can receive display updates directly from QEMU.

- The DisplayChangeListener is really lame: its can't dissociate
between several listeners that use the same callback pointers,
so introduce DisplayUpdateListener in console.h to work around
this. This is preferably to modifying DisplayChangeListener
which is going to introduce conflicts with upstream.

- Simplify a lot the console code and display-core. Note that
we can have several framebuffer clients at the same time now.

Note that QFrameBuffer is still used by both the UI program and
the standalone emulator.

Change-Id: I6d5ad6ecd9b34b9d9d1a30ea5000e875c285e84e
onsole.c
isplay-core.c
isplay-core.h
rotocol/fb-updates-proxy.c
rotocol/fb-updates-proxy.h
e3fdd075ed97085b4201cb0c79609633b19bddcc 02-Feb-2011 David 'Digit' Turner <digit@android.com> Move framebuffer.h to android/

The QFrameBuffer is no used by QEMU-specific code anymore so it's
more logical to move it here.

Change-Id: Id49ff53dd49648000e7543652d66f7c03881a8cb
isplay-core.h
isplay.h
ramebuffer.c
ramebuffer.h
ain-ui.c
ain.c
rotocol/fb-updates-impl.h
rotocol/fb-updates-proxy.c
kin/file.h
kin/window.c
e993126c6704029cb1c656922a66a32bd09b6089 02-Feb-2011 David 'Digit' Turner <digit@android.com> Move core-connection.c from to android/protocol/

Change-Id: I1f04ed1f00fccdea043f4a4fbf5ba745b36bbcc7
ore-connection.c
ore-connection.h
ain-ui.c
rotocol/attach-ui-impl.c
rotocol/core-commands-proxy.c
rotocol/core-connection.c
rotocol/core-connection.h
rotocol/fb-updates-impl.c
rotocol/fb-updates-impl.h
rotocol/ui-commands-impl.c
rotocol/user-events-proxy.c
74d7acec6643694132a127feb5ccadda7ea793d6 02-Feb-2011 David 'Digit' Turner <digit@android.com> Separate init_skinned_ui() into two functions.

This removes init_skinned_ui() and adds parse_skin_files() and init_sdl_ui().

The first function only parses skin files and options, and doesn't do anything
related to the UI.

The second function does setup the SDL UI after all options/skin processing has
been performed. We also modify main.c and main-ui.c to move the call to
init_sdl_ui() as far as possible after the options parsing.

+ Move core attachment code to the end of qemu_main() in main-ui.c

Change-Id: I2bf5f0a096d827ae1fee070a8fa45cbd4629d54f
ain-common.c
ain-common.h
ain-ui.c
ain.c
emulator.c
emulator.h
f845627c83ce6ce3e306f9b6842d1e30ef89ae97 02-Feb-2011 David 'Digit' Turner <digit@android.com> Move common main routines from into android-common.[hc]

This is a first step towards cleaning-up our initialization/startup code.

Change-Id: I2d4fbc5c2cd0181fb39a1a97a15650945038c3b9
ain-common.c
ain-common.h
ain-ui.c
ain.c
6d37ae98b765dc741caef137b7494133bb6f8980 01-Feb-2011 David Turner <digit@android.com> Merge "Create user data image using the initial user data image"
622f1530c8a6badfbcaf8c59976348678fbe248b 01-Feb-2011 David 'Digit' Turner <digit@android.com> Generate temporary hardware.ini from configuration settings.

This patch generates a temporary hardware.ini from the hardware
configuration. The idea is to move as much hw config info as possible
to a single file that the core can read.

Other patches will change how various config info is passed to the
core, from command-line options to the generated hardware.ini.
vd/hw-config.c
vd/hw-config.h
ain-ui.c
ain.c
tils/ini.c
tils/ini.h
tils/system.h
85276806ec6ac969d7befa2496c1de59adaaac74 01-Feb-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Refactor attach-UI service

Change-Id: Ia68ceb57ee5b5a66fa76b837fe3b990eb12e7188
onsole.c
ain-ui.c
rotocol/attach-ui-impl.c
rotocol/attach-ui-impl.h
rotocol/attach-ui-proxy.c
rotocol/attach-ui-proxy.h
rotocol/core-commands-proxy.c
rotocol/core-commands-proxy.h
rotocol/ui-commands-impl.c
rotocol/ui-commands-impl.h
rotocol/user-events-proxy.c
rotocol/user-events-proxy.h
ync-utils.h
94a2fba98924c6684650d66409934358cb0c9d09 31-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Refactor the framebuffer service

Change-Id: I8ac4580af65b8d58976c97b77b309dd202e75003
onsole.c
isplay-core.c
isplay-core.h
ramebuffer-common.h
ramebuffer-core.c
ramebuffer-core.h
ramebuffer-ui.c
ramebuffer-ui.h
ain-ui.c
rotocol/fb-updates-impl.c
rotocol/fb-updates-impl.h
rotocol/fb-updates-proxy.c
rotocol/fb-updates-proxy.h
rotocol/fb-updates.h
250b2e00af04f8407dea564e643dad4ef08b8a88 28-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Refactored user-events protocol

Change-Id: I08afb96ef17a52c3795f5029acfc244a93ab57c7
onsole.c
ain-ui.c
rotocol/core-commands-proxy.c
rotocol/user-events-impl.c
rotocol/user-events-impl.h
rotocol/user-events-protocol.h
rotocol/user-events-proxy.c
rotocol/user-events-proxy.h
ser-events-common.h
ser-events-core.c
ser-events-core.h
777eb68eb60cac18f4b62e2e1b14a906875cbe7a 26-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Refactored ui-core-control and core-ui-control protocols

Also cleaned the code up from obsolete ui-core-protocol.* and
core-ui-protocol.*

Change-Id: I194bec669d25b68a10c32b2be50bc9da50c52ebb
onsole.c
ore-connection.c
ore-connection.h
ore-ui-protocol.c
ore-ui-protocol.h
elp.c
ain-ui.c
rotocol/core-commands-api.h
rotocol/core-commands-impl.c
rotocol/core-commands-impl.h
rotocol/core-commands-proxy.c
rotocol/core-commands-proxy.h
rotocol/core-commands-qemu.c
rotocol/core-commands.h
rotocol/ui-commands-api.h
rotocol/ui-commands-impl.c
rotocol/ui-commands-impl.h
rotocol/ui-commands-proxy.c
rotocol/ui-commands-proxy.h
rotocol/ui-commands-qemu.c
rotocol/ui-commands.h
rotocol/ui-common.h
emu-setup.c
emulator.c
kin/window.c
i-core-protocol.c
i-core-protocol.h
i-ctl-common.h
i-ctl-core.c
i-ctl-core.h
i-ctl-ui.c
i-ctl-ui.h
1712152e55face61231d8bd234bf10e6a7524e65 28-Jan-2011 Orjan Percy <orjan.percy@sonyericsson.com> Create user data image using the initial user data image

Starting the emulator with a new AVD should create a new user data image
(userdata-qemu.img) as a copy of existing user data image (userdata.img).
This is not done since the flag IMAGE_EMPTY_IF_MISSING will cause
the user data image to be reset. By not setting the flag the user data
is initialized in the way documented in code and on-line help.

Change-Id: I787bcbc904f79edf241fbacb7446f459fc5f2ad0
vd/info.c
a473d81826d44905bc0d7ec8c9b39aef1cf87fb7 26-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Remove spaces in the console service names

Change-Id: I339449214ab951aba40abfe2a5b3e3ebfb222311
onsole.c
ore-connection.c
ain-ui.c
i-ctl-core.h
i-ctl-ui.c
i-ctl-ui.h
bfeb525bfa291ebafe4d6c4f75197f128620f5f0 26-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Implement UI control service and client"
6b985d708d64008eee69fe0c3f03c6e3c61e7f73 21-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implement UI control service and client

Change-Id: Iecc1b5bb9ddcdaf9f22c500a5195718db3f25354
onsole.c
ore-ui-protocol.c
elp.c
ain-ui.c
emulator.c
ync-utils.h
i-core-protocol.c
i-core-protocol.h
i-ctl-common.h
i-ctl-core.c
i-ctl-core.h
i-ctl-ui.c
i-ctl-ui.h
646a4f8761b4de1f20a42b7e069ca0f75689724a 25-Jan-2011 rich cannings <richc@google.com> Use setenv when available

Even putenv("X=y") is bad because the "string becomes part of the
environment; changing it later will change the environment."
(http://www.kernel.org/doc/man-pages/online/pages/man3/putenv.3.html)

Change-Id: I0d57204a7020649493fb005c962951407d40fa45
kin/window.c
a46c1675f90288252ae0e992f52c72a6db5dd2a7 25-Jan-2011 rich cannings <richc@google.com> Use putenv when setenv is unavailable

Windows builds and possibly others do not have putenv. Using
"#ifdef HAVE_SETENV" which is common in qemu.

Change-Id: I2cd6770a77cd192440ff4dc6a624568eb27d5558
kin/window.c
a0f5d51826fc3b7ee5937c9c0fb1df7e29e13b8b 25-Jan-2011 rich cannings <richc@google.com> putenv(3) misused. Corrected with setenv(3).

POS34-C. Do not call putenv() with a pointer to an automatic variable as
the argument:

Change-Id: I0c973edd2cc8d6c86287ec0258bca6a06f319bfb
https://www.securecoding.cert.org/confluence/display/seccode/POS34-C.+Do+not+call+putenv()+with+a+pointer+to+an+automatic+variable+as+the+argument
kin/window.c
5758404ffd1be160efa303ff27eef645fc4e2c2d 21-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Remove unnecessary calls in UI <-> Core protocols.

Core port related calls are no longer needed, since UI is aware of
core's base port on attachment to the core

Change-Id: Ic211fc9b02cb652009360f80917e90c44d941878
ore-ui-protocol.c
ore-ui-protocol.h
ain-ui.c
emu-setup.c
emulator.c
i-core-protocol.c
i-core-protocol.h
ac389ae4513263597dc02e4099867d5123faaa04 20-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Force core to send entire framebuffer on UI attachment

Change-Id: I2feb813314163b94781ffe765eb23527b6c4a0f1
isplay-core.c
ramebuffer-common.h
ramebuffer-core.c
ramebuffer-core.h
ramebuffer-ui.c
ync-utils.c
ync-utils.h
6ee1c4edbd30b7c7aff9d6e13793207278aa1660 20-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix framebuffer and user events service disconnection bug.

FB and UE services overwrite the socket's read callbacks, making the console
unavare of the fact that console client gets disconnected. As the result,
console clients for FB and UE stays alive after UI has exited, making it
impossible to attach another UI. To fix this, we add socket read callbacks
to the FB and UE service that monitor the disconnection event and destroy
their console clients on such events.

Change-Id: I82e714f33ccc81bc04ca47eda6fbb8fab4a313f9
onsole.c
ramebuffer-core.c
ser-events-core.c
9411a562e1ab772732a4d5147c9103a638837c82 20-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Implement user event transmission between the UI and the core

Change-Id: I503aa691cada5250b76167a923d4a226d20ee41d
onsole.c
ramebuffer-core.c
ain-ui.c
ync-utils.c
ync-utils.h
ser-events-common.h
ser-events-core.c
ser-events-core.h
a9edc435e6592fcc001e21e150391a84bde114a6 19-Jan-2011 David 'Digit' Turner <digit@android.com> Merge "Compute default memory size from screen size."
8856170ee5fa7d8443501e7ac972a27597dea9f5 19-Jan-2011 David 'Digit' Turner <digit@android.com> Merge "Print concatenated QEMU options with -verbose."
3bbc919b70c78e0be6387d06faa90743deedb4dc 19-Jan-2011 David 'Digit' Turner <digit@android.com> Compute default memory size from screen size.

This change is used when using a magic skin (e.g. -skin 800x600)
or when using the full Android build system, in order to determine
a good default for the RAM size.

Change-Id: I900e28146592cdd3f0df9b3f1828b119309eea85
vd/hardware-properties.ini
vd/hw-config-defs.h
ain-ui.c
ain.c
emulator.c
emulator.h
3336176fc898915b7b5544f3a7c60ec2794507c3 19-Jan-2011 David 'Digit' Turner <digit@android.com> Print concatenated QEMU options with -verbose.

This makes it easier to launch the core (qemu-android) with the same
set of options than the stand-alone emulator.

Change-Id: I55d0007f83280ffc5b9a26adc1300472013ff93d
ain-ui.c
ain.c
0158ea3220978ecc0fa1738e4a0bdae83fa36175 19-Jan-2011 David 'Digit' Turner <digit@android.com> Make "qwerty2" the default charmap.

This patch makes "qwerty2" the default charmap for skins that
don't specifiy one explicitely. Note that the "qwerty" charmap
is here for historical reasons only. All skins provided by all
SDK Android platforms explicitely mention "qwerty2", so this patch
will mainly impact "magic skins" like those created by an option
like "-skin 1024x768".

This gets rid of the obsolete "qwerty" charmap (it was never
used by any of the skins provided by the SDK, and is incorrect).

+ Simplify android/charmap.[hc] code.
+ Lazy-load the charmap name in hw/goldfish_events_device.c
harmap.c
harmap.h
onsole.c
kin/keyboard.c
122b335f58e2f52d542854dcddef8723a2b213a4 16-Jan-2011 David 'Digit' Turner <digit@android.com> Sligh speedup for pixel conversion routines with Duff's device.

Change-Id: If832bc5844945f7a2027b2f8d09393586545d8d5
kin/window.c
tils/duff.h
97d795c955f8d261a0a5294d49ea06d5a473ed03 16-Jan-2011 David 'Digit' Turner <digit@android.com> Add support for 32-bit framebuffers.

This modifies the emulator so support 32-bit framebuffers.
You can create such a frame-buffer using one of these methods:

- Add a "bpp 32" line to the "display" element of your skin
- Use the new 'magic' skin option format: e.g. -skin 320x480x32

Note that the result will be hideous since the kernel driver still
thinks the hardware is only 16-bits. This will be addressed in a
later patch to hw/goldfish_fb.c and to the kernel driver
($KERNEL/drivers/video/goldfishfb.c)

Change-Id: I0fc700c4a4cb8521076605324e15ed34e5d01136
isplay-core.c
isplay.c
ain-ui.c
ain.c
kin/file.c
kin/file.h
kin/window.c
9cf288a4a03f6745a81b35e8022aab3d1d5f2247 18-Jan-2011 David Turner <digit@android.com> Merge "Adding proximity sensor simulation"
90c6235ce7bdc6f7afbcfe56ea6f2c3d2b128447 13-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Refining main-ui.c to better separate UI and core related initialization

The main reason for this is to clarify initialization for UI that starts core,
and UI that attaches to an existing core. In this CL I did:
- Removed -initdata option that seems obsolete (doesn't affect anything in the code)
- Passed through -timezone option that doesn't affect anything in the UI, and is needed
only in the core.
- Removed dependency on AVD info from the core (core needed only virtual device name)

Change-Id: Ie631249848a1b5b8d837c0c7b201a40ee7e4a367
mdline-options.h
onsole.c
elp.c
ain-ui.c
ain.c
cf755ea6f4b850a6afd12ef8308da8def7ba8941 12-Jan-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Hook up framebuffer changes with UI window

Change-Id: Ib2dff72c808614cd6ded096d62717afc1c41e667
ramebuffer-core.c
ramebuffer-ui.c
ramebuffer-ui.h
ain-ui.c
emulator.c
emulator.h
926b80a42426915f2ca536d6969b741613bff9f9 07-Jan-2011 Xavier Ducrohet <xav@android.com> Make the emulator find the skins in their new location.

Change-Id: Ib5c43306376e51a2a0866868f990ca8c8899ae7a
vd/info.c
ca29fbbb188a1aab9b69776d5dc6bc3e7f812a0a 02-Jan-2011 David 'Digit' Turner <digit@android.com> Add -audio-test-out option to the core.

This option can be used to quickly check audio output (without
having to boot a full AVD and launch a sound-playing application).

Usage:
emulator <other-options> -qemu -audio-test-out
qemu-android <other-options> -audio-test-out

This simply generates an ugly saw signal, but that's enough for us.

Change-Id: I060300b4000b9705d181c6262de8d4d13c749e69
udio-test.c
udio-test.h
1306e385222558accba9a01fd93858f06dccf77e 02-Jan-2011 David 'Digit' Turner <digit@android.com> Remove obsolete -audio-in and -audio-out options.

Use -audio <backend> to select the audio driver.

Change-Id: I71c837e4c78241711be5f38ef9b03294a69145bd
mdline-options.h
elp.c
ain-ui.c
ain.c
8acf4e2237c2969647f47008344e44918bb30acb 21-Dec-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Pass bits per pixel tu UI when it gets attached to core framebuffer

Instead of passing bits per pixel property in each and every framebuffer notification
message, do it once when UI attaches to the core's framebuffer service.

Change-Id: Ic1f6d9796b64d40518f09f5a5341f8359ff817b7
onsole.c
isplay-core.c
isplay-core.h
ramebuffer-common.h
ramebuffer-core.c
ramebuffer-core.h
ramebuffer-ui.c
e95660aadc669784406d5f5a867988b8ecc2ed0d 20-Dec-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Resubmit framebuffer service implementation

Change-Id: I184e27a1e8d88835bc9f0502eccfa3f64a7aaf9e
sync-utils.h
onsole.c
ore-connection.c
ore-connection.h
isplay-core.c
isplay-core.h
ramebuffer-common.h
ramebuffer-core.c
ramebuffer-core.h
ramebuffer-ui.c
ramebuffer-ui.h
ooper-qemu.c
ain-ui.c
ync-utils.c
ync-utils.h
7c8397abd80cd6ba6a2665ef22739e603ae4c290 17-Dec-2010 Ola Albertsson <ola.albertsson@sonyericsson.com> Adding proximity sensor simulation

Proximity sensor is added in emulator and avd ini file is modified to
be able add a proximity seensor to a avd.

Change-Id: I4d2645c0c4861511451b606e18d2fd9b9a2d27ed
vd/hardware-properties.ini
vd/hw-config-defs.h
w-sensors.c
w-sensors.h
6750d0fbf0c4e1847b7c8322f3140efd01917afe 17-Dec-2010 Tim Baverstock <weasel@google.com> Merge "Add 'gsm signal' command, to set rssi and ber"
4c6b10a4f385c04dbd7226e10a86a1f5cbd34f2a 15-Dec-2010 Tim Baverstock <weasel@google.com> Add 'gsm signal' command, to set rssi and ber

Change-Id: I24d4738f6e5135437af25d22e2fa68617f5632fa
onsole.c
e3936ca43e99a066e714cea18f95ac22d8392b91 15-Dec-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Implement core display deriving it from android display"
72d83df9865cf8f5393a41fc3f6e283ab6aaa81b 14-Dec-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Implement core display deriving it from android display

Core display is a framebuffer client that receives framebuffer updates and dispatches
them to the UI attached to the core.

Change-Id: Iff1e0609cbe66240031e3670934a6796a9ae3b15
isplay-core.c
isplay-core.h
622b8f4c760b8c4479d28430f978bad8bb9ea32c 07-Dec-2010 Tim Baverstock <weasel@google.com> Send unsolicited time response to first signal strength query after loadvm

Change-Id: I9c6260493d42564ee3aa34799313368bb2de7d4d
mdline-options.h
elp.c
ain-ui.c
ain.c
napshot.h
d87b080495e71ada650b165a1f06616b433e6073 06-Dec-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Submit merged

Squashed commit of the following:

commit aeefab810c6331e2f96e81f20e4408b39dd3a2ca
Author: Vladimir Chtchetkine <vchtchetkine@google.com>
Date: Thu Dec 2 07:40:34 2010 -0800

Implement -attach-core UI option

Change-Id: I4168e2d707cab1b4873ee16d86d5126c1a316abf

Change-Id: I2da1ef5d53641f3c60d83d8d5ddf3aff34b0c6c7
mdline-options.h
onsole.c
ore-connection.c
ore-connection.h
elp.c
ain-ui.c
ync-utils.c
ync-utils.h
fced4df82222b898580557de7313d86b5d6934f3 03-Dec-2010 Tim Baverstock <weasel@google.com> Merge "Add -no-snapshot-load option to permit reboot."
8da2038bd390720721b2d4229a1644c24c56362c 03-Dec-2010 Tim Baverstock <weasel@google.com> Merge "Correct command arguments for 'geo fix', but support backward compatible use."
53d8a5c0c8fc087d16316a4399f5a773339c4956 02-Dec-2010 Tim Baverstock <weasel@google.com> Add -no-snapshot-load option to permit reboot.

This is a workaround for the emulator not being able to detect the guest's
power-down situation, and simply lingering like a zombie: on exit it's saved
as a zombie, and is restored as a zombie which isn't useful. Denying autoload
forces a reboot.

Change-Id: I48f32600f5ce18cd5c71aa01d1b71b382102f227
mdline-options.h
elp.c
ain-ui.c
ain.c
86ca19f7e89801a5735277a3c99df53d697dd2c4 02-Dec-2010 Tim Baverstock <weasel@google.com> Merge "Augment the auto-loadvm behaviour with corresponding auto-savevm-on-exit behaviour."
0d4c88288c6109eec4c4b4801519809f0c23cd46 02-Dec-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Implement line reading on syncsocket

Change-Id: I1fa22c34203b163e1b0a78240be73a4a7473691e
ync-utils.c
ync-utils.h
a8fc4913fb7a4f834a5b9084e86a4a2e3dfd7e0c 30-Nov-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Implement helper routines for syncronous socket operations

Change-Id: I93af5f740decb1fb0f6e037a76223fa8dd5305ac
ync-utils.c
ync-utils.h
4afdaf1285ecdcbcfeac6d3e9be0b9b0de0e2b07 25-Nov-2010 Tim Baverstock <weasel@google.com> Correct command arguments for 'geo fix', but support backward compatible use.

Change-Id: Id4f427dfb918d69e3fb52725cbe88bce1666dddc
onsole.c
24204cc964cf7d56b1a20c12ece08eecab1093fa 25-Nov-2010 Tim Baverstock <weasel@google.com> Augment the auto-loadvm behaviour with corresponding auto-savevm-on-exit behaviour.

Autosave fires when loadvm would have been tried - whether it succeeded or not - in
order to bootstrap from an empty snapshot file.

- New autosave behaviour inhibited with -no_snapshot_save flag.
- Underlying behaviour implemented with a new qemu option -savevm_on_exit

Change-Id: If64d89f004565ecbb431bc7e96ecc37e27876d67
mdline-options.h
elp.c
ain-ui.c
ain.c
068c52b3b8d88bc5ce8f5a6799ee90aba2da2c9a 25-Nov-2010 Tim Baverstock <weasel@google.com> Enable snapshot behaviour

Change-Id: I383927c7805e840031d83ef7154c335519e1f5a4
onfig/config.h
d2c51cfa819f995d7a285a15ccae9755480c0a54 24-Nov-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Separate main.c used to build the emulator from main-ui.c used to build the UI

Change-Id: I1c7baeaa8447fe1df895869bfb6b74631b765845
ain-ui.c
ain.c
e654412d45c41d9dc83a87fce42f1d283fe0c55b 18-Nov-2010 David 'Digit' Turner <digit@android.com> Parallelize -list-cores implementation.

Modify the implementation of list_cores() to perform all 16
connection requests in parallel, using a generic looper and
and asyncConsoleConnector per probed port, with a global
timeout of half a second.

This is also a demonstration of the new asynchronous helpers.

Change-Id: Ib09adf44b00d0694ec29d7ed0b26b44eef77f88a
ain.c
6d448806a80bcc2557ae0a38e7fd206967cf844e 18-Nov-2010 David 'Digit' Turner <digit@android.com> Introduce asynchronous operation helpers.

<android/async-utils.h> contains generic helpers to read, write
and connect to sockets.

<android/async-console.h> contains a helper class to connect
to Android console port asynchronously.

Change-Id: I5d0a49a770ad974c5d4382438d75e9eb624368d1
sync-console.c
sync-console.h
sync-utils.c
sync-utils.h
1bb627cd086588d3f9650fac04f4034961caf9f1 18-Nov-2010 David 'Digit' Turner <digit@android.com> Fix generic looper implementation

+ allow looper_run() to return a value that indicates why
it exited.

+ add looper_runWithDeadline() and looper_runWithTimeout()
in the case where you want to run only for a limited time.

looper_runWithTimeout(looper,0) can be used to poll the
event state and return asap after firing all the callbacks.

+ fix iolooper_modify()

Change-Id: Iba3b0385a7fd8d90f4f3334ebf313e79267f7b3d
ooper-generic.c
ooper-qemu.c
ooper.h
347753be1d6bb07249641c84c3c582113af81941 18-Nov-2010 David 'Digit' Turner <digit@android.com> Allow safe deletion during iteration of an ARefSet.

+ make AREFSET_FOREACH take the name of an existing type variable
which avoids an annoying type-cast in each statement.

Change-Id: Icf9d886601a9876fa29c15eb0e60a9bf6c8ec163
ooper-generic.c
tils/refset.c
tils/refset.h
7a17b608de24e3aaf7d5ca030bb80a74dcc3baf9 17-Nov-2010 David 'Digit' Turner <digit@android.com> Implementation of event loop abstraction.

This patch adds "android/looper.h" which provides an

abstraction for event loops:
- android/looper-qemu.c implements it on top of the QEMU main event loop.
- android/looper-generic.c implements it on top of an IoLooper object.

The main idea is to move the UI-related code to use the abstraction
to handle timers and asynchronous (network) i/o.

NOTE: Code compiles but has not been heavily tested.

Change-Id: Ib6820c1b9a9950dc22449a332bc1b066a07af203
ooper-generic.c
ooper-qemu.c
ooper.h
tils/refset.h
tils/vector.h
f6cbbf529c7f4d3164243fc2cb9241978b954633 18-Nov-2010 David 'Digit' Turner <digit@android.com> Merge "Update android/utils/ with misc. new features."
4c0f745dc80d392fddea23eb8d4d7d86425ce0c6 17-Nov-2010 David 'Digit' Turner <digit@android.com> Update android/utils/ with misc. new features.

This introduces a few new features to android/utils/ that will
be used in later patches.

+ <android/utils/assert.h> to handle assertions
+ <android/utils/vector.h> to handle dynamic arrays
+ <android/utils/reflist.h> slightly updated (more docs)
+ <android/utils/refset.h> implements a set of pointers

Change-Id: Iebc14cfefd1c0e8aaecda9958a980d40f0be610a
kin/composer.c
tils/assert.c
tils/assert.h
tils/panic.c
tils/panic.h
tils/reflist.c
tils/reflist.h
tils/refset.c
tils/refset.h
tils/system.c
tils/system.h
tils/vector.c
tils/vector.h
2779beecc7410f29102125e87e8174597acb2fe5 01-Nov-2010 Raphael <raphael@google.com> Add env var ANDROID_TMP to override /tmp/android location.

This is needed if there's already a /tmp/android which the current user
can't access on the system. It would prevent the emulator from starting
with a cryptic error message:

NAND: could not create temp file for system NAND disk image: Permission deniedemulator: User-config was not changed.

SDK Bug: 3154431

Change-Id: Iefe7fd6a5139da545aaef5670fb7f42d210d0edc
tils/bufprint.c
9a33e8554225c82cd900208f88e8965bb085ab87 09-Nov-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Implement -list-cores UI option

Also fixed a bug in iolooper-select.c (io_looper_del_write was buggy)
Also switched iolooper-select.c to use malloc/free instead of qemu_xxx

Change-Id: Ief47608f30a863d624af6363620e93e903cbdadc
mdline-options.h
elp.c
ain.c
ae835acc2d1a8b4aaeb599add9cfc02ea5789eaf 18-Oct-2010 Ot ten Thije <ottenthije@google.com> Add command line flag to show list of snapshots.

This patch introduces the flag '-snapshot-list', which causes the
emulator to output a table of snapshots in the currently mounted
snapshot storage file.

The snapshot file is accessed with a very simple driver for the Qcow2
file system, independent of Qemu's block driver framework. This way,
the flag is available in the emulator-ui builds as well. Using Qemu's
framework would have resulted in adding a lot of Qemu dependencies to
the UI build, which we are explicitly trying to avoid.

Change-Id: I059b9ac53e2f8e051757a5c637761eccf8ea17cb
mdline-options.h
elp.c
ain.c
napshot.c
napshot.h
2ff39a367738422c0ca1313cac8ff380e1fdd498 06-Oct-2010 Ot ten Thije <ottenthije@google.com> Control state snapshots from Android console.

This patch exposes Qemu's save, load, delete and list commands for
state snapshots on the Android console. A level of indirection is
added by means of the OutputChannel construct. This allows us to show
the output of the Qemu commands on the console rather than on the
monitor, while minimizing the differences with the upstream codebase.

The new commands are exposed only when the configuration constant
CONFIG_ANDROID_SNAPSHOTS is not 0.

Change-Id: I558d5cd505d321fe2da5835713d341d151f60534
onsole.c
631f2555ed2b50a07ea19eaefa495a028ab1991a 27-Oct-2010 David 'Digit' Turner <digit@android.com> Fix invalid "geo fix" formatting bug.

See http://code.google.com/p/android/issues/detail?id=2928
for details.

Change-Id: If192fe2f8dba9e5bd11f0f7fdc6a7445a8573623
onsole.c
353b3b1135563e2bcaf7797acfa35a2fe2d3a818 05-Oct-2010 Ot ten Thije <ottenthije@google.com> Load state snapshot rather than booting to start emulator.

This patch adds support for an optional file "snapshots.img" in the
data directory of an AVD. This file should be an image formatted with
the qcow2 file system and will be mounted on -hdb when the emulator
starts up. If present, the emulator will attempt to load the snapshot
named "default-boot" from this image, rather than going through the
full boot procedure.

To control the behaviour of this functionality, this patch introduces
the following new command line options for the emulator:

-snapstorage <file>: override the default location of the
snapshot storage file.
-no-snapstorage: do not load the snapshots file, even if an explicit
path is given.
-snapshot <name>: instead of loading "default-boot", load the state
snapshot with the given name.
-no-snapshot: do not load a snapshot, but force a full boot
sequence, even if a snapshots file is mounted. Useful for
creating snapshots.

Note that this functionality is experimental and will be enabled
only if the constant CONFIG_ANDROID_SNAPSHOTS in
android/config/config.h is set to "1" before building. It is turned
off by default.

Change-Id: Iee2e9096a27f3414bacfc271f90ef93a98730c82
vd/info.c
vd/info.h
mdline-options.h
onfig/config.h
elp.c
ain.c
6133adcd101e17118354e64771c52355dbafb1d7 21-Oct-2010 Ot ten Thije <ottenthije@google.com> Merge "Added state snapshot support for QemuD service "boot properties"."
d9b6cb97a8a9e93f1bbe5351874b03f7faa81783 20-Oct-2010 David 'Digit' Turner <digit@android.com> Fix linux-x86_64 build.

Fix various 64-bitness issues in the source code to
make the --try-64 option work again on Linux. Note that
the generated binary is not faster than its 32-bit variant
when it comes to benchmarking the boot sequence.

Change-Id: Iad248e033757d4cd25524a438a5dbe1cf3aca6cf
onfig/linux-x86_64/SDL_config.h
tils/mapfile.c
tils/mapfile.h
tils/system.c
tils/timezone.c
45041e34b979d2ae49b985a1cb98117e71904a16 05-Oct-2010 Ot ten Thije <ottenthije@google.com> Added state snapshot support for QemuD service "boot properties".

Change-Id: I12383de77917c31d6227fc223753c1dcab31fb56
oot-properties.c
80bc5c8c7b9c50e8f302c22c2fba42dd6e8aa2df 20-Oct-2010 David 'Digit' Turner <digit@android.com> Fix incorrect orientation at boot.

The goldfish kernel's event driver is very picky about the
state of the virtual device it talks to. Essentially, it can
only listen to h/w events if the corresponding IRQ is raised
_after_ it has completed some initial setup.

If the IRQ is raised before, the driver will refuse to listen
to events, and any interaction becomes impossible.

We changed the way our UI windows are built and managed
previously, and this had the unfortunate effect of sending
one h/w event too soon, which, in the old code, would raise
the IRQ prematurely. This resulted in an input freeze.

To work around this the UI code was modified to not send
the initial h/w event, but this resulted in bad orientation
of the home screen at the end of the boot sequence.

This change allows the virtual device to wait for the kernel
driver before raising the IRQ, in the case any h/w event has
been buffered. It also removes the hack in the UI code,
allowing the send of the initial h/w event at startup.

BONUS MINOR CHANGES:
EsounD probe: fix error message.
console: fix compiler warnings
libpng: proper handling of MMX support.
android-configure.sh: fix --ignore-audio handling
The option didn't do anything if the audio development packages
are properly installed on the system.

Change-Id: Ib134158873d5cb72290c9676d92d20233226c889
onfig/check-esd.c
onsole.c
kin/window.c
i-core-protocol.c
18fe86e8245878f3b7a2813bd59b8cfcf636e15c 19-Oct-2010 David 'Digit' Turner <digit@android.com> emulator-ui: Remove dependencies from qemu sources.

This change removes some QEMU-specifics that crept into the UI code.

Change-Id: Ib1974dc64e54a35dc0cd01aec1eb547a9263a0c8
harmap.c
isplay.c
ain.c
kin/window.c
tils/dirscanner.c
tils/system.c
tils/timezone.c
3ba139cbc278f905bfb1c13f3b92fb88a1f2a36f 15-Oct-2010 David Turner <digit@android.com> Merge "Added state snapshot support for QemuD."
81f7429f25a555ae2d37d14c5c3843dd3621c22f 14-Oct-2010 David 'Digit' Turner <digit@android.com> standalone builds: windows executables end in .exe

This change only applies to the stand-alone build system. It ensures
that when one does the following under Linux:

./android-configure.sh --mingw
make

then, the Windows executables that are generated have their name
ending in .exe (e.g. objs/emulator.exe instead of objs/emulator)

This does not affect the Android build system which already does the
right thing (and is used to build SDK binaries).

Change-Id: If9597e550f0bceec04d334eb84199a0f024a3fdf
uild/host_executable.make
871da2aa80687142bec00ef7c1112253c76c32bb 20-Sep-2010 Ot ten Thije <ottenthije@google.com> Added state snapshot support for QemuD.

With this patch, both modem and sensor functionality are correctly
restored when a state snapshot is loaded. This was not the case
previously because communication with either of these services is
done using the qemud daemon, which did not support snapshots.

The boot-properties and charpipe services have no specific save/load
functionality yet, since the framework itself should be reviewed
first. Adding support for bootproperties should not be difficult
though, and charpipe may not need it.

For a description of the high-level process for saving and loading,
consult section IV "State snapshots" in docs/ANDROID-QEMUD.TXT.

Change-Id: I5b06d88b911ca096e78060163174904c48a01c66
oot-properties.c
w-control.c
w-qemud.c
w-qemud.h
w-sensors.c
892078d7e6b33d3cc4e219d45d38eab203171e9e 13-Oct-2010 David 'Digit' Turner <digit@android.com> Merge "emulator-ui: fix crash on exit"
3c9dce795d3c7c577604cbb3f89b5d6afa610ff9 13-Oct-2010 David Turner <digit@android.com> Merge changes Ieab04778,Idb0e3c52,I3f426352,Ied07f9db

* changes:
Don't build MMX stuff on PowerPC
Add SDL_config.h for PPC (generated by android-configure.sh)
Add config-host.h for PPC (generated by android-configure.sh)
Fix detection of host endianness
73f31662e687ea96d579ce9dca45c640b930985f 13-Oct-2010 David 'Digit' Turner <digit@android.com> emulator-ui: fix crash on exit

+ remove net_cleanup() call in qemu_main(). It is not needed since the
corresponding function only deals with the virtual LAN management
and was causing build issues on some machines.

Change-Id: I63896b9886c59259f75025277601711b450b2c0d
i-core-protocol.c
1a000857bb7eef298efa787699050884f92311fe 22-Jul-2010 Jaime Lopez <jaimel@codeaurora.org> qemu: Multimode support

Preliminary implementation of a Multimode modem
- Added the +CTEC AT command which allows querying and setting the current technology
- Added preliminary NVRAM file support

Add cdma subscription source support
- Add support to save the subscription source preference to nv.
- Add command 'cdma ssource' to switch subscription source from the
emulator console

Implement AT+WRMP command
Implement the AT+WRMP command to set and get the roaming preference

Implement Emergency Callback Mode

Implement the +WSOS command and unsol to notify Emergency Callback Mode status

Implement +WPRL AT Command
Enable PRL update notification by implementing the AT+WPRL query command
Implement a console command to send +WPRL unsolicited response

Change-Id: I5c036c1b0832b94c0b7675931f6a18b5d9ca7436
onsole.c
7746af04f1c7a44253ce49cf7cf1914757faaafe 07-Oct-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Make core initialization replying to the UI at the end of initialization.

Also, this CL contains a minor fix to formatting boot options passed to the kernel

Change-Id: I267172d82094a0cbbbced2cee7a2990bb7fa3793
ore-init-utils.c
ore-init-utils.h
c74f74e60c21ee9edf0f6ea1c6d5035041c9d1dc 25-Sep-2010 Marcus Comstedt <marcus@mc.pp.se> Add SDL_config.h for PPC (generated by android-configure.sh)

Change-Id: Idb0e3c52100693958f4856568969985899d0aedd
onfig/linux-ppc/SDL_config.h
9bb482ba648239cd485453ea8f54c4214aa2aad2 25-Sep-2010 Marcus Comstedt <marcus@mc.pp.se> Add config-host.h for PPC (generated by android-configure.sh)

Change-Id: I3f42635204bed9f078577d668da4a01263d1ba86
onfig/linux-ppc/config-host.h
4e024bb4f5c8aa8b07459f7fbd65c35122127fd1 22-Sep-2010 David 'Digit' Turner <digit@android.com> Remove compiler warnings when building the emulator.

This forces -Wall during the build. Note that this patch doesn't
remove all warnings, but most of the remaining ones are from upstream anyway.

Change-Id: I8808d8495e99866e156ce5780d2e3c305eab491f
harmap.c
onfig.c
kin/argb.h
kin/scaler.c
kin/trackball.c
tils/ini.c
tils/mapfile.c
f290f4e361473fb696952f4b0c42865032d6558d 13-Sep-2010 David 'Digit' Turner <digit@android.com> update linux-x86 and windows config-host.h

+ remove obsolete 'Linux' config directory.

Change-Id: Ib0cc7e2ab6b5b90a2cfe43bd0afced692b29d6dc
onfig/Linux/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
93a9afcef75c894842fa134f8025b0a55b82b112 13-Sep-2010 David 'Digit' Turner <digit@android.com> Update darwin-x86 config-host.h, remove obsolete ppc one.

Change-Id: Ic3c0dcf07dbe0d172ac9a18fc2775d33d171fb60
onfig/darwin-ppc/config-host.h
onfig/darwin-x86/config-host.h
b8fec3e556b0d1b2a66c76d6ec0a9b242baa1068 09-Sep-2010 David Turner <digit@android.com> upstream: bswap.h

+ add a <machine/bswap.h> probe to android-configure.sh
onfig/freebsd-x86/config-host.h
onfig/linux-x86/config-host.h
80dd1261df980abf963b7f4a73f43c1102848706 09-Sep-2010 David Turner <digit@android.com> Add <fnmatch.h> check to android-configure.h
uild/common.sh
onfig/darwin-x86/config-host.h
onfig/freebsd-x86/config-host.h
onfig/linux-x86/config-host.h
b25bf2a7477595aa54181874921086d4c0071c03 08-Sep-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Passed boot properties from main to core as -boot-property parameters.

Change-Id: I56955fb13a073b15ee2a41fdfbd6845bfe65edc5
ain.c
i-core-protocol.c
e92bc56ef89ab8b51c4c89d4d9779b64e9491b9b 07-Sep-2010 David 'Digit' Turner <digit@android.com> Add new "qemu monitor" command to the console.

This allows you to access the QEMU virtual machine monitor directly
from the console (instead of playing with the command-line to do it).

The implementation of the 'quit' command has been modified to simply
close the connection, instead of stopping the emulator program.

This patch introduces changes that allow a console session to be
detached and redirected at runtime to other internal services of
the emulator program. This will be useful in the future to implement
other features.

+ doc typo
+ add proper definitions for CONFIG_ANDROID on config-host.h
+ remove obsolete sysdeps.h dependency in android/console.c

Change-Id: If16cfe41c12a26eb8f56e3a9c24452eafa5efab4
onfig/darwin-x86/config-host.h
onfig/freebsd-x86/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
onsole.c
cefa7443eb3d3e4bb134595f756145426d5613e3 01-Sep-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Add android_port initialization in the core.

Also some minor cleanups to the ui <-> core stuff.

Change-Id: I7d64ec1aa694c027851b7e262b6e1b80bb6cef08
ain.c
emu-setup.c
emulator.c
i-core-protocol.c
i-core-protocol.h
2cb19c7efef5f194198aa84d6a9ffbdb4c740455 01-Sep-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Fixed dependency ob core data in android/help.c"
318f17a0050e729bce8545463b657c1d62835b5e 27-Aug-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Fixed dependency ob core data in android/help.c

Also moved along -tcpdump option

Change-Id: I9fc53e0dc6a86e9a880d6127bf2da3ac1d7ec58a
ndroid.h
elp.c
ain.c
i-core-protocol.c
i-core-protocol.h
130ace4f3ccd53f71c0dbb93c8d1c9f88c29400e 27-Aug-2010 David 'Digit' Turner <digit@android.com> Merge "Add a PulseAudio audio backend for Linux."
415a4b1f54f896bf28abe1beb2d8005a3d98f531 28-Jul-2010 David 'Digit' Turner <digit@android.com> Add a PulseAudio audio backend for Linux.

Change-Id: Ifaf876c41ab6c7275ba7d1dc8e12139f62840cd6
onfig/check-pulseaudio.c
e13168648d5947955e0fd4fbf396f891ae53921f 26-Aug-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Moved nand and netspeed initialization from main to core.

Change-Id: Ide3914fa52f62f618d39ac20f02bce8185a6805a
ain.c
13f3b6c53817255217f40db289abace42c3c31a6 25-Aug-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Cleaned up build script from rebuilding locally generated sources

Also passed along -show-kernel option to the emulator core

Change-Id: Ic606a7a9cdac677cbd5ce9ca1a9f1a2b16da4dfa
ain.c
b2438402d16ee4a0bb4b077d0ad0ef1d82b2a08c 24-Aug-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Moved radio, gps and audio setup entirely into the core

Change-Id: I9d76bb3cd892b7b2b0713a27ff5477195c93ff36
ain.c
7fbf49776a98847a5f95325646f7eb5ff787423f 12-Aug-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Cleanup stuff for the UI build

1. Move DNS server registration entirely to the core.
2. Move -memcheck option initialization entirely to the core.
3. Move qemu_help routine (used by both, Core and UI) to common qemu-help.c file.

Change-Id: I5e47e94bdc375f0e037ccc6bd88daeb5fa06d1cf
ain.c
b5365f32d7b1dcc6c3e9be7584ce8d4f68b3e7e1 09-Aug-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Move memchecker initialization from main.c to vl-android.c (core)

Also move qemu-malloc.c to common CORE and UI sources

Change-Id: Ifd62ae247cc03700d85b5fc35072d73ac37cc570
ain.c
3cf34f28ff198c69a02ed74a8e851b53cf3ff00c 31-Jul-2010 David 'Digit' Turner <digit@android.com> Fix window title to display the correct port number for the emulator.

Change-Id: I289451995683d5d4de2afe2e87481418a393c82f
ore-ui-protocol.c
ore-ui-protocol.h
emu-setup.c
emulator.c
9b98dbde344781e93e2bdcfa599428cda2fda41d 31-Jul-2010 David 'Digit' Turner <digit@android.com> Better detection of incorrect proxy values when starting the emulator.

Change-Id: I344f06fc16e051359669b8fe9b8dcec0ceca377d
emu-setup.c
ba1f57f4a17ea97343b58903ba7100fee58ba28e 27-Jul-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Added qemu-android build target which will build bare (UI-stripped) emulator

Also has some minor separation changes

Change-Id: I367e26f691d4d77b43c59b090b01434133d33584
kin/window.c
i-core-protocol.c
i-core-protocol.h
055ae42d36d9d78a7920f66ee2df485d81d24264 27-Jul-2010 David 'Digit' Turner <digit@android.com> Better separation of UI and Core sources for framebuffer emulation.

+ new document under docs/DISPLAY-STATE.TXT to explain what's happening.

Change-Id: Ia0d233377266212da49af932c7528f46f5feb92d
isplay.c
isplay.h
ain.c
emulator.c
kin/window.c
i-core-protocol.c
i-core-protocol.h
657a3521a1f4d354b57f0e524b1cd57bed177bb0 24-Jul-2010 David 'Digit' Turner <digit@android.com> GPS: Fixed the "geo fix" console command, and added satellite count emulation.

Change-Id: I27626c5ede2b0ed354ee780fa00caf4778ff690f
onsole.c
1fee27e582e9ad9981dd54adad6d47f18a1aae4d 23-Jul-2010 David 'Digit' Turner <digit@android.com> fix -http-proxy implementation to work correctly with chunked encoding.

Change-Id: I3d8a18bd0849c75d0133b234a8aa74069ad71baa
emu-setup.c
43552dc4fa64aad0c9fdb8f4c92ae7ac79406596 22-Jul-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Remove UI dependency from goldfish_event_device.c

Change-Id: Iea5edfbae0caff45161c814d631d35d2e6d61d1c
harmap.c
harmap.h
onsole.c
ain.c
2fa5173bd1ce7341c50adac676a317945f0969c7 16-Jul-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Moved dependency on android_ui_set_window_scale to ui-core-protocol.h

Also cleaned up dependency on android_base_port variable

Change-Id: I8c1675a859e3d24e9bb174471dd03556c696aff1
onsole.c
ore-ui-protocol.c
ore-ui-protocol.h
ain.c
emu-setup.c
emulator.c
i-core-protocol.c
i-core-protocol.h
eb8382507c6b802f378cf940fae4775633c1d84e 15-Jul-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Move net-related routines from main.c to net-android.c

Change-Id: If102220e6db913f4a51bb1809ce60f4bf24bdd6a
ndroid.h
mdline-option.h
ain.c
7258f6b1539906849d02fa9f5e75360b0d01f48c 14-Jul-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Finished shuffling files.

Change-Id: Ifb0a1458fa9aa5c5143e876242e03e1eee2044b9
ain.c
45d921a6b0f4626805a3a4870834874be051f6b0 08-Jul-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Removed boot-properties.h dependency from help.c

File help.c belongs to the UI, while boot-properties belong to the Core

Change-Id: I526bc187740c58f89375025ca21927f5224acf19
elp.c
elp.h
4057561d5414c89f0d9964017e9473b68643e865 08-Jul-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Removed hw-control dependency from the UI.

qemulator_setup has been setting brighness callback via direct call to hw-control.
After the change callback is set via call to ui-core-protocol

Change-Id: Ib96887d47cf765f38f4a7ad39f4f39963d9fb90d
ain.c
emulator.c
i-core-protocol.c
i-core-protocol.h
71bb14f826775867d16e7d382cfdc48e6ca46ccb 08-Jul-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Move key event generation out of the UI realm into neutral space.

Abstracted keycode event array into keycode_array.[hc],
Moved key to keycode translation into charmap.c

Change-Id: I4de0c9853fa93d675895fc361e62ee36c1c0a652
harmap.c
harmap.h
onsole.c
eycode-array.c
eycode-array.h
emulator.c
kin/keyboard.c
i-core-protocol.c
i-core-protocol.h
i_core_protocol.c
i_core_protocol.h
a21ac6912568a1d36a2919669f905bc58be21244 28-Jun-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Add ui_core_protocol.* to simulate UI->Core exchange.

Change-Id: I969bb097fcd9be55d83368ddee0e377a0f0af896
emulator.c
i_core_protocol.c
i_core_protocol.h
83f82216024e9b5623d9f2b3b90e9c2e954412e9 25-Jun-2010 David 'Digit' Turner <digit@android.com> Fix a memory corruption bug that can happen if a qemud service decides to
close the connection during a clie_recv() call.

Change-Id: I5cedde24c5b15081453c1537c679ca1f9c697ad9
w-qemud.c
d81e6d1ce722d7e561d495bbd4b137e728e25b83 16-Jun-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Pass core-specific options to emulator core as cmd-line options.

Change-Id: I7ed897ca92c1344505f982897e2f59cc68c42d89
ain.c
emu-setup.c
377eb2c7c762db6e28fa273ac7e4747a7c9e037e 21-May-2010 David 'Digit' Turner <digit@android.com> Enable --mingw option in android-configure.sh

This should ease testing of the Windows build during development.

Change-Id: I45cc9e396a0e82d764cf7a27fd40ad7c5367c51a
uild/common.sh
111d6f8ed6dea6e651ab450e1ea11310ff0b2857 09-Jun-2010 Dries Harnie <botje.linux@gmail.com> Inter-emulator networking: add interfaces in the correct order

Change-Id: I9cab6f47bbde9f4dacdb2a426064af63eb4709c4
ain.c
38f8467357f731c4ced8548c6bb65e95745c7eff 07-Jun-2010 Dries Harnie <botje.linux@gmail.com> qemu-props: Signal end of property list.

Change-Id: I0194413e3ce93ff09aa953f283a22211e93848a1
oot-properties.c
34f2974ce7ec7c71beb47b5daf9089d5c8c40c79 26-May-2010 David 'Digit' Turner <digit@android.com> Add small user-event abstraction interface.

Preparation for future UI frontend/backend separation.

This is done to ensure that the code under android/skin/ does not depend
on any QEMU-specific header. We achieve this by adding a new abstract header
"user-events.h" and one QEMU-specific implementations for the functions
defined here.

This also modifies console.h and vl-android.c to make them closer to
upstream (by removing Android-specific changes).

+ fix Makefile.android to always build SDL from sources in standalone mode.

Change-Id: I0d152741e7bb2c9cd283f5c35bd054385c7c1eb3
onsole.c
ain.c
kin/keyboard.c
kin/window.c
34d165185730eac6ddc4e7a23d192d22aa3d4dfb 19-May-2010 David 'Digit' Turner <digit@android.com> Build SDL from sources directly.

This removes the requirement to build the SDL library before the rest
of the emulator. The prebuilt SDL library and installation is now optional
and is only kept for the full Android build on Linux (mainly to avoid having
to install many dev libraries on build servers).

This patch affects both the Android and standalone build systems.

The script android-configure.sh will not use a prebuilt SDL installation
unless you explicitely use --sdl-config=<script>.

Tested for linux-x86 / darwin-x86 / cygwin / linux-mingw builds.

Change-Id: If973b2ad199f06aeeff43aec387d1ac629487529
uild/common.sh
onfig/darwin-x86/SDL_config.h
onfig/freebsd-x86/SDL_config.h
onfig/linux-x86/SDL_config.h
onfig/windows/SDL_config.h
ain.c
40beab42ecdc4e2a79714b54c401feb0fb33b6d0 15-May-2010 Dries Harnie <botje.linux@gmail.com> Enable interconnection of emulators

This patch adds a -shared-net-id option to the emulator which
joins the emulator in a shared network.
If the option is given the emulator is started with an additional
network interface bound to a multicast socket. This multicast socket
emulates a network hub, interconnecting emulators.
If the -shared-net-id option is not given, nothing changes.

Change-Id: I0ea70a073cdbd34f804161300240fafca34080d0
mdline-options.h
elp.c
ain.c
d27aca1c8172462c6e834c3c42582106b36aa422 13-May-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Moved android_emulation_setup from android/main.c to android/qemu-setup.c

Change-Id: Ic66bb0d07e28088ae02055c88d37bfd00edea592
ain.c
emu-setup.c
fd3b1a0e32964436a5259e073857e0c4e2110122 11-May-2010 David 'Digit' Turner <digit@android.com> Upstream: add qemu_fdatasync()

Change-Id: I232b9c4df372e1fded97694fffcd72ef9ea113c4
onfig/linux-x86/config-host.h
3d66dc7c08acb3802bf803abca68ac5fb36582b4 28-Jan-2010 David 'Digit' Turner <digit@google.com> Upstream: HAVE_IOVEC => CONFIG_IOVEC

Change-Id: I18025d9c154a02af5d6298c7d7f72fc9f2c1c5d7
onfig/darwin-x86/config-host.h
onfig/linux-x86/config-host.h
0119362f0d74ca74f3ea743f6e0e527a9edcc474 11-May-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Moved QEmulator out of main.c

Change-Id: I20964bb5d7fbef5ea22d265427793a2a7fce2017
ain.c
emulator.c
emulator.h
20894ae3fa98f82da925fbeb72e616eef509758a 11-May-2010 David 'Digit' Turner <digit@android.com> Upstream: HOST_WORDS_ALIGNED -> WORDS_ALIGNED

Change-Id: Ica9022695d83fb48a8c25fdb1e1f0dc1c63747ff
ain.c
kin/image.c
1368f99ba2c6f29a97ba057d30d4a0235c83a441 11-May-2010 David 'Digit' Turner <digit@android.com> Fix emulator OS X build when using the Android build system.

Change-Id: Ia19b4e14b84c12edc040a70144a97b5ca9474b00
onfig/darwin-x86/config-host.h
onfig/freebsd-x86/config-host.h
2c538c86c15d597cc875dc926e4e39285c5625df 11-May-2010 David 'Digit' Turner <digit@android.com> Upstream: Use CONFIG_BSD instead of _BSD and HOST_BSD

Also fix OS X build, which failed with a link error.
Change-Id: Idd63f25dc1f46ea66da5727c7577def34f048c3c
onfig/darwin-ppc/config-host.h
731e9244aeb83b77a47efc4e65e9f2135ae634ff 27-Apr-2010 Jeff Hamilton <jham@android.com> When running from the Android build system and no skin is defined
on the command line check for a skin in $ANDROID_PRODUCT_OUT/skin.

Change-Id: I776aa481b38bd4e48982fdb5c032a10c970576a8
vd/info.c
c306052006efb151cc10c28ce2f0087b8ded5e1c 19-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from tools_r6

Change-Id: I860d4b338cba9ea749797d6607b262c8072dd1f6
92568958dd42bf35667cc6451b5edd7f7d1f73a1 16-Apr-2010 David 'Digit' Turner <digit@google.com> Revert previous patch to fix SD Card emulation

The previous patch modifies SD Card hardware emulation in a way that is
not backwards compatible with previous SDK platform releases. This has
the unfortunate effect of making SD Card emulation not work properly
when running existing AVDs.

Reverting the patch until we get a better one.

Change-Id: I82dac87709d88aa3bd292bf2ed0008ae74d95853
vd/info.c
vd/info.h
mdline-options.h
onsole.c
elp.c
ain.c
aea1b87e31b952a733fe6cc6a0be4493a78ea961 14-Apr-2010 Raphael <raphael@google.com> Changes to build Windows emulator under Linux/MinGW

- Linux being case-sensitve, include "windows.h" instead of "Windows.h" is important.
- Use MinGW's windres.
- No pthread needed.

Change-Id: Ib4ce944bb55a8b1d870e230f269c89cb7df0b3f2
tils/mapfile.c
555d73444f8f053323828e354f446ccee41439d5 09-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from tools-r6

Change-Id: I8b1287b619b6ec77024cb1ce56fabc80d2b1146d
fbcab322c2a12bfe49d0faaef91fccdc7bb97d4e 07-Apr-2010 David 'Digit' Turner <digit@google.com> Automatically parse a file named 'hardware.ini' if it is found
in the skin directory, and we are using the Android build system.

Change-Id: I62480314f73ae60e769c113d6e4421e9946bb818
vd/info.c
4c189f8aa64218fa21195e63842944e35eff222a 29-Mar-2010 Stefan Hilzinger <hilzinger@google.com> Making the port where adb is expected configurable.

Environment variable ANDROID_ADB_SERVER_PORT allows to control the port
the emulator expects adb to be listening on.

Change-Id: Ibe52c02829ac9a0308f2cf5da32a57ab773110f8
ain.c
80488c5378f95c7ba3e4ee80742a9c2051e783db 26-Mar-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Merge "Move file I/O out of ELFF, abstracting them in platform-independent fasion."
8339d18223eed408bfefcd00f649a2b13ccac52c 25-Mar-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Move file I/O out of ELFF, abstracting them in platform-independent fasion.

Change-Id: Ie8800dc96db810e352618bfea8243ab008ae9d2c
tils/mapfile.c
tils/mapfile.h
ce0f4b02160ee72d7d2428867fe757bc37c68c98 25-Mar-2010 David 'Digit' Turner <digit@google.com> Fix Win32 socket error handling.

This also fixes -http-proxy support on Windows.

Change-Id: I741b224511c064412ac39351ed4f1b9146a313a5
onsole.c
5389aa19033153c09556d1362a8b8a56abccb8f5 16-Feb-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Merge memory checking from sandbox

Change-id: Ibce845d0
mdline-options.h
elp.c
ain.c
tils/debug.h
tils/path.h
802c9bd7f3353c8ce4133f20ca2f5fb98bc20bf4 07-Jan-2010 David 'Digit' Turner <digit@google.com> am 538b0138: am c973b058: Add support to the emulator\'s standalone build system for C++ sources.

Merge commit '538b01383c3f202aa7822ab9cae01c4d1abe2c08'

* commit '538b01383c3f202aa7822ab9cae01c4d1abe2c08':
Add support to the emulator's standalone build system for C++ sources.
538b01383c3f202aa7822ab9cae01c4d1abe2c08 07-Jan-2010 David 'Digit' Turner <digit@google.com> am c973b058: Add support to the emulator\'s standalone build system for C++ sources.

Merge commit 'c973b058ebe38bb585a9a6026e39519db1f91c33' into eclair-plus-aosp

* commit 'c973b058ebe38bb585a9a6026e39519db1f91c33':
Add support to the emulator's standalone build system for C++ sources.
c973b058ebe38bb585a9a6026e39519db1f91c33 07-Jan-2010 David 'Digit' Turner <digit@google.com> Add support to the emulator's standalone build system for C++ sources.
uild/binary.make
uild/clear_vars.make
uild/definitions.make
7e7e1732e0db91e137356fe94951e73ab7219cbd 10-Dec-2009 David 'Digit' Turner <digit@google.com> am e3c94626: am 39fd8497: Add two documentation files describing the format of config and skin files.

Merge commit 'e3c94626074fd1331d1821fed5db043f6da02d2a' into eclair-mr2-plus-aosp

* commit 'e3c94626074fd1331d1821fed5db043f6da02d2a':
Add two documentation files describing the format of config and skin files.
0bf9b8b2e1e625ce427911deb3732ff67a58a8e3 10-Dec-2009 San Mehat <san@google.com> am 71e736ef: qemu: android: Add control console support for managing sdcards

Merge commit '71e736ef90ef644130201742980b275fcca259a5' into eclair-mr2-plus-aosp

* commit '71e736ef90ef644130201742980b275fcca259a5':
qemu: android: Add control console support for managing sdcards
e3c94626074fd1331d1821fed5db043f6da02d2a 08-Dec-2009 David 'Digit' Turner <digit@google.com> am 39fd8497: Add two documentation files describing the format of config and skin files.

Merge commit '39fd8497a66aa9f78a18c8684181128361612c6f' into eclair-mr2

* commit '39fd8497a66aa9f78a18c8684181128361612c6f':
Add two documentation files describing the format of config and skin files.
48e931256ea56af1b22cc5b52157ad0ed805637c 08-Dec-2009 David 'Digit' Turner <digit@google.com> am 39fd8497: Add two documentation files describing the format of config and skin files.

Merge commit '39fd8497a66aa9f78a18c8684181128361612c6f' into eclair-plus-aosp

* commit '39fd8497a66aa9f78a18c8684181128361612c6f':
Add two documentation files describing the format of config and skin files.
71e736ef90ef644130201742980b275fcca259a5 07-Dec-2009 San Mehat <san@google.com> qemu: android: Add control console support for managing sdcards

Signed-off-by: San Mehat <san@google.com>

qemu: goldfish: Fix compile error introduced in refactoring

Signed-off-by: San Mehat <san@google.com>
onsole.c
39fd8497a66aa9f78a18c8684181128361612c6f 08-Dec-2009 David 'Digit' Turner <digit@google.com> Add two documentation files describing the format of config and skin files.
tils/ini.h
b3e7ebed293cb3dbfbaafc888aff0349e069e820 07-Dec-2009 San Mehat <san@google.com> am 68a8f7b5: qemu: android: Add support for multiple SD cards

Merge commit '68a8f7b5ed6ee2bbbc7b67070b9c401c2276426f' into eclair-mr2-plus-aosp

* commit '68a8f7b5ed6ee2bbbc7b67070b9c401c2276426f':
qemu: android: Add support for multiple SD cards
68a8f7b5ed6ee2bbbc7b67070b9c401c2276426f 05-Dec-2009 San Mehat <san@google.com> qemu: android: Add support for multiple SD cards

Add commandline support for an additional SD card, and plumb support to
the MMC emulation layer. This patch also reworks the way the hw emulation
layer registers devices. Previously, the mmc virtual hardware was only
created if the sdcard image existed. Now, two virtual MMC controllers are
*always* created as on real hardware. When a request is made to one
of our controllers which has no image file bound to it, a new interrupt
status indicating a command timeout is sent to the guest driver, as
is standard with MMC controllers. This patch also sets the stage for
supporting hot-add / hot-remove.

Signed-off-by: San Mehat <san@google.com>

qemu: android: Integrate card detect into the virtual mmc hardware and
wire it up to the STATE_CHANGE irq status

Signed-off-by: San Mehat <san@google.com>

fixups from review - mmc now works with legacy
drivers

Signed-off-by: San Mehat <san@google.com>
vd/info.c
vd/info.h
mdline-options.h
elp.c
ain.c
51e8424b90a592619034f13b162cb5f6d0fee3d0 04-Dec-2009 David 'Digit' Turner <digit@google.com> am dc3dd741: am a383d02c: Extract emulator major version number from SDK Tools package revision.

Merge commit 'dc3dd741551c323bb853782656c0d693db98ecdc' into eclair-mr2-plus-aosp

* commit 'dc3dd741551c323bb853782656c0d693db98ecdc':
Extract emulator major version number from SDK Tools package revision.
e48bd04f0b59e5b6a8bea4718e3b2f587c711bba 03-Dec-2009 David 'Digit' Turner <digit@google.com> am a383d02c: Extract emulator major version number from SDK Tools package revision.

Merge commit 'a383d02cb57dd7dadd382654175e51354073a139' into eclair-plus-aosp

* commit 'a383d02cb57dd7dadd382654175e51354073a139':
Extract emulator major version number from SDK Tools package revision.
a383d02cb57dd7dadd382654175e51354073a139 03-Dec-2009 David 'Digit' Turner <digit@google.com> Extract emulator major version number from SDK Tools package revision.

The minor version number is now always 0, this makes the next
version number "5.0" currently in the eclair branch.
ndroid.h
ain.c
ae4812d7514dbea69f72da2386c573b63f54160b 02-Dec-2009 David 'Digit' Turner <digit@google.com> am 1c657d48: am 8b657e5d: Fix a crash when using an 8MB SD Card image file.

Merge commit '1c657d4855986fcf9f4df2b592b1d0ca3238defc' into eclair-mr2-plus-aosp

* commit '1c657d4855986fcf9f4df2b592b1d0ca3238defc':
Fix a crash when using an 8MB SD Card image file.
8fa4d03021927c765331f1e320226ae4923e9f6e 02-Dec-2009 David 'Digit' Turner <digit@google.com> am 8b657e5d: Fix a crash when using an 8MB SD Card image file.

Merge commit '8b657e5deaa03b989b0b36791fcf2aa6b2882656' into eclair-plus-aosp

* commit '8b657e5deaa03b989b0b36791fcf2aa6b2882656':
Fix a crash when using an 8MB SD Card image file.
8b657e5deaa03b989b0b36791fcf2aa6b2882656 01-Dec-2009 David 'Digit' Turner <digit@google.com> Fix a crash when using an 8MB SD Card image file.

The minimum size is now 9MB. This appears to be a limitation
of the emulated MMC hardware code and/or kernel device driver.
ndroid.h
ain.c
0152329883ccb02e9b8afedbe04ccc3519ab421a 20-Nov-2009 Xavier Ducrohet <xav@android.com> am 70dc4cbc: am 5bc6182a: Fix location of prebuilt skins.

Merge commit '70dc4cbc6e6b6b1813d3f0d548b6ab3c381ccbd5' into eclair-mr2-plus-aosp

* commit '70dc4cbc6e6b6b1813d3f0d548b6ab3c381ccbd5':
Fix location of prebuilt skins.
018ce14ac3bbaa6d91a3c43668e03451ffd0e10d 20-Nov-2009 Xavier Ducrohet <xav@android.com> am 5bc6182a: Fix location of prebuilt skins.

Merge commit '5bc6182ae984796a6d14be7f7b8eb73c1b630b8e' into eclair-plus-aosp

* commit '5bc6182ae984796a6d14be7f7b8eb73c1b630b8e':
Fix location of prebuilt skins.
5bc6182ae984796a6d14be7f7b8eb73c1b630b8e 20-Nov-2009 Xavier Ducrohet <xav@android.com> Fix location of prebuilt skins.

Change-Id: I3ce440cff624138518dc410c304353bea1ecef91
vd/info.c
elp.c
786eceb493bb9c27a53bdb6ab46b0ff0e5c87d52 30-Oct-2009 David 'Digit' Turner <digit@google.com> am c95f75ae: am fa461021: am 49dcc4de: Fix typo which prevented the computation of the default /data partition size from working properly.

Merge commit 'c95f75aebab035bb62b63cae426a1cca394f5a50' into eclair-mr2-plus-aosp

* commit 'c95f75aebab035bb62b63cae426a1cca394f5a50':
Fix typo which prevented the computation of the default /data partition size
feb377343c836010839c09899215ae35eef64908 30-Oct-2009 David 'Digit' Turner <digit@google.com> am 98f3c372: am 7d0891ef: am def0e542: Remove the disk partition size hardware properties.

Merge commit '98f3c372f1725ceffe9933bdf93b93c05a7c1bfa' into eclair-mr2-plus-aosp

* commit '98f3c372f1725ceffe9933bdf93b93c05a7c1bfa':
Remove the disk partition size hardware properties.
25b6d7cdbae41898e643211cbaa5dce9158b867d 30-Oct-2009 David 'Digit' Turner <digit@google.com> am fa461021: am 49dcc4de: Fix typo which prevented the computation of the default /data partition size from working properly.

Merge commit 'fa4610215cef5d4ccff7357c62d332d4d93e0f13' into eclair-plus-aosp

* commit 'fa4610215cef5d4ccff7357c62d332d4d93e0f13':
Fix typo which prevented the computation of the default /data partition size
49dcc4de79c93de65c20706b798353be1e840915 30-Oct-2009 David 'Digit' Turner <digit@google.com> Fix typo which prevented the computation of the default /data partition size
from working properly.
ain.c
13d22877c1d0ca0e206097c94ad56bce3eab6c2e 29-Oct-2009 David 'Digit' Turner <digit@google.com> am 7d0891ef: am def0e542: Remove the disk partition size hardware properties.

Merge commit '7d0891efa38af61302b644a3c150fa6fa4367b42' into eclair-plus-aosp

* commit '7d0891efa38af61302b644a3c150fa6fa4367b42':
Remove the disk partition size hardware properties.
def0e542c9cc004a7b83ff965103c34097c0960b 29-Oct-2009 David 'Digit' Turner <digit@google.com> Remove the disk partition size hardware properties.

Also remove the error/abort message in case an AVD's image files
are larger than the default.
vd/hardware-properties.ini
vd/hw-config-defs.h
ain.c
790b7534b5a0dea8040fa0c10f1e376db26a7bf8 08-Oct-2009 David 'Digit' Turner <digit@google.com> am 03e12440: Add a new hardware property: vm.heapSize

Merge commit '03e124409bd08e620898fbaf8ce27dde3afa1143' into eclair-plus-aosp

* commit '03e124409bd08e620898fbaf8ce27dde3afa1143':
Add a new hardware property: vm.heapSize
03e124409bd08e620898fbaf8ce27dde3afa1143 08-Oct-2009 David 'Digit' Turner <digit@google.com> Add a new hardware property: vm.heapSize

Allows to control the maximum heap size of Dalvik applications when running
under emulation.
vd/hardware-properties.ini
vd/hw-config-defs.h
ain.c
1f2d8d3650062aa683aff2a42270724c1a4ba064 07-Oct-2009 David 'Digit' Turner <digit@google.com> am 065242de: Ensure android/avd/hw-config-defs.h is properly regenerated as needed.

Merge commit '065242de51ba1e18387ce22a99eb091a859990f7' into eclair-plus-aosp

* commit '065242de51ba1e18387ce22a99eb091a859990f7':
Ensure android/avd/hw-config-defs.h is properly regenerated as needed.
b10f014a2717dcf6641e502d152b20461831b85a 07-Oct-2009 David 'Digit' Turner <digit@google.com> am 48ed3267: Do not use qemu_malloc() to allocate arrays.

Merge commit '48ed3267dfffedb65385b0a1f1462fdd46d049bb' into eclair-plus-aosp

* commit '48ed3267dfffedb65385b0a1f1462fdd46d049bb':
Do not use qemu_malloc() to allocate arrays.
065242de51ba1e18387ce22a99eb091a859990f7 07-Oct-2009 David 'Digit' Turner <digit@google.com> Ensure android/avd/hw-config-defs.h is properly regenerated as needed.

This modifies the emulator's build system to ensure that the file at
android/avd/hw-config-defs.h is regenerated automatically each time that
android/avd/hardware-properties.ini is itself changed.

Tested with both the Android build system, and the standalone one.
ain.c
ools/gen-hw-config.py
947c214ab0a721fc1cd15d5b582c4baad2d26daa 07-Oct-2009 David 'Digit' Turner <digit@google.com> am bcc6ae14: Finally fix ARMv7 NEON emulation.

Merge commit 'bcc6ae14820ddb24e2403d84b420ce61f371ae94' into eclair-plus-aosp

* commit 'bcc6ae14820ddb24e2403d84b420ce61f371ae94':
Finally fix ARMv7 NEON emulation.
fc11951fdedd724620eaf6f869db8572ba0c93cb 07-Oct-2009 David 'Digit' Turner <digit@google.com> am ddf49e53: Workaround ARMv7 emulation issues.

Merge commit 'ddf49e53df97a349f42c733059165dc73c9907dc' into eclair-plus-aosp

* commit 'ddf49e53df97a349f42c733059165dc73c9907dc':
Workaround ARMv7 emulation issues.
48ed3267dfffedb65385b0a1f1462fdd46d049bb 07-Oct-2009 David 'Digit' Turner <digit@google.com> Do not use qemu_malloc() to allocate arrays.

This function will call abort() for zero-sized arrays. This is stupid so use
the Android-specific functions that return NULL instead.
kin/window.c
bcc6ae14820ddb24e2403d84b420ce61f371ae94 06-Oct-2009 David 'Digit' Turner <digit@google.com> Finally fix ARMv7 NEON emulation.

The real problem was the size of the static intermediate TCG opcode buffer.

Due to its SIMD nature, a single Neon instruction can generate a very large number
of corresponding TCG opcodes. Using lots of Neon instructions in a big looop like
the one we have in our ARMv7-optimized memcpy did generate enough opcodes to
overwrite the static gen_opc_buf buffer, resulting in overwrites into the following
global buffer (gen_opparam_buf) corresponding to opcode parameters.

The end result was generation of really broken host machine code, and completely
unreliable emulation, including potential assertion failure in the liveness analysis
pass.

This patch does the following:

- bumps the buffer size from 512 to 2048
- adds sanity checks that will abort the emulator if another similar overwrite
is detected before machine code is generated.
- remove the previous hack where we disabled the liveness analysis pass for ARMv7

Note that fixing the code generator to not use a static buffer is not trivial at
this point, and that we much prefer to stay true to the upstream sources at the
moment.

Keep in mind that a previous patch also fixed a bug in the ARM->TCG translator
(typo required changing a 0 into a 1) which affected Neon instructions too.

I can't believe I just lost 2 weeks of my life on that bug :-(
ain.c
ddf49e53df97a349f42c733059165dc73c9907dc 05-Oct-2009 David 'Digit' Turner <digit@google.com> Workaround ARMv7 emulation issues.

This patch is used to disable the code generator's liveness analysis pass when we
emulate an ARMv7 CPU. This is required to properly run the dex preoptimization pass
during the build of -user system images.

Also includes:
- a fix for a sad typo in target-arm/translate.c related to NEON instruction emulation
- upstream improvements to the x86 and x86_64 backends to generate better goto branches at runtime
- upstream fixes for 64-bit swap and shift operations in TCG

After this patch is applied, re-enabling the ARMv7 memcpy should allow to run the dex preopt
pass succesfully. Anything else is untested though. WE STILL NEED TO FIX THE CODE GENERATOR.
ain.c
0c88ea7315d320b86fcf9a5a77bd246a60dd1f9a 01-Oct-2009 Xavier Ducrohet <xav@android.com> am f9c07534: Increase Emulator system image to 72MB

Merge commit 'f9c07534fd5c3cf54592db4771ac27df3a13522d' into eclair-plus-aosp

* commit 'f9c07534fd5c3cf54592db4771ac27df3a13522d':
Increase Emulator system image to 72MB
f9c07534fd5c3cf54592db4771ac27df3a13522d 01-Oct-2009 Xavier Ducrohet <xav@android.com> Increase Emulator system image to 72MB

This is required to run the SDK system image with the new assets
in multiple densities.

Change-Id: I4ab21a9c5ef554d1d8d63a32c3e88719e6d49253
vd/hardware-properties.ini
vd/hw-config-defs.h
bd143536e4ac325f3577d300c3750d52b37cf058 25-Sep-2009 vchtchetkine <vchtchetkine@google.com> am 2697a83b: Fix free() bug in charmap code

Merge commit '2697a83bcf2b1d13c5f957e4c5ee64b774099b3f' into eclair-plus-aosp

* commit '2697a83bcf2b1d13c5f957e4c5ee64b774099b3f':
Fix free() bug in charmap code
2697a83bcf2b1d13c5f957e4c5ee64b774099b3f 25-Sep-2009 vchtchetkine <vchtchetkine@google.com> Fix free() bug in charmap code
harmap.c
d26c32105dc6de28845efae356635637cd0136fa 24-Sep-2009 David 'Digit' Turner <digit@google.com> am c3e6bb48: Fix emulator crash on exit, due to invalid free() call.

Merge commit 'c3e6bb48bc36d7e1b95bff7c870b0842eb8a452e' into eclair-plus-aosp

* commit 'c3e6bb48bc36d7e1b95bff7c870b0842eb8a452e':
Fix emulator crash on exit, due to invalid free() call.
c3e6bb48bc36d7e1b95bff7c870b0842eb8a452e 23-Sep-2009 David 'Digit' Turner <digit@google.com> Fix emulator crash on exit, due to invalid free() call.
harmap.c
harmap.h
0c9f59668e41309d853c20094442088e19ec4610 21-Sep-2009 vchtchetkine <vchtchetkine@google.com> am 52195e70: Fix build break caused by undefined min(a,b)

Merge commit '52195e705c10ab94c2b842591bbd2fda60e13102' into eclair-plus-aosp

* commit '52195e705c10ab94c2b842591bbd2fda60e13102':
Fix build break caused by undefined min(a,b)
52195e705c10ab94c2b842591bbd2fda60e13102 21-Sep-2009 vchtchetkine <vchtchetkine@google.com> Fix build break caused by undefined min(a,b)
harmap.c
7daffa9b7b647e89bf6964725352f44a3523c59f 21-Sep-2009 vchtchetkine <vchtchetkine@google.com> am 9085a28c: Implementation for dynamic charmap option in emulator.

Merge commit '9085a28c14f369d231dbae099a690689179f428a' into eclair-plus-aosp

* commit '9085a28c14f369d231dbae099a690689179f428a':
Implementation for dynamic charmap option in emulator.
9085a28c14f369d231dbae099a690689179f428a 15-Sep-2009 vchtchetkine <vchtchetkine@google.com> Implementation for dynamic charmap option in emulator.

Created .kcm parser and added -charmap option to the emulator, so user
can specify keyboard layout for emulator session.
harmap.c
harmap.h
mdline-options.h
elp.c
ain.c
kin/keyboard.c
kin/keyboard.h
72e536bed18c886abd2b86223acbc159b5403e8c 21-Sep-2009 David 'Digit' Turner <digit@google.com> am 238b4b0e: Fix ARMv7 emulation by disabling CPU alignment exceptions

Merge commit '238b4b0ef1a01afa66ef267dae4a96401ad386db' into eclair-plus-aosp

* commit '238b4b0ef1a01afa66ef267dae4a96401ad386db':
Fix ARMv7 emulation by disabling CPU alignment exceptions
238b4b0ef1a01afa66ef267dae4a96401ad386db 20-Sep-2009 David 'Digit' Turner <digit@google.com> Fix ARMv7 emulation by disabling CPU alignment exceptions

Disable alignment CPU exceptions to be able to boot an ARMv7 system image.
This is because 4.4.0 emits a machine code sequence that stores an 8-bytes double
on a 4-byte aligned address on the stack in the implementation of cvt() in the C
library (see the disassembly for bionic/libc/stdio/vfprintf.c). It is uncertain
that this is a compiler bug at this point, but the upstream QEMU sources don't have
alignment exceptions enabled for any ARM target anyway.

Also, add a check to force CPU emulation to "cortex-a8" if the kernel file name
ends in "-armv7". This is a poor man's approach to hardware configuration that will
be replaced by a more sophisticated solution in the future. Right now, we just want
to be able to build -user system images with the dex preopt pass running in the
emulator with the minimum amount of fuss.
ain.c
6f0e6da580dcc786104edefef3a879f018834a3a 19-Sep-2009 David 'Digit' Turner <digit@google.com> am 06074941: Merge change 25638 into eclair

Merge commit '060749410208cd5a0e25faacdd6a5ef1ae8cf6d5' into eclair-plus-aosp

* commit '060749410208cd5a0e25faacdd6a5ef1ae8cf6d5':
Allow skins to provide a "dpad-rotation" field for each layout.
87250c24aec9449eb615951cf537a2fcf709f1d8 18-Sep-2009 David 'Digit' Turner <digit@google.com> Allow skins to provide a "dpad-rotation" field for each layout.

This is used to deal with the fact that the framework *always* assumes that
the physical DPad is rotated in landscaped mode, while the default skin no
longer does that.

NOTE: tested on old skin files for backwards compatibility.

(Upcoming skin fixes coming in another patch)
harmap.h
eycode.c
eycode.h
ain.c
kin/file.c
kin/file.h
kin/keyboard.h
kin/window.c
497d910c85598a75cc2be2ea932c44036c854fc3 15-Sep-2009 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 5d8f37ad to eclair-plus-aosp
a3abe794b734382295b89d6c2d1d176ce4bb9b4b 15-Sep-2009 Jean-Baptiste Queru <jbq@google.com> merge from open-source master
5d8f37ad78fc66901af50c762029a501561f3b23 14-Sep-2009 David 'Digit' Turner <digit@google.com> Merge upstream QEMU 10.0.50 into the Android source tree.

This change integrates many changes from the upstream QEMU sources.
Its main purpose is to enable correct ARMv6 and ARMv7 support to the
Android emulator. Due to the nature of the upstream code base, this
unfortunately also required changes to many other parts of the source.

Note that to ensure easier integrations in the future, some source files
and directories that have heavy Android-specific customization have been
renamed with an -android suffix. The original files are still there for
easier integration tracking, but *never* compiled. For example:

net.c net-android.c
qemu-char.c qemu-char-android.c
slirp/ slirp-android/
etc...

Tested on linux-x86, darwin-x86 and windows host machines.
uild/binary.make
uild/definitions.make
onfig/Linux/config-host.h
onfig/config.h
onfig/darwin-x86/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
onsole.c
ain.c
4b5dd6552c18c3295c6363235c3b6ae4ff3f0698 14-Sep-2009 Android Code Review <code-review@android.com> Merge change 11469

* changes:
General changes to support freebsd system in building scripts
8ac092bcc7c6928b848dfc3e946eb83cc6f8cad6 14-Sep-2009 Android Code Review <code-review@android.com> Merge change 11471

* changes:
Allowed building on FreeBSD same timezone related code as for Linux.
088232286a7814a92b5b0d4a34f243a2e857facc 31-Aug-2009 Alexey Tarasov <tarasov@dodologics.com> General changes to support freebsd system in building scripts
uild/common.sh
f665626600d70095db62b335cc3a7e32f0460324 31-Aug-2009 Alexey Tarasov <tarasov@dodologics.com> Added config file related to FreeBSD-x86
onfig/freebsd-x86/config-host.h
be4da91955d96196cf5bca31156c25692e94a62d 31-Aug-2009 Alexey Tarasov <tarasov@dodologics.com> Allowed building on FreeBSD same timezone related code as for Linux.
tils/timezone.c
37f0fd547e05c8bcfa59eee57c9988c1f3969fb1 03-Sep-2009 Jean-Baptiste Queru <jbq@google.com> merge from donut
cd059b15f2c7df69f4a087bd66900eb172e41d1c 28-Aug-2009 David 'Digit' Turner <digit@google.com> Added two new hardware properties to control AVD partition sizes.

disk.systemPartition.size (default 66MB)
disk.dataPartition.size (default 66MB)

If the emulator detects that an image file is larger than the corresponding
setting, it will do the following:

- for AVDs running from the SDK, an error message will be printed and
the emulator aborts. Note that this can only happen if there are some
serious mis-configuration of AVDs anyway.

- when launching the emulator from the Android build system, a warning
will be printed, and the partition size will be automatically adjusted
at launch.

Previously, trying to launch an over-sized system image would result in the
emulated system booting, but then failing to find certain files, depending on
how the yaffs2 disk images are built. This caused hard-to-debug issues.

Note that the option -partition-size <size> can be used to override the AVD's
setting at runtime.
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/info.c
vd/info.h
ain.c
abe0822e3cccae6098c56f4fecb029f300b9a01a 21-Aug-2009 David 'Digit' Turner <digit@google.com> Fix F2/PageUp to properly generate an emulated Menu key press.

This bug was introduced by previous changes to hw/goldfish_events_device.c
where the list of valid key scancodes reported by the kernel was restricted
to KEY_SOFT1 but not KEY_MENU.

KEY_SOFT1 is the scan-code used to represent a press of the Menu key on
the emulated device. KEY_MENU is some Linux thing that is confusingly unrelated.

Before we filtered out KEY_MENU, the framework or keymap was capable of
transforming KEY_MENU into the proper kKeyCodeMenu at runtime. But the event
filtering added in goldfish_events_device.c meant that KEY_MENU was never
passed by the kernel to user-space.

The fix is simply to generate KEY_SOFT1 for emulated Menu key presses.
harmap.h
5ad9febb1c7e08fe24413f9bd04f30d92b4cfa3a 21-Aug-2009 David 'Digit' Turner <digit@google.com> Fix EsounD audio backend and bump version number.

The original esdaudio.c file from upstream contains a nasty race condition
that can be triggered when the emulator exists while the audio record thread
is in a blocking read() call. In this case, exit() will end up calling
esd_fini_in which will try to pthread_join() the blocked thread, resulting
in a dead-lock.

This change just gets rid of the helper threads and just performs audio output
and input in the main event loop, avoiding blocking i/o completely. I haven't
experienced any difference compared to the original one, be it in audio lag
or CPU usage when playing a simple MP3 file in the emulated system.

The change also updates the update-audio.sh script since we don't store
our sources in p4 anymore. A small fix in common.sh deals removes an obsolete
special case that is not needed anymore when determining the location of the
host prebuilt binaries.

The version number is also bumped to 1.12 and CHANGES.TXT updated
accordingly.
ndroid.h
uild/common.sh
945a054848c64af7351620f09101f7a687498d34 11-Aug-2009 Xavier Ducrohet <xav@android.com> Shorten the title of the emulator to only contain very relevant info.

BUG: 2044596
ain.c
ceb00f8c44e26d948e28b7a3ccef8fd2068589d9 03-Aug-2009 Jean-Baptiste Queru <jbq@google.com> merge from donut
a69c35e9e398346ba34b7c82f56f2b5565ebabfe 30-Jul-2009 David 'Digit' Turner <digit@google.com> Add KEY_XXX values to console "event send EV_KEY:<name>:<value>"

This also modifies hw-events.c because EV_KEY has both
BTN_XXX and KEY_YYY labels that must be accounted for in the
list.
w-events.c
w-events.h
6cfe67b3b6c6827a1fca860a36bbb8cda6d2056b 26-Jul-2009 Jean-Baptiste Queru <jbq@google.com> Merge korg/donut into korg/master
d68b48725d720a06b24932b170f528929856f3db 24-Jul-2009 David 'Digit' Turner <digit@google.com> Fix ANDROID_SDK_HOME handling on Unix (the env. var was ignored)

Bump version number to 1.11 in android/android.h
Update CHANGES.TXT to reflect SDK 1.5_r3 changes
Update some comments in android/boot-properties.[hc]
Add a --debug option to android-configure.sh (and android-rebuild.sh)
to build a unoptimized debug version of the standalone emulator binary.
ndroid.h
oot-properties.c
oot-properties.h
tils/bufprint.c
c5b127050f2dbed015d6b01703a33062d6910d4a 19-Jun-2009 David 'Digit' Turner <digit@google.com> Add a new hw.lcd.density hardware property to AVD configuration files.
This value can be overriden with the already existing -dpi-device <value> option.

The value is mapped to one of 120,160 and 240, then set to the boot-time property
named qemu.sf.lcd_density used by the framework to properly select assets and/or
resize them at runtime.

This means that "emulator -dpi-device 130" will select 120 lcd_density, or
"emulator -dpi-device 220" will select a 240 one.
vd/hardware-properties.ini
vd/hw-config-defs.h
w-lcd.c
w-lcd.h
ain.c
5998b8947d8c2788b62d38afdd571ddff78648a5 11-Jun-2009 David 'Digit' Turner <digit@google.com> This fixes the hardware emulation to support several clients listening
to the "sensors" service at the same time. Each client can decide to
listen to different sensors, with different delays too.

The previous implementation only allowed a single client, which blocked
anything application that tried to read the sensors (since the framework
was already the only allowed client)

Signed-off-by: David 'Digit' Turner <digit@google.com>
w-sensors.c
46be48730333120a7b939116cef075e61c12c703 04-Jun-2009 David 'Digit' Turner <digit@google.com> Add our modified SDL sources under distrib/sdl-1.2.12
Fix distrib/make-distrib.sh script to work with git
Fix distrib/build-emulator.sh to accomodate for new SDL configure script
Handle Tiger SDK usage in SDL configure script
uild/common.sh
uild/definitions.make
ain.c
kin/window.c
tils/display-quartz.m
tils/display.c
tils/display.h
e15f24b5fc4c260bf5acbf9e4ff6331c745e5e42 01-Jun-2009 David 'Digit' Turner <digit@google.com> Bump version number and update ChangeLog
ndroid.h
8b870f0a99f484e4357b2664471eab12dadec327 26-May-2009 David 'Digit' Turner <digit@google.com> Allow emulator skins to provide a button for the "search" hardware scan-code.
This is different from using the F5 default key-binding that generates the same thing.
kin/file.c
318e4f294c181df33cf2541763904565b29bcccb 25-May-2009 David 'Digit' Turner <digit@google.com> This adds the '-prop <name>=<value>' option which is used to set
boot-time system properties from the command line. This is done
by implementing a new 'boot-properties' qemud service in the emulator.

This is to be used by the 'qemu-props' helper program that will be
invoked by /system/etc/init.goldfish.rc to read a list of system
properties from the emulator and set them in the emulated system
during boot.
oot-properties.c
oot-properties.h
mdline-option.c
mdline-option.h
mdline-options.h
elp.c
w-control.c
w-qemud.c
w-qemud.h
w-sensors.c
ain.c
377da6eeb05aed6b54935b7a45b5426077762121 24-Apr-2009 The Android Open Source Project <initial-contribution@android.com> Merge commit 'korg/donut'
fbcbf4201b9b56b72e9a06d292ae94360dd66b9e 15-Apr-2009 David Turner <> AI 146315: am: CL 146314 modify GSM emulation to accomodate 1.0 and 1.1 system images.
without this, networking doesn't work well when using the 1.1 add-on with
the cupcake sdk
Original author: digit
Merged from: //branches/cupcake/...

Automated import of CL 146315
w-qemud.c
ecd65c2ac179c55fbbbb3ba5a3348dcc0bc475dd 15-Apr-2009 David Turner <> AI 146314: modify GSM emulation to accomodate 1.0 and 1.1 system images.
without this, networking doesn't work well when using the 1.1 add-on with
the cupcake sdk
BUG=1787254

Automated import of CL 146314
w-qemud.c
ce69b78142dff44a628257804d841ad1846fc598 15-Apr-2009 The Android Open Source Project <initial-contribution@android.com> Merge commit 'korg/cupcake'
791d86195fedca3a8cba5d7fa3e3610302361a78 14-Apr-2009 David Turner <> AI 145976: am: CL 145806 Add qemud-version auto-detection logic to android/hw-qemud.c
Document the supported QEMUD services in known Android systems
Print "Press F6 to exit trackball mode..." in the window title bar when one
activates the persistent trackball mode. The actual text depends on your
key binding configuration.
Refine the skin directory auto-search paths when an AVD name is not given on the
command line. This makes the following work correctly:
tools/emulator -sysdir platforms/android-1.5/images -data foo.img
Original author: digit
Merged from: //branches/cupcake/...

Automated import of CL 145976
vd/info.c
w-qemud.c
ain.c
669c47953c86f489d2a7ce8893bc9a5e1f0620e5 14-Apr-2009 David Turner <> AI 145975: am: CL 145805 Fix a bug in android/console.c that prevented the console "redir add" command from working properly
Fix a bug in sock_address_init_resolve which caused a crashed when getaddrinfo() returned an error.
Original author: digit
Merged from: //branches/cupcake/...

Automated import of CL 145975
onsole.c
3a0c4d9eed9ba76e2744258af212b8c1269a24a5 12-Apr-2009 David Turner <> AI 145806: Add qemud-version auto-detection logic to android/hw-qemud.c
Document the supported QEMUD services in known Android systems
Print "Press F6 to exit trackball mode..." in the window title bar when one
activates the persistent trackball mode. The actual text depends on your
key binding configuration.
Refine the skin directory auto-search paths when an AVD name is not given on the
command line. This makes the following work correctly:
tools/emulator -sysdir platforms/android-1.5/images -data foo.img
BUG=1745505

Automated import of CL 145806
vd/info.c
w-qemud.c
ain.c
850869d21220b9d5d14c45dd39e253f5a6f43080 12-Apr-2009 David Turner <> AI 145805: Fix a bug in android/console.c that prevented the console "redir add" command from working properly
Fix a bug in sock_address_init_resolve which caused a crashed when getaddrinfo() returned an error.
BUG=1769061,1780001

Automated import of CL 145805
onsole.c
0f77b3a9904ef77bbfd4ed3d8ca964bc38a90f95 05-Apr-2009 David Turner <> AI 144595: Fix the AVD configuration code to support "sdcard.path" in config.ini to indicate an explicit SD Card image file (instead of using the one in the content directory)
Note that this also fix a bug where the SD Card image was not properly locked in the previous implementation.
Allow the http-proxy support code to actually manage to receive chunked encoding data, instead of complaining needlessly.
Introduce a new CharBuffer object that is used indirectly by "-radio <hostdevice>" and "-gps <hostdevice>" options
Add new documentation for QEMUD and CharDriverState objects
Update the Audio documentation with ASCII graphics (because I'm an artist too)
BUG=1750126,1731936

Automated import of CL 144595
vd/info.c
w-qemud.c
w-qemud.h
fff1ae51e389c25e2b19cd087c5e19cd27d40163 05-Apr-2009 David Turner <> AI 144596: am: CL 144595 Fix the AVD configuration code to support "sdcard.path" in config.ini to indicate an explicit SD Card image file (instead of using the one in the content directory)
Note that this also fix a bug where the SD Card image was not properly locked in the previous implementation.
Allow the http-proxy support code to actually manage to receive chunked encoding data, instead of complaining needlessly.
Introduce a new CharBuffer object that is used indirectly by "-radio <hostdevice>" and "-gps <hostdevice>" options
Add new documentation for QEMUD and CharDriverState objects
Update the Audio documentation with ASCII graphics (because I'm an artist too)
Original author: digit
Merged from: //branches/cupcake/...

Automated import of CL 144596
vd/info.c
w-qemud.c
w-qemud.h
a780727a390971e6cdc11cbe82c6a66052498212 28-Mar-2009 David Turner <> AI 143179: am: CL 142901 Avoid a segmentation fault in the emulator when trying to use an AVD while
ANDROID_PRODUCT_OUT is not defined. Argh..
Original author: digit
Merged from: //branches/cupcake/...

Automated import of CL 143179
vd/info.c
543053775a4375b1f1901eeeef749270a10f8734 27-Mar-2009 The Android Open Source Project <initial-contribution@android.com> Merge commit 'korg/cupcake'
84adcaa1435d78778250b819763429dc332c7b44 26-Mar-2009 David Turner <> Automated import from //branches/cupcake/...@142901,142901
vd/info.c
b58c44e55548129243185ef5927bd3abb5903044 25-Mar-2009 David Turner <> Automated import from //branches/donutburger/...@142528,142528
vd/info.c
mdline-options.h
elp.c
ain.c
eef8d85e91a28678d710458f57defe242b522da3 25-Mar-2009 David Turner <> Automated import from //branches/cupcake/...@142527,142527
vd/info.c
mdline-options.h
elp.c
ain.c
9877e2e3e3c2df64de306b48f80a4f5d0b028d95 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
vd/hardware-properties.ini
vd/hw-config-defs.h
w-control.c
w-qemud.c
w-qemud.h
w-sensors.c
w-sensors.h
ain.c
emud.c
emud.h
kin/window.c
tils/debug.h
d0cdbf4c54bae19971050434396853f15844a4bb 18-Mar-2009 Jean-Baptiste Queru <jbq@google.com> Merge commit 'remotes/korg/cupcake' into merge
b3ee93a038ab992ffdda9f232befdea6ea713b24 13-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@138607
vd/hardware-properties.ini
vd/hw-config-defs.h
mdline-options.h
elp.c
ain.c
b059facee5eb498c78c573617c62cc13eddc8644 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
vd/hardware-properties.ini
vd/hw-config-defs.h
harmap.h
ain.c
kin/keyboard.c
kin/window.c
92c7311b1cb354745ec7b59b0e03910b3fe4c205 05-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@136594
vd/info.c
ain.c
tils/path.c
8b23a6c7e1aee255004dd19098d4c2462b61b849 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ndroid.h
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/hw-config.c
vd/hw-config.h
vd/info.c
vd/info.h
uild/binary.make
uild/clear_vars.make
uild/definitions.make
uild/getdir.make
uild/host_executable.make
uild/host_static_library.make
uild/mkdeps.sh
harmap.c
harmap.h
mdline-option.c
mdline-option.h
mdline-options.h
onfig.c
onfig.h
onfig/Linux/config-host.h
onfig/check-alsa.c
onfig/check-esd.c
onfig/config.h
onfig/darwin-ppc/config-host.h
onfig/darwin-x86/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
onsole.c
lobals.h
ps.c
ps.h
elp.c
elp.h
w-control.c
w-control.h
w-events.c
w-events.h
w-kmsg.c
w-kmsg.h
cons.h
ain.c
emud.c
emud.h
esource.c
esource.h
kin/argb.h
kin/composer.c
kin/composer.h
kin/default.h
kin/file.c
kin/file.h
kin/image.c
kin/image.h
kin/keyboard.c
kin/keyboard.h
kin/keyset.c
kin/keyset.h
kin/rect.c
kin/rect.h
kin/region.c
kin/region.h
kin/scaler.c
kin/scaler.h
kin/surface.c
kin/surface.h
kin/trackball.c
kin/trackball.h
kin/window.c
kin/window.h
ools/gen-hw-config.py
ser-config.c
ser-config.h
tils/bufprint.c
tils/bufprint.h
tils/debug.c
tils/debug.h
tils/dirscanner.c
tils/dirscanner.h
tils/display-quartz.m
tils/display.c
tils/display.h
tils/filelock.c
tils/filelock.h
tils/ini.c
tils/ini.h
tils/misc.c
tils/misc.h
tils/path.c
tils/path.h
tils/reflist.c
tils/reflist.h
tils/stralloc.c
tils/stralloc.h
tils/system.c
tils/system.h
tils/tempfile.c
tils/tempfile.h
tils/timezone.c
tils/timezone.h
f721e3ac031f892af46f255a47d7f54a91317b30 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ndroid.h
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/hw-config.c
vd/hw-config.h
vd/info.c
vd/info.h
uild/binary.make
uild/clear_vars.make
uild/definitions.make
uild/getdir.make
uild/host_executable.make
uild/host_static_library.make
uild/mkdeps.sh
harmap.c
harmap.h
mdline-option.c
mdline-option.h
mdline-options.h
onfig.c
onfig.h
onfig/Linux/config-host.h
onfig/check-alsa.c
onfig/check-esd.c
onfig/config.h
onfig/darwin-ppc/config-host.h
onfig/darwin-x86/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h
onsole.c
lobals.h
ps.c
ps.h
elp.c
elp.h
w-control.c
w-control.h
w-events.c
w-events.h
w-kmsg.c
w-kmsg.h
cons.h
ain.c
emud.c
emud.h
esource.c
esource.h
kin/argb.h
kin/composer.c
kin/composer.h
kin/default.h
kin/file.c
kin/file.h
kin/image.c
kin/image.h
kin/keyboard.c
kin/keyboard.h
kin/keyset.c
kin/keyset.h
kin/rect.c
kin/rect.h
kin/region.c
kin/region.h
kin/scaler.c
kin/scaler.h
kin/surface.c
kin/surface.h
kin/trackball.c
kin/trackball.h
kin/window.c
kin/window.h
ools/gen-hw-config.py
tils/bufprint.c
tils/bufprint.h
tils/debug.c
tils/debug.h
tils/dirscanner.c
tils/dirscanner.h
tils/display-quartz.m
tils/display.c
tils/display.h
tils/filelock.c
tils/filelock.h
tils/ini.c
tils/ini.h
tils/misc.c
tils/misc.h
tils/path.c
tils/path.h
tils/reflist.c
tils/reflist.h
tils/stralloc.c
tils/stralloc.h
tils/system.c
tils/system.h
tils/tempfile.c
tils/tempfile.h
tils/timezone.c
tils/timezone.h
bae1bc39312d5019bd9a5b8d840a529213a69a17 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
vd/info.c
vd/info.h
mdline-options.h
elp.c
ain.c
ser-config.c
ser-config.h
tils/ini.c
tils/ini.h
tils/path.c
tils/path.h
ee2298a313b6e425d6ff0324be6a313b1cd9a399 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
vd/info.c
vd/info.h
mdline-options.h
elp.c
ain.c
ser-config.c
ser-config.h
tils/ini.c
tils/ini.h
tils/path.c
tils/path.h
6ea48cda17efbcaeae48a5c90107a7e97d495fd9 16-Feb-2009 Adrian Taylor <adrian@macrobug.com> Fixing emulator crash on Win32.

This fixes a crash when starting the emulator on Win32 after it has
been built using 'make_windows_sdk.sh' and when the ANDROID_PRODUCT_OUT
variable is not defined.

The bug is discussed at
http://code.google.com/p/android/issues/detail?id=1999

and the fix is proposed by David Turner at
http://groups.google.com/group/android-platform/browse_thread/thread/91b12cc73aae98ae

This patch just includes the proposed fix. I have confirmed it fixes
the problem for me. The same code built as a Linux emulator also
continues to work. I have been unable to test on Darwin as I don't have
a handy OS X machine.
tils/dirscanner.c
d944e7a273e10cb40d795bdc25503b97ee60ae66 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
vd/info.c
c27f813900a3c114562efbb8df1065e94766fc48 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
ndroid.h
vd/hardware-properties.ini
vd/hw-config-defs.h
vd/hw-config.c
vd/hw-config.h
vd/info.c
vd/info.h
uild/binary.make
uild/definitions.make
uild/mkdeps.sh
harmap.c
harmap.h
mdline-option.c
mdline-option.h
mdline-options.h
onfig.c
onfig.h
onfig/Linux/config-host.h
onsole.c
lobals.h
ps.c
ps.h
elp.c
elp.h
w-control.c
w-control.h
w-events.c
w-events.h
w-kmsg.c
w-kmsg.h
cons.h
ain.c
emud.c
emud.h
esource.c
esource.h
kin/argb.h
kin/composer.c
kin/composer.h
kin/default.h
kin/file.c
kin/file.h
kin/image.c
kin/image.h
kin/keyboard.c
kin/keyboard.h
kin/keyset.c
kin/keyset.h
kin/rect.c
kin/rect.h
kin/region.c
kin/region.h
kin/scaler.c
kin/scaler.h
kin/surface.c
kin/surface.h
kin/trackball.c
kin/trackball.h
kin/window.c
kin/window.h
ools/gen-hw-config.py
tils/bufprint.c
tils/bufprint.h
tils/debug.c
tils/debug.h
tils/dirscanner.c
tils/dirscanner.h
tils/display-quartz.m
tils/display.c
tils/display.h
tils/filelock.c
tils/filelock.h
tils/ini.c
tils/ini.h
tils/misc.c
tils/misc.h
tils/path.c
tils/path.h
tils/reflist.c
tils/reflist.h
tils/stralloc.c
tils/stralloc.h
tils/system.c
tils/system.h
tils/tempfile.c
tils/tempfile.h
tils/timezone.c
tils/timezone.h
m/hardware-properties.ini
m/hw-config-defs.h
m/hw-config.c
m/hw-config.h
m/info.c
m/info.h
1874f27ee24391532969a0bf3c861991e8c54649 20-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127101
tils/ini.c
0724eefc1939d32ff3c1c00a47ca6b8cccff1edd 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
m/info.c
c2db2b6accc7888df514261a7240e7759df95a4c 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
uild/definitions.make
uild/host_executable.make
tils/ini.c
tils/ini.h
m/info.c
df7881f07f53b041dc0568be8528e9dbb74994cc 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
uild/binary.make
uild/clear_vars.make
uild/definitions.make
uild/getdir.make
uild/host_executable.make
uild/host_static_library.make
uild/mkdeps.sh
onfig/check-alsa.c
onfig/check-esd.c
lobals.h
ools/gen-hw-config.py
tils/debug.h
tils/dirscanner.c
tils/dirscanner.h
tils/ini.c
tils/ini.h
m/hardware-properties.ini
m/hw-config-defs.h
m/hw-config.c
m/hw-config.h
m/info.c
m/info.h
55f4e4a5ec657a017e3bf75299ad71fd1c968dd3 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
onfig/config.h
onfig/darwin-ppc/config-host.h
onfig/darwin-x86/config-host.h
onfig/linux-x86/config-host.h
onfig/windows/config-host.h