OSDN Git Service

android-x86/frameworks-native.git
5 years agoMerge "Call dmabuf_dump tool in dumpstate"
Treehugger Robot [Wed, 13 Feb 2019 22:39:49 +0000 (22:39 +0000)]
Merge "Call dmabuf_dump tool in dumpstate"

5 years agoMerge changes from topic "cut_dependency"
Treehugger Robot [Wed, 13 Feb 2019 02:17:34 +0000 (02:17 +0000)]
Merge changes from topic "cut_dependency"

* changes:
  Revert "Delay start of surfaceflinger until after the Runtime APEX is mounted."
  Cut the static deps from libvulkan to libnativeloader and libnativebridge

5 years agoCall dmabuf_dump tool in dumpstate
Erick Reyes [Mon, 11 Feb 2019 22:46:36 +0000 (14:46 -0800)]
Call dmabuf_dump tool in dumpstate

This tool will dump shared buffer information on bug reports. Since it
is being rolled out on specific products, look for the binary in
/product/bin and execute it if found.

Bug: 63860998

Change-Id: If6e4ff48d3bc62e1fa7a88f16cc6ab0d5b05176f
Signed-off-by: Erick Reyes <erickreyes@google.com>
5 years agoMerge "libbinder_ndk: vendor available"
Steven Moreland [Tue, 12 Feb 2019 17:28:43 +0000 (17:28 +0000)]
Merge "libbinder_ndk: vendor available"

5 years agoMerge "Clear BOOTCLASSPATH for APP AOT compilation."
Vladimir Marko [Tue, 12 Feb 2019 13:45:57 +0000 (13:45 +0000)]
Merge "Clear BOOTCLASSPATH for APP AOT compilation."

5 years agoRevert "Delay start of surfaceflinger until after the Runtime APEX is mounted."
Jiyong Park [Mon, 28 Jan 2019 15:43:04 +0000 (00:43 +0900)]
Revert "Delay start of surfaceflinger until after the Runtime APEX is mounted."

This reverts commit a1ce9e7a833aa4a98ab5530a3a713838df7a4803.

Reason: static deps to libnativeloader and libnativebridge no longer
exist

Bug: 123403798
Test: device boots to the UI
Test: bootanimation is shown from the very beginning

Change-Id: I40fc87e0189e410e8501837517481f87786d5503

5 years agoCut the static deps from libvulkan to libnativeloader and libnativebridge
Jiyong Park [Mon, 28 Jan 2019 15:36:19 +0000 (00:36 +0900)]
Cut the static deps from libvulkan to libnativeloader and libnativebridge

The dependencies are replaced with *_lazy libraries which dynamically
load and links to the real libraries at runtime using dlopen and dlsym.

This allows libvulkan to be used by early processes that are executed
before the activation of the runtime APEX where libnativeloader and
libnativebridge are provided.

Bug: 123403798
Test: m
Test: device boots to the UI
Change-Id: Id55e7b8b0269b1f39917cf9f5c57f55218a67fc4

5 years agoMerge "Add missing error checks in tests."
Alan Stokes [Tue, 12 Feb 2019 09:49:22 +0000 (09:49 +0000)]
Merge "Add missing error checks in tests."

5 years agolibbinder_ndk: vendor available
Steven Moreland [Mon, 11 Feb 2019 23:04:13 +0000 (15:04 -0800)]
libbinder_ndk: vendor available

Bug: 121279086
Test: N/A
Change-Id: Ief1a52d2b51e071728a6379713c3e694f865cec5

5 years agoMerge "Convert libGLES_android to Android.bp"
Treehugger Robot [Mon, 11 Feb 2019 14:48:51 +0000 (14:48 +0000)]
Merge "Convert libGLES_android to Android.bp"

5 years agoClear BOOTCLASSPATH for APP AOT compilation.
Vladimir Marko [Fri, 8 Feb 2019 15:11:59 +0000 (15:11 +0000)]
Clear BOOTCLASSPATH for APP AOT compilation.

Let dex2oat pick up the boot classpath from the boot image,
excluding the updatable module components. This allows
updating those modules without recompiling apps.

Test: Manually check bootclasspath entry in an oat file
      compiled on device.
Bug: 122937705
Change-Id: I353f3862c9ece046a36010aa121d1f88ec9be78f

5 years agoMerge "Remove obsolete comment from cmds/installd/otapreopt_chroot.cpp."
Roland Levillain [Mon, 11 Feb 2019 11:17:20 +0000 (11:17 +0000)]
Merge "Remove obsolete comment from cmds/installd/otapreopt_chroot.cpp."

5 years agoConvert libGLES_android to Android.bp
Dan Willemsen [Mon, 11 Feb 2019 00:42:07 +0000 (16:42 -0800)]
Convert libGLES_android to Android.bp

