aboutsummaryrefslogtreecommitdiffstats
path: root/android
Commit message (Collapse)AuthorAgeFilesLines
* Publish and use libOpenglRender interface headerJesse Hall2012-04-181-31/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixes debug output using an unitialized string buffer.Vladimir Chtchetkine2012-04-121-1/+1
| | | | Change-Id: I1fee7e9f70600da4540744aa11f927bfc9c759e1
* Enable multi-touch emulation with -gpu onVladimir Chtchetkine2012-04-116-34/+131
| | | | | | | | | | | | | | | | 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
* Implements SDKCtlSocket that implements communication protocol wih SdkControllerVladimir Chtchetkine2012-04-069-63/+2354
| | | | | | | In addition, this CL contains some minor tweaks to async-socket, and async-socket-connector that improve tracebility. Change-Id: Ib1309b19dcd02e96379155fea7015019d93160e7
* Make all async I/O object referenced.Vladimir Chtchetkine2012-04-036-79/+316
| | | | | | | | | 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
* Refactor asynchronous socket APIsVladimir Chtchetkine2012-04-025-437/+527
| | | | | | | | | | | | | | | 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
* Implements asynchronous socket APIVladimir Chtchetkine2012-03-293-0/+1283
| | | | | | | | | | | 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
* Fixes bug in qlooptimer_startAbsolute for qemu-looperVladimir Chtchetkine2012-03-281-1/+1
| | | | | | | 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
* Merge "Implements an asynchronous socket connector with retries"Vladimir Chtchetkine2012-03-283-0/+481
|\
| * Implements an asynchronous socket connector with retriesVladimir Chtchetkine2012-03-273-0/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "EmuGL: Add OnPost callback to OpenGL renderer"Jesse Hall2012-03-262-5/+11
|\ \ | |/ |/|
| * EmuGL: Add OnPost callback to OpenGL rendererJesse Hall2012-03-222-5/+11
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "New option '-force-32bit' to always use 32-bit emulator on 64-bit ↵Andrew Hsieh2012-03-223-15/+33
|\ \ | | | | | | | | | platforms"
| * | New option '-force-32bit' to always use 32-bit emulator on 64-bit platformsAndrew Hsieh2012-03-223-15/+33
| | | | | | | | | | | | | | | | | | Useful for both QA and trouble-shooting Change-Id: I09eac8b94e29e8a201188bf17d3511c15cfee4b4
* | | Merge "Revert "EmuGL: Add OnPost callback to OpenGL renderer""Jesse Hall2012-03-222-11/+5
|\ \ \
| * | | Revert "EmuGL: Add OnPost callback to OpenGL renderer"Jesse Hall2012-03-222-11/+5
| | | | | | | | | | | | This reverts commit 2f4361f1d63751f1f72e1a1f953acfb9c05727da
* | | | Merge "EmuGL: Add OnPost callback to OpenGL renderer"Jesse Hall2012-03-222-5/+11
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | EmuGL: Add OnPost callback to OpenGL rendererJesse Hall2012-03-222-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Use enum where appropriate in hw.iniVladimir Chtchetkine2012-03-211-3/+8
|/ / | | | | | | Change-Id: I8a85de939a89d373724cfb977141ca01e7d1ff34
* | Add 'enum' entry type to hw.ini fileVladimir Chtchetkine2012-03-211-2/+17
| | | | | | | | | | | | 'entry' type enumerates values that are allowed for the given type name. Change-Id: Ic0f4021f761dfd78ff4dd9d2b58a2d811109b3c6
* | Revert "Support 'enum' type in hardware-properties.ini file"Vladimir Chtchetkine2012-03-211-60/+3
|/ | | This reverts commit 1d57949ea5bae66b27febc2edcfc7ae0f10be716
* Support 'enum' type in hardware-properties.ini fileVladimir Chtchetkine2012-03-201-3/+60
| | | | | | | | | | | | | | | | | | | 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
* Fixes a hack that initialized event socket for async I/OVladimir Chtchetkine2012-03-191-28/+35
| | | | | | This CL provides proper handling for event socket async I/O initialization. Change-Id: If02894a63e943c7f3db8efbab0713ed2861ecb38
* Refactor HW config to use hw.camera_back, and hw.camera_front properties.Vladimir Chtchetkine2012-03-195-355/+109
| | | | | | | | | | 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
* Cleanup harware properties.Vladimir Chtchetkine2012-03-196-44/+42
| | | | | | | 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
* Fixes a hack that was enabling multi-touch emulation on Mac.Vladimir Chtchetkine2012-03-161-48/+23
| | | | | | | | 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
* Merge "64-bit emulator"Andrew Hsieh2012-03-1613-29/+141
|\
| * 64-bit emulatorAndrew Hsieh2012-03-1313-29/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix emulator crash on sensor emulation.Vladimir Chtchetkine2012-03-151-0/+20
| | | | | | | | | | | | | | The reason for crash is that event socket's I/O looper has been used without being properly initialized. Change-Id: I4f6372a4c2e54d5ea80313eda5208da17fc84d1d
* | Merge "Fix snapshot autoconfig"Vladimir Chtchetkine2012-03-143-1/+19
|\ \ | |/ |/|
| * Fix snapshot autoconfigVladimir Chtchetkine2012-03-143-1/+19
| | | | | | | | | | | | | | | | | | | | 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
* | Increase default partition size, and fix data partition size calculation.Vladimir Chtchetkine2012-03-081-2/+2
|/ | | | | | | | | | | 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
* Merge "Multi-touch emulation support"Vladimir Chtchetkine2012-03-0513-24/+1479
|\
| * Multi-touch emulation supportVladimir Chtchetkine2012-03-0513-24/+1479
| | | | | | | | Change-Id: I311dc55fe10f41637775baa330a7c732ff317f51
* | Set value of hw.keyboard "no".SeongJae Park2012-03-021-1/+1
|/ | | | | | | | | | | | | | | | | | 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>
* Enables ADBD tracing in emulator.Vladimir Chtchetkine2012-02-272-1/+99
| | | | | | | | | | 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
* Fixes camera RTE on WindowsVladimir Chtchetkine2012-02-221-1/+15
| | | | | | | | | 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
* Stop emulator when both, gpu and snapshots are on.Vladimir Chtchetkine2012-02-101-0/+9
| | | | | | | 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
* Fix problem with using clipboard in Windows camera emulationVladimir Chtchetkine2012-02-021-20/+140
| | | | | | | | | | | | | | | 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
* Implement asynchronous data send over 'event' socket.Vladimir Chtchetkine2012-01-302-2/+229
| | | | Change-Id: Ifce399aec98540fca4e1cca8c3599142d9ff6887
* Merge "Expand the ways how a query can be sent to Android device."Vladimir Chtchetkine2012-01-262-0/+70
|\
| * Expand the ways how a query can be sent to Android device.Vladimir Chtchetkine2012-01-252-0/+70
| | | | | | | | | | | | | | | | 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
* | Merge "New files to add HAX support"Jean-Baptiste Queru2012-01-241-0/+11
|\ \ | |/ |/|
| * New files to add HAX supportJun Nakajima2012-01-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Refactor camera parameters parsing routinesVladimir Chtchetkine2012-01-233-170/+187
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "Check for data partition init path on snapshot load."Vladimir Chtchetkine2012-01-191-0/+8
|\ \
| * | Check for data partition init path on snapshot load.Vladimir Chtchetkine2012-01-191-0/+8
| |/ | | | | | | | | | | | | | | 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
* | Fixed typo in emulator -help-build-imagesAndrew Hsieh2012-01-181-2/+2
|/ | | | | | | 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
* Respect HW configs when loading VM from snapshots.Vladimir Chtchetkine2012-01-135-8/+280
| | | | | | | | | | | | | | 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
* Don't display warning when emulator is unable to connect to device.Vladimir Chtchetkine2012-01-101-1/+3
| | | | | | | | | | 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