Commit graph

42490 commits

Author SHA1 Message Date
David Anderson
5ee058d74c Merge "fastbootd: Fix transport ownership." 2018-09-05 00:37:12 +00:00
Treehugger Robot
5efd2abee5 Merge "Make unzip available." 2018-09-04 22:56:56 +00:00
David Anderson
03de645aac fastbootd: Fix transport ownership.
This change moves Transport ownership back out of FastBootDriver.
Callers of set_transport must ensure that the previous transport is
destroyed. In addition, deleting a transport now ensures that it is
closed.

Bug: 78793464
Test: fastboot, fuzzy_fastboot works
Change-Id: I8f9ed2f7d5b09fd0820b2677d087a027378f26db
2018-09-04 15:01:12 -07:00
David Anderson
33dcdb808b Merge "fastbootd: Implement getvar all." 2018-09-04 20:41:54 +00:00
Elliott Hughes
ab08933f97 Make unzip available.
Bug: N/A
Test: N/A
Change-Id: I7f7a2e5d494536e5eb5f5e8744af224f31351c15
2018-09-04 13:33:30 -07:00
David Anderson
304308ca3f Merge "fastbootd: Refactor for getvar all." 2018-09-04 19:45:39 +00:00
Treehugger Robot
d230bcf4b0 Merge "Fix disagreement of client_id/app_data pointer semantic" 2018-09-04 19:43:03 +00:00
Janis Danisevskis
56c533dfd9 Fix disagreement of client_id/app_data pointer semantic
KM1/KM2 implementations should treat nullptr and KeymasterBlob{nullptr, 0}
equally when passed in as client_id or app_data. However, trusty KM1
treats them differently.

Bug: 113110105
Bug: 113084196
Change-Id: Ie0e2b5d60d808e4f7a8e48aeb4c694268f9bc0a1
2018-09-04 19:42:10 +00:00
Treehugger Robot
aa31cfcd5c Merge "llkd: Add stack symbol checking" 2018-09-04 19:26:08 +00:00
Treehugger Robot
07fd6d029b Merge "Remove unused ART build dependencies" 2018-09-03 07:57:22 +00:00
David Anderson
0f6266305e fastbootd: Implement getvar all.
This implements getvar all by invoking each callback and writing an INFO
status for each result. For commands that take arguments, the variable
handler can specify a function that returns all possible arguments.
Currently this only applies to partition variables.

Bug: 78793464
Test: fastboot getvar all works
Change-Id: I1cf84e06bf67614b6f56171c0ee6ca5d7ac383c9
2018-08-31 18:39:28 -07:00
David Anderson
1fb3fd7242 fastbootd: Refactor for getvar all.
It is easier to implement getvar all if we can invoke each variable
handler and collect their results. This change reverts the handlers to
return their messages as an outparam, rather than going through
FastbootDevice.

Bug: 78793464
Test: fastboot getvar works
Change-Id: I8544251ce517526b26435526756359ce220520cc
2018-08-31 17:03:50 -07:00
Orion Hodson
02699e33f8 Remove unused ART build dependencies
Test: m
Change-Id: I58e7c6ecb74d565d109012cc23a38083a60f3c52
2018-08-31 16:15:56 +01:00
Treehugger Robot
640ceee567 Merge "Fix the mac fastboot build" 2018-08-31 04:09:25 +00:00
Dan Willemsen
822465a930 Fix the mac fastboot build
The Carbon framework isn't on the list of libraries that Soong allows
linking against, so this broke the Mac build. This compiles just fine
without Carbon though, and I don't see any references to Carbon in the
code.

Test: mma
Change-Id: I83044d244f7cec778c8b8b6132249c0f016c10fc
2018-08-30 18:26:11 -07:00
Dan Willemsen
4d8929773b Merge "Convert fastboot to Soong" 2018-08-30 23:36:54 +00:00
Treehugger Robot
ebb631b0a3 Merge "init: First Stage Mount observe nofail mount flag" 2018-08-30 22:20:39 +00:00
Mark Salyzyn
96505fad80 llkd: Add stack symbol checking
Feature outlined here is only available on userdebug or eng builds.
Blocked for security reasons because requires ptrace capabilities.

Add ro.llk.stack to list a set of symbols that should rarely happen
but if persistent in multiple checks, indicates a live lock condition.
At ro.llk.stack.timeout_ms the process is sent a kill, if it remains,
then panic the kernel.

