Commit Graph

40469 Commits

Author SHA1 Message Date
Josh Gao 2de2ade387 adbd: increase oom_score_adj for `adb shell`
Previously, processes started via `adb shell` have an oom_score_adj of
-1000, making them invisible to the oom killer. This makes running a
process that consumes all memory (e.g. by leaking in a loop) lead to
the entire rest of the system (including adbd, because of bad
heuristics in the kernel) being oom killed before getting to it.

Bug: http://b/63143027
Test: `adb shell cat /proc/self/oom_score_adj` with adb root
Change-Id: I59111134e36dc271adf4c1dd4bd4400d4fe6aee0
2018-03-28 15:01:23 -07:00
Treehugger Robot 45562bfb63 Merge changes Iea2a3055,I6582cfc6
* changes:
  adb: start building windows test again.
  adb: fix windows test build.
2018-03-28 21:59:33 +00:00
Elliott Hughes d08c9102d6 OWNERS for system/core/mkbootimg.
Bug: N/A
Test: N/A
Change-Id: I9007898e29727892a166f4445c9b112987a97d7d
2018-03-28 14:48:59 -07:00
Bowgo Tsai 85fc6a91c0 Merge "Adding odm.img for `fastboot flashall`" am: cdc553d042
am: b526c2f785

Change-Id: I77d339294f116cbdd1279442b59e6ca8b295e175
2018-03-28 21:29:48 +00:00
Jaekyun Seok da4b0a27fb Merge "Allow vendor-init-actionable for ro.debuggable" am: 5e7de48f03
am: 000e274f9a

Change-Id: I266c01a444a76b2de3378399a5b6c0fc154b901f
2018-03-28 21:27:23 +00:00
Hridya Valsaraju 02c08cc347 Add a script to unpack boot image
The script prints out the boot image header
contents and extracts the kernel, ramdisk,
second bootloader and recovery DTBO images.

Bug: 74763691
Test: unpack_bootimg --boot_img $OUT/recovery.img

Change-Id: Iadbca81c157d9e4607f808a14468ab5542347507
2018-03-28 21:25:41 +00:00
Bowgo Tsai b526c2f785 Merge "Adding odm.img for `fastboot flashall`"
am: cdc553d042

Change-Id: Ieec9dd04d8dbc3fcf348a118529f168f710426cf
2018-03-28 20:58:12 +00:00
Jaekyun Seok 000e274f9a Merge "Allow vendor-init-actionable for ro.debuggable"
am: 5e7de48f03

Change-Id: Ib5b96ecd02860cc66f84defd1f0dcf8830d9e11d
2018-03-28 20:54:51 +00:00
Josh Gao 541a8656c4 adb: restore adb/adb.exe in the list of artifacts.
Test: m dist
Change-Id: Iba44a03e79af9242bfe36efb736496f8db720ebf
2018-03-28 12:57:48 -07:00
Hridya Valsaraju 147b355bb3 Add a recovery DTBO section to boot image
For non-A/B devices, the recovery partition should
be self-sufficient and not depend on any other
partition. Since recovery may need access to devices
added to the DT by overlays(for eg.display), we need to
make sure that the the recovery image also contains
the information from the DTBO image.

The following fields are added to the boot image
header for this purpose:
-boot header version
-header size
-recovery dtbo size
-recovery dtbo address

Bug: 74763691
Test: unpack_bootimage --boot_img $OUT/recovery.img
      diff out/extracted_dtbo $TOP/device/google/wahoo-kernel/dtbo.img

Change-Id: I1969859038b84fac1e4a71f79f2f546b9cacffc8
2018-03-28 12:53:21 -07:00
Elliott Hughes 5620d224b6 Add "require partition-exists=" support.
The Pixel 2 system images release was a bit of a disaster because anyone
using an old version of fastboot would blindly flash too few partitions,
potentially bricking their device. This change lets us add a line to
the android-info.txt file for a device with a new partition.

Also error out sooner in such cases by checking the requirements
immediately, rather than optimistically unpacking everything first.

Switch Action over to C++ to fix memory issues.

Bug: http://b/77158188 (partition checking)
Bug: http://b/74444116 (error out sooner)
Test: manual testing with a modified android-info.txt
Change-Id: I58b426cad410107e368f35f5725216d07281dd97
2018-03-28 12:43:53 -07:00
Treehugger Robot cdc553d042 Merge "Adding odm.img for `fastboot flashall`" 2018-03-28 19:42:30 +00:00
Jaekyun Seok fce960cdf4 Allow vendor-init-actionable for ro.debuggable
Some partners are using ro.debuggable as action trigger to config a
product differently according to its value.

Bug: 75987246
Test: succeeded building and tested taimen
Change-Id: I4cc57e7b52e17fc89e585afa0a8a10925e47fac8
Merged-In: I4cc57e7b52e17fc89e585afa0a8a10925e47fac8
(cherry picked from commit 4f214c5179)
2018-03-29 04:21:22 +09:00
Treehugger Robot 5e7de48f03 Merge "Allow vendor-init-actionable for ro.debuggable" 2018-03-28 19:15:16 +00:00
Tom Cherry 87f114d3f3 Merge "Revert "fs_config: Move hostapd to /vendor/bin/hw"" into pi-dev
am: 36a716dc1f

