Commit Graph

369 Commits

Author SHA1 Message Date
Mathieu Chartier
62d0f901fd Don't pass in empty arg to dex2oat.
We would occassionally pass in an empty arg "" instead of a NULL.
This caused problems since dex2oat isn't made to handle empty args.

(cherry picked from commit f53dbfeda3)

Change-Id: Ia2d60b895391bf83b5d250c20ddb8a4917d347a6
2014-03-05 17:56:31 -08:00
Mathieu Chartier
1d84e25648 am 3c39e03c: Merge "Don\'t pass in empty arg to dex2oat."
* commit '3c39e03c08094ce65608cae8a45dd726cf10b5c3':
  Don't pass in empty arg to dex2oat.
2014-03-06 01:05:22 +00:00
Mathieu Chartier
f53dbfeda3 Don't pass in empty arg to dex2oat.
We would occassionally pass in an empty arg "" instead of a NULL.
This caused problems since dex2oat isn't made to handle empty args.

Change-Id: Ibb1aed64a4aa17459b2a75a5a2abcf13c7fa8ac7
2014-03-05 16:58:48 -08:00
Brian Carlstrom
cd44310a13 am c9e60374: am e19c99aa: Merge "Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags"
* commit 'c9e60374f5144e94103e5b866570be114aa165c8':
  Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags
2014-03-05 22:33:26 +00:00
Brian Carlstrom
c9e60374f5 am e19c99aa: Merge "Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags"
* commit 'e19c99aad605c395f53bf39ae1a27e298e7e33ce':
  Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags
2014-03-05 20:09:46 +00:00
Brian Carlstrom
0ae8e39ebc Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags
Change-Id: Ic048ed654ea0ae38c9684e5fa5b14742b6b83305
2014-03-04 14:11:55 -08:00
Narayan Kamath
87eb08dc07 am ad0f05be: am b98c4761: Merge "Correcting include path in installd test project\'s Android.mk"
* commit 'ad0f05bed95dc816a5b1e4bea23b0736458c1857':
  Correcting include path in installd test project's Android.mk
2014-02-28 16:23:59 +00:00
Narayan Kamath
ad0f05bed9 am b98c4761: Merge "Correcting include path in installd test project\'s Android.mk"
* commit 'b98c4761e0c80a8d8138910e0a5e5fc8baff8282':
  Correcting include path in installd test project's Android.mk
2014-02-28 16:19:30 +00:00
Ramin Zaghi
7400742285 Correcting include path in installd test project's Android.mk
installd project has moved from frameworks/base to frameworks/native
 and so its test project's c_include path defined in Android.mk
 has to match the change.

Change-Id: I597125ff659f51edbd9fc95371790e2d567c78be
2014-02-28 15:41:57 +00:00
Xia Wang
b7925f1364 Build the benchmark test to /data/local/tmp/ for automated test
Change-Id: I27a5ee24636ff9752a35dbab793821f6b7a79221
2014-02-26 18:04:50 -08:00
Dianne Hackborn
20c7adbfaa am b37b312b: am 7d86b454: Merge "frameworks/native: move idmap to frameworks/base"
* commit 'b37b312b829c7ab5107c2f96d0a95a557f67a831':
  frameworks/native: move idmap to frameworks/base
2014-02-14 02:00:17 +00: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
165c8bdfb5 am 0e4d2885: am 2044ac43: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
* commit '0e4d2885a34d31f5dbe5a08bdb654953abaf82a2':
  Convert all selinux_android_restorecon and _setfilecon calls to new API.
2014-02-13 00:16:04 +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
Dianne Hackborn
297097957f am 6e5fdb15: am 6c14f0ad: Merge "Runtime resource overlay, iteration 2"
* commit '6e5fdb1551ca7d117bf7e1acca133a077a8701f0':
  Runtime resource overlay, iteration 2
2014-02-11 21:49:02 +00: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
667c3a19d8 am 99188064: am 340aa8cb: Merge "New command line tool \'idmap\'"
* commit '99188064fd3b2d4ca85b02afefa4adb2562f8940':
  New command line tool 'idmap'
