Commit Graph

38707 Commits

Author SHA1 Message Date
Hridya Valsaraju c9dffd158c Merge changes from topic "recovery_dtbo"
am: 3ac694632c

Change-Id: I684c39d4381f93e5ae3df7af21a6a60c2899b15d
2018-03-29 00:29:29 +00:00
Hridya Valsaraju 86f4bafa5e Add a recovery DTBO section to boot image
am: 147b355bb3

Change-Id: I01cba4d0bdb21a533c5c76f9e71993c6f2f0f7cc
2018-03-29 00:29:01 +00:00
Elliott Hughes fea8b41aa1 Merge "Add "require partition-exists=" support."
am: 539f3ddff5

Change-Id: If07bf31027fab8c4b341c9bc6de907cff94e2c7f
2018-03-29 00:27:36 +00:00
Josh Gao 54b603ee56 Merge changes Iea2a3055,I6582cfc6
am: 45562bfb63

Change-Id: Ic1e986c5554bcb191b025afec41fc051f9714574
2018-03-29 00:27:09 +00:00
Christopher Ferris 6dbc28ece3 Fix null pointer dereference in RegsArm.
Fix RegsArm::GetPcAdjustment to check for an invalid elf before trying
to read memory.
Modify the tests for this so it crashes without this change.

Also modify the GetPcAdjustment for all different architectures so
that unless the relative pc is too small, it will return the minimum
amount that should be adjusted. This is to handle cases where we still
want to adjust the pc but it's in an invalid elf. Mostly this is for
handling cases when the pc is in jit gdb debug code so that we use the
right unwind information.

Bug: 77233204

Test: Passes unit tests for libbacktrace/libunwindstack.
Change-Id: Id73609adaf3b80a583584441de228156fec3afa7
2018-03-28 17:21:01 -07:00
Treehugger Robot 3ac694632c Merge changes from topic "recovery_dtbo"
* changes:
  Add a script to unpack boot image
  Add a recovery DTBO section to boot image
2018-03-29 00:02:57 +00:00
Elliott Hughes 539f3ddff5 Merge "Add "require partition-exists=" support." 2018-03-28 23:25:24 +00:00
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
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
Treehugger Robot 5e7de48f03 Merge "Allow vendor-init-actionable for ro.debuggable" 2018-03-28 19:15:16 +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
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
Bowgo Tsai a56e2e8dce Merge "Adding product.img for `fastboot flashall`"
am: c41ff1b366

Change-Id: I8beb7ba3b313112e7ae84d74a894b76f670b811b
2018-03-27 01:49:13 +00:00
Treehugger Robot c41ff1b366 Merge "Adding product.img for `fastboot flashall`" 2018-03-27 01:37:42 +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
Tom Cherry 324e27d284 Merge "Verify the SELabels used in property_contexts" 2018-03-26 23:28:30 +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 3b279aa5c7 Merge "Allow android::base::ScopeGuard in STL containers" 2018-03-26 23:05:25 +00:00
Luis Hector Chavez b77035b89a 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
2018-03-26 13:30:09 -07:00
Martijn Coenen f7a1378384 Merge "Add new trace tag for AIDL."
am: 80dce0127c

Change-Id: I31e5546ed42672d21f2195eb1f56d42568a582ef
2018-03-26 20:26:57 +00:00
Martijn Coenen 80dce0127c Merge "Add new trace tag for AIDL." 2018-03-26 19:00:57 +00:00
Luis Hector Chavez e74b0f224c Merge "adb: Open FunctionFS files with more restrictive access modes"
am: f78ff013d0

Change-Id: I867878aba35e47c66a9f501cd1cf9b979d5bc8a9
2018-03-26 18:56:38 +00:00
Treehugger Robot f78ff013d0 Merge "adb: Open FunctionFS files with more restrictive access modes" 2018-03-26 18:48:25 +00:00
Tom Cherry 882faa6448 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
2018-03-26 09:22:55 -07:00
Martijn Coenen 24426e96a5 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
Merged-In: I91b14b3b16d8d7a29f531101b14ddf10dbc61a5a
2018-03-26 09:59:21 +02:00
Bowgo Tsai 0afc6b07f1 Adding product.img for `fastboot flashall`
Bug: 64195575
Test: fastboot flashall
Change-Id: Ifd119650dd3316508870df0dfc770099e95ae1d1
2018-03-26 15:47:59 +08:00
Christopher Ferris 47aaa8ce06 Merge "Method to avoid skipping frames for local unwinds."
am: 43cb7ea4ed