See build/soong/README.md for more information.

It's split into two libraries since Soong does not support the .cpp.arm
syntax.

Bug: 122332691
Test: treehugger
Change-Id: Ia21e467509832401214c8475486c8a7dd49653f6

5 years agoMerge "Add member typedef referring to base interface"
Pawin Vongmasa [Sat, 9 Feb 2019 08:20:16 +0000 (08:20 +0000)]
Merge "Add member typedef referring to base interface"

5 years agoAdd member typedef referring to base interface
Pawin Vongmasa [Sat, 9 Feb 2019 01:38:49 +0000 (17:38 -0800)]
Add member typedef referring to base interface

A member typedef named "BaseInterface" is added to BnInterface and
BpInterface to refer to the base interface class.

Test: Builds

Bug: 123736523
Change-Id: Iae4c18cb037481edc357fde1edc718acb79ecc23

5 years agoMerge "surfaceflinger: Update OWNERS"
Treehugger Robot [Fri, 8 Feb 2019 23:11:31 +0000 (23:11 +0000)]
Merge "surfaceflinger: Update OWNERS"

5 years agoRemove obsolete comment from cmds/installd/otapreopt_chroot.cpp.
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

5 years agosurfaceflinger: Update OWNERS
Marissa Wall [Fri, 8 Feb 2019 18:17:31 +0000 (10:17 -0800)]
surfaceflinger: Update OWNERS

With stoza@ out for the next few months, the San Diego SurfaceFlinger
team needs someone with owners.

Also add zzyiwei@ for TimeStats because he has owned it since the
beginning.

Change-Id: I7c3dd1146327673f6bdfbc43663fdcbb03943061

5 years agoMerge "SurfaceFlinger: remove DdmConnection"
Orion Hodson [Wed, 6 Feb 2019 08:51:39 +0000 (08:51 +0000)]
Merge "SurfaceFlinger: remove DdmConnection"

5 years agoSurfaceFlinger: 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

5 years agoMerge "libbinder: keep ashmem size >= 0"
Tri Vo [Tue, 5 Feb 2019 21:38:50 +0000 (21:38 +0000)]
Merge "libbinder: keep ashmem size >= 0"

5 years agoAdd missing error checks in tests.
Alan Stokes [Tue, 5 Feb 2019 17:53:24 +0000 (17:53 +0000)]
Add missing error checks in tests.

To ensure we don't get tests spuriously passing when setup has failed.

Test: atest installd_service_test
Bug: 78442602
Change-Id: I32c8dc4f3d2b9d6dc0f289b170fd13198c87cac3

5 years agoMerge "installd_service_test: fix ServiceTest.CreateAppDataSnapshot_ClearsCache"
Treehugger Robot [Tue, 5 Feb 2019 17:00:28 +0000 (17:00 +0000)]
Merge "installd_service_test: fix ServiceTest.CreateAppDataSnapshot_ClearsCache"

5 years agoinstalld_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

5 years agoMerge "Use sh_binary instead of cc_prebuilt_binary for shell scripts"
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"

5 years agoUse 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

5 years agoMerge "Have `otapreopt_chroot` bind-mount Bionic artifacts from the Runtime APEX."
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."

5 years agoMerge "Add handling for PH property dex2oat_resolve_startup_strings"
Mathieu Chartier [Sat, 2 Feb 2019 01:14:50 +0000 (01:14 +0000)]
Merge "Add handling for PH property dex2oat_resolve_startup_strings"

5 years agoMerge "Add "ls -l /data/anr" output to bugreport"
Treehugger Robot [Fri, 1 Feb 2019 21:29:39 +0000 (21:29 +0000)]
Merge "Add "ls -l /data/anr" output to bugreport"

5 years agoAdd handling for PH property dex2oat_resolve_startup_strings
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

5 years agoAdd "ls -l /data/anr" output to bugreport
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

5 years agoMerge "Refactor the APEX package activation/deactivation logic in `otapreopt_chroot`."
Roland Levillain [Fri, 1 Feb 2019 16:29:22 +0000 (16:29 +0000)]
Merge "Refactor the APEX package activation/deactivation logic in `otapreopt_chroot`."

5 years agoHave `otapreopt_chroot` bind-mount Bionic artifacts from the Runtime APEX.
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

5 years agoRefactor the APEX package activation/deactivation logic in `otapreopt_chroot`.
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

5 years agoMerge "installd: remove restored ce_data if de_data rollback failed"
Nikita Ioffe [Fri, 1 Feb 2019 12:59:55 +0000 (12:59 +0000)]
Merge "installd: remove restored ce_data if de_data rollback failed"

