Commit Graph

49607 Commits

Author SHA1 Message Date
Colin Cross
8a9a2e24db am d5fe844b: Merge "Use /(vendor|system)/lib64/egl for 64-bit EGL libraries"
* commit 'd5fe844b41778bf87101fc0a0e4e37e779678c50':
  Use /(vendor|system)/lib64/egl for 64-bit EGL libraries
2014-02-18 20:21:35 +00:00
Colin Cross
d5fe844b41 Merge "Use /(vendor|system)/lib64/egl for 64-bit EGL libraries" 2014-02-18 20:14:41 +00:00
Dan Willemsen
8edb8f5f2d Use /(vendor|system)/lib64/egl for 64-bit EGL libraries
Change-Id: Ie64806bfe4ba60a3167b84685cf983d4ada1042d
2014-02-16 10:29:40 -08:00
Arve Hjønnevåg
11cfdccfd3 Binder: Disable attemptIncStrongHandle
The driver does not support BC_ATTEMPT_ACQUIRE and will return an error.
IPCThreadState does not handle driver errors, and will resend the failed
command blocking all other commands.

Change-Id: I643986037341821b27b62dc82df933844f4842b8
2014-02-14 20:18:13 -08:00
Arve Hjønnevåg
f50b9eaaee Binder: Make sure binder objects do not overlap
Fixes crashing part of bug 11355082.
The driver still leaks references.

Change-Id: Ibc6a63b151c1fc1f7666237f25255ba781e02071
2014-02-15 03:44:17 +00:00
Colin Cross
ff75a8000c libagl: support multilib build
Use LOCAL_SRC_FILES_arch and LOCAL_CFLAGS_arch to support building
for multiple architectures.

Change-Id: I829c1bea880739bf8184df4006d0a481ffccc5c2
2014-02-14 17:29:22 -08:00
Dianne Hackborn
b37b312b82 am 7d86b454: Merge "frameworks/native: move idmap to frameworks/base"
* commit '7d86b45472898373bbe3ef03286b66d71ea82b79':
  frameworks/native: move idmap to frameworks/base
2014-02-14 01:54:37 +00:00
Dianne Hackborn
7d86b45472 Merge "frameworks/native: move idmap to frameworks/base" 2014-02-14 01:45:28 +00:00
Nick Kralevich
0e4d2885a3 am 2044ac43: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
* commit '2044ac43e53b517526b3c70dc4fbc60ffc01693f':
  Convert all selinux_android_restorecon and _setfilecon calls to new API.
2014-02-12 23:15:07 +00:00
Nick Kralevich
2044ac43e5 Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API." 2014-02-12 23:09:45 +00:00
Colin Cross
07a4728150 frameworks/native: move idmap to frameworks/base
idmap depends on libandroidfw, so it should go in frameworks/base.

Change-Id: Ieee30ba9d8170d3118acc89f0617981228a6974b
2014-02-11 18:04:03 -08:00
Jeff Brown
eac45b8a53 am ed4d28dd: Add method to apply offset to PointerCoords. (DO NOT MERGE)
* commit 'ed4d28dd70448b13eb74a3166ec8d1c1a530e2d4':
  Add method to apply offset to PointerCoords.  (DO NOT MERGE)
2014-02-12 00:26:19 +00:00
Jeff Brown
ed4d28dd70 Add method to apply offset to PointerCoords. (DO NOT MERGE)
Change-Id: I3dc2ba22b026e5b8e1c3d90f7366ec09a59ce6b6
2014-02-11 14:43:19 -08:00
Dianne Hackborn
6e5fdb1551 am 6c14f0ad: Merge "Runtime resource overlay, iteration 2"
* commit '6c14f0ad82be418c742e56fe586657ea0f394b05':
  Runtime resource overlay, iteration 2
2014-02-11 21:41:23 +00:00
Dianne Hackborn
6c14f0ad82 Merge "Runtime resource overlay, iteration 2" 2014-02-11 21:27:36 +00:00
Dianne Hackborn
99188064fd am 340aa8cb: Merge "New command line tool \'idmap\'"
* commit '340aa8cbd4afbb68b16f369336cc1c202582f021':
  New command line tool 'idmap'
2014-02-11 20:35:42 +00:00
Dianne Hackborn
340aa8cbd4 Merge "New command line tool 'idmap'" 2014-02-11 20:29:56 +00:00
Stephen Smalley
26288202e7 Convert all selinux_android_restorecon and _setfilecon calls to new API.
libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-02-07 09:36:11 -05:00
Adam Lesinski
1772970fa5 am 0f0ccf07: Add new software features
* commit '0f0ccf07bad594b618f4fcce9a8f79a5bc188bb3':
  Add new software features
