Commit graph

42292 commits

Author SHA1 Message Date
Mark Salyzyn
8aa329d0e2 Merge changes from topic "squashfs+overlayfs"
am: d88b52e7f4

Change-Id: Ifa38f8e48a3110dff9d1339c804855f8a0080ef4
2018-08-09 16:22:24 -07:00
Mark Salyzyn
d88b52e7f4 Merge changes from topic "squashfs+overlayfs"
* changes:
  init: add fs_mgr_overlayfs_mount_all to FirstStageMount
  adb: add overlayfs handling for readonly system filesystems
  fs_mgr: get fs_mgr_mount_all to call fs_mgr_overlayfs_mount_all
  fs_mgr: add overlayfs handling for squashfs system filesystems
2018-08-09 20:44:20 +00:00
David Anderson
dff1cef8ae Merge changes Id2a61d35,Ibe802c36
am: 3cf9f9b838

Change-Id: I56c5e5df0c716d72163aca5a50775ae92228c630
2018-08-09 13:04:12 -07:00
Treehugger Robot
3cf9f9b838 Merge changes Id2a61d35,Ibe802c36
* changes:
  fastbootd: Add support for flashing logical partitions.
  fastbootd: Enable erase and flash commands for physical partitions.
2018-08-09 19:47:17 +00:00
Tom Cherry
f1e6db5567 Merge "init: clarify comment for the restorecon of second stage init"
am: 424ffa2df9

Change-Id: I6756899be70781ab4f1a5cd2f7d8daf28cb56a23
2018-08-09 11:56:25 -07:00
Treehugger Robot
424ffa2df9 Merge "init: clarify comment for the restorecon of second stage init" 2018-08-09 18:28:49 +00:00
David Anderson
88ef0b1f25 fastbootd: Add support for flashing logical partitions.
When flashing logical partitions, we read the "super" partition metadata
corresponding to the current slot. We then temporarily create a
device-mapper device for that partition, and immediately destroy the
device after all operations are complete. We do not mount partitions
ahead of time, or keep them mounted, because a fastboot operation may
change the layout of the logical partition table (or change which slot
is current).

Bug: 78793464
Test: fastboot flash a logical partition under "super"
Change-Id: Id2a61d3592decabeebfd283c4fd6e6cbe576a18c
2018-08-09 11:15:23 -07:00
Tom Cherry
e85b2addca init: clarify comment for the restorecon of second stage init
Test: we actually do need this restorecon for recovery.
Change-Id: I46a8d6ea5c08b18d79fa6dd8df0f4a98695363e2
2018-08-09 10:40:51 -07:00
David Anderson
12211d163e fastbootd: Enable erase and flash commands for physical partitions.
Bug: 78793464
Test: adb reboot fastboot && fastboot flashall

Change-Id: Ibe802c36f6efe20111a2315616ef34d3a027950f
2018-08-09 09:58:37 -07:00
Tao Bao
47c07649af Merge "fastboot: fastbootd uses libadbd.so."
am: 075c351af2

Change-Id: Ide4d00255ea38dc3b79973094bed5a04c7baf3f7
2018-08-09 09:41:34 -07:00
David Anderson
e60694d66a Merge "fastbootd: Allow returning errors from getvar handlers."
am: 4264b7f5d2

Change-Id: I1e14040ca3aa2dd671e910f0bedd8f138e9ec2f0
2018-08-09 09:40:44 -07:00
Tao Bao
075c351af2 Merge "fastboot: fastbootd uses libadbd.so." 2018-08-09 16:31:29 +00:00
Treehugger Robot
4264b7f5d2 Merge "fastbootd: Allow returning errors from getvar handlers." 2018-08-09 16:28:06 +00:00
Steven Moreland
bff61f2eba Merge "Add ParseFloat (in parsedouble.h)."
am: 9ce0de0ed1

Change-Id: I16d399f1be0a9c5d3ebe20e795b8a69f3fd30e4f
2018-08-09 09:25:41 -07:00
Steven Moreland
9ce0de0ed1 Merge "Add ParseFloat (in parsedouble.h)." 2018-08-09 16:14:18 +00:00
Hans Boehm
cc8c08d1f1 Merge "Revert^2 "Prepare to fail in RefBase destructor if count is untouched""
am: 2d3f234f20

Change-Id: I12acef5c4485616cbb0fd57162bcca0919068132
2018-08-08 22:23:23 -07:00
Hans Boehm
2d3f234f20 Merge "Revert^2 "Prepare to fail in RefBase destructor if count is untouched"" 2018-08-09 05:09:19 +00:00
Steven Moreland
7ab8206b59 Merge "ParseDouble: allow validation only."
am: 4842b1b53e