5 years agoMerge "installd: Add destroyAppDataSnapshot and corresponding binder API"
Nikita Ioffe [Fri, 1 Feb 2019 11:50:12 +0000 (11:50 +0000)]
Merge "installd: Add destroyAppDataSnapshot and corresponding binder API"

5 years agoinstalld: 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

5 years agoMerge "Installd: Refactor binder tests"
Treehugger Robot [Thu, 31 Jan 2019 22:14:21 +0000 (22:14 +0000)]
Merge "Installd: Refactor binder tests"

5 years agoMerge "libbinder_ndk: ScopedAResource into impl namespace"
Steven Moreland [Thu, 31 Jan 2019 19:35:33 +0000 (19:35 +0000)]
Merge "libbinder_ndk: ScopedAResource into impl namespace"

5 years agoInstalld: Refactor binder tests
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

5 years agoMerge "Fix regression in startBugreport flow"
Treehugger Robot [Thu, 31 Jan 2019 12:48:36 +0000 (12:48 +0000)]
Merge "Fix regression in startBugreport flow"

5 years agoMerge "Ensure only one bugreport is in progress in dumpstate"
Nandana Dutt [Thu, 31 Jan 2019 10:31:43 +0000 (10:31 +0000)]
Merge "Ensure only one bugreport is in progress in dumpstate"

5 years agoMerge "installd: Create "lib" symlink with the correct label."
Treehugger Robot [Thu, 31 Jan 2019 10:22:02 +0000 (10:22 +0000)]
Merge "installd: Create "lib" symlink with the correct label."

5 years agoMerge "Add OWNERS to inputflinger"
Treehugger Robot [Thu, 31 Jan 2019 03:44:38 +0000 (03:44 +0000)]
Merge "Add OWNERS to inputflinger"

5 years agoMerge "libbinder_ndk: remove draft status"
Steven Moreland [Thu, 31 Jan 2019 00:51:57 +0000 (00:51 +0000)]
Merge "libbinder_ndk: remove draft status"

5 years agoAdd OWNERS to inputflinger
Michael Wright [Wed, 30 Jan 2019 22:00:04 +0000 (22:00 +0000)]
Add OWNERS to inputflinger

Test: N/A
Change-Id: If16fbe675557cb01770bdc2d6cbc55c46c384d9c

5 years agoinstalld: Create "lib" symlink with the correct label.
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

5 years agolibbinder_ndk: ScopedAResource into impl namespace
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

5 years agoFix regression in startBugreport flow
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

5 years agoMerge "Use screenshot file descriptor if available"
Nandana Dutt [Wed, 30 Jan 2019 10:55:37 +0000 (10:55 +0000)]
Merge "Use screenshot file descriptor if available"

5 years agolibbinder: keep ashmem size >= 0
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

5 years agoMerge "Fix/suppress google-explicit-constructor warnings"
Treehugger Robot [Wed, 30 Jan 2019 01:58:55 +0000 (01:58 +0000)]
Merge "Fix/suppress google-explicit-constructor warnings"

5 years agoFix/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

5 years agoMerge "installd: clear app's cache before doing a snapshot"
Treehugger Robot [Tue, 29 Jan 2019 21:11:50 +0000 (21:11 +0000)]
Merge "installd: clear app's cache before doing a snapshot"

5 years agolibbinder_ndk: remove draft status
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

5 years agoMerge "Restore security context of `/postinstall/apex` earlier in otapreopt_chroot."
Roland Levillain [Tue, 29 Jan 2019 18:07:59 +0000 (18:07 +0000)]
Merge "Restore security context of `/postinstall/apex` earlier in otapreopt_chroot."

5 years agoUse screenshot file descriptor if available
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

5 years agoEnsure only one bugreport is in progress in dumpstate
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

5 years agoMerge "Convert Android.mk file to Android.bp"
Treehugger Robot [Tue, 29 Jan 2019 15:56:47 +0000 (15:56 +0000)]
Merge "Convert Android.mk file to Android.bp"

5 years agoinstalld: clear app's cache before doing a snapshot
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

5 years agoMerge "installd: Validate volumeUuid in snapshotAppData and restoreAppDataSnapshot"
Treehugger Robot [Tue, 29 Jan 2019 11:13:16 +0000 (11:13 +0000)]
Merge "installd: Validate volumeUuid in snapshotAppData and restoreAppDataSnapshot"

5 years agoMerge "Add vendor dumpsys."
Treehugger Robot [Tue, 29 Jan 2019 01:46:08 +0000 (01:46 +0000)]
Merge "Add vendor dumpsys."

5 years agoRestore security context of `/postinstall/apex` earlier in otapreopt_chroot.
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

