Commit Graph

40366 Commits

Author SHA1 Message Date
Tom Cherry 36a716dc1f Merge "Revert "fs_config: Move hostapd to /vendor/bin/hw"" into pi-dev 2018-03-28 18:30:49 +00:00
Tom Cherry 666464a180 Revert "fs_config: Move hostapd to /vendor/bin/hw"
This reverts commit 656b75c77c.

Capability bits are moving from fs_config.cpp to the associated init
scripts for daemons on /vendor.

Bug: 74554159
Test: wifi tethering works on walleye
2018-03-28 18:29:02 +00:00
Chia-I Wu 7d940ae4af graphics: add render intents and new color modes
Adds

  HAL_COLOR_MODE_BT2020 = 10,
  HAL_COLOR_MODE_BT2100_PQ = 11,
  HAL_COLOR_MODE_BT2100_HLG = 12,
  HAL_DATASPACE_BT2020_ITU_HLG = 302383104,
  HAL_DATASPACE_BT2020_HLG = 168165376,
  HAL_RENDER_INTENT_COLORIMETRIC = 0,
  HAL_RENDER_INTENT_ENHANCE = 1,
  HAL_RENDER_INTENT_TONE_MAP_COLORIMETRIC = 2,
  HAL_RENDER_INTENT_TONE_MAP_ENHANCE = 3,

by running update-base-files.sh.

Bug: 73824924
Test: manual
Change-Id: Ifde249074abf2228ebe016a38b5bcea8bccb5e9d
2018-03-28 10:23:09 -07:00
android-build-team Robot 0421b58f49 Snap for 4683893 from 136f765fb3 to pi-release
Change-Id: Ibe1b07efe8d032d44d2c828bae218c56d4e8078a
2018-03-28 07:25:18 +00:00
TreeHugger Robot 136f765fb3 Merge "lmkd: Protect against buffer overflow" into pi-dev 2018-03-28 01:44:33 +00:00
Greg Kaiser d6d847142b lmkd: Protect against buffer overflow
We're passing a 'line' whose backing buffer is PAGE_MAX in size
into memory_stat_parse_line().  We protect overflowing the smaller
LINE_MAX 'key' buffer via some C preprocessing macros to assure
we limit the size.

Test: Local build with LMKD_LOG_STATS set for this file.
Bug: 76220622
Merged-In: I9e50d4270f7099e37a9bfc7fb9b9b95cc7adb086
Change-Id: I9e50d4270f7099e37a9bfc7fb9b9b95cc7adb086
2018-03-27 21:59:31 +00:00
David Anderson 7d74a5a2f2 storaged: fix divide-by-zero when updating history
Bug: 75984894
Test: storaged unit tests on x86/64 platforms
Change-Id: I8c491f70705c662d40d0b212bcbc43a0de279bec
Merged-In: I8c491f70705c662d40d0b212bcbc43a0de279bec
(cherry picked from commit f2dd78bb2c)
2018-03-27 14:51:28 -07:00
Christopher Ferris af16967ec8 Method to avoid skipping frames for local unwinds.
In cases where there might be a crash in the unwind library itself,
we need a method to avoid skipping these frames or we won't be able
to see the actual crash.

Added unit test for this behavior.

Bug: 74121887

Test: Ran unit tests on host and target.
Change-Id: I45825020c174016af39dd8ffdc67acb72a24ad4d
(cherry picked from commit 458f4e725d)
2018-03-27 11:12:41 -07:00
Tom Cherry 677bed578e Merge "Verify the SELabels used in property_contexts" into pi-dev 2018-03-27 16:45:39 +00:00
android-build-team Robot 75105ab798 Snap for 4680594 from ca47ae3513 to pi-release
Change-Id: Ia0ebf1e82b207d979c2300e7ca589d0928531199
2018-03-27 07:27:32 +00:00
TreeHugger Robot 88993acd95 Merge "Adding product.img for `fastboot flashall`" into pi-dev 2018-03-27 04:30:40 +00:00
Jerry Zhang ca47ae3513 Merge "Remove sys.usb.ffs.mtp.ready property" into pi-dev 2018-03-27 02:49:02 +00:00
TreeHugger Robot 64250b5abe Merge "Allow android::base::ScopeGuard in STL containers" into pi-dev 2018-03-27 02:29:20 +00:00
Bowgo Tsai 7e50de4449 Adding product.img for `fastboot flashall`
Bug: 64195575
Test: fastboot flashall