There is no ABA detection in the paths, the condition for the
stack symbol being present instantaneously must be its rarity of
being caught.  If a livelock occurs in the path of the symbol, then
it is possible more than one path could be stuck in the state, but
the best candidate symbols are found underneath a lock resulting in
only one process being the culprit, and the best aim.  There may be
processes that induce a look of persistence, if so the symbol is not
a candidate for checking.

Add ro.llk.blacklist.process.stack to list process names we want
to skip checking.  This configuration parameter is also used to
prevent sepolicy noise when trying to acquire stacks from non
ptrace'able services.

Test: gTest llkd_unit_tests
Bug: 33808187
Bug: 111910505
Bug: 80502612
Change-Id: Ie71221e371b189bbdda2a1155d47826997842dcc
2018-08-30 13:53:19 -07:00
Treehugger Robot
5fdd77b2f1 Merge "adb: don't try to reconnect emulators." 2018-08-30 20:26:18 +00:00
Mark Salyzyn
eafc1c3d58 init: First Stage Mount observe nofail mount flag
MountPartitions should respect nofail.  The nofail flag makes the
partition optional.

Test: manual (future code using feature), and smoke test
Bug: 109821005
Bug: 78914864
Change-Id: I715a66ef1abbe223b0cefe5bd2758f63352b1afc
2018-08-30 13:16:24 -07:00
Treehugger Robot
c47c508dcd Merge "fastboot: Use a single codepath for flashall and update." 2018-08-30 20:12:16 +00:00
Joel Fernandes
3cc906b0c4 Merge "Remove ashmem from system/core" 2018-08-30 19:30:58 +00:00
Christopher Ferris
7f6dab578e Merge "Set errno for all error return cases." 2018-08-30 18:58:19 +00:00
Josh Gao
fc2e56ffd7 adb: don't try to reconnect emulators.
Bug: http://b/113533872
Test: ./test_adb.py
Change-Id: Id591f43b487cc3928390e30f11645990e34a51bf
2018-08-30 11:37:00 -07:00
Dan Willemsen
ab971b5e7e Convert fastboot to Soong
Also fix adb's version number to match.

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

Test: cd system/core/fastboot; mma
Test: fastboot --version
Test: adb --version
Test: out/host/linux-x86/nativetest/fastboot_test/fastboot_test
Test: out/host/linux-x86/nativetest64/fastboot_test/fastboot_test
Change-Id: I65ea39af9183c602e84f3bc0e4a0d066a30fc464
2018-08-30 11:28:18 -07:00
Treehugger Robot
5a139a0d75 Merge "Show bootanimation after decrypt" 2018-08-30 16:53:37 +00:00
Isaac Lee
f32c201743 Show bootanimation after decrypt
Because the original modification (restart SF which is added
for display bootanimation) from O to P causes bootanimation NPE,
 we remove the part of restart SF and add other flow to show
 bootanimation.

Test: manual, ran the test 10 times and it cause no NPE and
      display BootAnimation after decrypt
Test: boot aosp_sailfish

Bug: 79547653
Change-Id: I355ccdbb2e2f27d897e2e0ee00f9300ef38ede03
2018-08-30 16:44:34 +00:00
Tom Cherry
dd2ef111d4 Merge changes I11ff0aed,Ia442a41d
* changes:
  fastboot: remove 'verify'
  fastboot: remove 'powerdown'
2018-08-30 02:18:12 +00:00
Peter Collingbourne
6316be2ed1 Merge "libpixelflinger: Avoid using x18 register in blend implementation." 2018-08-30 01:20:34 +00:00
Treehugger Robot
2dd1ec6d11 Merge "adb should #include <sys/sysmacros.h>" 2018-08-30 00:28:42 +00:00
Treehugger Robot
24b861d742 Merge "Fix bug in fs_mgr with calling vdc" 2018-08-30 00:16:33 +00:00
Treehugger Robot
5dea98f5ea Merge "Remove unused -I of external/safe-iop." 2018-08-30 00:11:18 +00:00
Peter Collingbourne
60143111ea libpixelflinger: Avoid using x18 register in blend implementation.
Instead, use x15 which is one of the available temporary registers.

Bug: 112907825
Test: test-pixelflinger-arm64-t32cb16blend
Change-Id: Icfcaae1d8163880eddc2862af92e5636a03d8b52
2018-08-29 16:23:21 -07:00
David Anderson
cf444f3633 fastboot: Use a single codepath for flashall and update.
This patch extracts the common logic out of the flashall and update
command implementations. There is now a FlashAllTool helper class, and
an ImageSource class for commands to specify how to find built images.