Change-Id: Id8dad48e5fe42e8671bf2ceb1fcdbc28cb087ffc
2018-03-28 18:45:07 +00:00
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
Bowgo Tsai 017217ec57 Adding odm.img for `fastboot flashall`
Bug: 64195575
Test: fastboot flashall
Change-Id: Ie6c20a1004867e7c9cfa1894abab9252316a9154
2018-03-29 01:31:51 +08: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
Jaekyun Seok 4f214c5179 Allow vendor-init-actionable for ro.debuggable
Some partners are using ro.debuggable as action trigger to config a
product differently according to its value.

Bug: 75987246
Test: succeeded building and tested taimen
Change-Id: I4cc57e7b52e17fc89e585afa0a8a10925e47fac8
2018-03-28 12:21:03 +09:00
Greg Kaiser f97f242c30 [automerger skipped] Merge "lmkd: Protect against buffer overflow" into pi-dev
am: 136f765fb3  -s ours

Change-Id: I5f8cf0f5dad1e93cbe51d0fbfad785d6b8bc831d
2018-03-28 03:19:15 +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 d5a93f925c Method to avoid skipping frames for local unwinds.
am: af16967ec8

Change-Id: I61485a5b085b7672f472724f2b6cbccf5e832549
2018-03-27 21:01:27 +00: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 54c73fa7c1 Merge "Verify the SELabels used in property_contexts" into pi-dev
am: 677bed578e

Change-Id: I68788f1113ca430a29a2bd83a561e9b7afff184f
2018-03-27 16:55:24 +00:00
Tom Cherry 677bed578e Merge "Verify the SELabels used in property_contexts" into pi-dev 2018-03-27 16:45:39 +00:00
Bowgo Tsai 493e6ec922 [automerger skipped] Merge "Adding product.img for `fastboot flashall`" into pi-dev
am: 88993acd95  -s ours

Change-Id: Ia394e2577b2420aec493f1ced657de339ebdb538
2018-03-27 04:40:42 +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 0b2ecd9d57 Merge "Remove sys.usb.ffs.mtp.ready property" into pi-dev
am: ca47ae3513

Change-Id: I3af594b34b1045fde4e5928935e61f892afeccd1
2018-03-27 03:21:11 +00:00
Jerry Zhang ca47ae3513 Merge "Remove sys.usb.ffs.mtp.ready property" into pi-dev 2018-03-27 02:49:02 +00:00
Luis Hector Chavez 2edb005875 [automerger skipped] Merge "Allow android::base::ScopeGuard in STL containers" into pi-dev
am: 64250b5abe  -s ours

Change-Id: I224a160667f7c5a8a61b5640a902ebbf65560dd7
2018-03-27 02:43:22 +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 bbf2cb3976 Merge "Adding product.img for `fastboot flashall`" am: c41ff1b366
am: a56e2e8dce

Change-Id: I345fe212d021864803b1f12447af1a8ded299826
2018-03-27 01:55:22 +00:00
Bowgo Tsai a56e2e8dce Merge "Adding product.img for `fastboot flashall`"
am: c41ff1b366

Change-Id: I8beb7ba3b313112e7ae84d74a894b76f670b811b
2018-03-27 01:49:13 +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
Treehugger Robot c41ff1b366 Merge "Adding product.img for `fastboot flashall`" 2018-03-27 01:37:42 +00: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 e034b0d561 Merge "Verify the SELabels used in property_contexts" am: 324e27d284
am: 7608894fe0

Change-Id: I0fd3ab6353bc6009b28526db97427025a4c600c5
2018-03-26 23:54:33 +00:00
Tom Cherry 7608894fe0 Merge "Verify the SELabels used in property_contexts"
am: 324e27d284

Change-Id: Ie2529102d2f5c28ed083462f3692732d67e9ccdc
2018-03-26 23:46:32 +00:00
Rajeev Kumar f09c593dd5 Merge "Use usel_mkd_stats_log build variable while compiling lmkd with stats logging feature." into pi-dev
am: 42c17c8ee5

Change-Id: I4d5b2851bb465dfaf0c8c7b863611685aedaf03d
2018-03-26 23:34:24 +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
Tom Cherry 324e27d284 Merge "Verify the SELabels used in property_contexts" 2018-03-26 23:28:30 +00:00
Luis Hector Chavez 072108f560 Merge "Allow android::base::ScopeGuard in STL containers" am: 3b279aa5c7
am: 94a480d21f

Change-Id: I1b8daea74c1779f30b724a1c03a55b374870a2e7
2018-03-26 23:21:46 +00:00
Luis Hector Chavez 94a480d21f Merge "Allow android::base::ScopeGuard in STL containers"
am: 3b279aa5c7

Change-Id: I0c57afc84e8bd3ab9de7c1bcb9f743c272d04aaa
2018-03-26 23:15:25 +00: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
Treehugger Robot 3b279aa5c7 Merge "Allow android::base::ScopeGuard in STL containers" 2018-03-26 23:05:25 +00:00
Rajeev Kumar 716fe89b88 Fix compilation issue when LMKD_LOG_STATS is defined.
am: 1c669f764d

Change-Id: I750b6a13b1a897b3dc77e1823a997afe0c40e4a3
2018-03-26 21:46:22 +00:00
Martijn Coenen f733da8e91 [automerger skipped]Merge "Add new trace tag for AIDL." am: 80dce0127c
am: f7a1378384  -s ours

Change-Id: Ieb10fb76f22d7047b6430691918d53d07e8eb0f9
2018-03-26 20:39:50 +00:00