2014-02-06 19:30:54 +00:00
Colin Cross
2b957503b7 am 74be0f7b: Merge "binder: fix all warnings"
* commit '74be0f7be35e7b40a322fa9a407cb49265333a0b':
  binder: fix all warnings
2014-02-06 02:59:37 +00:00
Colin Cross
74be0f7be3 Merge "binder: fix all warnings" 2014-02-06 02:06:42 +00:00
Colin Cross
6f4f3ab36c binder: fix all warnings
Fix warnings related to casting pointers to ints, using %d or %ld to
print size_t/ssize_t, and unused parameters.

Change-Id: I7a13ba83d402952989c1f795cd9e880a95b98d9e
2014-02-05 17:51:10 -08:00
Adam Lesinski
0f0ccf07ba Add new software features
Wearable devices are much more stripped down than
handheld and tablet devices. There are system
services that must not be present on wearable
devices. Those services have their own feature
xml files that get copied to the system image
as needed. They are included by default in the
handheld and tablet core feature files in order
to maintain previous behavior.

Wearable devices should always copy the
data/etc/wearable_core_hardware.xml file and
whatever other files that represent required
services (eg. data/etc/android.software.print.xml).

Change-Id: I410442d45854fe54cba1131ce488a5a459ac580a
2014-02-05 19:35:57 +00:00
Andrew Hsieh
bdab63e06b am 055dac1b: Merge "Fixed apparent copy/paste mistake Bug: 11634373"
* commit '055dac1b54af46a0608b32e83fcae45e75a4a8f0':
  Fixed apparent copy/paste mistake Bug: 11634373
2014-02-05 07:58:00 +00:00
Andrew Hsieh
055dac1b54 Merge "Fixed apparent copy/paste mistake Bug: 11634373" 2014-02-05 07:16:31 +00:00
David Friedman
8769436bba Fixed apparent copy/paste mistake
Bug: 11634373

Change-Id: I9b0ac4d3b4a9a2999b2013abd39465a062ec51ea
2014-02-05 11:19:04 +08:00
Siva Velusamy
67041e6841 am fd6a3ff4: Merge "GLES_trace: fix compile errors on 64 bit architectures"
* commit 'fd6a3ff4b4dda34f8e6e03989dd7466e4cbd8b0e':
  GLES_trace: fix compile errors on 64 bit architectures
2014-02-04 19:19:38 +00:00
Siva Velusamy
fd6a3ff4b4 Merge "GLES_trace: fix compile errors on 64 bit architectures" 2014-02-04 19:14:07 +00:00
Changwan Ryu
dc425805b2 am e636692a: [DO NOT MERGE] Extend OpenMAX IL definitions to support AC3
* commit 'e636692a2eecead363f06297e7b5b379079331da':
  [DO NOT MERGE] Extend OpenMAX IL definitions to support AC3
2014-02-04 07:31:42 +00:00
Arve Hjønnevåg
8641112a1c am 4e7fd950: Merge "Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set."
* commit '4e7fd9506103dcc9750788caf1f94b8d1348f37b':
  Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set.
2014-02-04 02:01:45 +00:00
Arve Hjønnevåg
4e7fd95061 Merge "Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set." 2014-02-04 00:48:12 +00:00
Arve Hjønnevåg
f3ad11cf3c Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set.
Change-Id: I46a29939fa29ec9421ab6dff3285502f69a31745
2014-02-03 14:48:36 -08:00
Arve Hjønnevåg
c93865de80 am 58242fc2: Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...
* commit '58242fc29881cf29d56ee6e5fde6d73b16d0b67c':
  ServiceManager: Implement PING_TRANSACTION
  ServiceManager: Use 32/64 bit types from new binder header
  Binder: Use 64 bit pointers in 32 processes if selected by the target
  Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
  Binder: Make binder portable
  ServiceManager: Fix the binder interface
  ServiceManager: Store handles in uint32_t instead of void *
  ServiceManager: Generic Fixes
  ServiceManager: Add extra error handling
  ServiceManager: Fix Android.mk
  ServiceManager: Make use of kernel exported structures
2014-02-03 21:18:35 +00:00
Arve Hjønnevåg
58242fc298 Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...
* changes:
  ServiceManager: Implement PING_TRANSACTION
  ServiceManager: Use 32/64 bit types from new binder header
  Binder: Use 64 bit pointers in 32 processes if selected by the target
  Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
  Binder: Make binder portable
  ServiceManager: Fix the binder interface
  ServiceManager: Store handles in uint32_t instead of void *
  ServiceManager: Generic Fixes
  ServiceManager: Add extra error handling
  ServiceManager: Fix Android.mk
  ServiceManager: Make use of kernel exported structures