2014-02-11 20:41:09 +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
Arve Hjønnevåg
ba91e5af45 am 8641112a: am 4e7fd950: Merge "Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set."
* commit '8641112a1c3d4ff3ed68131d07eed01b715ac906':
  Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set.
2014-02-04 02:10:18 +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
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
88f6ad18de am c93865de: am 58242fc2: Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...
* commit 'c93865de80a16d3638936890fb42eb175284044b':
  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 22:11:16 +00: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
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
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
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
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
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
Serban Constantinescu
bcf38880c6 ServiceManager: Make use of kernel exported structures
This patch switches ServiceManager to use the structures exported in the
kernel headers rather then redefining its own.

struct binder_txn is replaced with struct binder_transaction_data and struct
binder_object with struct flat_binder_object, both defined in the binder driver
header <linux/binder.h>.

Change-Id: I3b3e97918173ea35a289e184774ae06193192da3
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-31 10:20:49 +00:00
Brian Carlstrom
87a12bf53b frameworks/native: Rename persist.sys.dalvik.vm.lib to allow new default
Bug: 12798969

(cherry picked from commit 0c05d3aca6)

Change-Id: I3db785c3f8a3d242d7a0127ed5bec9ecca67f52c
2014-01-30 16:27:52 -08:00
Brian Carlstrom
0c05d3aca6 frameworks/native: Rename persist.sys.dalvik.vm.lib to allow new default
Bug: 12798969
Change-Id: I6b40317eceb3d89b0acff88238a9a9ab423c4d78
2014-01-30 13:16:53 -08:00
John Spurlock
5ecd4beef8 Dump system settings for all users
Change-Id: Ic832b19fe698da1984876b2949c3f26990ae5076
2014-01-29 14:34:24 -05:00
Guang Zhu
9fcca4ee17 releax wait timeout on start of dumpstate service
Bug: 12181612
Change-Id: If7ae97de1e42890dac37d036ead669ccda65e688
2014-01-15 15:58:54 -08:00
Nick Kralevich
b281d81404 am e2d412f0: am e7394ba8: am c02c35fb: Merge "restorecon /data/media when re-creating it for multi-user upgrade."
* commit 'e2d412f0466ac6a1a33e2c2563ed2192b58bfa87':
  restorecon /data/media when re-creating it for multi-user upgrade.
2013-12-17 23:18:58 +00:00
Nick Kralevich
e2d412f046 am e7394ba8: am c02c35fb: Merge "restorecon /data/media when re-creating it for multi-user upgrade."
* commit 'e7394ba8bd9cd90a0fb72f6c50522a41cd7877fd':
  restorecon /data/media when re-creating it for multi-user upgrade.
2013-12-17 23:12:20 +00:00
Stephen Smalley
47a351834f restorecon /data/media when re-creating it for multi-user upgrade.
Change-Id: I112c61863f2104d1962697c54cff25106e9b48a0
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-12-17 16:04:20 -05:00
Todd Poynor
34ced636fb am 2a83daa8: dumpstate: dump console-ramoops instead of last_kmsg if present
* commit '2a83daa8a3e1eab292dc1464bbe78f025f4bc0e9':
  dumpstate: dump console-ramoops instead of last_kmsg if present
2013-12-11 06:30:39 +00:00
Todd Poynor
2a83daa8a3 dumpstate: dump console-ramoops instead of last_kmsg if present
Change-Id: I41a922b33f0b6b4e8e150a92e46032501a165e33
2013-12-10 14:42:27 -08:00
Nick Kralevich
17dc96ecde am 651dc744: am bef08b8d: Merge "Handle policy reloads within installd rather than restarting it."
* commit '651dc7440b10c8a4090bd5469a2e90d3bfe8356e':
  Handle policy reloads within installd rather than restarting it.
2013-12-02 23:31:01 +00:00
Nick Kralevich
bef08b8d1b Merge "Handle policy reloads within installd rather than restarting it." 2013-11-27 21:09:13 +00:00
Nick Kralevich
b5e4762129 am e4e91c4e: resolved conflicts for merge of e678897f to klp-dev-plus-aosp
* commit 'e4e91c4ead821afb5aced2e33ee39d8878eb4d1e':
  Proper security labeling of multi-user data directories.