Change-Id: I24758b950cf256527f6a5f80e22a45d994724aa3
2018-08-08 19:43:43 -07:00
Treehugger Robot
4842b1b53e Merge "ParseDouble: allow validation only." 2018-08-09 02:38:27 +00:00
Josh Gao
232cacc29a Merge "base: move unique_fd fdsan tests into bionic."
am: e74c526513

Change-Id: I2f2586281ce25cc859eb8cfcc939a31b9745429a
2018-08-08 19:27:34 -07:00
Treehugger Robot
e74c526513 Merge "base: move unique_fd fdsan tests into bionic." 2018-08-09 02:14:48 +00:00
David Anderson
856b7ecbb6 fastbootd: Allow returning errors from getvar handlers.
Currently a few getvar handlers will return invalid strings when an
error occurs. This change allows those handlers to instead send a proper
failure message.

Bug: 78793464
Test: N/A
Change-Id: I7ff7d036c1e6fb0a3d700ecf21b1103ab77278d2
2018-08-08 18:24:09 -07:00
Steven Moreland
586ef26f74 Add ParseFloat (in parsedouble.h).
Bug: 110758329 # for using here
Test: libbase_test (added float_smoke)
Change-Id: I640f85655567c707cbee625ca9c88db2ab91da66
2018-08-08 18:17:21 -07:00
Josh Gao
fa06fc79e2 base: move unique_fd fdsan tests into bionic.
EXPECT_DEATH forks behind the scenes, which turns off fdsan, leading to
these tests failing. Instead of duplicating the special
EXPECT_FDSAN_DEATH macro, just move these tests into the bionic fdsan
tests.

Test: none
Change-Id: Ia7b65d4560601d5a78d143aced887a6773b401c0
2018-08-08 17:38:04 -07:00
Julien Desprez
d8ecfb6db7 Merge "Add adb integration test to general-tests"
am: 7b1d163cb8

Change-Id: I5fc70e76edff1c8924a54e3128733d2b7fcfb20d
2018-08-08 17:23:06 -07:00
Treehugger Robot
7b1d163cb8 Merge "Add adb integration test to general-tests" 2018-08-09 00:05:51 +00:00
Steven Moreland
1b8981e972 ParseDouble: allow validation only.
This change also updates documentation for Parse(Ui|I)nt functions
which recently had a corresponding change applied.

Bug: 110758329
Test: libbase_test
Change-Id: I4842c0500a6e49498eeb8a63d1117c06727fffdf
2018-08-08 16:50:27 -07:00
Hans Boehm
2a019ecf4f Revert^2 "Prepare to fail in RefBase destructor if count is untouched"
This reverts commit b9d0753d2b.

Reason for revert: Re-land with MacOS workaround.

Test: Build (on Linux) and boot AOSP, with weak symbols enabled and disabled.

Change-Id: I5150cd90367178f3b039761dca3bccc9c2987df1
2018-08-08 16:30:12 -07:00
Tao Bao
b71eedf912 fastboot: fastbootd uses libadbd.so.
The size of `fastbootd` goes down from 64088-byte to 38488-byte
(aosp_taimen-userdebug) after the change.

Bug: 78793464
Test: `m -j installclean && m -j fastbootd`. Check that
      $OUT/recovery/root/system/lib64/libadbd.so exists and
      $OUT/recovery/root/system/bin/fastbootd depends on that.
Change-Id: Ic36c98da1a0dda4e0d86e671f858c42578f53f90
2018-08-08 15:54:48 -07:00
Hridya Valsaraju
b5ff114a62 Merge "fastbootd: Implement the getvar command."
am: 70306b9271

Change-Id: I72bd78bfc8ab0c18006614990ad7fa4a44a8a7c7
2018-08-08 15:47:20 -07:00
Mark Salyzyn
934db8a4a5 init: add fs_mgr_overlayfs_mount_all to FirstStageMount
Test: compile & smoke
Bug: 109821005
Bug: 110985612
Change-Id: I51a4b7fc123e736035f74e126f71288721dc9fab
2018-08-08 15:42:46 -07:00
Mark Salyzyn
c60153f742 adb: add overlayfs handling for readonly system filesystems
adb verity-on setup overlayfs directories, do not skip if verity
feature not configured for device.

adb verity-off teardown overlayfs directories, do not skip if verity
feature not configured for device.

adb remount setup overlayfs directories and mount if possible, and
do so without a reboot if possible.