2014-02-03 21:12:57 +00:00
Mårten Kongstad
63568b1430 Runtime resource overlay, iteration 2
Support any number of overlay packages. Support any target package.

UPDATED PACKAGE MATCHING
------------------------
In Runtime resource overlay, iteration 1, only a single overlay package
was considered. Package matching was based on file paths:
/vendor/overlay/system/framework-res.apk corresponded to
/system/framework-res.apk. Introduce a more flexible matching scheme
where any package is an overlay package if its manifest includes

    <overlay targetPackage="com.target.package"/>

For security reasons, an overlay package must fulfill certain criteria
to take effect: see below.

THE IDMAP TOOL AND IDMAP FILES
------------------------------
Idmap files are created by the 'idmap' binary; idmap files must be
present when loading packages. For the Android system, Zygote calls
'idmap' as part of the resource pre-loading. For application packages,
'idmap' is invoked via 'installd' during package installation (similar
to 'dexopt').

UPDATED FLOW
------------
The following is an outline of the start-up sequences for the Android
system and Android apps. Steps marked with '+' are introduced by this
commit.

Zygote initialization
   Initial AssetManager object created
+    idmap --scan creates idmaps for overlays targeting 'android', \
           stores list of overlays in /data/resource-cache/overlays.list
   AssetManager caches framework-res.apk
+  AssetManager caches overlay packages listed in overlays.list

Android boot
   New AssetManager's ResTable acquired
     AssetManager re-uses cached framework-res.apk
+    AssetManager re-uses cached 'android' overlays (if any)

App boot
   ActivityThread prepares AssetManager to load app.apk
+  ActivityThread prepares AssetManager to load app overlays (if any)
   New AssetManager's ResTable acquired as per Android boot

SECURITY
--------
Overlay packages are required to be pre-loaded (in /vendor/overlay).
These packages are trusted by definition. A future iteration of runtime
resource overlay may add support for downloaded overlays, which would
likely require target and overlay signatures match for the overlay to
be trusted.

LOOKUP PRIORITY
---------------
During resource lookup, packages are sequentially queried to provide a
best match, given the constraints of the current configuration. If any
package provide a better match than what has been found so far, it
replaces the previous match. The target package is always queried last.

When loading a package with more than one overlay, the order in which
the overlays are added become significant if several packages overlay
the same resource.

Had downloaded overlays been supported, the install time could have been
used to determine the load order. Regardless, for pre-installed
overlays, the install time is randomly determined by the order in which
the Package Manager locates the packages during initial boot. To support
a well-defined order, pre-installed overlay packages are expected to
define an additional 'priority' attribute in their <overlay> tags:

    <overlay targetPackage="com.target.package" priority="1234"/>

Pre-installed overlays are loaded in order of their priority attributes,
sorted in ascending order.

Assigning the same priority to several overlays targeting the same base
package leads to undefined behaviour. It is the responsibility of the
vendor to avoid this.

The following example shows the ResTable and PackageGroups after loading
an application and two overlays. The resource lookup framework will
query the packages in the order C, B, A.

        +------+------+-     -+------+------+
        | 0x01 |      |  ...  |      | 0x7f |
        +------+------+-     -+------+------+
            |                           |
        "android"                Target package A
                                        |
                       Pre-installed overlay B (priority 1)
                                        |
                       Pre-installed overlay C (priority 2)

Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e
2014-02-03 16:16:40 +01:00
Mårten Kongstad
5ee3dafa98 New command line tool 'idmap'
Introduce a new tool 'idmap' to handle generation and verification of
idmap files. The tool is modelled on 'dexopt', and is intended to be
used similarly, notably by 'installd'.
See cmds/idmap/idmap.cpp for further documentation on 'idmap'.

Note: this commit is interdependent on a commit in project build/ to add
'idmap' to PRODUCT_PACKAGES.

Note: the changes to androidfw are only stubs. The actual implementation
will be provided in Runtime resource overlay, iteration 2.

Change-Id: I7131b74ece1e46c8a9c0a31d103e686aa07da2bb
2014-02-03 16:16:39 +01:00
Changwan Ryu
e636692a2e [DO NOT MERGE] Extend OpenMAX IL definitions to support AC3
OpenMAX IL does not have generic support for AC3, but IL 1.1.2 and above
supports component extension APIs, which enable us to add our own constants
and definitions.