2013-09-20 12:53:20 -07:00
Nick Kralevich
e4e91c4ead resolved conflicts for merge of e678897f to klp-dev-plus-aosp
Change-Id: Ie2a5e7a917ab7f5a0ee98300b880d22c7a10bf70
2013-09-20 12:45:20 -07:00
Mike Lockwood
30a7d5a5a9 Add support for "input" service running as user AID_INPUT
Change-Id: I8b6700c25ea2264fb3e1c16e18df281eb67b931f
2013-09-18 14:44:30 -07:00
Robert Craig
880d1a957e Proper security labeling of multi-user data directories.
Add seinfo paramater to appropriate make directory
functions. This allows proper labeling for multi-user
scenarios.

Change-Id: Iaba7c40645bc7b6cc823d613da0c3782acf6ddd5
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-09-18 13:21:12 +00:00
Mike Lockwood
2a5fd8b064 servicemanager: Add support for "audio" service running as AID_AUDIO user
Change-Id: Ia41f1edd05f233ac5ce43c34eb8ab3ab76ffa194
2013-09-11 08:10:11 -07:00
Dianne Hackborn
3b010de1c1 am ecc05fb5: am 59b1516f: Fix issue #10422349: Limit/change the battery history data in batterystats
* commit 'ecc05fb5430ebb57710850f22d2a370c2af86e9d':
  Fix issue #10422349: Limit/change the battery history data in batterystats
2013-09-04 18:32:12 -07:00
Dianne Hackborn
ecc05fb543 am 59b1516f: Fix issue #10422349: Limit/change the battery history data in batterystats
* commit '59b1516f4cefcfd599f4e5e9c4a227a48d1ace65':
  Fix issue #10422349: Limit/change the battery history data in batterystats
2013-09-04 18:24:33 -07:00
Dianne Hackborn
59b1516f4c Fix issue #10422349: Limit/change the battery history data in batterystats
Use new compact option to include history when dumping battery stats.

Change-Id: I3833a88db76d8791bd5c2e8f6ff414af65472a42
2013-09-04 18:04:14 -07:00
Rom Lemarchand
b3fb0ae7fd fix incorrect aspect ratio label
2048x1536 was labeled as 3:2 when it is 4:3.

Change-Id: I981af139ba3d1c6f111772aeaccf95c679999370
2013-08-29 16:19:18 -07:00
John Reck
68bfe1fea6 am 05f0a81a: Merge "Add libpng include path"
* commit '05f0a81a93f0d41fa4115c752e617849d145fe5b':
  Add libpng include path
2013-08-27 09:54:06 -07:00
John Reck
e9b2dfe3fd Add libpng include path
Forward compatibility change

Change-Id: Iae792715d9a9aea34f53cd6383981371835c4a31
2013-08-26 16:48:46 -07:00
Dmitry Shmidt
a8113c12cc am 072ca28d: am 56968ec0: Merge "dumpstate: Fix wifi list of networks dump" into klp-dev
* commit '072ca28d7860829083f17d9e24863329010536cf':
  dumpstate: Fix wifi list of networks dump
2013-08-21 12:41:51 -07:00
Dmitry Shmidt
1d6b97c869 dumpstate: Fix wifi list of networks dump
Bug: 9056601

Change-Id: Ia0adb67afdf3d478033d0ee34bbb95e621e2fe51
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-08-21 10:58:29 -07:00
Mathias Agopian
bebc84e19c am 99b535ad: am 5bbe0ab6: fix build. optional test broke.
* commit '99b535ad06fa033784c251394143287f9b0b89c8':
  fix build. optional test broke.
2013-08-14 18:32:27 -07:00
Mathias Agopian
5bbe0ab655 fix build. optional test broke.
Change-Id: I0ed5e2cd4c8945ee95673ed0eec5820d9def5097
2013-08-14 18:22:02 -07:00
Todd Poynor
c8919373b2 am b52bfbb1: am 5025593d: Merge "dumpstate: switch to HAL static libraries" into klp-dev
* commit 'b52bfbb1c4ee3e19d4ce54f3d9e149878696edf1':
  dumpstate: switch to HAL static libraries