Test: compile
Bug: 109821005
Bug: 110985612
Change-Id: I28c4c23fea44b886c5523f0286a523f0b0485df0
2018-08-08 15:42:44 -07:00
Mark Salyzyn
d9e6c2020e fs_mgr: get fs_mgr_mount_all to call fs_mgr_overlayfs_mount_all
After fs_mgr_mount_all has added the resources, let
fs_mgr_overlayfs_mount_all to read-only mount overlayfs over the
possible system partitions.

Test: compile
Bug: 109821005
Bug: 110985612
Change-Id: I7101a04c57de1a26283b1523636d07fa8e19ffc7
2018-08-08 15:38:53 -07:00
Mark Salyzyn
b28389f5ee fs_mgr: add overlayfs handling for squashfs system filesystems
Logistics for adb remount on developer builds for readonly system
partitions using overlayfs to deal with not being able to remount
with read-write.

Conditions are that filesystem is squashfs, read-only, debug build,
kernel supports overlayfs.  The default is a valid /cache/overlay/
directory, with .../<mount_point>/upper and .../<mount_point>/work,
associated with each system partition <mount_point>.

Will take the sepolicy of context of lowerdir as rootcontext= option.

Add fs_mgr_overlayfs_mount_all() to recurse through
fs_mgr_read_fstab_default(), and checking against /proc/mounts to
add any acceptable overlayfs mounts.  The checking with /proc/mounts
makes sure we do not overlayfs overtop an overlayfs.

Add fs_mgr_overlayfs_setup(const char*, const char* bool*) and
fs_mgr_overlayfs_teardown(const char*, bool*) to respectively setup
or teardown the overlayfs support directories.  Return value
includes success and optional supplied change booleans.

Test: compile
Bug: 109821005
Bug: 110985612
Change-Id: Ie9b4e9ca0f2bdd9275ac2e2e905431636948e131
2018-08-08 15:38:53 -07:00
Treehugger Robot
70306b9271 Merge "fastbootd: Implement the getvar command." 2018-08-08 22:37:00 +00:00
Florian Mayer
09336fe231 Merge "Allow to get raw register data on all platforms."
am: ec004eb1b3

Change-Id: I57b8c1521f7d5bf5bbcdd26c930a44d19e8fc744
2018-08-08 14:55:59 -07:00
Josh Gao
b97de6d007 Merge "adb: clean up handle_host_request."
am: f41897a66e

Change-Id: Ifa0dd3f795394e977275732f3f831d9ff12399ef
2018-08-08 14:50:32 -07:00
Florian Mayer
ec004eb1b3 Merge "Allow to get raw register data on all platforms." 2018-08-08 21:37:46 +00:00
Treehugger Robot
f41897a66e Merge "adb: clean up handle_host_request." 2018-08-08 20:36:44 +00:00
Mathieu Chartier
759d185990 Merge "Move to using ClassAccessor"
am: fe891a88a9

Change-Id: I0762a7368b163e3cc54dc55cdb4d60bb2ae29138
2018-08-08 13:20:06 -07:00
Mathieu Chartier
fe891a88a9 Merge "Move to using ClassAccessor" 2018-08-08 20:05:13 +00:00
Julien Desprez
75fea7ec3b Add adb integration test to general-tests
In order to run them continuously, add them to general-test
zip.

Test: make general-tests
Bug: 112104122
Change-Id: I7a1143ac638626069ed78ddd450063e9489e22e8
2018-08-08 12:08:50 -07:00
Hridya Valsaraju
31d2c26409 fastbootd: Implement the getvar command.
This implements basic "fastboot getvar" support, including commands supported
by IBootControl.

Bug: 78793464
Test: fastboot getvar <fastboot variable>

Change-Id: Iee1a7b3f43dea46f80dcdf73c45034e2ffe4727d
2018-08-08 11:41:53 -07:00
Suren Baghdasaryan
42f5cfbd45 [automerger skipped] Merge "lmkd: Skip memory.stat usage when per-app memcgs are not used"
am: 1e0e1b44bd  -s ours

Change-Id: Ic2a13be530643b3b30c69587ec7dfbe76725474b
2018-08-08 11:38:50 -07:00
Suren Baghdasaryan
26beb5ca71 Merge "lmkd: Protect against buffer overflow"
am: 41950dd414

Change-Id: Ifabd859dfd34354a4567e049c0426a0699dcc076
2018-08-08 11:36:18 -07:00
Mathieu Chartier
c2277fc216 Move to using ClassAccessor
In preparation for removal of ClassDataItemAccessor.

Bug: 79758018
Test: make
Test: test/run-test --host 137
Test: out/host/linux-x86/nativetest/libunwindstack_test/libunwindstack_test

Change-Id: I61a20fe7200a0d669b84573d3853b55877922602
2018-08-08 11:04:15 -07:00
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