Commit graph

42240 commits

Author SHA1 Message Date
Tao Bao
db291b5fb4 Merge "Merge libsync_recovery rules into libsync."
am: 8fa3adb8a9

Change-Id: I5a37ec60d84c2d92aadc7071f9355fb3ef3bac8c
2018-08-08 11:03:52 -07:00
Greg Kaiser
421492206f Merge "Revert "Support Speck encryption.""
am: 7d4e7d3156

Change-Id: I4fbd66f6fa138d8f3910f8bd9ecc5d8e9a106f8d
2018-08-08 10:41:00 -07:00
David Anderson
04d964045d Merge "fastboot: Fix product-services typo"
am: 6b0ecdab15

Change-Id: I0a7f1f390aa8d5241da262ee30a094b3c5a711c2
2018-08-08 10:39:57 -07:00
Tao Bao
e7e0a5e29d Merge "Make libadf, libsync_recovery recovery_available."
am: ba22102ce3

Change-Id: I45e5b40128edff3623b2ee0c918e17b4ea93fa74
2018-08-08 10:39:15 -07:00
Mark Salyzyn
32e66971ab Merge "bootstat: duplicate boot reason entries"
am: f3c332725b

Change-Id: I910060f82aa3c3720baecd5aa9e2462eea38239d
2018-08-08 10:38:08 -07:00
Tao Bao
8fa3adb8a9 Merge "Merge libsync_recovery rules into libsync." 2018-08-08 00:26:38 +00:00
Xin Li
1680c7b327 Merge "Merge Android Pie into master"
am: 5d707816ac

Change-Id: I5c73a134d341cb054a0693250bc5e3c3738bb663
2018-08-07 15:42:25 -07:00
Treehugger Robot
7d4e7d3156 Merge "Revert "Support Speck encryption."" 2018-08-07 21:11:51 +00:00
Treehugger Robot
6b0ecdab15 Merge "fastboot: Fix product-services typo" 2018-08-07 18:24:10 +00:00
Tao Bao
ba22102ce3 Merge "Make libadf, libsync_recovery recovery_available." 2018-08-07 18:05:45 +00:00
Tao Bao
f32d3df46f Merge libsync_recovery rules into libsync.
Statically linking against libsync is no longer a concern, since libsync
has supported the modern sync ABI (which is frozen upstream) after the
recent cleanup works.

Test: `m dist` with aosp_taimen-userdebug
Change-Id: Ic162bc7ff7c9dd306658d11d4b71e2d18730a2ee
2018-08-07 11:00:50 -07:00
Jerry Zhang
9b66330375 Make libadf, libsync_recovery recovery_available.
Bug: 110380063
Test: `m dist` with aosp_taimen-userdebug
Change-Id: Ie3543ff89b6b4f0de04eff0f85f8001f4b27d86a
2018-08-07 10:53:07 -07:00
Tom Cherry
fc464cabcc Merge "split first stage init into a separate executable"
am: 574533a657

Change-Id: Ib26d1b54dc654883eaccd1d5dc9575cfac1262a5
2018-08-07 10:48:01 -07:00
Mark Salyzyn
f3c332725b Merge "bootstat: duplicate boot reason entries" 2018-08-07 17:38:50 +00:00
Greg Kaiser
954c141c48 Revert "Support Speck encryption."
This reverts commit 49c27c5cb2.

Remove the Speck encryption support. It was eventually
decided not to allow Speck in Android P, so this code
is no longer needed and wasn't used outside of testing.

Bug: 112009351
Test: Confirmed AES continues to work with FBE.
Change-Id: Ia5458143be5687fff8d541d8fa2c8ee24a369da4
2018-08-07 10:10:31 -07:00
Mark Salyzyn
274b5447fa bootstat: duplicate boot reason entries
Selected visually obvious non-compliant boot reasons to allow
for future re-use of a later formerly duplicated entry.