2013-08-13 17:30:12 -07:00
Todd Poynor
4f5b9a701b dumpstate: switch to HAL static libraries
Change-Id: I865a0b4b4a84a2d54a239e7b09874287f0c1ad56
2013-08-13 16:30:01 -07:00
John Reck
05cf62d1c8 Fix libpng includes
png.h now includes pnglibconf.h
 update the include path so it can find it

Change-Id: I594f1613e42405072029ae4cd7f9f8d0e03b2434
2013-08-13 13:47:12 -07:00
Stephen Smalley
bd558d6187 Handle policy reloads within installd rather than restarting it.
Restarting installd upon policy reloads has reportedly caused
stability problems for some users.  Stop restarting installd
and instead handle policy reloads within it.

Change-Id: I697a736d8e414cfc6cfa131ed7b97c7f7694d022
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-07-26 15:48:07 -04:00
Alex Ray
656a6b9e36 dumpstate: remove libutils dependency
Change-Id: I9745f389402c01b90877612e060ac996eba99964
2013-07-23 17:51:19 -07:00
Mathias Agopian
7ffaa7c60d move services executables sources in their respective src folder
Change-Id: Ic65434a26c7fed1699abf0851fec6faa40e09c0c
2013-07-22 12:25:18 -07:00
Mathias Agopian
595264f1af BufferQueue improvements and APIs changes
this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:

- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
  those flags are used to put the BufferQueue in a mode where it
  will never block if both flags are set. This is achieved by:
  - returning an error from dequeueBuffer() if it would block
  - making sure a buffer is always available by replacing
    the previous buffer with the new one in queueBuffer()
    (note: this is similar to what asynchrnous mode used to be)

Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.

Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
2013-07-18 22:28:18 -07:00
Mathias Agopian
7f069d79e7 Merge "always pass the BufferQueue explicitely to consumers" 2013-07-16 02:17:58 +00:00
Jeff Sharkey
f8bca79df3 Merge "Change legacy "persona" references to userid_t." 2013-07-16 00:19:19 +00:00
Jeff Brown
40c9e0a398 Add skeleton of input flinger.
Change-Id: I7f25080e446d4d3d9de9b18fe432a09bc751e0d9
2013-07-15 16:03:14 -07:00
Jeff Sharkey
abe4fe5b46 Change legacy "persona" references to userid_t.
Offers stronger typing with no functional change.

Change-Id: I09f0262470feec5cfdf26658f998c20550af84d4
2013-07-15 15:16:10 -07:00
Nick Kralevich
76b45c126b dumpstate: Show SELinux process labels
Change-Id: Ie19586a3b733bd4420f6b20b5d253d42c2f165ea
2013-07-15 12:21:40 -07:00
Mathias Agopian
8f938a5338 always pass the BufferQueue explicitely to consumers
Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
2013-07-12 22:06:26 -07:00
Dianne Hackborn
1bd5068a51 Fix cmd line arguments for usagestats.
Change-Id: I9a1436aa1d1665924ba62a568bb4b66d67ae2814
2013-07-12 12:19:44 -07:00
Brian Carlstrom
e7a8b17e37 Renaming dalvik.vm.lib to persist.sys.dalvik.vm.lib
Change-Id: If31695e04bb813eb75b2fdd00e5d70ced4fbb0e9
2013-07-10 09:51:20 -07:00
Dianne Hackborn
5cd46aa339 Update to follow procstats options changes.
Change-Id: I6f016c944cfcd01bbbcf3cf37bc7ff05482f0012
2013-07-09 15:01:40 -07:00
Dianne Hackborn
3e5fa73722 Update to use --include-committed for procstats.
Change-Id: I5ce737b624c5617c94054d6bedebca754fbf16a9
2013-07-03 16:51:15 -07:00
Ken Sumrall
d3fa561616 Add support for mmc trace events
Change-Id: I1d9f2a85e50f8e30d418fb97c01ce7b0fbb680bd
2013-07-03 12:32:50 -07:00
Dianne Hackborn
02bea9786d Add checkin dumps to bug reports.
This is a duplicate of the associated human-readable dumps
of these services, but much better for automated parsing.