Change-Id: I1c2c9e88d30e56d00e28ea1ae79060f80d9b4b57
2018-03-24 19:32:15 +00:00
Christopher Ferris 43cb7ea4ed Merge "Method to avoid skipping frames for local unwinds." 2018-03-24 19:20:16 +00:00
Mark Salyzyn 785c18d4d1 Merge "storaged: owner adjustment"
am: 387319307a

Change-Id: I0faa3fd6cc6bbe0b33db5873f9a44f83909aaf74
2018-03-23 23:19:40 +00:00
Josh Gao f8a97c1f14 adb: start building windows test again.
Test: mma
Change-Id: Iea2a3055cc3642905a1bbdd18550a9fc12702da8
2018-03-23 15:37:20 -07:00
Mark Salyzyn 387319307a Merge "storaged: owner adjustment" 2018-03-23 22:01:55 +00:00
Mark Salyzyn 133c9111a3 storaged: owner adjustment
Added salyzyn@ for final owner review on adjustments to storaged.

Test: none
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Change-Id: Iac73403ea416a4820f72689f5860aa88931def06
2018-03-23 14:37:53 -07:00
Josh Gao 2e1e789e2a adb: fix windows test build.
The switch over to soong unintentionally turned off building the
Windows tests (and there's a bug preventing them from being turned on).
Preemptively fix the build breakages that'll happen when we turn them
back on.

Test: mma with Android.bp 's/cc_test_host/cc_binary_host' hacks
Change-Id: I6582cfc61b96052537d50d8ba90533dbb66e3e1d
2018-03-23 13:03:28 -07:00
Christopher Ferris 458f4e725d 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
2018-03-23 13:01:44 -07:00
Yabin Cui 9b987e4bde Merge "Support a map that represents gdb jit elf data."
am: 7102f7c98d

Change-Id: I8233d4f8f05885ac07cebe4594bc0d9e3a71a56e
2018-03-23 17:39:23 +00:00
Yabin Cui 7102f7c98d Merge "Support a map that represents gdb jit elf data." 2018-03-23 17:27:58 +00:00
Mark Salyzyn cf63c66865 Merge "bootstat: refine "Kernel panic - not syncing""
am: 3b353ed41c

Change-Id: I59a9cf50c398c5231a3fa1ef00ba3c4bed249992
2018-03-22 23:51:49 +00:00
Treehugger Robot 3b353ed41c Merge "bootstat: refine "Kernel panic - not syncing"" 2018-03-22 23:17:40 +00:00
Mark Salyzyn 3f48fa9cb2 bootstat: refine "Kernel panic - not syncing"
Provide some easy kernel panic subreasons mined from last kmesg,
generates a canonical boot reason (system boot reason) that
may aid triage.

Notably report kernel_panic,hung if [khungtaskd] triggers on
a livelock condition, forms a signals on the dashboards.

Helper function getSubreason modified to optionally enable checking
for a single quote resulting in a refactoring to ease maintenance of
the termination detection in the face of single bit errors heuristics.

Test: boot_reason_test.sh
Bug: 63736262
Bug: 33808187
Change-Id: I7fdd1e57e7a26095738175074306f0d2d59b1d69
2018-03-22 13:57:31 -07:00
Josh Gao 32e239f139 Merge changes I5fe02059,Iea8bf298,I0630c302,Ifc4b8fe9,I29319bda
am: d888e343b7

Change-Id: I312a8cc960d967f246f53e3e5677ab7008934951
2018-03-22 04:00:33 +00:00
Treehugger Robot d888e343b7 Merge changes I5fe02059,Iea8bf298,I0630c302,Ifc4b8fe9,I29319bda
* changes:
  adb: bump the local socket backlog to the maximum.
  adb: fix unicode file path test.
  adb: delete vestigial SHELL_EXIT_NOTIFY_FD.
  adb: don't immediately close a socket when write fails.
  adb: make fdevent_run_on_main_thread's fd nonblocking.
2018-03-22 03:48:38 +00:00
Josh Gao 8f7ff94762 adbd: spawn login shell when run without a command.
Match openssh's behavior with regards to login shells.

Bug: http://b/76116378
Test: `adb shell -T set -o` vs `ssh localhost -T set -o`
Test: `adb shell -tt set -o` vs `ssh localhost -tt set -o`
Test: `echo set -o | adb shell -T` vs `echo set -o | ssh localhost -T`
Test: `echo set -o | adb shell -tt` vs `echo set -o | ssh localhost -tt`
Change-Id: I6ed69b43e2ac79c947c242948b5617ece08a713e
2018-03-21 18:23:09 -07:00