OSDN Git Service
Roland Levillain [Fri, 8 Feb 2019 19:09:07 +0000 (19:09 +0000)]
Remove obsolete comment from cmds/installd/otapreopt_chroot.cpp.
APEX packages are deactivated at the end of `otapreopt_chroot`, so
loop devices used to mount them are returned to the system.
Test: m otapreopt_chroot
Bug:
113373927
Change-Id: I8b55787ffa7abdfe63f9778623f5e2317b8a4525
Orion Hodson [Wed, 6 Feb 2019 08:51:39 +0000 (08:51 +0000)]
Merge "SurfaceFlinger: remove DdmConnection"
Orion Hodson [Mon, 4 Feb 2019 09:36:10 +0000 (09:36 +0000)]
SurfaceFlinger: remove DdmConnection
DdmConnection dlopen's libart.so which is undesirable for the Runtime Module.
Bug:
120782499
Test: m -j100
Change-Id: Ib9a129329f7bd8d67b954e58810807c683b20b48
Merged-In: Ib9a129329f7bd8d67b954e58810807c683b20b48
Exempt-From-Owner-Approval: Cherry-pick of approved CL in master
Tri Vo [Tue, 5 Feb 2019 21:38:50 +0000 (21:38 +0000)]
Merge "libbinder: keep ashmem size >= 0"
Treehugger Robot [Tue, 5 Feb 2019 17:00:28 +0000 (17:00 +0000)]
Merge "installd_service_test: fix ServiceTest.CreateAppDataSnapshot_ClearsCache"
Nikita Ioffe [Sat, 2 Feb 2019 17:26:18 +0000 (17:26 +0000)]
installd_service_test: fix ServiceTest.CreateAppDataSnapshot_ClearsCache
This test is failing on cf_x86_phone-userdebug target, with an error:
Failed copying /data/local/tmp/user_de/0/com.foo to /data/local/tmp/misc_de/0/rollback'
Logs shows that cp fails with "No such file or directory error":
02-05 08:37:49.444 12746 12746 I cp : cp: /data/local/tmp/misc_de/0/rollback: No such file or directory
02-05 08:37:49.445 12746 12746 I cp : cp terminated by exit(1)
Testcase is failing, because it doesn't create
/data/local/tmp/misc_de/0/rollback directory. It is hard to spot, because
other testcases in installd_service_test also create that directory, meaning
that depending on the order in which testcases are run,
CreateAppDataSnapshot_ClearsCache will either fail or succeed.
Verified that this is the case by running only
CreateAppDataSnapshot_ClearsCache testcase:
./data/nativetest/installd_service_test/installd_service_test --gtest_filter=*CreateAppDataSnapshot_ClearsCache*
Bug:
123631551
Fixes:
123631551
Test: ./data/nativetest/installd_service_test/installd_service_test --gtest_filter=*CreateAppDataSnapshot_ClearsCache*
Change-Id: I8277efe6076bac28fd07ea3705a21aae6b8cab14
Alexander Smundak [Tue, 5 Feb 2019 02:04:18 +0000 (02:04 +0000)]
Merge "Use sh_binary instead of cc_prebuilt_binary for shell scripts"
Sasha Smundak [Mon, 4 Feb 2019 19:20:58 +0000 (11:20 -0800)]
Use sh_binary instead of cc_prebuilt_binary for shell scripts
Bug:
123829926
Test: treehugger
Change-Id: If9d2da84b30aebf8881c6da12efbe99549f5e0cc
Roland Levillain [Mon, 4 Feb 2019 13:40:17 +0000 (13:40 +0000)]
Merge "Have `otapreopt_chroot` bind-mount Bionic artifacts from the Runtime APEX."
Mathieu Chartier [Sat, 2 Feb 2019 01:14:50 +0000 (01:14 +0000)]
Merge "Add handling for PH property dex2oat_resolve_startup_strings"
Treehugger Robot [Fri, 1 Feb 2019 21:29:39 +0000 (21:29 +0000)]
Merge "Add "ls -l /data/anr" output to bugreport"
Mathieu Chartier [Thu, 31 Jan 2019 20:59:39 +0000 (12:59 -0800)]
Add handling for PH property dex2oat_resolve_startup_strings
Added unit test to verify the property is passed to the oat file.
Test: adb shell /data/nativetest64/installd_dexopt_test/installd_dexopt_test
Bug:
116059983
Bug:
123524494
Change-Id: Ib4fe5401d58c6ac05ef3011bef04e38d1b6d4ba9
Makoto Onuki [Fri, 1 Feb 2019 01:08:59 +0000 (17:08 -0800)]
Add "ls -l /data/anr" output to bugreport
Bug:
123720446
Test: with adb bugreport
Change-Id: I2a00d370b8e61b4f0059cdf2d8d67136968a9f20
Roland Levillain [Fri, 1 Feb 2019 16:29:22 +0000 (16:29 +0000)]
Merge "Refactor the APEX package activation/deactivation logic in `otapreopt_chroot`."
Roland Levillain [Thu, 31 Jan 2019 18:30:17 +0000 (18:30 +0000)]
Have `otapreopt_chroot` bind-mount Bionic artifacts from the Runtime APEX.
Have `otapreopt_chroot` bind-mount Bionic artifacts (`linker(64)`,
`libc.so`, `libm.so`, `libdl.so`) from the Runtime APEX
(`/postinstall/apex/com.android.runtime`) into `/postinstall/bionic/`,
much the same way `init` sets up Bionic bind-mounts in the default
mount namespace.
Test: m otapreopt_chroot
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug:
113373927
Bug:
120266448
Change-Id: Ie254a94ae35e62f88375bc89380456f15796566a
Roland Levillain [Fri, 1 Feb 2019 13:15:58 +0000 (13:15 +0000)]
Refactor the APEX package activation/deactivation logic in `otapreopt_chroot`.
This is in prevision of reusing the package deactivation logic as a
clean-up step upon Bionic bind-mounting failure.
Test: m otapreopt_chroot
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug:
113373927
Bug:
120266448
Change-Id: I17b2d57252af7aca1fc27b4c051d6cc9d373c223
Nikita Ioffe [Fri, 1 Feb 2019 12:59:55 +0000 (12:59 +0000)]
Merge "installd: remove restored ce_data if de_data rollback failed"
Nikita Ioffe [Fri, 1 Feb 2019 11:50:12 +0000 (11:50 +0000)]
Merge "installd: Add destroyAppDataSnapshot and corresponding binder API"
Nikita Ioffe [Fri, 25 Jan 2019 13:54:43 +0000 (13:54 +0000)]
installd: Add destroyAppDataSnapshot and corresponding binder API
- destroyAppDataSnapshot: deletes both ce and de snapshots (controlled
via storageFlags), for ce snapshot fallbacks to deleting it by it's
inode in case snapshot is not accessible (user hasn't unlocked the
phone yet).
- snapshotAppData: in case ce snapshot was requested, it will now return
inode if a folder with the snapshot. Otherwise it will return 0.
Passing ceSnapshotInode to destroyAppDataSnapshot should make logic
inside RollbackManagerService a bit easier. Since it will be able to
delete ce snapshot regardless of user unlocking their phone.
Bug:
112431924
Test: installd_service_test installd_utils_test
Change-Id: I015de12593b87f3000f004cc0a901a9208d0b693
Merged-In: I015de12593b87f3000f004cc0a901a9208d0b693
Treehugger Robot [Thu, 31 Jan 2019 22:14:21 +0000 (22:14 +0000)]
Merge "Installd: Refactor binder tests"
Steven Moreland [Thu, 31 Jan 2019 19:35:33 +0000 (19:35 +0000)]
Merge "libbinder_ndk: ScopedAResource into impl namespace"
Andreas Gampe [Thu, 31 Jan 2019 17:22:27 +0000 (09:22 -0800)]
Installd: Refactor binder tests
Add helper macros to automatically print return status errors.
Bug:
123631551
Test: atest --test-mapping frameworks/native/cmds/installd
Merged-In: I4ab448fabbab91cc608c318a07f9bf95547062fc
Change-Id: I4ab448fabbab91cc608c318a07f9bf95547062fc
Treehugger Robot [Thu, 31 Jan 2019 12:48:36 +0000 (12:48 +0000)]
Merge "Fix regression in startBugreport flow"
Nandana Dutt [Thu, 31 Jan 2019 10:31:43 +0000 (10:31 +0000)]
Merge "Ensure only one bugreport is in progress in dumpstate"
Treehugger Robot [Thu, 31 Jan 2019 10:22:02 +0000 (10:22 +0000)]
Merge "installd: Create "lib" symlink with the correct label."
Treehugger Robot [Thu, 31 Jan 2019 03:44:38 +0000 (03:44 +0000)]
Merge "Add OWNERS to inputflinger"
Steven Moreland [Thu, 31 Jan 2019 00:51:57 +0000 (00:51 +0000)]
Merge "libbinder_ndk: remove draft status"
Michael Wright [Wed, 30 Jan 2019 22:00:04 +0000 (22:00 +0000)]
Add OWNERS to inputflinger
Test: N/A
Change-Id: If16fbe675557cb01770bdc2d6cbc55c46c384d9c
Nick Kralevich [Wed, 30 Jan 2019 20:32:21 +0000 (12:32 -0800)]
installd: Create "lib" symlink with the correct label.
When installing an application which has a 32 bit ABI, system_server
(via installd) creates a compatibility "lib" symlink in the application
home directory. See:
https://android.googlesource.com/platform/frameworks/base/+/
d5d7492040c1730899cccef9916541176004635c/services/core/java/com/android/server/pm/PackageManagerService.java#22876
and
https://android.googlesource.com/platform/frameworks/native/+/
6b8e52c805f124f8b1d7e511ae68d01d0769c32b/cmds/installd/InstalldNativeService.cpp#2077
When a process creates a filesystem object within a directory, in
inherits the directory type, but DOES NOT inherit the directory MLS
categories. See
* https://www.spinics.net/lists/selinux/msg21893.html
* https://www.spinics.net/lists/selinux/msg21897.html
for more details on this behavior.
Without subsequent fixup, an installd created symlink in an
application home directory will have incorrect SELinux MLS categories,
and as a result, may be unreadable to the application.
Modify installd to assign the "lib" label the same MLS categories as
the enclosing parent directory.
Steps to reproduce:
1) adb shell
2) su
3) ls -laZ /data/data/*/lib
Expected:
crosshatch:/ # ls -laZ /data/data/*/lib
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0:c177,c256,c512,c768 46 2019-01-30 12:46 /data/data/com.android.chrome/lib -> /system/product_services/app/Chrome/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0:c512,c768 38 2019-01-30 12:46 /data/data/com.android.omadm.service/lib -> /system/priv-app/DMService/lib/arm
lrwxrwxrwx 1 root root u:object_r:privapp_data_file:s0:c512,c768 54 2019-01-30 12:46 /data/data/com.android.vending/lib -> /system/product_services/priv-app/Phonesky/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0:c141,c256,c512,c768 30 2019-01-30 12:46 /data/data/com.google.android.apps.tycho/lib -> /product/app/Tycho/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0:c512,c768 46 2019-01-30 12:46 /data/data/com.google.android.videos/lib -> /system/product_services/app/Videos/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0:c180,c256,c512,c768 58 2019-01-30 12:46 /data/data/com.google.android.webview/lib -> /system/product_services/app/TrichromeWebView/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0:c512,c768 34 2019-01-30 12:46 /data/data/com.qti.ltebc/lib -> /system/app/QAS_DVC_MSP/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0:c512,c768 38 2019-01-30 12:46 /data/data/com.qualcomm.ltebc_vzw/lib -> /system/app/QAS_DVC_MSP_VZW/lib/arm
Actual:
crosshatch:/ # ls -laZ /data/data/*/lib
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0 46 2019-01-30 12:36 /data/data/com.android.chrome/lib -> /system/product_services/app/Chrome/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0 38 2019-01-30 12:36 /data/data/com.android.omadm.service/lib -> /system/priv-app/DMService/lib/arm
lrwxrwxrwx 1 root root u:object_r:privapp_data_file:s0 54 2019-01-30 12:36 /data/data/com.android.vending/lib -> /system/product_services/priv-app/Phonesky/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0 30 2019-01-30 12:36 /data/data/com.google.android.apps.tycho/lib -> /product/app/Tycho/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0 46 2019-01-30 12:36 /data/data/com.google.android.videos/lib -> /system/product_services/app/Videos/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0 58 2019-01-30 12:36 /data/data/com.google.android.webview/lib -> /system/product_services/app/TrichromeWebView/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0 34 2019-01-30 12:36 /data/data/com.qti.ltebc/lib -> /system/app/QAS_DVC_MSP/lib/arm
lrwxrwxrwx 1 root root u:object_r:app_data_file:s0 38 2019-01-30 12:36 /data/data/com.qualcomm.ltebc_vzw/lib -> /system/app/QAS_DVC_MSP_VZW/lib/arm
Bug:
123350324
Test: manual
Change-Id: Id09846556cb0ba7e39fbc57f9039f072d6a752a1
Steven Moreland [Wed, 30 Jan 2019 20:29:53 +0000 (12:29 -0800)]
libbinder_ndk: ScopedAResource into impl namespace
This is an implementation detail that may change in the future.
Fixes:
123601615
Test: atest android.binder.cts
Change-Id: I006d8bf8b64228a2cc27bee671b6a9838e8df492
Nandana Dutt [Wed, 30 Jan 2019 13:13:52 +0000 (13:13 +0000)]
Fix regression in startBugreport flow
Ensure what's passed to the background thread is around.
BUG:
123617758
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
Test: manual test of API via a test client
Change-Id: I161c0d378c04cf925778fdb8712b1bd68901fb91
Nandana Dutt [Wed, 30 Jan 2019 10:55:37 +0000 (10:55 +0000)]
Merge "Use screenshot file descriptor if available"
Tri Vo [Tue, 29 Jan 2019 21:23:46 +0000 (13:23 -0800)]
libbinder: keep ashmem size >= 0
Avoid integer overflow.
Bug:
123590642
Test: device boots
Change-Id: I9f25827842da00c4e69efca849c6a94721964007
Treehugger Robot [Wed, 30 Jan 2019 01:58:55 +0000 (01:58 +0000)]
Merge "Fix/suppress google-explicit-constructor warnings"
Chih-Hung Hsieh [Thu, 20 Dec 2018 23:54:30 +0000 (15:54 -0800)]
Fix/suppress google-explicit-constructor warnings
* Use NOLINT or NOLINTNEXTLINE to suppress warnings on intended converters
Bug:
28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I5c73437ecee0d672863664cc8c2970b099597f77
Treehugger Robot [Tue, 29 Jan 2019 21:11:50 +0000 (21:11 +0000)]
Merge "installd: clear app's cache before doing a snapshot"
Steven Moreland [Tue, 29 Jan 2019 19:51:13 +0000 (11:51 -0800)]
libbinder_ndk: remove draft status
So that it is included in future NDK releases.
Fixes:
123299014
Test: N/A
Change-Id: I118b3190ce01147af84a33156ac01cdcde54a20d
Roland Levillain [Tue, 29 Jan 2019 18:07:59 +0000 (18:07 +0000)]
Merge "Restore security context of `/postinstall/apex` earlier in otapreopt_chroot."
Nandana Dutt [Tue, 29 Jan 2019 16:10:45 +0000 (16:10 +0000)]
Use screenshot file descriptor if available
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
BUG:
123576130
Fixes:
123576130
Change-Id: I2ac2dc3bfc7920a00e4148ca29169c171558de3a
Nandana Dutt [Tue, 29 Jan 2019 15:59:38 +0000 (15:59 +0000)]
Ensure only one bugreport is in progress in dumpstate
BUG:
123571915
Test: current bugreport flows work
Test: interactive bugreport
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
Test: adb shell /data/nativetest64/dumpstate_smoke_test/dumpstate_smoke_test
Change-Id: I1145a27ed6dde43142789d876902e32d1a286bb2
Treehugger Robot [Tue, 29 Jan 2019 15:56:47 +0000 (15:56 +0000)]
Merge "Convert Android.mk file to Android.bp"
Nikita Ioffe [Wed, 23 Jan 2019 14:32:48 +0000 (14:32 +0000)]
installd: clear app's cache before doing a snapshot
Bug:
112431924
Test: installd_service_test
Change-Id: I4a6c3bbf071dcee007e48ece40e5009c1a43ecca
Treehugger Robot [Tue, 29 Jan 2019 11:13:16 +0000 (11:13 +0000)]
Merge "installd: Validate volumeUuid in snapshotAppData and restoreAppDataSnapshot"
Treehugger Robot [Tue, 29 Jan 2019 01:46:08 +0000 (01:46 +0000)]
Merge "Add vendor dumpsys."
Roland Levillain [Thu, 24 Jan 2019 10:51:30 +0000 (10:51 +0000)]
Restore security context of `/postinstall/apex` earlier in otapreopt_chroot.
Invoke `selinux_android_restorecon` on `/postinstall/apex` just after
mounting a tmpfs filesystem in it, so that this directory is correctly
labeled (with type `postinstall_apex_mnt_dir`) and may be manipulated
in following operations (`chmod`, `chown`, etc.) following updated
policies restricted to `postinstall_apex_mnt_dir` (instead of
`tmpfs`).
Test: m otapreopt_chroot
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug:
113373927
Bug:
120796514
Change-Id: I0b243a00e0443e439afda055d3b12aa9eefe0503
Treehugger Robot [Mon, 28 Jan 2019 22:04:58 +0000 (22:04 +0000)]
Merge "Update filesystem permissions for task tracepoints."
Nikita Ioffe [Mon, 21 Jan 2019 17:56:03 +0000 (17:56 +0000)]
installd: Validate volumeUuid in snapshotAppData and restoreAppDataSnapshot
Only supported values are nullptr and "TEST".
Bug:
112431924
Test: installd_service_test
Change-Id: I27260a3554d009053206d8e3d1e213306ff3d7d5
Carmen Jackson [Fri, 25 Jan 2019 01:31:25 +0000 (17:31 -0800)]
Update filesystem permissions for task tracepoints.
These tracepoints are used for memory debugging, and should be enabled
for user builds.
Bug:
123367055
Test: manual: took a trace with Traceur and verified that these
tracepoints appear.
Change-Id: I31fafc11d60a96f2a4c58f2670decb2480c0ec78
Merged-In: I31fafc11d60a96f2a4c58f2670decb2480c0ec78
Nandana Dutt [Mon, 28 Jan 2019 17:20:45 +0000 (17:20 +0000)]
Merge "Remove unused DumpstateOptions parcel"
Nikita Ioffe [Mon, 28 Jan 2019 12:09:47 +0000 (12:09 +0000)]
Merge "installd: clear existing snapshots before performing a new one"
Nandana Dutt [Fri, 16 Nov 2018 17:28:25 +0000 (17:28 +0000)]
Remove unused DumpstateOptions parcel
Now using bugreport mode to indicate runtime options.
BUG:
111441001
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
Change-Id: I1890323394a5f146a8e0e971914b8b7437e75547
Steven Moreland [Sat, 26 Jan 2019 03:28:52 +0000 (03:28 +0000)]
Merge "Load libandroid_runtime lazily."
Steven Moreland [Sat, 26 Jan 2019 03:14:27 +0000 (19:14 -0800)]
Add vendor dumpsys.
$ adb shell /vendor/bin/dumpsys -l
<hangs>
$ adb shell /vendor/bin/sh -c "/vendor/bin/dumpsys -l"
Currently running services:
...
$ adb root
$ adb shell /vendor/bin/dumpsys -l
Currently running services:
...
Bug:
123433249
Test: manual (see above)
Change-Id: I4d74be3ef43e7d65154be27c4cf85ab32e09dfef
Steven Moreland [Wed, 23 Jan 2019 00:02:02 +0000 (16:02 -0800)]
Load libandroid_runtime lazily.
Memory/performance for low-level processes that do not need this.
Bug:
118783779 # follow-up to cleanup
Bug:
123284997
Test: atest android.binder.cts
Change-Id: Ie8de0a082dfb75786a45a448185fedb317daa94e
Sasha Smundak [Fri, 25 Jan 2019 07:20:47 +0000 (23:20 -0800)]
Convert Android.mk file to Android.bp
See build/soong/README.md for more information.
Bug:
122332691
Test: treehugger
Change-Id: I2146596aad99baa128511d07ab73470885319d49
Jiwen Cai [Fri, 25 Jan 2019 18:42:22 +0000 (18:42 +0000)]
Merge "Add jwcai and tianyuj to the owner's file of libs/ui"
Suren Baghdasaryan [Fri, 25 Jan 2019 17:09:02 +0000 (17:09 +0000)]
Merge "DO NOT MERGE: Revert "Revert "Add libprocessgroup dependency and fix sched_policy include"""
Suren Baghdasaryan [Fri, 25 Jan 2019 05:29:23 +0000 (05:29 +0000)]
DO NOT MERGE: Revert "Revert "Add libprocessgroup dependency and fix sched_policy include""
This reverts commit
f145309d9c1549b06029bb00a3d5fe2bf459ed02.
Reason for revert: AOSP is fixed with new vendor image
Change-Id: If522adf1ea36e7792b1ae26234ec2bdb2756bdfd
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Nikita Ioffe [Fri, 25 Jan 2019 11:44:36 +0000 (11:44 +0000)]
installd: remove restored ce_data if de_data rollback failed
I think it's clearer (and safer) if failed rollback leaves app devoid of
any data rather that with only ce_data.
LMK if you disagree, I will just abandon this change then. :)
I tried adding a test to make de_rollback fail (while keeping
ce_rollback successful), but failed to.
Only idea I have in mind is to intercept calls to /system/bin/cp, which
doesn't look like a unit test anymore (and also I'm not sure how
feasible it is).
Test: existing tests in installd_service_test pass
Bug:
112431924
Change-Id: I3c6214d70bac682874ea846a01294b5361470f93
Nikita Ioffe [Wed, 23 Jan 2019 16:32:13 +0000 (16:32 +0000)]
installd: clear existing snapshots before performing a new one
Bug:
112431924
Test: installd_service_test
Change-Id: I23a97f113e8a7423a7c509ee06d1436a2c2c961f
Roland Levillain [Fri, 25 Jan 2019 12:23:17 +0000 (12:23 +0000)]
Merge "Refactor paths to Android Runtime binaries in directory `cmds/installd/`."
Roland Levillain [Fri, 25 Jan 2019 11:56:30 +0000 (11:56 +0000)]
Merge changes from topics "runtime-apex-otapreopt_chroot-tear-down", "runtime-apex-installd-support", "runtime-apex-otapreopt_chroot-support"
* changes:
Implement a tear-down phase in otapreopt_chroot.
Revert^2 "Have installd use ART binaries from the Android Runtime APEX."
Revert^2 "Have `otapreopt_chroot` mount APEX packages in the chroot dir."
Treehugger Robot [Thu, 24 Jan 2019 15:14:05 +0000 (15:14 +0000)]
Merge "Use the consent service to check if user has consented to taking a bugreport"
Nandana Dutt [Fri, 18 Jan 2019 17:13:52 +0000 (17:13 +0000)]
Use the consent service to check if user has consented to taking a
bugreport
Test: verified current flows of bugreport generation still work
Test: TBD test the new flow
Change-Id: I5fc154905515db664f76d1453c9d79364dc2f01e
Treehugger Robot [Thu, 24 Jan 2019 12:16:35 +0000 (12:16 +0000)]
Merge "Add IIncidentCompanion binder API."
Narayan Kamath [Thu, 24 Jan 2019 10:25:00 +0000 (10:25 +0000)]
Merge "installd: Implement support for userdata snapshot and restore."
Suren Baghdasaryan [Thu, 24 Jan 2019 06:57:55 +0000 (06:57 +0000)]
Merge "DO NOT MERGE: Revert "Add libprocessgroup dependency and fix sched_policy include""
Suren Baghdasaryan [Thu, 24 Jan 2019 04:53:17 +0000 (20:53 -0800)]
DO NOT MERGE: Revert "Add libprocessgroup dependency and fix sched_policy include"
This reverts commit
dc9078de949983a91b04dedc78e4089645f8626d.
Reason for revert: Broke AOSP
Change-Id: Ia5cb6e8f829669a6e0dd01260605b986a1282c85
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Treehugger Robot [Thu, 24 Jan 2019 04:50:18 +0000 (04:50 +0000)]
Merge "Add FEATURE_TELEPHONY_IMS feature definition"
Brad Ebinger [Wed, 23 Jan 2019 22:59:46 +0000 (14:59 -0800)]
Add FEATURE_TELEPHONY_IMS feature definition
Add an IMS feature definition so that telephony doesn't
bring up unnecessary resources or run GTS tests on a device
that doesn't support it.
Bug:
118823723
Test: manual
Change-Id: I359f9e337ec785745f5d0ca778615d12c61faedf
Joe Onorato [Tue, 11 Dec 2018 22:24:49 +0000 (14:24 -0800)]
Add IIncidentCompanion binder API.
It's in frameworks/native because dumpstate uses it.
BUG:
111441001
Test: builds
Change-Id: I0897bec8882395d3444f46a145e9f91f4e9da32d
Roland Levillain [Wed, 23 Jan 2019 15:59:50 +0000 (15:59 +0000)]
Refactor paths to Android Runtime binaries in directory `cmds/installd/`.
Have `dexopt` and `otapreopt` use the same set of definitions.
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug:
113373927
Bug:
120796514
Change-Id: I94e55a831c68b67cb81cfa91281b2feb0cc4b365
Mathieu Chartier [Wed, 23 Jan 2019 17:02:31 +0000 (17:02 +0000)]
Merge "[view compilation] Add viewcompiler support to installd"
Treehugger Robot [Wed, 23 Jan 2019 17:00:48 +0000 (17:00 +0000)]
Merge "Dumpstate aidl: add cancelBugreport"
Nandana Dutt [Wed, 23 Jan 2019 08:29:23 +0000 (08:29 +0000)]
Dumpstate aidl: add cancelBugreport
This allows adding a cancel method to the bugreporting API. Note that it
is implemented on the java side.
Also removed unused args from onFinished.
BUG:
111441001
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
Change-Id: I6a3a0d652c89dc157de4a4056ccddc40e5d6e549
Tianyu Jiang [Tue, 22 Jan 2019 22:18:13 +0000 (14:18 -0800)]
Add jwcai and tianyuj to the owner's file of libs/ui
for the development of BufferHub project. OWNERS file is out of sync.
This change syncs the file and added jwcai and tianyuj to the OWNERS.
Bug: None
Test: None
Change-Id: I817d3dc323e46aa7417a583d1faa8e0bbb87c3df
Treehugger Robot [Tue, 22 Jan 2019 23:30:39 +0000 (23:30 +0000)]
Merge "Add a flag that makes dumpstate wait for options"
Nandana Dutt [Tue, 22 Jan 2019 12:10:16 +0000 (12:10 +0000)]
Add a flag that makes dumpstate wait for options
There are 2 ways of running bugreports. Running dumpstate binary
directly with command line options (existing flow), or running the
binary to start the binder service, which waits for a caller to supply
arguments like file descriptors to write output to (new flow to support
the bugreport triggering API).
Support the second flow with a new commandline flag.
Also add a new service that uses the flag, to be used in the API.
BUG:
111441001
Test: adb shell setprop "ctl.start" "bugreportd" -> starts service &
waits.
Test: interactive bugreport still works
Change-Id: I64cd03d15f45a896692d7462998d4faa6e413ef1
Suren Baghdasaryan [Tue, 22 Jan 2019 20:58:15 +0000 (20:58 +0000)]
Merge "Add libprocessgroup dependency and fix sched_policy include"
Narayan Kamath [Mon, 14 Jan 2019 15:21:52 +0000 (15:21 +0000)]
installd: Implement support for userdata snapshot and restore.
Adds two binder APIs:
- snapshotAppData: Makes a copy of the apps credential encrypted
and/or device encrypted data for a given user to one of
/data/misc_[ce|de]/rollback. This path is writable only by
installd.
- restoreAppDataSnapshot: Restores a copy of the apps credential
encrypted and/or device encrypted data from a snapshot, if one
exists.
Implemented for use from RollbackManagerService, which will make
a transient copy of an app package as well as its data in order to
roll them back within a specified window.
Bug:
112431924
Test: installd_utils_test, installd_service_test
Change-Id: I3e4d36c11e52fb885b585b1946e215cf986206fd
Merged-In: I3e4d36c11e52fb885b585b1946e215cf986206fd
Roland Levillain [Fri, 18 Jan 2019 11:56:50 +0000 (11:56 +0000)]
Implement a tear-down phase in otapreopt_chroot.
Collect the list of APEX packages activated by `otapreopt_chroot` and
deactivate them after executing `otapreopt` (in its own process).
Also share android::installd::Exec between `otapreopt` and
`otapreopt_chroot`.
This tear-down phase ensures loop devices associated during by
`otapreopt_chroot` are detached before `otapreopt_chroot` exits.
Test: m otapreopt_chroot
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug:
113373927
Bug:
120796514
Change-Id: I236ac49bb698fb672e7a4f9de9903229e535e9c6
Roland Levillain [Wed, 12 Dec 2018 15:06:16 +0000 (15:06 +0000)]
Revert^2 "Have installd use ART binaries from the Android Runtime APEX."
This reverts commit
3a77febd0b57dcaceee2bb13b4bccddffb25ffc8.
Test: Device boot test (with Android Runtime APEX).
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug:
113373927
Bug:
120796514
Change-Id: Ib22f91b5f8916f13b31bcd630600a86b9d86e25d
Roland Levillain [Tue, 18 Dec 2018 12:15:12 +0000 (12:15 +0000)]
Revert^2 "Have `otapreopt_chroot` mount APEX packages in the chroot dir."
We need at least the Android Runtime APEX to be able to run `dex2oat`
in `otapreopt`. For simplicity, reuse `apexd`'s logic and mount all
the APEX packages found on the system partition in /postinstall/apex.
This is a temporary change. The final design will integrate A/B OTA
updates and `apexd`.
This reverts commit
00b5b3f01b7b6bf96d0d66d650ede8aa4734bf3f.
Test: m otapreopt_chroot
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug:
113373927
Bug:
120796514
Change-Id: Ifa45c282d04ae443e55bd41d8c9cbb4ea5f837d4
Suren Baghdasaryan [Sat, 3 Nov 2018 02:15:37 +0000 (19:15 -0700)]
Add libprocessgroup dependency and fix sched_policy include
surfaceflinger, installd and libvrflinger are using set_sched_policy
which is moved into libprocessgroup. Add libprocessgroup dependency
and include required headers.
Exempt-From-Owner-Approval: janitorial
Bug:
111307099
Test: builds, boots
Merged-In: Iccb7c54a85ca148d44ce687fe05e89ad4369e104
Change-Id: Iccb7c54a85ca148d44ce687fe05e89ad4369e104
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Treehugger Robot [Tue, 22 Jan 2019 11:25:12 +0000 (11:25 +0000)]
Merge "Remove outfile option from dumpstate"
Treehugger Robot [Tue, 22 Jan 2019 09:09:34 +0000 (09:09 +0000)]
Merge "Fix dumpstate test instructions"
Nicolas Geoffray [Tue, 22 Jan 2019 08:43:55 +0000 (08:43 +0000)]
Merge "Delay start of surfaceflinger until after the Runtime APEX is mounted."
Martin Stjernholm [Thu, 17 Jan 2019 21:19:14 +0000 (21:19 +0000)]
Delay start of surfaceflinger until after the Runtime APEX is mounted.
It depends on libdexfile_external which is provided by the Runtime APEX.
Test: flash and boot
Test: atest CtsJdwpTestCases
Bug:
113373927
Change-Id: Ic3af21d74854cce02180d3d2e9e3b1b338456e46
Exempt-From-Owner-Approval: Trying this CL out for gathering numbers - will revert if substantial.
Nandana Dutt [Mon, 21 Jan 2019 15:56:48 +0000 (15:56 +0000)]
Remove outfile option from dumpstate
Remove the ability to write to any directory. Instead support only
writing to its internal directory (currently /bugreports, which points
to Shell app's directory), or a caller-specified file fd.
We cannot expect all callers to supply an fd, because in the poweruser
case where the bugreport is triggered with combo keys, the API is
bypassed and dumpstate binary will be run.
This should be a safe change since sepolicy should not allow dumpstate
to write to arbitrary directories anyway.
This keeps the API lean and keeps the user consent for sharing more
focused.
Note that the current callers all pass in /data/user_de/0/com.android.shell/files/bugreports/bugreport
as the outfile argument already, which is the location /bugreports
symlink points to, so it should work just as before.
BUG:
111441001
Test: adb bugreport
Test: adb shell bugreport
Test: interactive bugreport
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
Change-Id: Iae8593dc4745147b7bdae25738fcd69b3c20aaf0
Nandana Dutt [Mon, 21 Jan 2019 17:47:09 +0000 (17:47 +0000)]
Fix dumpstate test instructions
Amend command to copy all tests including smoke tests
Test: verified instruction
Change-Id: I107be21f2acab3a9965a114fb2219e3d21c871b1
Treehugger Robot [Sat, 19 Jan 2019 13:48:29 +0000 (13:48 +0000)]
Merge "Add calling uid and calling package to startBugreport"
Nandana Dutt [Wed, 16 Jan 2019 17:45:18 +0000 (17:45 +0000)]
Add calling uid and calling package to startBugreport
This is so they can be passed to the consent service which will present
the user with a dialog and get their consent to share the bugreport with
the calling package.
Also update a few TODOs.
BUG:
111441001
Test: builds
Change-Id: I0a72c8e2d697f8a25f307cfce73c8f03ed1746e2
Eric Holk [Thu, 10 Jan 2019 02:17:27 +0000 (18:17 -0800)]
[view compilation] Add viewcompiler support to installd
This change adds methods to installd to call viewcompiler and generate
precompiled layouts when requested either by `pm compile --compile-layouts`,
package install, or package upgrade.
Bug:
111895153
Test: manual
Change-Id: Ic021d7a41c15642664f44542653170ad24055f22
Hector Dearman [Fri, 18 Jan 2019 17:04:05 +0000 (17:04 +0000)]
Merge "Fix typo cpu6 -> cpu7"
Hector Dearman [Fri, 18 Jan 2019 14:00:32 +0000 (14:00 +0000)]
Fix typo cpu6 -> cpu7
This prevented perfetto from clearing the ftrace buffer for cpu7
(and only cpu7). Seems a copy paste error.
Test: Untested.
Bug:
122609457
Change-Id: I2096dc333880d94cb25ba5ce50272444e8ae999e
Treehugger Robot [Fri, 18 Jan 2019 01:39:21 +0000 (01:39 +0000)]
Merge "Remove ftrace dumping from dumpstate"
Treehugger Robot [Fri, 18 Jan 2019 01:08:40 +0000 (01:08 +0000)]
Merge "Fix/suppress sensor google-explicit-constructor warnings"
Primiano Tucci [Thu, 17 Jan 2019 15:51:14 +0000 (15:51 +0000)]
Remove ftrace dumping from dumpstate
When capturing a bug report, dumpstate checks if ftrace
is on, and if so, steals the trace from the buffer.
This feature doesn't seem to be actually used, getting
rid of unnecessary complexity and unnecessary permissions.
Furthermore, stealing the trace is bad for iorapd, studio
perfetto, Traceur and all the other trace users.
Matching selinux change: aosp/875395
Bug:
122987614
Test: run dumpstate before and after patch,
file sizes are comparable,
observed no tracing-related errors.
Change-Id: I8bcd478c9bde776a2ec21b5e9a97aedaaa3681fd
Chih-Hung Hsieh [Thu, 20 Dec 2018 23:49:36 +0000 (15:49 -0800)]
Fix/suppress sensor google-explicit-constructor warnings
* Add explicit to conversion constructors/operators
* Use NOLINT or NOLINTNEXTLINE to suppress warnings on intended converters
Bug:
28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I63e196797c287182fe8ccdad0e896f864a10bf76
Treehugger Robot [Thu, 17 Jan 2019 21:06:33 +0000 (21:06 +0000)]
Merge "Add filemap events for iorapd"