Change-Id: Ifd119650dd3316508870df0dfc770099e95ae1d1
Merged-In: Ifd119650dd3316508870df0dfc770099e95ae1d1
(cherry picked from commit 0afc6b07f1)
2018-03-27 09:40:35 +08:00
Luis Hector Chavez f6965c793a Allow android::base::ScopeGuard in STL containers
This change lets android::base::ScopeGuard be useful in STL containers
(e.g. std::vector<android::base::ScopeGuard<std::function<void()>>>). It
also provides perfect forwarding for android::base::make_scope_guard.

Bug: 34764308
Test: libbase_test

Change-Id: I7d1e5494b0f0695763cff0700efdb9ec18ae85c8
Merged-In: I7d1e5494b0f0695763cff0700efdb9ec18ae85c8
(cherry picked from commit b77035b89a)
2018-03-27 00:38:06 +00:00
Tom Cherry daaf3aa226 Verify the SELabels used in property_contexts
Verify that the SELabels used in property_contexts correspond to a
real type in the SEPolicy and that this type has the property_type attribute.

Bug: 74078792
Test: Build property_contexts on bullhead successfully
Test: See failure when using a faulty SELabel in property_contexts
Change-Id: If1618c2c3dae4c0cd3efa5f88056478a6db6bd0b
(cherry picked from commit 882faa6448)
2018-03-26 16:32:05 -07:00
TreeHugger Robot 42c17c8ee5 Merge "Use usel_mkd_stats_log build variable while compiling lmkd with stats logging feature." into pi-dev 2018-03-26 23:14:23 +00:00
Rajeev Kumar 1c669f764d Fix compilation issue when LMKD_LOG_STATS is defined.
Note: The breakage was caused by http://ag/3621623

Test: mmma system/core/lmkd/
Change-Id: I17033aeedb3183d4777dacb89ec84430ff061b3c
Bug: 74443701
(cherry picked from commit fb25ddd9c9)
2018-03-26 18:15:25 +00:00
android-build-team Robot 97a2405075 Snap for 4677756 from ffeb7ecc3f to pi-release
Change-Id: I7a8747503857a2e730be7d727a9922ffb1992955
2018-03-25 07:25:02 +00:00
Martijn Coenen ffeb7ecc3f Merge "Add new trace tag for AIDL." into pi-dev 2018-03-24 05:58:25 +00:00
Rajeev Kumar b7273785a2 Use usel_mkd_stats_log build variable while compiling lmkd with stats logging feature.
Bug: 74443701
Test: Tested manually
Merged-In: Ifa13cc7d1c3ff3ac71a16cf55be5a48ce808ef59
Change-Id: Ifa13cc7d1c3ff3ac71a16cf55be5a48ce808ef59
(cherry picked from commit 083be30783)
2018-03-23 20:33:57 +00:00
Jerry Zhang 6e9a327504 adb: Retry io in case of interrupt
io_submit sleeps waiting for the gadget
to be enabled. Currently if that sleep
is interrupted it will shut down adb,
causing it to have to start back up again.

Rather than return EINTR if interrupted,
io_submit actually completes and the EINTR
is found later when looking through events.
Since an io that is interrupted will be
small anyway, add a loop to retry small ios.

Also upgrade aio logs in accordance with
their importance.

Fixes: 75981904
Test: adb works, logs show successful interrupt handling
Change-Id: I35973fce130ee849ce59fef80d15b65afb816ba4
2018-03-23 00:11:05 +00:00
Jerry Zhang 50108b3f49 Remove sys.usb.ffs.mtp.ready property
With the usb control fd changes, there
is no longer a need to wait for this
property to trigger before starting the
connection.

Bug: 72877174
Test: switch config to mtp/ptp
Change-Id: Ib29419e7948025be3f3295106cad18943d314f0b
2018-03-22 11:35:20 -07:00
android-build-team Robot 00d10a35c2 Snap for 4670666 from 1f70d1cac5 to pi-release
Change-Id: I1745918d3f7e84bff7b4c9f77dfcc65a1044b91c
2018-03-22 07:27:42 +00:00
Benedict Wong 1f70d1cac5 Merge "Set SPI Allocation Timeout to One Hour" into pi-dev 2018-03-21 17:03:39 +00:00
Martijn Coenen 07b98d9b97 Add new trace tag for AIDL.
So we can auto-generate tracing code for AIDL interfaces.