Change-Id: Iecee4f8bb3112b0720ceae9192017e12d3fe97e3
2014-02-03 14:10:18 +09:00
Arve Hjønnevåg
e5245cbf5d ServiceManager: Implement PING_TRANSACTION
Stop printing "invalid id " to stderr every time a process tries to
connect to the servicemanager.

Change-Id: Ib0e5a0375bfa2dec2c2f9cd668bd5dda46ed6588
2014-01-31 17:22:30 -08:00
Arve Hjønnevåg
399b6c3bbc ServiceManager: Use 32/64 bit types from new binder header
Change-Id: I1bd7c38ed9f43125cf9c63aa533434ee7ca06f80
2014-01-31 17:22:30 -08:00
Arve Hjønnevåg
84e625ac1e Binder: Use 64 bit pointers in 32 processes if selected by the target
Uses new kernel header where void * has been replaced by binder_uintptr_t

Change-Id: Icfc67c2a279269f700343bd9246fd7cb94efe2c1
2014-01-31 15:51:06 -08:00
Arve Hjønnevåg
e91fff0a2d Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
Change-Id: I96c643123b0314c361b7f48a18d5c22c660d4ff5
2014-01-31 15:50:59 -08:00
Aravind Akella
e8df30b870 am ebff73c3: Bug fix for SensorFusion data rate.
* commit 'ebff73c37d5f1581702430f4a0348c160b99b57e':
  Bug fix for SensorFusion data rate.
2014-01-31 22:39:41 +00:00
Aravind Akella
ebff73c37d Bug fix for SensorFusion data rate.
SensorFusion is always returning data at the slowest possible sampling rate (5 Hz). batch() is getting called twice, first time with the requested rate and second time with the slowest rate (which overwrites the requested rate). Fix batch call in SensorFusion::activate()

Bug: 12064319
Change-Id: If62f3e514233f69810336fd22b136b4395b667d3
2014-01-31 22:33:51 +00:00
Brian Carlstrom
e0dd0b8514 am af3efe8c: Merge "frameworks/native: Rename persist.sys.dalvik.vm.lib to allow new default"
* commit 'af3efe8ce7e2eeb7a98552af5cf38d8a9720f018':
  frameworks/native: Rename persist.sys.dalvik.vm.lib to allow new default
2014-01-31 12:34:20 +00:00
Serban Constantinescu
f683e0163a Binder: Make binder portable
Changes include
- Binder attempts to cast pointers to a int datatype
  which is not sufficient on a 64-bit platform.

- This patch introduces new read/write functions into
  Parcel that allow pointers to be written using the
  uintptr_t datatype for compile-time data type size
  selection.

-  Change access specifier for the methods above.

-  Binder uses the 64bit android_atomic_release_cas64
   (aka cmpxchg)

Change-Id: I595280541e0ba1d19c94b2ca2127bf9d96efabf1
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-31 10:49:40 +00:00
Serban Constantinescu
3a345f0df5 ServiceManager: Fix the binder interface
This patch adds support for binder transactions on 64bit systems
without breaking the existing 32bit ABI. It has been tested on
the Android emulator and ARMv8 Model.

Most of the changes in this patch just follow the binder ABI.

Change-Id: I8c37b847ea65008d56554d34d4696fe3d22f7533
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-31 10:49:34 +00:00
Serban Constantinescu
5fb1b8836a ServiceManager: Store handles in uint32_t instead of void *
This patch corrects the types used for storing handles.

Change-Id: If9c10782345f1de9e12b4b3fd6be9e02e6b568cd
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-31 10:49:30 +00:00
Serban Constantinescu
9b738bb411 ServiceManager: Generic Fixes
This patch fixes some of the ServiceManager issues. The following patches
of the series add fixes to the ABI.

Change-Id: Ib479234c8704e12592f1b149ddec67881bc50230
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-31 10:49:25 +00:00
Serban Constantinescu
a44542ca74 ServiceManager: Add extra error handling
This patch extends the error handling. It also adds a check for a matching
binder version - kernel/userspace.

Change-Id: I43a262934b38c5711536aaa42754fed1ef04b39e
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-31 10:49:20 +00:00
Serban Constantinescu
dc832dc551 ServiceManager: Fix Android.mk
This patch fixes Android.mk and enables building bctest as an optional
module without any extra hacks.

Change-Id: Icaf8bf9452776db2ea4a2ba75f3abf05b4e2cdab
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-31 10:49:16 +00:00