Change-Id: I902b768b03aeac1472f03f96913f9b8ada5dba9c
2013-06-26 18:59:09 -07:00
Brian Carlstrom
1705fc44fb Moving dex2oat installd patches from frameworks/base
(cherry picked from commit 3fa3a652ba9a7c5b23b6f2bc7c1851d4e23e430f)

Change-Id: I2f9bb66e1b0463bef41805f2d220160880121813
2013-06-19 23:20:49 -07:00
Amith Yamasani
12861530ef Merge "Add a note about emulated sdcard in rawbu usage dump" 2013-06-14 18:00:01 +00:00
Amith Yamasani
b82bf9dfc9 Add a note about emulated sdcard in rawbu usage dump
Change-Id: I95af9175235a18716d63a863b482a323392e4fa2
2013-06-14 10:43:39 -07:00
keunyoung
caad555f3e add dumpsys -l to list available services
- for people with poor memory like me :)

Change-Id: I60160ca333ac4864bb8328f164cc2e9eba3660fc
2013-06-13 16:32:26 -07:00
jp abgrall
c40f4e64f2 am 4b2b0a74: am 74bd799e: Merge "Exit dumpstate on SIGPIPE to avoid cascading child crashes"
* commit '4b2b0a7494c872b7d545a9abe2d08ca0d0325073':
  Exit dumpstate on SIGPIPE to avoid cascading child crashes
2013-05-28 15:52:27 -07:00
jp abgrall
4b2b0a7494 am 74bd799e: Merge "Exit dumpstate on SIGPIPE to avoid cascading child crashes"
* commit '74bd799ec20d2420459fa382533b1cc39ca9a54c':
  Exit dumpstate on SIGPIPE to avoid cascading child crashes
2013-05-28 15:46:14 -07:00
John Michelau
885f888c55 Exit dumpstate on SIGPIPE to avoid cascading child crashes
When dumpstate ignores SIGPIPE it can lead to a cascade of tombstones /
coredumps since many of its children don't handle or ignore it.  It's
best to just exit dumpstate once the pipe is broken.

Change-Id: Ic0c57ecf4171f0c0a07837e51c41cb1876e1350c
2013-05-28 14:20:59 -05:00
Tim Murray
f0f2841d95 Add RenderScript category for atrace.
Change-Id: I069a301329f4a579c7b2716fa52c3f4a0ae0062b
2013-05-23 14:39:42 -07:00
Jamie Gennis
7f9efade0d am d2a92b5b: am db733579: Merge "atrace: add the \'dalvik\' trace category" into jb-mr2-dev
* commit 'd2a92b5b97b5a107d327744f216abdea8e0cda89':
  atrace: add the 'dalvik' trace category
2013-05-08 15:03:56 -07:00
Mathias Agopian
002e1e58df libutils clean-up
Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
2013-05-07 18:28:11 -07:00
Jamie Gennis
d2a92b5b97 am db733579: Merge "atrace: add the \'dalvik\' trace category" into jb-mr2-dev
* commit 'db733579a4c64eddd7dadb4ac15f54658ccfc0fb':
  atrace: add the 'dalvik' trace category
2013-05-07 18:23:18 -07:00
Jamie Gennis
db733579a4 Merge "atrace: add the 'dalvik' trace category" into jb-mr2-dev 2013-05-08 01:21:17 +00:00
Jamie Gennis
eff2e8d237 atrace: add the 'dalvik' trace category
Bug: 8856374
Change-Id: Ie7759328333d21d8123ce9d4f1a177cae5ede51e
2013-05-07 15:20:57 -07:00
Erik Gilling
63d076e339 flatland: add 1920x1200 to 16:10 resolutions
Change-Id: Ie7540c1ca4ec2c7ea8a307ce118d35479cdf499c
2013-05-07 12:32:59 -07:00
Erik Gilling
7bfdf27539 flatland: add 3:2 tests
Change-Id: I90496207fbf972c9a8e6baa2188a7732a282f879
2013-05-07 12:32:59 -07:00
Dianne Hackborn
ba018b3fa5 am 4fc27d79: Merge "Fix issue #8768456: Settings > App Info under reports..." into jb-mr2-dev
* commit '4fc27d79c29646b08ff059abc19cc4a7bccaa316':
  Fix issue #8768456: Settings > App Info under reports...
