| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ibfd85c3e351caef89ae57630c824255f29f47914
|
|
|
|
|
|
|
|
|
|
| |
Quite often (especially on older XP machines) attempts to allocate large VM RAM is
going to fail, and crash the emulator. Since it's failing deep inside QEMU, it's
not really possible to provide the user with a meaningful explanation for the crash.
So, before initializing VM we should check if QEMU is going to be able to allocate
requested amount of RAM, and if not, try to come up with a recomendation.
Change-Id: Id6213d50c70f6bd3b32c4df2ded96d8e3013ec40
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I59c9e58c568a70855783e57514fec80b711d6a64
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
pc-bios was recently moved to new directory. Change emulator to
search in new path in standalone mode (built in external/qemu
and run from external/qemu/objs). To be specific, change
../../../prebuilt/common/pc-bios/
to
../../../prebuilts/qemu-kernel/x86/pc-bios/
Change-Id: Id79534349394c9b47f8ef5dda76f2a21268b58fe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
Compiler throws warnings that 'dhport/dlport' may be used uninitialized, which creates
a lot of noise when compiling the emulator. The way the variables are used and initialized
makes it completely safe to ignore these warnings.
Change-Id: I87c9930c73bb8d54a86e826ca23b32010fbc046f
|
| |
| |
| | |
This reverts commit 2f4361f1d63751f1f72e1a1f953acfb9c05727da
|
|/
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I311dc55fe10f41637775baa330a7c732ff317f51
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checking HAXM capability to check if emulator can use HAXM virtalization.
Currently two possibility that HAXM not work. Firstly is VT/NX is not enabled
in the system, seconly is HAXM have used up the memory quota. See code comemnts
for the memry quota explaination.
Checking the capability in advance can give user more information that why HAXM
is not working and be more user friendly.
Change-Id: I13f73734cf783398f485fabd19cce43364b571c3
Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
Signed-off-by: Gao, Fengqian <fengqian.gao@intel.com>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HAX (Hardware-based Accelerated eXecution) employes hardware virtualization
technology to boost performance of the Android emulator on Mac OS X or Windows
hosts.
This changeset includes the changes required to the existing files. To pass
the compilation, hax.h is added, but CONFIG_HAX is disabled so that no
real changes added.
Change-Id: Ifa5777e8788e6698747c1ec4cd91315161c2ca0b
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I9221916514a39435d2710fa9dada92a87bdc4dab
|
|
|
|
|
|
| |
-webcam name=<name>[,dir=<direction>] options controls web cameras to use for emulation.
Change-Id: I961fd399c7e041541adda040dd24f194cc383cb9
|
|
|
|
|
|
|
| |
- Enable / Disable fake camera
- Set fake camera facing direction: back, or front
Change-Id: Iab741a694daf2bf752e91e23df566a83ac7a97e7
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This is done to allow for future integration of the
upstream auto-generated "trace.h" header file.
Change-Id: I9d1bba3320d9e8acfd7359540d3ed6695773061e
|
|
|
|
| |
Change-Id: I49e96e2d5ae571849b0b6fef0a30b41ecdee8d23
|
|
|
|
| |
Change-Id: I4908006f3492aab199466c501dedff2bd835d647
|
|
|
|
| |
Change-Id: Ib422f24224c2e75dd126689c67dbbb187d7c1670
|
|
|
|
|
|
| |
Also fixes a bug in os-posix.c
Change-Id: If2c6fb94d3e48d1db051aa9141dc2f69bdca35a8
|
|
|
|
| |
Change-Id: I28d2025dfa1f7bfc1ab2318f5ff6c0fd56f4b658
|
|
|
|
| |
Change-Id: I8f93e06038bd6e35a2972e3fef351046c247e4ee
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I6856ded73b4dcd10fe4831697c8518f958aeffbb
|
|
|
|
|
|
| |
+ Generate qemu-options.def instead of qemu-options.h
Change-Id: I043e6b0c1c58e5cc2e96d05465f39b42f9054b5a
|
|
|
|
| |
Change-Id: Iaf5221814247d7686ec3d57abeab097b09c6a5dd
|
|
|
|
|
|
|
|
| |
This fixes the algorithm used to search the PC Bios files.
Moreover, this makes standalone builds under external/qemu
just work by looking under prebuilt/common/pc-bios
Change-Id: I4619565d57dc5a5b75333f6459f5bfc32b81e918
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a small bug where the audio backend given with
the -audio <name> option was ignored. The bug was introduced during
a previous integration of upstream audio changes.
The old code always used the same default backend (PulseAudio).
Change-Id: I7bc68df3fd3025f8a8bd1f0fd868872b7eee2017
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the routine that looks for the x86 BIOS
file(s) when running from the build tree (i.e. typing
'emulator' just after building the full_x86-eng product).
Turns out that the files are installed under
out/host/<system>/usr/share/pc-bios by our build scripts.
Change-Id: I51ae849d5cdf130558d05f2386c4175dfea1e054
|
|
|
|
|
|
|
|
|
| |
It looks like we also need to set the 'cache' property to 'unsafe'
when initializing the SDCard block device. Otherwise it will be
mounted as O_DIRECT, making all i/o operations on the SD Card
extremely slow.
Change-Id: Id1a72f926c73dc6981a568f005f19cfc50f724d5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that the 'snapshot' property must be turned on on
the block device corresponding to the snapshot storage file.
Otherwise, the file is mounted O_DIRECT, which on my speedy machine
limits the operation to a max of about 2.5 MB/s. This explains why
saving snapshots was so pathetic.
With this change, the save throughput is up to 278 MB/s on the same
machine!
Change-Id: I77c792114171a4ecaf3e3f08f64d8b3a30709f23
|
|
|
|
|
|
| |
+ Rename android/pipe-net.c to android/hw-pipe-net.c
Change-Id: Ia2e2466c3bf3ea812f36639420fad7ce2e0cb61d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I14c03c193166c214ce406a3dc524b8dfa16fa733
|