aboutsummaryrefslogtreecommitdiffstats
path: root/android/avd
Commit message (Collapse)AuthorAgeFilesLines
* Implement ADB communication over QEMU pipeVladimir Chtchetkine2011-12-134-0/+44
| | | | Change-Id: I62ff5898c7a955aaaa8af8f7ee7ed018af860f80
* Implements sensors emulation using a connected Android deviceVladimir Chtchetkine2011-11-091-0/+21
| | | | | | | | | | | | | | 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
* New AVD property to control presence of hw main keys.Xavier Ducrohet2011-10-041-4/+9
| | | | | | | | 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
* Check that first two cameras are facing in opposite direction.Vladimir Chtchetkine2011-09-231-1/+3
| | | | | | | 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
* Add -webcam commandline option to control webcam emulationVladimir Chtchetkine2011-09-201-0/+104
| | | | | | -webcam name=<name>[,dir=<direction>] options controls web cameras to use for emulation. Change-Id: I961fd399c7e041541adda040dd24f194cc383cb9
* Add cmdline param to control fake camera emulationVladimir Chtchetkine2011-09-131-0/+8
| | | | | | | - Enable / Disable fake camera - Set fake camera facing direction: back, or front Change-Id: Iab741a694daf2bf752e91e23df566a83ac7a97e7
* Add hw.gpu.enabled hardware propertyDavid 'Digit' Turner2011-08-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-223-0/+37
| | | | | | | | | | | | | 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
* merge from tools_r13The Android Open-Source Project2011-08-113-37/+0
|\ | | | | | | Change-Id: Iabd0b49a5c3ad991da1b4f636ecdf881b1c271aa
| * Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-113-37/+0
| | | | | | | | | | | | | | | | properties". do not merge. This reverts commit f490aee025b3bab5bcdb065e5fc1b1abecf16b97. Change-Id: I59a0b2aebc8ab2b788a820a206c6eb4fc6e6e6d2
| * Merge c80340 from master to r13: Move charmap to hardware propertiesDavid 'Digit' Turner2011-08-053-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix -sysdir handling.David 'Digit' Turner2011-08-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Move charmap to hardware propertiesDavid 'Digit' Turner2011-07-073-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | hw-config-defs.h: Remove from source tree + auto-generateDavid 'Digit' Turner2011-07-051-305/+0
| | | | | | | | | | | | | | | | | | | | | | 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
* | Fix -sysdir handling.David 'Digit' Turner2011-06-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | arm: Automic ARMv7-A support for platform builds.David 'Digit' Turner2011-06-164-2/+58
|/ | | | | | | | | | | | | | | | | 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
* Update desc on hw.lcd.density to include 213/320Xavier Ducrohet2011-06-101-1/+1
| | | | Change-Id: Ib5f7644242c9f02f3a8eed51aa1d24d1e98ff2aa
* Fix ANDROID_SDK_HOME handling.David 'Digit' Turner2011-05-041-12/+5
| | | | | | | | | 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
* Add 'emulator' launcher program.David 'Digit' Turner2011-05-025-220/+397
| | | | | | | | | | | | | | | | | | | | | | | 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
* Add support for hw.lcd.backlightTim Wan2011-04-152-0/+16
| | | | Change-Id: I02dc12caa76c86de5d294b6fc857ae37b74f0130
* Set hw.keyboard.lid default value to false for API level >= 12David 'Digit' Turner2011-03-225-59/+287
| | | | | | | | | | | | | | | | | | | | | 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
* Move AVD name initialization to the core.David 'Digit' Turner2011-03-012-0/+15
| | | | | | | Use a hardware property to send the AVD name to the core. The -android-avdname core option is still supported though. Change-Id: I4daac5c9fb65ed5261b5c04c1e1a18daed057a3f
* Move data partition initialization to core.David 'Digit' Turner2011-03-012-465/+17
| | | | Change-Id: I3c2b4668593391026da028194503fc87246e44ba
* Move system image initialization to core.David 'Digit' Turner2011-03-014-56/+38
| | | | Change-Id: Ic8da3ccaed9bab7dbb44c0bb341b0dba20b90980
* Move snapshot storage initialization to the core.David 'Digit' Turner2011-03-014-26/+16
| | | | Change-Id: I2c2b782fe4711cc8c323433e7976222b878cf679
* Move the SD Card initialization to the core.David 'Digit' Turner2011-03-014-32/+37
| | | | Change-Id: I2c8fa2a7df3d79ed4222296a93b787994a8ee11d
* Move cache partition initialization to core.David 'Digit' Turner2011-03-012-33/+19
| | | | Change-Id: I1f887e6f8fc38e43b1fff3f7bab3814b52542762
* Move kernel/ramdisk initialization to the core.David 'Digit' Turner2011-03-014-42/+80
| | | | | | | The QEMU -kernel, -initrd and -append options are still supported for overriding the hardware configuration. Change-Id: I034d9e25d0a23341086aa052f449db5de50b2c8d
* Rework AvdInfo processing.David 'Digit' Turner2011-03-012-516/+618
| | | | | | | | | | | | | | | | | | | | | 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
* Remove CONFIG_ANDROID_SNAPSHOTS macro.David 'Digit' Turner2011-03-012-16/+1
| | | | | | The feature is no longer optional. Change-Id: I4558f12e3804e42069e8a3e6bcf0837d350206ed
* Remove target-specific hard-coded macro.David 'Digit' Turner2011-02-231-8/+74
| | | | | | | | | | | | | | | 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
* Stuff hardware configuration with paths to image / partition filesVladimir Chtchetkine2011-02-222-0/+153
| | | | Change-Id: Id26cd578fc3faf1fee1a55f4999c3613e47c0e96
* Add hw.keyboard.lidDavid 'Digit' Turner2011-02-103-4/+21
| | | | | | | | | | | 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
* Correct auto-detection of default VM heap size.David 'Digit' Turner2011-02-102-2/+5
| | | | | | | | | | | | 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
* Get rid of -android-gui core option.David 'Digit' Turner2011-02-102-0/+38
| | | | | | | | | 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
* Write the core hardware configuration file to AVD's content directory.David 'Digit' Turner2011-02-102-17/+54
| | | | | | | | | | | | | 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
* Revert "Build arm and x86 binaries at the same time."Xavier Ducrohet2011-02-092-10/+12
| | | | | | This fails to build on MacOS X This reverts commit a39b10bd2574825a815d6ad854499dd127cfa9cb.
* Build arm and x86 binaries at the same time.David 'Digit' Turner2011-02-102-12/+10
| | | | Change-Id: I105c5a097c988cb964b47b40b71c7a08af0d9210
* x86: Add x86 support. Rebase the change (20906/1) due to a minor conflict.Jun Nakajima2011-02-021-0/+5
| | | | | | | 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>
* Merge "Create user data image using the initial user data image"David Turner2011-02-011-1/+0
|\
| * Create user data image using the initial user data imageOrjan Percy2011-01-281-1/+0
| | | | | | | | | | | | | | | | | | | | 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
* | Generate temporary hardware.ini from configuration settings.David 'Digit' Turner2011-02-012-0/+27
|/ | | | | | | | | 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.
* Compute default memory size from screen size.David 'Digit' Turner2011-01-192-2/+2
| | | | | | | | 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
* Merge "Adding proximity sensor simulation"David Turner2011-01-182-0/+14
|\
| * Adding proximity sensor simulationOla Albertsson2010-12-172-0/+14
| | | | | | | | | | | | | | 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
* | Make the emulator find the skins in their new location.Xavier Ducrohet2011-01-071-1/+1
|/ | | | Change-Id: Ib5c43306376e51a2a0866868f990ca8c8899ae7a
* Load state snapshot rather than booting to start emulator.Ot ten Thije2010-10-222-23/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* When running from the Android build system and no skin is definedJeff Hamilton2010-04-271-3/+18
| | | | | | on the command line check for a skin in $ANDROID_PRODUCT_OUT/skin. Change-Id: I776aa481b38bd4e48982fdb5c032a10c970576a8
* Revert previous patch to fix SD Card emulationDavid 'Digit' Turner2010-04-152-40/+23
| | | | | | | | | | | 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
* Automatically parse a file named 'hardware.ini' if it is foundDavid 'Digit' Turner2010-04-061-0/+35
| | | | | | in the skin directory, and we are using the Android build system. Change-Id: I62480314f73ae60e769c113d6e4421e9946bb818