2013-05-02 15:15:17 -07:00
Dianne Hackborn
8b41780d73 Fix issue #8768456: Settings > App Info under reports...
...app storage size for apps w/ .so files

The lib directories are tagged with the apk install number,
so must be explicitly passed down to installd.

Change-Id: Iae8815afd6ba964f5b2ed86a0d04a91827391ed6
2013-05-01 18:55:10 -07:00
Dianne Hackborn
0c71bb90f9 am 9380d78c: Add new resources trace.
* commit '9380d78c98d8b8fbce9ade5881fab7134fadc015':
  Add new resources trace.
2013-04-12 17:06:29 -07:00
Dianne Hackborn
9380d78c98 Add new resources trace.
Change-Id: Iab8c1ef51f491e818fb4bab0ba7a042f0d9bec9a
2013-04-12 16:58:24 -07:00
Ying Wang
46f19772ae resolved conflicts for merge of c76e8a20 to jb-mr2-dev-plus-aosp
Change-Id: I895a8ad8c936a80c70aaac739c6441d3c7c55834
2013-04-09 22:27:50 -07:00
Ying Wang
8a0cb4ee0b Add liblog
Bug: 8580410
Change-Id: I2ca4fa00dde0b574df3619134836bcb9315bd506
2013-04-09 21:55:39 -07:00
Geremy Condra
e167d889e4 am a3d3e137: Merge "dumpstate: Add SELinux restorecon call."
* commit 'a3d3e137f473a965fefced9670e3b0c6b5f7f791':
  dumpstate: Add SELinux restorecon call.
2013-04-04 23:42:15 -07:00
Robert Craig
957983787d dumpstate: Add SELinux restorecon call.
Set the security context on the directory used
to dump Dalvik and native stack traces.

Change-Id: Iba13783f10e850485ce1a8d4aa5792d55085eb22
Signed-off-by: Robert Craig <rpcraig@tycho.ncsc.mil>
2013-04-04 06:33:10 -04:00
Jamie Gennis
f7f29c8f9d atrace: add support for app tracing
This change adds support for the -a command line argument to atrace.  This
argument sets the comma separated list of application names (i.e.
/proc/self/cmdline values) for which to enable application-level tracing.

Change-Id: I812d57c4cdc581943247229413f09b7e1adc10d0
2013-03-28 13:53:45 -07:00
Jamie Gennis
9794f90368 Merge "atrace: fix tracing on user builds" into jb-mr2-dev 2013-03-28 18:14:14 +00:00
Jamie Gennis
6f6f3f710b atrace: fix tracing on user builds
Change-Id: Idef15d514f0bd1e117362c6a06a2ea24314feb7f
2013-03-27 15:50:30 -07:00
Geremy Condra
437bdbbaec Merge "Add seinfo parsing to PackageManagerService." into jb-mr2-dev 2013-03-26 01:39:22 +00:00
Robert Craig
4d3fd4e998 Add seinfo parsing to PackageManagerService.
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory.  Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 17:37:51 -07:00
Jeff Sharkey
aaaa57bf89 Bugreport broadcasts are only useful to owners.
Bug: 8415156
Change-Id: Ia73969262abe9f715f038dad934651d7e5d65c87
2013-03-25 17:15:57 -07:00
Jamie Gennis
43122e7e67 atrace: use creat instead of truncate
Change-Id: Ie25c704f33c419c0c542249ae2841393862df0ab
2013-03-21 14:06:57 -07:00
Jeff Sharkey
a6c1ab52e3 Merge "Move screenshots near beginning of dumpstate." into jb-mr2-dev 2013-03-20 19:09:45 +00:00
Jeff Sharkey
5a93003d3f Move screenshots near beginning of dumpstate.
Bug: 8420215
Change-Id: I6adffd1182ed8f99b8d11d43785a4eb4a388ceb5
2013-03-19 15:19:48 -07:00
Jamie Gennis
79fb99d0de Merge "atrace: add support for tracing kernel functions" into jb-mr2-dev 2013-03-18 21:54:44 +00:00
Jamie Gennis
e9b8cfb632 atrace: add support for tracing kernel functions
This change adds support for tracing specific kernel function calls using the
function_graph tracer.  It adds a '-k' option to atrace that accepts a comma
separated list of kernel function names for which tracing will be enabled.