Test: compile
Bug: 112157996
Change-Id: I3c6b449d36f9e4b745214dd7840b1dc1258bf483
2018-08-07 09:57:32 -07:00
Xin Li
5d707816ac Merge "Merge Android Pie into master" 2018-08-07 16:51:24 +00:00
David Anderson
8cdea7ff0c fastboot: Fix product-services typo
The build system generates a partition name of "product_services" for
the product-services partition, so fastboot's image list must reflect
this.

Bug: 78793464
Test: fastboot flash product_services works with fastbootd
Change-Id: I348f970c9584fd3dd4369e8cded66b6e39eee2b2
2018-08-07 09:29:11 -07:00
Tom Cherry
574533a657 Merge "split first stage init into a separate executable" 2018-08-07 16:08:55 +00:00
Josh Gao
c62f446678 Merge changes from topic "fdsan_debuggerd"
am: 50973d1865

Change-Id: I2ae93efd1645cd67d7c823d7fe22ccff71796033
2018-08-07 03:06:33 -07:00
Josh Gao
50973d1865 Merge changes from topic "fdsan_debuggerd"
* changes:
  adb: actually enable fdsan.
  adb: move AdbCloser to its rightful place.
  libdebuggerd: extract and print the fdsan table.
  crash_dump: pass the address of the fdsan table.
2018-08-07 10:02:16 +00:00
Orion Hodson
bd6a27fd8d Merge "Revert "Prepare to fail in RefBase destructor if count is untouched""
am: 919ee8ab1c

Change-Id: Ia8ba709af6ed960823cbd93708b7e92653bb0b59
2018-08-07 01:39:37 -07:00
Orion Hodson
919ee8ab1c Merge "Revert "Prepare to fail in RefBase destructor if count is untouched"" 2018-08-07 08:27:29 +00:00
Hans Boehm
b9d0753d2b Revert "Prepare to fail in RefBase destructor if count is untouched"
This reverts commit 9d3146af22.

Reason for revert: It appears that weak symbols don't work as expected on MacOS, breaking the MacOS aapt build.

Change-Id: Ica0955106485a7bf2e2c3f09ff7910e230eb4139
2018-08-07 05:35:12 +00:00
David Anderson
68303f2297 Merge "fs_mgr: Do not mount empty partitions."
am: 4f878cf6cb

Change-Id: I62e1721c63b9b3054a20b4f486ed7e3f9f722ae7
2018-08-06 19:02:58 -07:00
David Anderson
8b79606d26 Merge "liblp: Allow flashing to readonly logical partitions."
am: a70e2b2ed7

Change-Id: Id26cef536900b650767f167d09f878d41af9a267
2018-08-06 19:02:19 -07:00
Hridya Valsaraju
21fd013665 Merge "Allow existance of partition to be checked before flashall or update"
am: c4630ef445

Change-Id: Icb3475c307ba6d44ccbacc3ed231886e94864d5d
2018-08-06 19:01:38 -07:00
Hridya Valsaraju
f57b123d46 Merge "Add fastbootd."
am: c30a75a007

Change-Id: I8447c0f4ddf9588b38a168d9c136c4b3d3bcee59
2018-08-06 18:58:34 -07:00
Josh Gao
297d9bf8ea adb: actually enable fdsan.
adb was using a custom unique_fd closer that didn't have an
implementation for fdsan, which meant that none of our FDs were
actually tracked. Guard this behind ifdefs so that we only use this
on Windows, and delete our implementation of Pipe in favor of the one
in libbase while we're at it. libbase's implementation always sets
O_CLOEXEC, so fix up the instance of Pipe that doesn't expect that.

Test: mma
Test: adb start-server
Test: debuggerd `pidof adbd`
Change-Id: Ic29d641a2f93fb42384b00c51775048c8bcbe152
2018-08-06 18:50:10 -07:00
Josh Gao
9d100f1043 adb: move AdbCloser to its rightful place.
Test: mma
Change-Id: Ie74c49e8abf72f594a35d04b2b0d99b96f58f8d0
2018-08-06 18:50:10 -07:00
Josh Gao
ce841d91fb libdebuggerd: extract and print the fdsan table.
This commit only prints the raw value of the owner tag, pretty-printing
will come in a follow-up commit.