With these paths merged, the update command now supports logical
partitions.

Bug: 78793464
Test: flashall works with or without a super partition
      update works with or without a super partition

Change-Id: I63a8690bbc4da6ea98a07eb2c07166ddd993a7b7
2018-08-29 15:58:34 -07:00
Tom Cherry
e51dadb8a7 fastboot: remove 'verify'
This isn't sent by the fastboot client.
This isn't in our bootloader requirement document.
Neither my hikey nor sailfish respond to this.

Test: fastboot still works
Change-Id: I11ff0aed818d98f3427ed427605d99b3c76ccb06
2018-08-29 15:29:20 -07:00
Ivan Afonichev
0a10040289 adb should #include <sys/sysmacros.h>
On modern systems <sys/sysmacros.h> no longer being included by <sys/types.h>
To use major(), minor() we should include <sys/sysmacros.h> explicitly.
See https://koji.fedoraproject.org/koji/taskinfo?taskID=29356781
Similar changes merged last year:
https://android-review.googlesource.com/c/platform/system/core/+/398913
https://android-review.googlesource.com/c/platform/system/core/+/399050
2018-08-30 01:12:56 +04:00
Tom Cherry
566751444d fastboot: remove 'powerdown'
This isn't sent by the fastboot client.
This isn't in our bootloader requirement document.
Neither my hikey nor sailfish respond to this.
The README.md literally uses this as an example for 'unknown command'

Test: fastboot still works.
Change-Id: Ia442a41de517dae078dd7e73c951aadb97646c73
2018-08-29 14:10:47 -07:00
Paul Lawrence
c735bfe5da Fix bug in fs_mgr with calling vdc
Parameter count was hard coded to 3, make dynamic

Test: Metadata encrypted device boots

Change-Id: I25bb5adb7f27fc392564bfa6ed3ed2efeb5c5a40
2018-08-29 12:56:53 -07:00
Christopher Ferris
9d3f45339a Set errno for all error return cases.
Test: Updated unit tests pass.
Change-Id: I2c1f14ed44ce144a46cb2866c146fca89a05539e
2018-08-29 10:47:06 -07:00
Tom Cherry
7b02605bf2 Merge "Switch root to /system in first stage mount" 2018-08-29 17:05:40 +00:00
Elliott Hughes
f5ca0f7ad4 Remove unused -I of external/safe-iop.
Bug: http://b/25224572
Test: builds
Change-Id: I90c35a38d69f533b8f60c2f357f0e5e36596d050
2018-08-29 09:49:24 -07:00
Treehugger Robot
90cd262d47 Merge "fastboot: Clean up the image array a bit." 2018-08-29 15:46:21 +00:00
Treehugger Robot
379e09927b Merge "fastboot: Flash boot partitions before rebooting to fastbootd." 2018-08-29 15:46:18 +00:00
David Pursell
1735516651 Merge "libcutils test: make set_sched_policy optional" 2018-08-29 15:33:24 +00:00
Elliott Hughes
11cd49c0c8 Merge "Move off safe-iop." 2018-08-29 15:23:09 +00:00
Treehugger Robot
49c4cd4d41 Merge "fs_mgr: set overlayfs_file context" 2018-08-29 14:32:00 +00:00
Treehugger Robot
9177927311 Merge "libdebuggerd: decode fdsan owner tags." 2018-08-29 01:50:19 +00:00
Mark Salyzyn
40b45b87c3 fs_mgr: set overlayfs_file context
Security minded hardening, let's not depend on reboot and restorecon.

Test: manual, make sure all sepolicy context are as expected before reboot
Bug: 109821005
Change-Id: I9d3419ce57be072daa55f704f75df7775fbaf5fb
2018-08-28 22:21:00 +00:00
Treehugger Robot
d2b29eb3af Merge "fs_mgr: overlayfs skip mount points that are more specific" 2018-08-28 22:20:35 +00:00
David Anderson
0debda098f fastboot: Clean up the image array a bit.
This makes the following changes to the images array:
 * The "optional_if_no_partition" flag is removed, as it was a temporary
   workaround for super.img.
 * The "flashall" flag is removed.
 * The "needed_for_fastbootd" flag is now an ImageType enum.

Bug: N/A
Test: fastboot builds, flashall works
Change-Id: Id000ea20cf83639cec2c9ae94f28c799b34606f1
2018-08-28 15:17:48 -07:00