Change-Id: I872b2f1d474b8ebb904053853fc8cf8c0a98089c
2013-03-18 13:56:18 -07:00
Jeff Sharkey
7560443061 Increase screenshot timeout.
Devices with large displays take longer than 5 seconds to write.

Change-Id: If74bc4a3cec366ae28eca549bce28ef212e47d8f
2013-03-14 10:20:31 -07:00
Jeff Sharkey
d77d4e0edc Merge "Support broadcast when dumpstate finishes." into jb-mr2-dev 2013-03-14 15:44:15 +00:00
Jeff Sharkey
27f9e6d849 Support broadcast when dumpstate finishes.
Add flag that sends BUGREPORT_FINISHED broadcast when dumpstate
is finished, including the resulting filesystem paths.  Also reduces
directory creation to 0770.

Bug: 7005318
Change-Id: Id4c6b699a56f8acd859b7ab73368500e1a8f3c67
2013-03-13 16:59:27 -07:00
Jamie Gennis
b2a89e3155 atrace: add the webview category
Change-Id: Iefb552cd275bb5784903e8bf328890ecd233e45b
2013-03-11 19:41:28 -07:00
jp abgrall
574d6902b7 am ba8abb51: Merge "Ensure dumpstate children die"
* commit 'ba8abb517d1eddebeda62bf907fa446e3c3b81f6':
  Ensure dumpstate children die
2013-03-11 12:28:06 -07:00
John Michelau
e7b6cf13f9 Ensure dumpstate children die
Use prctl(PR_SET_PDEATHSIG, SIGKILL) in each forked child to ensure
it dies when dumpstate dies.

This is important for two cases:
- dumpstate runs a timer for each child process.  On expiration, it
  sends SIGTERM to kill the process.  Sometimes SIGTERM isn't enough
  to kill a hung process, so the child lives on.
- When dumpstate is killed by the user before completing, outstanding
  children continue to run and generate output.

Change-Id: I96e0dc918c26d56c9fee53611980ba2edd238712
2013-03-11 11:44:15 -05:00
Mathias Agopian
649b976a00 limit number of extra binder threads in SF to 4
it should be enough and it makes debugging easier.

Bug: 6609290
Change-Id: I2341e20cfcfde184fe1ed9b925215f8fa3481ced
2013-03-07 15:32:47 -08:00
Nick Kralevich
98ca63e6d1 am 22641851: Merge "dumpstate: use correct header file."
* commit '22641851c48fee6e79d01adcfab01c0b625cfb3c':
  dumpstate: use correct header file.
2013-03-01 18:05:56 +00:00
Nick Kralevich
d747129e1e installd: use correct header file.
This is a port of https://android-review.googlesource.com/52540 ,
which doesn't apply cleanly to master.

Change-Id: I2824bb7afd4e343b5dc8bed9f24002ec1dcbf07f
2013-02-28 16:59:13 -08:00
Nick Kralevich
e96b2d0037 dumpstate: use correct header file.
Change-Id: I006d7a219ce6309259f271beff6011cc266f1a61
2013-02-28 16:46:22 -08:00
Dmitry Shmidt
5b8176471c Remove obsolte 'su' from 'ping' call (to work on user build)
Change-Id: I2d391bbd39fc591eef33b9c9e4b4cdbda29e41e7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-02-22 11:27:58 -08:00
Mathias Agopian
b7daa0dade fix build: SurfaceTextureClient to Surface rename
Change-Id: Ibcf98337940f9195bcff7b5e8bddb6e912e65163
2013-02-15 14:48:52 -08:00
Mathias Agopian
e3c697fb92 Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
2013-02-14 19:19:05 -08:00
Alex Ray
36ebf51a1b atrace: add HAL tag
Change-Id: Idfd4f2075e8cd82833ef06d4487423c62b59fe11
2013-02-13 15:30:31 -08:00
Jamie Gennis
c52e16cbf9 flatland: remove an unneeded #include
Change-Id: I50831d4efd543664ff7df7aaef35d842aebf1bd6
2013-02-12 18:15:38 -08:00
Ken Sumrall
8f75fa7bcf Do not use su to run the df command in bugreports
User builds do not have su, so when the bugreport attempts to report
disk free space, the command fails and nothing is reported.  However,
the df command does not need to be run as root to report free space,
so just run the command directly.