5 years agoMerge "Update filesystem permissions for task tracepoints."
Treehugger Robot [Mon, 28 Jan 2019 22:04:58 +0000 (22:04 +0000)]
Merge "Update filesystem permissions for task tracepoints."

5 years agoinstalld: Validate volumeUuid in snapshotAppData and restoreAppDataSnapshot
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

5 years agoUpdate filesystem permissions for task tracepoints.
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

5 years agoMerge "Remove unused DumpstateOptions parcel"
Nandana Dutt [Mon, 28 Jan 2019 17:20:45 +0000 (17:20 +0000)]
Merge "Remove unused DumpstateOptions parcel"

5 years agoMerge "installd: clear existing snapshots before performing a new one"
Nikita Ioffe [Mon, 28 Jan 2019 12:09:47 +0000 (12:09 +0000)]
Merge "installd: clear existing snapshots before performing a new one"

5 years agoRemove unused DumpstateOptions parcel
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

5 years agoMerge "Load libandroid_runtime lazily."
Steven Moreland [Sat, 26 Jan 2019 03:28:52 +0000 (03:28 +0000)]
Merge "Load libandroid_runtime lazily."

5 years agoAdd vendor dumpsys.
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

5 years agoLoad libandroid_runtime lazily.
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

5 years agoConvert Android.mk file to Android.bp
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

5 years agoMerge "Add jwcai and tianyuj to the owner's file of libs/ui"
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"

5 years agoMerge "DO NOT MERGE: Revert "Revert "Add libprocessgroup dependency and fix sched_pol...
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"""

5 years agoDO NOT MERGE: Revert "Revert "Add libprocessgroup dependency and fix sched_policy...
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>
5 years agoinstalld: remove restored ce_data if de_data rollback failed
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

5 years agoinstalld: clear existing snapshots before performing a new one
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

5 years agoMerge "Refactor paths to Android Runtime binaries in directory `cmds/installd/`."
Roland Levillain [Fri, 25 Jan 2019 12:23:17 +0000 (12:23 +0000)]
Merge "Refactor paths to Android Runtime binaries in directory `cmds/installd/`."

5 years agoMerge changes from topics "runtime-apex-otapreopt_chroot-tear-down", "runtime-apex...
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."

5 years agoMerge "Use the consent service to check if user has consented to taking a bugreport"
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"

5 years agoUse the consent service to check if user has consented to taking a
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

5 years agoMerge "Add IIncidentCompanion binder API."
Treehugger Robot [Thu, 24 Jan 2019 12:16:35 +0000 (12:16 +0000)]
Merge "Add IIncidentCompanion binder API."

5 years agoMerge "installd: Implement support for userdata snapshot and restore."
Narayan Kamath [Thu, 24 Jan 2019 10:25:00 +0000 (10:25 +0000)]
Merge "installd: Implement support for userdata snapshot and restore."

5 years agoMerge "DO NOT MERGE: Revert "Add libprocessgroup dependency and fix sched_policy...
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""

5 years agoDO 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>
5 years agoMerge "Add FEATURE_TELEPHONY_IMS feature definition"
Treehugger Robot [Thu, 24 Jan 2019 04:50:18 +0000 (04:50 +0000)]
Merge "Add FEATURE_TELEPHONY_IMS feature definition"

5 years agoAdd 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

5 years agoAdd IIncidentCompanion binder API.
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

5 years agoRefactor paths to Android Runtime binaries in directory `cmds/installd/`.
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

5 years agoMerge "[view compilation] Add viewcompiler support to installd"
Mathieu Chartier [Wed, 23 Jan 2019 17:02:31 +0000 (17:02 +0000)]
Merge "[view compilation] Add viewcompiler support to installd"

5 years agoMerge "Dumpstate aidl: add cancelBugreport"
Treehugger Robot [Wed, 23 Jan 2019 17:00:48 +0000 (17:00 +0000)]
Merge "Dumpstate aidl: add cancelBugreport"

5 years agoDumpstate 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

5 years agoAdd jwcai and tianyuj to the owner's file of libs/ui
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

5 years agoMerge "Add a flag that makes dumpstate wait for options"
Treehugger Robot [Tue, 22 Jan 2019 23:30:39 +0000 (23:30 +0000)]
Merge "Add a flag that makes dumpstate wait for options"

5 years agoAdd 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

5 years agoMerge "Add libprocessgroup dependency and fix sched_policy include"
Suren Baghdasaryan [Tue, 22 Jan 2019 20:58:15 +0000 (20:58 +0000)]
Merge "Add libprocessgroup dependency and fix sched_policy include"

5 years agoinstalld: Implement support for userdata snapshot and restore.
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

5 years agoImplement a tear-down phase in otapreopt_chroot.
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

5 years agoRevert^2 "Have installd use ART binaries from the Android Runtime APEX."
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