OSDN Git Service
Nicolas Geoffray [Thu, 5 Jan 2017 15:01:32 +0000 (15:01 +0000)]
Merge "Pass the same fd when compiling due to boot image update."
am:
4f8c1fd2ea
Change-Id: Ifbc81ad7ffebdcb2eb40e279c558899ec1dce505
Treehugger Robot [Thu, 5 Jan 2017 14:56:01 +0000 (14:56 +0000)]
Merge "Pass the same fd when compiling due to boot image update."
Nicolas Geoffray [Tue, 20 Dec 2016 15:03:56 +0000 (15:03 +0000)]
Pass the same fd when compiling due to boot image update.
Test: device boots, apps get installed, OTA uses same vdex.
Change-Id: I913062630640f31a18d23b2f62afd74986322e6a
Martijn Coenen [Thu, 5 Jan 2017 09:46:55 +0000 (09:46 +0000)]
Merge "Callback elision for HIDL interfaces."
am:
b7ee96a666
Change-Id: I2d71b02f11d16c95830adbca36f77345ba58cafa
Martijn Coenen [Thu, 5 Jan 2017 09:40:55 +0000 (09:40 +0000)]
Merge "Callback elision for HIDL interfaces."
Martijn Coenen [Mon, 2 Jan 2017 14:17:11 +0000 (15:17 +0100)]
Callback elision for HIDL interfaces.
Test: mma
Bug:
31380743
Change-Id: I33080b61d6233b63106b2602a628bfcdaa878a90
Francis Hart [Wed, 4 Jan 2017 20:38:52 +0000 (20:38 +0000)]
Merge "Surface: Ensure synchronisation of copyBlt"
am:
88f77814a1
Change-Id: If8fe2dde08a1a850029e1d9ca6a7ae965f2aa8ab
Treehugger Robot [Wed, 4 Jan 2017 20:33:09 +0000 (20:33 +0000)]
Merge "Surface: Ensure synchronisation of copyBlt"
Dan Albert [Wed, 4 Jan 2017 19:06:28 +0000 (19:06 +0000)]
Merge "Mark libGLESv3 as unversioned until android-24."
am:
a09d0363fd
Change-Id: Ic902107fc0f9f78fa9ab124c99cbb5f976ebbe61
Treehugger Robot [Wed, 4 Jan 2017 19:00:36 +0000 (19:00 +0000)]
Merge "Mark libGLESv3 as unversioned until android-24."
Jeff Sharkey [Tue, 3 Jan 2017 23:41:34 +0000 (23:41 +0000)]
Merge "Reference profiles use shared GID for user 0."
am:
226f77d87a
Change-Id: I3c4d10f9483f99f3db4b2b1ff53ab62cd0b567db
Jeff Sharkey [Tue, 3 Jan 2017 23:37:00 +0000 (23:37 +0000)]
Merge "Reference profiles use shared GID for user 0."
Dan Albert [Tue, 3 Jan 2017 23:18:48 +0000 (15:18 -0800)]
Mark libGLESv3 as unversioned until android-24.
Test: readelf on android-23 and android-24 outputs to check version
information.
Bug: https://github.com/android-ndk/ndk/issues/265
Change-Id: I4a9b50b015567c64b75f09e8414682d314a86bc4
Jeff Sharkey [Tue, 3 Jan 2017 21:33:50 +0000 (14:33 -0700)]
Reference profiles use shared GID for user 0.
Test: builds, boots
Bug:
33977235
Change-Id: I4de3852b3f230a6dc874a630e3c1b9fff2d83169
Jeff Sharkey [Tue, 3 Jan 2017 19:24:09 +0000 (19:24 +0000)]
Merge "Offer to measure disk stats using quotas."
am:
8aed997c14
Change-Id: I17e1355805fa2c439331b0a9814ce5160e0bd168
Jeff Sharkey [Tue, 3 Jan 2017 19:08:07 +0000 (19:08 +0000)]
Merge "Offer to measure disk stats using quotas."
Jeff Sharkey [Tue, 13 Dec 2016 00:32:56 +0000 (17:32 -0700)]
Offer to measure disk stats using quotas.
Now we're getting somewhere! This CL starts using quotactl() to read
UID/GID quota statistics when called with FLAG_USE_QUOTA, otherwise
it continues using the old heavy-weight traversal for calculation.
We now set the recently defined per-app GID used for identifying
cached data, and we use the sticky GID bit on cache directories to
ensure that newly created data inherits the GID for tracking
purposes. For any existing apps during an upgrade, an initial
bootstrapping case will recursively set this new GID.
This change also shuffles around a bunch of the tedious manual
accounting logic so that we exactly match the new quota statistics.
Test: builds, boots, quota stats match manual stats
Bug:
27948817
Change-Id: I8512c3193ce698f197a3f446e625d6a1c74e7649
Mark Salyzyn [Wed, 28 Dec 2016 16:58:07 +0000 (16:58 +0000)]
Merge "Replace cutils/log.h and rationalize log/log.h and android/log.h"
am:
1efda0b1d6
Change-Id: I263fa3a582bbff546f1281205b539258ee5dab49
Mark Salyzyn [Wed, 28 Dec 2016 16:48:57 +0000 (16:48 +0000)]
Merge "Replace cutils/log.h and rationalize log/log.h and android/log.h"
Mark Salyzyn [Thu, 29 Sep 2016 15:08:05 +0000 (08:08 -0700)]
Replace cutils/log.h and rationalize log/log.h and android/log.h
- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if required
- add system includes that are assumed as side effects of log.h
- modules that use SLOG should use SLOG for all logging (installd)
- define LOG_TAG first
- remove logging infrastructure if not used
Test: build
Bug:
31289077
Change-Id: Iea147a0104c7ab7f12451304131d6500f42141e7
Yifan Hong [Thu, 22 Dec 2016 18:16:15 +0000 (18:16 +0000)]
Merge "Update for hiding Status from Return<T> object."
am:
c47aa53c84
Change-Id: If4e92201b4f3a21925c9a2644fa8fa76d0ce7d18
Yifan Hong [Thu, 22 Dec 2016 18:04:15 +0000 (18:04 +0000)]
Merge "Update for hiding Status from Return<T> object."
Jeff Sharkey [Wed, 21 Dec 2016 18:58:21 +0000 (18:58 +0000)]
Merge "Only log restorecon changes for existing dirs."
am:
ee080ea229
Change-Id: Iac6ca0bdbd39efc2258efd354dfd054f6a6d026e
Yifan Hong [Wed, 21 Dec 2016 18:47:56 +0000 (10:47 -0800)]
Update for hiding Status from Return<T> object.
Test: compiles
Change-Id: Ie32514f34efaa1188f34f662b194b60d83c20bf0
Jeff Sharkey [Wed, 21 Dec 2016 18:46:27 +0000 (18:46 +0000)]
Merge "Only log restorecon changes for existing dirs."
Jeff Sharkey [Wed, 21 Dec 2016 16:33:55 +0000 (09:33 -0700)]
Only log restorecon changes for existing dirs.
If we just created an app private data directory, we're always going
to be relabeling it, so don't log in that case. Continue logging if
something caused us to relabel an existing app data directory.
Test: builds, boots, only logs for existing dirs
Bug:
31958779
Change-Id: Id03f7c18aed191a4c7fb9dcf9380136c93798a4b
Jeff Sharkey [Tue, 20 Dec 2016 01:13:41 +0000 (01:13 +0000)]
Merge "Remove ~1/3 of the installd calls at boot."
am:
ed04f3c7e5
Change-Id: Id68b901ea2c12815df1d4c6e83e789101663870c
Treehugger Robot [Tue, 20 Dec 2016 01:06:22 +0000 (01:06 +0000)]
Merge "Remove ~1/3 of the installd calls at boot."
Jeff Sharkey [Mon, 19 Dec 2016 23:39:18 +0000 (16:39 -0700)]
Remove ~1/3 of the installd calls at boot.
When preparing CE storage for an app, we always perform a second call
to extract any newly created CE directory inode. Let's simplify this
and just return the inode number from the createAppData() call.
Test: builds, boots, reads CE inodes after wipe
Bug:
33463450
Change-Id: I68485e4b9b49e9da7b3ac7c66f50c6abc750b7e3
Peng Xu [Sat, 17 Dec 2016 00:15:04 +0000 (00:15 +0000)]
Merge "Sensor: Add more comments for ASensorEventQueue_registerSensor() function"
am:
8d24d0022b
Change-Id: Ibd1faaf9c8a881a4fddcfa19e99357bb7ad13f0a
Peng Xu [Sat, 17 Dec 2016 00:02:02 +0000 (00:02 +0000)]
Merge "Sensor: Add more comments for ASensorEventQueue_registerSensor() function"
Jeff Sharkey [Thu, 15 Dec 2016 22:07:13 +0000 (22:07 +0000)]
Merge "Handle invalid shared GIDs."
am:
788bdeae78
Change-Id: I48c3d8e584a30ed994920f57570344d7736ab183
Jeff Sharkey [Thu, 15 Dec 2016 21:59:08 +0000 (21:59 +0000)]
Merge "Handle invalid shared GIDs."
Jeff Sharkey [Thu, 15 Dec 2016 21:50:11 +0000 (14:50 -0700)]
Handle invalid shared GIDs.
Shared GIDs are only available inside a range from 50000-59999, so
system UIDs (outside the normal app range) don't have a valid GID to
use. The best we can do is skip the profile setup in those cases.
Test: builds
Bug:
27948817
Change-Id: I8c38a0e3631eafd07e96da3e37e641b3cce195a6
Daniel Koch [Thu, 15 Dec 2016 19:18:03 +0000 (19:18 +0000)]
Merge "libvulkan: add NULL check to DestroySwapchainKHR"
am:
55e4f91258
Change-Id: I07b33309ac91d75535e0916315e98d5a1319c9b8
Treehugger Robot [Thu, 15 Dec 2016 19:09:39 +0000 (19:09 +0000)]
Merge "libvulkan: add NULL check to DestroySwapchainKHR"
Daniel Koch [Tue, 13 Dec 2016 23:45:13 +0000 (18:45 -0500)]
libvulkan: add NULL check to DestroySwapchainKHR
vkDestroySwapchainKHR is required to silently ignore NULL handles
that are provided to it to destroy.
This adds an early return if swapchain_handle is NULL.
Test: dEQP-VK.wsi.android.swapchain.destroy.null_handle (VK 1.0.2 CTS)
Change-Id: Ic230f114a680210cb0e0de931b17e4d70fb27f44
Dan Willemsen [Thu, 15 Dec 2016 07:28:16 +0000 (07:28 +0000)]
Merge "Fix unused-parameter warning"
am:
a2a7195e23
Change-Id: I5f7f0a85d52e1a7a7cdf53cd6f8cc892a79cc1ca
Treehugger Robot [Thu, 15 Dec 2016 07:17:26 +0000 (07:17 +0000)]
Merge "Fix unused-parameter warning"
Colin Cross [Thu, 15 Dec 2016 00:10:28 +0000 (00:10 +0000)]
Merge "Fix more warnings in framworks/native/opengl/include"
am:
e714200784
Change-Id: I3d87ab34104953546061d4999bcd1f21b01ad401
Colin Cross [Wed, 14 Dec 2016 23:58:54 +0000 (23:58 +0000)]
Merge "Fix more warnings in framworks/native/opengl/include"
Dan Willemsen [Wed, 14 Dec 2016 05:20:13 +0000 (21:20 -0800)]
Fix unused-parameter warning
This is exposed when frameworks/av/include is moved from being a system
include directory to a normal include directory.
Test: m -j checkbuild
Change-Id: I127ebe25162f3b6dbb9fc564a6c2c851d0c1636f
Colin Cross [Wed, 14 Dec 2016 20:45:27 +0000 (12:45 -0800)]
Fix more warnings in framworks/native/opengl/include
Remove two more visability attributes being applied to typedefs.
The warnings were being hidden by the use of -isystem to include
frameworks/native/opengl/include.
Bug:
31752268
Test: m -j native
Change-Id: Ic6854d934a8d0d03b23e596d5230a6deb69c86bc
Aniroop Mathur [Mon, 12 Dec 2016 18:34:06 +0000 (00:04 +0530)]
Sensor: Add more comments for ASensorEventQueue_registerSensor() function
Lets add more comments to clarify that ASensorEventQueue_disableSensor is
to be used same as before for deactivating the sensor with respect to
sensor activation with ASensorEventQueue_registerSensor function.
Test: Check clarification in comments / spell check
Change-Id: Id38c002b57154c1feedf099f45b0ed8ed004ca39
Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
Christian Poetzsch [Tue, 13 Dec 2016 16:00:43 +0000 (16:00 +0000)]
Merge "egl: add EGL_IMG_context_priority to the whitelist"
am:
d94925cf3c
Change-Id: I8abde18794aa20175abf160013c9fa64e40a5870
Treehugger Robot [Tue, 13 Dec 2016 15:55:29 +0000 (15:55 +0000)]
Merge "egl: add EGL_IMG_context_priority to the whitelist"
Steven Moreland [Tue, 13 Dec 2016 01:21:09 +0000 (01:21 +0000)]
Merge "Make atrace not depend on /dev/hwbinder."
am:
228f4bdaa9
Change-Id: I411e1d562b50773f2517cdd2baea015ff1bbbc4b
Treehugger Robot [Tue, 13 Dec 2016 01:12:48 +0000 (01:12 +0000)]
Merge "Make atrace not depend on /dev/hwbinder."
Josh Gao [Tue, 13 Dec 2016 00:36:07 +0000 (00:36 +0000)]
Merge "atrace: introduce tracing category for adb."
am:
3c9a97902d
Change-Id: Ie645bb48bfa06b3e3dc7dbfc722dcb0bdf5a8977
Josh Gao [Tue, 13 Dec 2016 00:28:09 +0000 (00:28 +0000)]
Merge "atrace: introduce tracing category for adb."
Jeff Sharkey [Tue, 13 Dec 2016 00:10:51 +0000 (00:10 +0000)]
Merge "Split all dexopt-related code into dexopt.cpp."
am:
85a369c26e
Change-Id: I7a2028276fafd71d5c9294a635838fc1db56c0f1
Jeff Sharkey [Tue, 13 Dec 2016 00:10:50 +0000 (00:10 +0000)]
Split all dexopt-related code into dexopt.cpp.
am:
90aff26f01
Change-Id: I2a7b5fcf1a1143bbb34f8124e8e6b68fa701d6ed
Jeff Sharkey [Tue, 13 Dec 2016 00:01:23 +0000 (00:01 +0000)]
Merge "Split all dexopt-related code into dexopt.cpp."
Steven Moreland [Mon, 12 Dec 2016 23:18:06 +0000 (15:18 -0800)]
Make atrace not depend on /dev/hwbinder.
Bug:
31262344
Test: compiles
Change-Id: I2b4fa6815723507dd04afda19e99e5a15053dc66
Craig Donner [Mon, 12 Dec 2016 22:21:14 +0000 (22:21 +0000)]
Merge "Allow both RENDER and TEXTURE flags when creating native client buffers."
am:
2a3edda489
Change-Id: Ie071cbfb7d1d3f4c77f488e0f38bb4aa346072e0
Jeff Sharkey [Mon, 12 Dec 2016 22:14:56 +0000 (22:14 +0000)]
Merge "Minor shuffling of installd error reporting."
am:
991707a167
Change-Id: I34820e7997f70fea12c7b9d64999d419988317e2
Treehugger Robot [Mon, 12 Dec 2016 22:14:13 +0000 (22:14 +0000)]
Merge "Allow both RENDER and TEXTURE flags when creating native client buffers."
Treehugger Robot [Mon, 12 Dec 2016 22:06:43 +0000 (22:06 +0000)]
Merge "Minor shuffling of installd error reporting."
Jeff Sharkey [Mon, 12 Dec 2016 21:28:24 +0000 (14:28 -0700)]
Split all dexopt-related code into dexopt.cpp.
Only a few minor changes to return bool instead of binder::Status.
Test: builds, boots, apps install/uninstall fine
Change-Id: I538024c0e9da8ca2c0983a6e779c34bd40752053
Josh Gao [Tue, 29 Nov 2016 18:55:21 +0000 (10:55 -0800)]
atrace: introduce tracing category for adb.
Bug: http://b/
31289465
Test: systrace
Change-Id: Ida5e898206e5b224771393d2d2ba609183dc3b90
Jeff Sharkey [Mon, 12 Dec 2016 20:18:46 +0000 (13:18 -0700)]
Minor shuffling of installd error reporting.
We actually want to early-return when creating user data fails, and
we want to return an exception when getAppDataInode() is called with
unsupported flags.
Test: builds, boots, apps install/uninstall fine
Bug:
13758960,
30944031
Change-Id: I69816275a0be7a73a8ae7f3d90f2cdea80d8ebfc
Jeff Sharkey [Mon, 12 Dec 2016 19:48:04 +0000 (19:48 +0000)]
Merge "Return real error strings from installd."
am:
8f3ce2cd66
Change-Id: I2a5e1fa64f14e15b191e805e080489d078bcac70
Craig Donner [Fri, 9 Dec 2016 23:34:56 +0000 (15:34 -0800)]
Allow both RENDER and TEXTURE flags when creating native client buffers.
Bug:
33057441
Test: Cherrypick from internal repo.
Change-Id: I64ebf6bb5cb534d7f67a9338ebac4bf23a47d607
Jeff Sharkey [Mon, 12 Dec 2016 19:38:07 +0000 (19:38 +0000)]
Merge "Return real error strings from installd."
Jeff Sharkey [Sat, 10 Dec 2016 01:18:43 +0000 (18:18 -0700)]
Return real error strings from installd.
Now that we've moved installd to Binder, we can return nice detailed
error strings explaining why a call failed. This is particularly
valuable when we record the error message into the PackageManager
persistent log, because up until now those errors were limited to
an unhelpful "installd returned -1" message.
Also perform uniform enforcement of all incoming package name and
UUID arguments.
Test: builds, boots, apps install/uninstall fine
Bug:
13758960,
30944031
Change-Id: Ic1f65ce8c10b1329e01d6a49d72cafa879c4d8bc
Nick Kralevich [Mon, 12 Dec 2016 16:43:23 +0000 (16:43 +0000)]
Merge "service_manager.c: remove is_selinux_enabled calls"
am:
fce768d017
Change-Id: I1c53b32979e0d9d9706b52258acfd31341b9c4d1
Treehugger Robot [Mon, 12 Dec 2016 16:33:05 +0000 (16:33 +0000)]
Merge "service_manager.c: remove is_selinux_enabled calls"
Jeff Sharkey [Sat, 10 Dec 2016 23:07:06 +0000 (23:07 +0000)]
Merge "Filename refactoring, remove DEXOPT_OTA flag."
am:
68603971f6
Change-Id: Ieb4e045c7b2d4b57647ba6e3afbc18ec28540cfb
Jeff Sharkey [Sat, 10 Dec 2016 23:01:08 +0000 (23:01 +0000)]
Merge "Final push of installd to Binder; goodbye socket!"
am:
24865a0868
Change-Id: Iead84e70b56b40c49a0b358915bf5daa4df77882
Jeff Sharkey [Sat, 10 Dec 2016 22:57:22 +0000 (22:57 +0000)]
Merge "Filename refactoring, remove DEXOPT_OTA flag."
Jeff Sharkey [Sat, 10 Dec 2016 22:54:51 +0000 (22:54 +0000)]
Merge "Final push of installd to Binder; goodbye socket!"
Nick Kralevich [Sat, 10 Dec 2016 01:05:09 +0000 (17:05 -0800)]
service_manager.c: remove is_selinux_enabled calls
SELinux is always enabled. No need to check for it.
Test: Device boots and service manager works without errors.
Change-Id: I12be7336e7c31a5f5796ea1383f3dc934eb3c97c
Jeff Sharkey [Sat, 10 Dec 2016 00:06:57 +0000 (17:06 -0700)]
Filename refactoring, remove DEXOPT_OTA flag.
Test: builds, boots
Bug:
13758960,
30944031
Change-Id: Ib60899fc70b12f76fad9dfad596b513777752703
Jeff Sharkey [Wed, 7 Dec 2016 19:12:00 +0000 (12:12 -0700)]
Final push of installd to Binder; goodbye socket!
Move last two straggling installd commands to Binder and destroy the
socket-based communication channel forever.
Test: builds, boots, apps install fine, pre-OTA dexopt works
Bug:
13758960,
30944031
Change-Id: I2ecd604fb6627b9028a7e32f87d0367e4a4afde3
Francis Hart [Mon, 1 Dec 2014 14:04:49 +0000 (16:04 +0200)]
Surface: Ensure synchronisation of copyBlt
The Surface::lock() function has an optimisation for copying the
previously drawn contents from the frontbuffer to the (current)
backbuffer, so that the client does not have to redraw the whole surface
contents. This logic was not using the sync fence FD from
dequeueBuffer() and so was not correctly synchronised with pending
operations on the backbuffer.
Change-Id: Ib44574d50f8bdb4a23078cd8da1c5c512c876320
Jeff Sharkey [Wed, 7 Dec 2016 22:47:59 +0000 (22:47 +0000)]
Merge "Yet another set of installd Binder methods."
am:
77f764d66f
Change-Id: I92f820a6e51824f93a68109f74ce66d73679c28e
Jeff Sharkey [Wed, 7 Dec 2016 22:38:48 +0000 (22:38 +0000)]
Merge "Yet another set of installd Binder methods."
Jeff Sharkey [Wed, 7 Dec 2016 17:37:27 +0000 (10:37 -0700)]
Yet another set of installd Binder methods.
Pretty straightforward refactoring.
Test: builds, boots, apps install fine
Bug:
13758960,
30944031
Change-Id: I6e79fe1a3663807c24eb28dca684b539df398c13
Jeff Sharkey [Wed, 7 Dec 2016 06:45:24 +0000 (06:45 +0000)]
Merge "Move more installd methods to Binder."
am:
f69c024050
Change-Id: I8389e2fd000f1e90e22b83777ebaf44f26c90c61
Jeff Sharkey [Wed, 7 Dec 2016 06:39:27 +0000 (06:39 +0000)]
Merge "Move more installd methods to Binder."
Dan Willemsen [Wed, 7 Dec 2016 02:38:55 +0000 (02:38 +0000)]
Merge "Revert "Move installd back to Android.mk.""
am:
1ae0486a54
Change-Id: I3a57d5d8a62aa17b834091b142fd07c0d436708c
Treehugger Robot [Wed, 7 Dec 2016 02:35:35 +0000 (02:35 +0000)]
Merge "Revert "Move installd back to Android.mk.""
Jeff Sharkey [Tue, 6 Dec 2016 06:39:32 +0000 (23:39 -0700)]
Move more installd methods to Binder.
Test: builds, boots, apps install fine
Bug:
13758960,
30944031
Change-Id: I1fcaaaaad34c2f9a3d6a15443ef1764186669865
Dan Willemsen [Tue, 6 Dec 2016 23:44:57 +0000 (15:44 -0800)]
Revert "Move installd back to Android.mk."
This reverts commit
00b6f68c5c72252542a1e8c5dda4b420ed02c947 and
converts the new entries to Android.bp now that Soong supports AIDL.
Test: mmma -j framework/native/cmds/installd
Test: /data/nativetest64/installd_utils_test/installd_utils_test; fails
the same before/after
Change-Id: I327eb0bc28fa84cda669ec0df59da82ee10caf1f
Bill Yi [Wed, 7 Dec 2016 00:00:59 +0000 (00:00 +0000)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
am:
ecea1bfeae
Change-Id: I4c7f09b30207177815a24548a95e1bd823eeae85
Jeff Sharkey [Tue, 6 Dec 2016 23:52:32 +0000 (16:52 -0700)]
Merge commit '
f5c3b20f062ca646572ee6c07713eba691971c95' into dec6
Change-Id: I96a76c752bb1cd478bfd88f384537951c7b694e2
Jeff Sharkey [Tue, 6 Dec 2016 23:44:48 +0000 (23:44 +0000)]
Merge "DO NOT MERGE. Check and restorecon cache/code_cache directories."
am:
661cbb7f1b -s ours
Change-Id: Iddc4eb1f1a90dda1020c4d9a7375c2b4d8dcfdc6
Bill Yi [Tue, 6 Dec 2016 23:07:48 +0000 (15:07 -0800)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Jeff Sharkey [Tue, 6 Dec 2016 22:24:25 +0000 (22:24 +0000)]
Merge "Shuffle installd Binder implementation around."
Jeff Sharkey [Tue, 6 Dec 2016 22:24:17 +0000 (22:24 +0000)]
Merge "DO NOT MERGE. Check and restorecon cache/code_cache directories."
Jeff Sharkey [Tue, 6 Dec 2016 16:58:09 +0000 (16:58 +0000)]
Merge changes I0c8d4018,Ic9dfb243,I7e442b06
am:
17892731ec
Change-Id: Iadd662bf024e3acd58cf5c747d1546e457483a7b
Jeff Sharkey [Tue, 6 Dec 2016 16:58:06 +0000 (16:58 +0000)]
DO NOT MERGE. Recursively restorecon when SELinux label changes.
am:
7db6041d15 -s ours
Change-Id: Ie64c33ed2eaded73fe043955e0f954bc76f166f7
Jeff Sharkey [Tue, 6 Dec 2016 16:57:57 +0000 (16:57 +0000)]
DO NOT MERGE. Ignore setxattr() failures on tmpfs.
am:
4ed6507cfb -s ours
Change-Id: I5a8fa5606aaeaa75539a38227e78420acd4bf5bc
Jeff Sharkey [Tue, 6 Dec 2016 16:57:49 +0000 (16:57 +0000)]
DO NOT MERGE. Record "cache" inodes to clear while CE is locked.
am:
9a998f4762 -s ours
Change-Id: Id413a5bceff13dc717fa82209302662b77276165
Treehugger Robot [Tue, 6 Dec 2016 16:53:04 +0000 (16:53 +0000)]
Merge changes I0c8d4018,Ic9dfb243,I7e442b06
* changes:
DO NOT MERGE. Recursively restorecon when SELinux label changes.
DO NOT MERGE. Ignore setxattr() failures on tmpfs.
DO NOT MERGE. Record "cache" inodes to clear while CE is locked.
Jeff Sharkey [Tue, 6 Dec 2016 16:32:04 +0000 (09:32 -0700)]
Shuffle installd Binder implementation around.
Instead of writing wrapper methods in InstalldNativeService.cpp,
this change shifts the Binder implementation over into the existing
commands.cpp file. This will let us migrate all methods over, and
then perform one final file rename to InstalldNativeService.cpp.
The downside of this approach is that we no longer have a giant kill
switch to quickly switch back.
Moves the moveCompleteApp() method over to Binder.
Test: builds, boots, apps install fine
Bug:
13758960,
30944031
Change-Id: I53550e05bc2b65155c3de18424f67b1a95450a6f
Jeff Sharkey [Mon, 31 Oct 2016 17:22:19 +0000 (11:22 -0600)]
DO NOT MERGE. Check and restorecon cache/code_cache directories.
To speed up boot times, we recently relaxed SELinux restorecon logic
to only consider relabeling app storage when the top level SELinux
label changed.
However, if an app manually deletes either their cache or code_cache
directories, installd will helpfully recreate those directories at
the next boot, but they'll be stuck with incorrect SELinux labels
which an app can't fix. (Our historically aggressive restorecons had
relabeled them, which is why we didn't observe until now.)
This change checks the labels of the cache/code_cache directories,
and runs a restorecon if needed, fixing the issue above.
Test: delete cache and verify recreated with correct label
Bug:
32504081
Change-Id: I0114ae4129223e5909b1075d56a9b1145ebc5ef4
Jeff Sharkey [Wed, 21 Sep 2016 00:21:42 +0000 (18:21 -0600)]
DO NOT MERGE. Recursively restorecon when SELinux label changes.
PackageManager has been pretty aggressive about asking installd to
restorecon over app data when it thinks something might have
changed. However, in the vast majority of cases these are no-op
requests, and we waste a bunch of time recursively walking all
private data, easily costing 60+ seconds on dogfooder devices.
This change updates the initial "create_app_data" command to kick off
a recursive restorecon if it detects that the top-level SELinux label
on the app private data directory changes. The "create_app_data"
command is designed to ensure that an app's storage is ready, so
PackageManager always calls it at least once per boot before apps
can run. (This change means that PackageManager no longer needs to
make separate "restorecon_app_data" calls.)
Test: booted, verified that a label change triggered restorecon
Bug:
30768146
Change-Id: I0c8d4018cf8ff888d0ae07a82adc3d61a6002aad
Jeff Sharkey [Fri, 22 Jul 2016 17:38:54 +0000 (11:38 -0600)]
DO NOT MERGE. Ignore setxattr() failures on tmpfs.
Bug:
30210614
Change-Id: Ic9dfb2439b4b1056e1a58552be2e84f4e524321e
Jeff Sharkey [Fri, 15 Jul 2016 00:16:22 +0000 (18:16 -0600)]
DO NOT MERGE. Record "cache" inodes to clear while CE is locked.
There are two situations where we need to clear cached data from
all users, including those whose CE storage might still be locked:
1. When PackageManager is clearing caches to try making room for
package updates.
2. When the device fingerprint changes, we need to clear code caches
for all apps.
To enable this, we now record the inode number of the "cache" and
"code_cache" directories in xattrs of the parent directory. This is
just enough information to find the cache directories to enable
deleting files inside. When preparing CE storage for an app, we now
create these two directories and immediately write the inode numbers.
Bug:
26056125
Change-Id: I7e442b0676a695acf962593469793a93b03c8aee