Test: debuggerd `pidof adbd`
Test: static_crasher fdsan_file + manual inspection of tombstone
Change-Id: Idb7375a12e410d5b51e6fcb6885d4beb20bccd0e
2018-08-06 18:50:10 -07:00
Josh Gao
9da1f51c10 crash_dump: pass the address of the fdsan table.
Pass the address of the fdsan table down to crash_dump so that we can
dump the fdsan table along with the open file descriptor list.

Test: debuggerd_test
Test: manually ran an old static_crasher
Change-Id: Icbac5487109f2db1e1061c4d46de11b016b299e3
2018-08-06 18:50:10 -07:00
Treehugger Robot
4f878cf6cb Merge "fs_mgr: Do not mount empty partitions." 2018-08-07 00:52:34 +00:00
Treehugger Robot
a70e2b2ed7 Merge "liblp: Allow flashing to readonly logical partitions." 2018-08-07 00:28:48 +00:00
Xin Li
fb973d34ac Merge Android Pie into master
Bug: 112104996
Change-Id: Ib0e5b2801a931b469b753806b1fbe2fabb0c1de5
2018-08-06 17:26:31 -07:00
Treehugger Robot
c4630ef445 Merge "Allow existance of partition to be checked before flashall or update" 2018-08-07 00:20:46 +00:00
Treehugger Robot
c30a75a007 Merge "Add fastbootd." 2018-08-07 00:08:18 +00:00
David Anderson
6868cb9f5e fs_mgr: Do not mount empty partitions.
If a logical partition is resized to 0 bytes, it will have no extents.
This is not allowed by device-mapper, but is useful for effectively
compacting partitions with "fastboot flashall". If all logical
partitions are resized to 0, then resized to their intended size, then
we will allocate extents more efficiently.

However, if a partition is left with a zero size (either intentionally
or not), this should not throw the device into a reboot loop due to
CreateLogicalPartitions failing. Instead we skip partitions with no
extents.

Bug: 78793464
Test: with fastbootd:
        fastboot create-partition example 4096
        fastboot resize-partition example 0
      device reboots successfully

Change-Id: I572efa949176c8c3c493ef00438d8badd4d7cf4f
2018-08-06 15:59:38 -07:00
David Anderson
4d71d85805 liblp: Allow flashing to readonly logical partitions.
By default, logical partitions with the readonly flag are created with a
readonly device. This change allows callers of CreateLogicalPartition
to create writable devices so they can still be flashed.

Bug: 78793464
Test: fastboot flash product_services works with fastbootd
Change-Id: Ia8d2761a3067e3b62815acbf0b6fb7f033072ba2
2018-08-06 15:47:26 -07:00
Tao Bao
19e545c12d Merge "adb: adbd uses shared libraries."
am: 0e947189c5

Change-Id: If6dd1b01b0ae7b71c8911045ef0570f0c226e5d9
2018-08-06 15:34:51 -07:00
Tao Bao
0e947189c5 Merge "adb: adbd uses shared libraries." 2018-08-06 21:55:28 +00:00
Tao Bao
eca59ae895 adb: adbd uses shared libraries.
This CL builds the former `libadbd` as a shared library, and moves
`adbd` to using shared libraries.

We can't switch `libadbd` from static to shared library directly, due to
the circular dependency between `libadbd` and `adbd`. In particular,
daemon_service_to_fd() can't be compiled into `libadbd`, as it needs to
be overridden by recovery/minadbd.

This CL creates a static library `libadbd_core` as the common base,
which contains everything from the former `libadbd`. Both of the two
shared library targets `libadbd` and `libadbd_services` depend on
`libadbd_core`.