Change-Id: Ic7deb696f293e772ddf28eacfe16e4250af9a9f3
2013-02-08 17:35:58 -08:00
Glenn Kasten
64c8be0787 Add media.log service
Change-Id: Ic17752fff30676fe692c80260ff68284543385dd
2013-01-16 12:07:03 -08:00
Nick Kralevich
a2d838a542 Revert "App home directories are now 0700 for targetSdkVersion > 17"
This reverts commit 7f5c84a0b2.

Bug: 7966399
Bug: 7208882
Change-Id: I9fb13cf06c0f6605f3d992525346b14fe3259c66
2013-01-09 16:00:53 -08:00
Jamie Gennis
9c183f2493 flatland: add a GPU hardware benchmark
This change adds a GPU benchmark named 'flatland' that is intended to measure
GPU performance of UI rendering and compositing scenarios at a fixed a clock
frequency.  This initial version includes only window compositing scenarios.

Change-Id: I5577863aa3be5c6da8b49cb5d53cc49dec2f7081
2012-12-21 18:07:58 -08:00
Nick Kralevich
7f5c84a0b2 App home directories are now 0700 for targetSdkVersion > 17
Have installd set an app's home directory permissions to
0700 if the app has targetSdkVersion > 17.

Bug: 7208882
Change-Id: Iaa4fc42fec69bc1abdfae53704d6264dd6fa965f
2012-12-14 11:53:14 -08:00
Nick Kralevich
603b6c1975 Merge "remove unused code." 2012-12-12 12:43:19 -08:00
Nick Kralevich
f62d2851a8 remove unused code.
Change-Id: Iacc8b2664a0e404dfa554f223a44126c41581ae4
2012-12-12 10:38:54 -08:00
Jamie Gennis
92573f1ba0 atrace: fix the help string
Change-Id: I19f0093d65d64e669ad71c600c103f4080bfa2c2
2012-12-07 16:29:03 -08:00
Jamie Gennis
6eea6fb259 atrace: clean up tracing option enabling
This change switches atrace to use a table-driven approach to enabling and
disabling options.  It unifies how framework and kernel tracing are enabled,
and causes userland tracing options to be picked up by currently running
processes.

Change-Id: Iba2a3012ca0a67c4defdd076bce597db26e9f539
2012-12-07 14:03:07 -08:00
Chad Jones
9a57c5c69b Merge atrace/ from platform/system/extras to cmds/atrace/ 2012-11-29 14:35:18 -08:00
Glenn Kasten
9284fddfc6 Fix build
Change-Id: Ibb398f36a7569af3480e24145da4317bf5b86998
2012-11-14 16:24:27 -08:00
Erik Gilling
4edbd078cd add asynchronous tracing
Change-Id: I5b8660cd4d2af2ad7c6b2548c9572d3527882d6d
2012-11-14 16:06:04 -08:00
Kenny Root
244408786c Switch keystore to binder
Change-Id: Ie15781de079e8ecc9616cab9a5e392f5c814d9d8
2012-11-14 15:42:38 -08:00
rpcraig
f1c3ffe5f0 Bug fix on installd with SELinux enabled kernel.
setfilecon is not required on libsymlinks when target
doesn't exist. A bootloop is caused without this
change.

Change-Id: Ia895d9063f42885a3db6e8ca30cee5dceb8c1bac
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2012-11-14 10:42:28 -08:00
Dmitry Shmidt
258fe7eac9 am 77622879: am 4bacaec4: am 0b2c9268: bugreport: Add /proc/interrupts dump
* commit '77622879a6a12c6cb916df46c919dde87656e6df':
  bugreport: Add /proc/interrupts dump
2012-11-08 15:59:28 -08:00