Bug: 74416314
Test: inspect atrace output
Change-Id: I91b14b3b16d8d7a29f531101b14ddf10dbc61a5a
2018-03-21 13:59:34 +01:00
android-build-team Robot 930099dd2e Snap for 4667902 from be3cd3c0d8 to pi-release
Change-Id: I491740c097881d7d0ad3efd8231950f484f760b7
2018-03-21 07:28:21 +00:00
TreeHugger Robot be3cd3c0d8 Merge "/postinstall/* does not search for a lib in /vendor or /odm" into pi-dev 2018-03-20 18:56:40 +00:00
Tom Cherry 16e2e9d4da Merge "Revert "init: Reboot after timeout passes during reboot"" into pi-dev 2018-03-20 18:42:43 +00:00
Benedict Wong 89c9c9b18b Set SPI Allocation Timeout to One Hour
This change increases the default expiration length of an SA to 1h. The
IPsec API expects that SPIs are allocated indefinitely, but potential
for instability requires that these get cleaned up automatically. As
such, the duration was chosen as a sane, but long timeout value.

Bug: 72316671
Test: Added CTS tests to enforce this behavior
Merged-In: I47aef9cea4a09da253b2ec048a8797af5fa25529
Change-Id: I47aef9cea4a09da253b2ec048a8797af5fa25529
(cherry picked from commit 00308f8554)
2018-03-20 11:32:40 -07:00
Jiyong Park 955029aa1b /postinstall/* does not search for a lib in /vendor or /odm
There has been no section in the linker config file for the binaries
under /postinstall. As a result, the binaries were run with the legacy
default config where /vendor/lib and /odm/lib are added to the search
paths. This is causing selinux denials as the binaries for OTA are not
allowed to access /vendor/lib or /odm/lib, but the dynamic linker calls
realpath(3) on the paths to canonicalize them.

Fixing the issue by letting /postinstall/* binaries to run with a
dedicated linker namespace config, where /vendor/lib and /odm/lib are
not added to the search paths. Not having the paths is okay because
he OTA binaries should not have dependency to the libs there.

Bug: 75287236
Test: do the OTA, selinux denials on postinstall_file is not shown
Test: above test should pass on  wahoo, marlin and pre-treble devices
Merged-In: I49c11a0929002adfef667890c0a375c2b41054f4
Change-Id: I49c11a0929002adfef667890c0a375c2b41054f4
(cherry picked from commit d7e6cb27b6)
2018-03-21 01:25:55 +09:00
Tom Cherry ea31ac2514 Revert "init: Reboot after timeout passes during reboot"
This reverts commit c9fec9d2be.

Looks like ext4 can't handle a system reboot happening in the middle
of an unmount.  We'll have to find another way to handle this.

Bug: 74817735
Bug: 75310371
Test: reboot device
Merged-In: Ib4f7f7fd29988a31a99f146c40f6d987c1fef15e
Change-Id: I7c097ba5734e2e4ff320c8b02fb58324d9380513
2018-03-20 13:39:00 +00:00
android-build-team Robot 90f7eecfd0 Snap for 4665332 from bfb490e3e8 to pi-release
Change-Id: Id98393dc258b3fab3b2337bb236a06152148d19e
2018-03-20 07:25:06 +00:00
TreeHugger Robot bfb490e3e8 Merge "Allow vendor_init_actionable to persist.sys.usb.usbradio.config" into pi-dev 2018-03-20 03:46:42 +00:00
Jaekyun Seok 56f832e561 Allow vendor_init_actionable to persist.sys.usb.usbradio.config
persist.sys.usb.usbradio.config can be used as an action trigger in
vendor init scripts.

Bug: 75202311
Bug: 74266614
Test: succeeded building and tested on pixels
Change-Id: I123b5ebce4bbf33f41222c2e11137d52e38ff9f8
2018-03-20 07:40:16 +09:00
Yabin Cui 414df3e583 Always set the sp reg to the cfa for DWARF.
There are a few places where it is assumed that this register is
set to the cfa value when interpreting DWARF information.

Add a testcase for unwinding art_quick_osr_stub on ARM.

Bug: 73954823

Test: Ran libunwindstack/libbacktrace unit tests.
Test: Random debuggerd -b of process on a hikey.
Test: Ran the 137 art test on host.
Change-Id: Ida6ccdc38c3cfeea6b57fe861a0cc127b150b790
(cherry picked from commit 11e96fe48a)
2018-03-19 11:11:19 -07:00
android-build-team Robot f0c6e2494e Snap for 4662252 from 8dca85f0c8 to pi-release
Change-Id: Ia25717fd4196898dbe5353507af35147e883efe6
2018-03-18 07:26:34 +00:00
TreeHugger Robot 8dca85f0c8 Merge "adb: checks device state when using adb disable-verity for AVB" into pi-dev 2018-03-17 08:03:18 +00:00
TreeHugger Robot 6665d991e1 Merge "Support /odm partition" into pi-dev 2018-03-16 07:07:39 +00:00
Bowgo Tsai 45a00fdcce adb: checks device state when using adb disable-verity for AVB
adb disable-verity will toggle a flag in /vbmeta and introduce AVB
verification error on next boot. If the device is LOCKED, it will make
the device unbootable because verification error isn't allowed when the
device is locked.

Also indicating 'adb root' when failed to get verity state.

Bug: 70969453
Test: adb disable-verity should pop-up warning if the device is locked.

Change-Id: I1ed705e34334ea2231c96b16ddb8d225067af2f0
Merged-In: I1ed705e34334ea2231c96b16ddb8d225067af2f0
(cherry picked from commit 8cc9c3835a)
2018-03-16 15:06:23 +08:00
Bowgo Tsai 6795ef7bb2 Support /odm partition
Bug: 64195575
Test: boot a device

Change-Id: I52c0da32aef80c060f6efa47ddf62577fb543ad8
Merged-In: I52c0da32aef80c060f6efa47ddf62577fb543ad8
(cherry picked from commit 39476ffd8a)
2018-03-16 15:02:00 +08:00
TreeHugger Robot 8c907c65e6 Merge "Handle ARM thumb function symbols." into pi-dev 2018-03-16 04:56:25 +00:00
TreeHugger Robot 4031e1a46e Merge "Stop using SO_SNDBUFFORCE" into pi-dev 2018-03-16 03:00:44 +00:00
Christopher Ferris b70b4a5bcd Handle ARM thumb function symbols.
ARM thumb functions will have the zero bit set to one, which can cause
function name lookups to fail.

Add an ARM special GetFunctionName that handles this condition.

Fix a couple of the function offsets in unit tests.

Bug: 74844137

Test: Ran unit tests.
Test: Ran debuggerd -b on processes on a bullhead device.
Change-Id: Ibd407db34eaaa641f91fdb4f589c44a0dcc0216a
(cherry picked from commit 704ec9adba)
2018-03-15 19:28:23 -07:00
android-build-team Robot 0f7371a1aa Snap for 4656203 from 5f96d51507 to pi-release
Change-Id: I87307ecc3e5b603c2c29b358b9d67695ea1da46a
2018-03-15 07:27:57 +00:00
Ryo Hashimoto 3d95d88b14 Stop using SO_SNDBUFFORCE
Use SO_SNDBUF which doesn't require CAP_NET_ADMIN instead.
Change the value of kFuseMaxWrite to 128KB.

In the kernel code, there is a constant FUSE_MAX_PAGES_PER_REQ which
limits the size of requests to 128KB.

Bug: 74725300
Test: atest android.os.storage.cts.StorageManagerTest

Change-Id: Ic3a8f1a7378d027a6c0ee054cedc2c9f4b7509ad
2018-03-15 14:22:27 +09:00
TreeHugger Robot 5f96d51507 Merge "Revert "libutilscallstack is private VNDK-SP"" into pi-dev 2018-03-15 04:17:05 +00:00
Jiyong Park 78df555af3 Revert "libutilscallstack is private VNDK-SP"
CallStack.cpp was part of libutils, but has been separated into a new
library libutilscallstack [1] and then made invisible to vendors [2].
However, this is causing problem to the vendors who have been using
the CallStack class from libutils, because the class is no longer
available to them.

In order to support them, marking libutilscallstack as
'vendor_available: true'.

This reverts commit a32678df55.

[1] https://android-review.googlesource.com/c/platform/system/core/+/591954
[2] https://android-review.googlesource.com/c/platform/system/core/+/599754
Bug: 74600214
Test: m -j
Test: 2016/2017 pixel devices boots to the UI and Photo Editing works

Merged-In: Iaa232ed978378b566a4710e2320ee6ed04572e14
Change-Id: Iaa232ed978378b566a4710e2320ee6ed04572e14
(cherry picked from commit 130fea3478)
2018-03-15 10:46:30 +09:00
Jerry Zhang 9a1be3ad0e adb: Remove usages of ENDPOINT_ALLOC
All devices that previously used ENDPOINT_ALLOC
are on the new async io routines. None of the devices
using aio_compat have ENDPOINT_ALLOC so remove the
code to stop logging failures.

Fixes: 74213465
Test: adb works
Change-Id: I0c903eb76b006b6bcce48cec24f5353fa47cc128
2018-03-14 22:11:59 +00:00
Mark Salyzyn fec2e2c783 logd: identical check access message data out of range
(cherry pick from commit 22712428b8)

Discovered while running AddressSanitizer, binary events were fed
into logd that were smaller than the binary event string header.
Fix is to check the buffer sizes before performing the memcmp
operation.

Test: compile
Bug: 74574189
Change-Id: Ic01ef6fb0725258d9f39bbdca582ed648a1adc5d
2018-03-14 07:26:20 -07:00