The `adbd` on device (under both of normal boot and recovery) now
depends on `libadbd.so` and `libadbd_services.so`. recovery/minadbd will
depend on `libadbd.so` and `libminadbd_services.so` in future (after
fully converting recovery to Soong).

Bug: 78793464
Test: `m dist`
Test: Run adbd_test on marlin.
Test: Build and flash marlin on device. Check basic adbd functionalities
      (`adb shell` and `adb sync`) under normal boot and recovery.
Test: `adb sideload` on marlin.
Change-Id: Iacbd4db524ef94abd175cd1d27688f4faf3db024
2018-08-06 11:40:47 -07:00
Hridya Valsaraju
f1f0a9c8a5 Allow existance of partition to be checked before flashall or update
Bug: 112108453
Test: fastboot flashall with super.img and product-services.img in $OUT,
fastboot update with super.img and product-services.img in image.zip.

Change-Id: I5718b5e60c546c55af74292895b3f7fe169e4f02
2018-08-06 11:05:37 -07:00
Hans Boehm
b708511f78 Merge "Prepare to fail in RefBase destructor if count is untouched"
am: f502182ac6

Change-Id: I91ff7140a9a72c910ef01a2e13f277fa36c82b50
2018-08-06 11:01:28 -07:00
Tom Cherry
31438489c0 split first stage init into a separate executable
In the future, systems with dm-linear will require a ramdisk to set up
the mount for system.  In this world, first stage init will be a part
of this ramdisk and handle setting up dm-linear, mounting the
necessary partitions, then pivoting to the system image, which will
become the root partition.

This also enables previous devices without system-as-root, to be
unified with system-as-root devices for all aspects of boot after the
pivot_root.

Bug: 79758715
Test: boot hikey
Test: boot sailfish, boot sailfish into recovery
Change-Id: Iefa88a3ec5994e7989aa9f26f2de0351ffa5468b
2018-08-06 10:36:43 -07:00
Hans Boehm
f502182ac6 Merge "Prepare to fail in RefBase destructor if count is untouched" 2018-08-06 16:53:12 +00:00
Christopher Ferris
5aa46568b3 Merge "Be permissive about badly formed elf files."
am: c7815d675a

Change-Id: Ie62a0bd4f1fb50a2a02a0129a5006485a51ae734
2018-08-04 10:33:46 -07:00
Christopher Ferris
c7815d675a Merge "Be permissive about badly formed elf files." 2018-08-04 17:28:35 +00:00
Hans Boehm
9d3146af22 Prepare to fail in RefBase destructor if count is untouched
Move towards crashing if a normally configured RefBase object is
destroyed without ever incrementing the reference count. We've been
threatening to do this for a long time. The previously last known
violation had been fixed.

This also fixes stack trace printing from RefBase, which had previously
been broken, and which we found necessary to track down further
violations of this rule.

Unfortunately, we found several more violations with the aid of
that fix. After existing CLs are submitted, there are
still some failures, but they are no longer numerous. Thus this CL
doesn't actually crash in the event of a violation, but does log a
verbose stack trace if it encounters one.

Bugs have been filed against the remaining known RefBase client offenders.
We plan to enable crashing on usage violations once those are fixed.

The fix for the stack trace printing breakage unfortunately requires
the use of weak symbols in order to avoid a circular build dependency.
We expect to eventually replace this with execinfo.h functionality.

Some random reformatting, driven by consistency with current formatting
requirements.

Add missing include to BacktraceMap.h.

Bug: 79112958
Bug: 30292291
Test: Boot AOSP, Master
Change-Id: I8151c54560c3b6f75ffc4c48229f0388a2066958
2018-08-03 17:56:47 -07:00
Tom Cherry
5744e4d7d2 Merge "Split init's source files init first stage and second stage"
am: e0f6dc46d8

Change-Id: Iec525d3fb0e09550895d67709ed958f8337d9e34
2018-08-03 16:00:05 -07:00