Commit Graph

55429 Commits

Author SHA1 Message Date
Ruchir Rastogi bb0da94f8d First draft of native StatsEvent API
Test: m -j libstatssocket compiles
Change-Id: I874968d4f77a5990764100123794b923847e5eb5
Merged-In: I0da9740d29749d79d14be39e5949b98c58df704d
2019-12-18 11:33:22 -08:00
Nikita Ioffe 9f473c0579 Don't proceed with userspace reboot if device doesn't support it
Test: set property to false and adb reboot userspace
Bug: 135984674
Change-Id: I11e55243df002dd54e533a6b9fc529866597d4dd
2019-12-18 18:06:47 +00:00
Songchun Fan 284962431b [incremental] create /data/incremental in init.rc
We use /data/incremental to keep all the directories that are mounted on
the Incremental File System.

Since system_server does not have permission to dynamically create dirs
directly under /data, we create /data/incremental in init.rc.

Test: boots
BUG: 136132412
Change-Id: Ic90cc8f652672a8d4459c0cd38db9c0872217af4
2019-12-18 09:26:51 -08:00
Elliott Hughes fa44dc0f5d Merge "Fix SEGV in libziparchive with malformed zip file."
am: 264a37d12f

Change-Id: I39c2ec3e0a1b81585f6c47620d7dec9687bbc9f7
2019-12-18 08:19:04 -08:00
Elliott Hughes 264a37d12f Merge "Fix SEGV in libziparchive with malformed zip file." 2019-12-18 16:14:54 +00:00
David Anderson 97c0ff6196 Merge "liblp: Add a VIRTUAL_AB_DEVICE flag for LpMetadataHeader."
am: 43ad6362da

Change-Id: Iadeecde4704d71e8190f8d4208605cf95c1acd63
2019-12-18 08:03:01 -08:00
David Anderson 0105ab5472 Merge "libfiemap: Fix fallocate() usage."
am: 42c86c763c

Change-Id: Ibb27516044e8a702abb03147f44be8222462a839
2019-12-18 08:02:43 -08:00
David Anderson 43ad6362da Merge "liblp: Add a VIRTUAL_AB_DEVICE flag for LpMetadataHeader." 2019-12-18 15:42:44 +00:00
David Anderson 42c86c763c Merge "libfiemap: Fix fallocate() usage." 2019-12-18 15:37:10 +00:00
Jason Jeremy Iman 0abe8e8126 Merge "Enable "localfilesystem" UNIX domain socket for ADB."
am: 90e9217aca

Change-Id: I74f877351e40cf37f0cc79867128487223d52465
2019-12-17 21:39:32 -08:00
Treehugger Robot 90e9217aca Merge "Enable "localfilesystem" UNIX domain socket for ADB." 2019-12-18 05:34:30 +00:00
Peter Collingbourne 683192270f Stop using weak symbols in libvndksupport.
These weak symbols are no longer necessary because we no longer
need to statically link libvndksupport.

Furthermore, these symbols are not really optional when libvndksupport is
dynamically linked. When the library is linked with --as-needed the linker
may drop the reference to libdl_android.so, which leads to a failure to boot.

Bug: 146456667
Change-Id: I4d2290d8d0206e0d89665d4d872a7c53b3e1531b
2019-12-17 17:52:05 -08:00
Josh Gao a48b41bcb8 debuggerd: switch to using platform headers for DEBUGGER_SIGNAL.
Test: treehugger
Change-Id: Ie9736c4a077dba1029d2352bd94d47ce07323aec
2019-12-17 16:36:05 -08:00
Yifan Hong 0cd761c347 Merge changes from topic "wait_for_merge"
am: 18c6248ffe

Change-Id: Ibccf63cfdaabb8610c24d2b2271d7cb3cda016f2
2019-12-17 15:04:34 -08:00
David Anderson 71b287bfd7 libfiemap: Fix fallocate() usage.
This fixes two bugs in how we use fallocate(). First, using ZERO_RANGE
is a mechanism to allocate holes, not blocks. Instead we should be
passing no flags.

The reason this code worked is because of our explicit writes to the
file, which is intended to defeat lazy block allocation. This is not
necessary for F2FS with proper file pinning support, so we now skip this
when possible.

Together, these fixes improve the speed of "adb remount" when backed
by libfiemap.

Bug: 134949511
Test: adb remount when backed by /data
Change-Id: I746053d183e0c83d56979d9c3fa6d96b40b5e478
2019-12-17 15:04:08 -08:00
Yifan Hong 18c6248ffe Merge changes from topic "wait_for_merge"
* changes:
  libsnapshot: add WaitForMerge
  libsnapshot: SnapshotUpdateTest::AddOperation
  libsnapshot: add GetCurrentSlot
2019-12-17 23:01:59 +00:00
Martijn Coenen 110a65c586 Merge "Revert "Have /storage always point to sdcardfs by default.""
am: bc58945cd1

Change-Id: I2fef30b72fecb51363b5d8be2bb73bbe73a7a152
2019-12-17 09:45:00 -08:00
Treehugger Robot bc58945cd1 Merge "Revert "Have /storage always point to sdcardfs by default."" 2019-12-17 17:38:47 +00:00
David Anderson 65615d00a9 Merge "fs_mgr: Move libfiemap back to fs_mgr from system/gsid."
am: 1526a46e92

Change-Id: I447ec99fe62a62dc6a248e424a6312720f6f5918
2019-12-17 09:35:23 -08:00
David Anderson 1526a46e92 Merge "fs_mgr: Move libfiemap back to fs_mgr from system/gsid." 2019-12-17 17:32:09 +00:00
Elliott Hughes fba2a1a1ec Fix SEGV in libziparchive with malformed zip file.
d77c99ebc3 changed MappedFile to return a
bogus zero-length mapping on failure rather than nullptr. None of the
calling code was changed, though, and it seems like doing so would be a
bad idea. Revert that part of the change.

Add missing tests, and tidy up some of the logging. Also remove
single-use or obfuscatory constants from the tests.

The new "empty.zip" was created by using zip(1) to create a zip file
with one entry, then using `zip -d` to remove it.

The new "zero-size-cd.zip" was created by using zip(1) to create a zip
file containing a single empty file, and then hex editing the two byte
"size of the central directory" field in the "end of central directory
record" structure at the end of the file. (This is equivalent to, but
much smaller than, the example zip file provided by the bug reporter.)

Bug: http://b/145925341
Test: treehugger
Change-Id: Iff64673bce7dae886ccbc9dd6c2bbe18de19f9d2
2019-12-17 08:39:09 -08:00
Martijn Coenen 0dbb2a75f2 Revert "Have /storage always point to sdcardfs by default."
This reverts commit 5d53bfce2d.

Reason for revert: for consistency, we've decided that for now, all code will have the same view of /storage: FUSE. Will address the TODO here later.

Change-Id: Ia75e23c91fb098f6309c160de2889f06507c3717
2019-12-17 13:45:10 +00:00
Nikita Ioffe 7fe4852d3f Merge "Unmount bind-mounts on top of /data before unmounting /data"
am: e4b931146d

Change-Id: I10980637aaa6b9184ce5d5f794cf09d04f9df60b
2019-12-17 04:11:23 -08:00
Nikita Ioffe e4b931146d Merge "Unmount bind-mounts on top of /data before unmounting /data" 2019-12-17 12:06:59 +00:00
Ed Chen 30fa1296a7 Merge "Revert "remount: Remove the "backing" parameter to fs_mgr_overlayfs_setup.""
am: 701abc3f14

Change-Id: Ib994b996736594a7b969c232549cec5a6814dcbb
2019-12-17 01:21:21 -08:00
Ed Chen 701abc3f14 Merge "Revert "remount: Remove the "backing" parameter to fs_mgr_overlayfs_setup."" 2019-12-17 09:18:53 +00:00
Ed Chen 1981401909 Revert "remount: Remove the "backing" parameter to fs_mgr_overlayfs_setup."
This reverts commit b20aa434a3.

Bug: 146403375
Reason for revert: broken build 6078429 on git_master on walleye-user

Change-Id: Idc3b1c0ad5228d63298ce84811624b23d0cea434
2019-12-17 08:53:13 +00:00
David Anderson f204fa2199 Merge "remount: Remove the "backing" parameter to fs_mgr_overlayfs_setup."
am: 905ecdd374

Change-Id: Idde723e169effc42bc8a8e0a063a8ee85daf4524
2019-12-16 23:01:54 -08:00
David Anderson 905ecdd374 Merge "remount: Remove the "backing" parameter to fs_mgr_overlayfs_setup." 2019-12-17 06:05:43 +00:00
David Anderson 4fe398018b fs_mgr: Move libfiemap back to fs_mgr from system/gsid.
Bug: 134949511
Test: builds
Change-Id: I07943acce5d4671975afef6d8da1bdbeef43c39d
2019-12-16 20:10:26 -08:00
Nikita Ioffe 0dda423dd0 Unmount bind-mounts on top of /data before unmounting /data
Test: adb shell setprop sys.init.userdata_remount.force_umount_f2fs 1
Test: adb shell /system/bin/vdc checkpoint startCheckpoint 1
Test: adb reboot userspace
Bug: 135984674
Bug: 143970043
Change-Id: Icd7f3ad1c42d9b21bf4eacf1dec60355c9883254
2019-12-16 23:22:55 +00:00
David Anderson 4ba68b6451 liblp: Add a VIRTUAL_AB_DEVICE flag for LpMetadataHeader.
Bug: 134949511
Test: liblp_test gtests
Change-Id: I8b376d0980e1372086ed15b980209f3726ef651a
2019-12-16 22:20:40 +00:00
Yifan Hong cb6c6ef123 Merge "fastboot: Flashall does proper snapshot cancel"
am: 48d3b1e112

Change-Id: I85fe4961bc8111acf2c2c4a37f45c9f539729905
2019-12-16 13:50:06 -08:00
Treehugger Robot 48d3b1e112 Merge "fastboot: Flashall does proper snapshot cancel" 2019-12-16 21:44:39 +00:00
Alessio Balsini bef67f9fd4 Helper function to mount snapshot devices in recovery
In recovery the user has the option to mount /system, but when a device
is updating with Virtual A/B, the _b partition may be a snapshot.
This patch introduces a helper function that satisfies the dependency of
setting up the snapshot devices required to mount /system.

Bug: 139157327
Test: manual /system partition mount on VAB device during OTA
Change-Id: I7337bdd38d7016d12d3ee42be1c7893b10e9116d
Signed-off-by: Alessio Balsini <balsini@google.com>
2019-12-16 21:24:25 +00:00
Elliott Hughes 8025cee478 Merge "Rename unzip.cpp to ziptool.cpp."
am: cd652ea3dc

Change-Id: Icefb783e8da17a4c985b6fef02d3c124d9e7892d
2019-12-16 10:41:05 -08:00
Treehugger Robot cd652ea3dc Merge "Rename unzip.cpp to ziptool.cpp." 2019-12-16 18:37:49 +00:00
David Anderson c229e1facc Merge "liblp: Expand the metadata header for future use."
am: 18bb214b3f

Change-Id: Ica89f0a30ce180e168f98937472daaee6c4933f8
2019-12-16 09:42:03 -08:00
David Anderson 18bb214b3f Merge "liblp: Expand the metadata header for future use." 2019-12-16 17:31:57 +00:00
Jiyong Park 0d8d920e1d Merge "Use apex name in apex_manifest.pb as the mount point"
am: 413440c5b9

Change-Id: I46cc8c9cb168538bf9408a515725a0715f35fba5
2019-12-16 06:57:37 -08:00
Treehugger Robot 413440c5b9 Merge "Use apex name in apex_manifest.pb as the mount point" 2019-12-16 14:48:03 +00:00
Jiyong Park 648ae3a9d3 Use apex name in apex_manifest.pb as the mount point
When bind-mounting flattened APEX, use the apex name found in
apex_manifest.pb as the mount point, instead of the directory name which
might be different from apex name in case when the apex is overridden.

This allowed us to remove the special casing for the ART apex since we
/system/apex/com.android.art.release will be mounted to
/apex/com.android.art instead of /apex/com.android.art.release.

Bug: N/A
Test: m
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m, device is bootable
Change-Id: Ibdde7002b9078db390e6672b0eb82c474925451d
2019-12-16 11:31:50 +09:00
Martijn Coenen 74b049c172 Merge "Have /storage always point to sdcardfs by default."
am: a587d69364

Change-Id: I730e04651fce8267176b577622bfe0b821ebd8c9
2019-12-14 02:02:53 -08:00
Martijn Coenen a587d69364 Merge "Have /storage always point to sdcardfs by default." 2019-12-14 09:19:03 +00:00
Yifan Hong 1af515b57c libsnapshot: add WaitForMerge
Add an API that does not initiate the merge, but only waits for it to
finish. It is different from ProcessUpdateState API in that it also
blocks when state == UNVERIFIED and booting from the new slot.
(ProcessUpdateState immediately returns in this case).

This is useful for android.os.UpdateEngine.CleanupSuccessfulUpdate().
Bug: 138808328
Test: libsnapshot_test

Change-Id: I7cc59fcaf69616e7ec7ebe6101991b5106845b65
2019-12-13 19:52:31 -08:00
Yifan Hong c810f1091a libsnapshot: SnapshotUpdateTest::AddOperation
Reusable test code.
Test: libsnapshot_test

Change-Id: I00a1a460d84c01b0dbd24b668293df87962e8b00
2019-12-13 19:52:31 -08:00
Yifan Hong c64cefc027 libsnapshot: add GetCurrentSlot
Factor out obscure logic that reads boot indicator path.
GetCurrentSlot() returns three states:
- None (read failure)
- Old (before reboot)
- New (after reboot)
Use these "logical" slot values for simpler code.

Test: libsnapshot_test
Change-Id: I1fa2ce4916c5a1652d25682ec1f11e101c858822
2019-12-13 19:52:31 -08:00
Yifan Hong f99af924e5 Merge "libsnapshot: snaity check overflow bit at the end of update"
am: babc293140

Change-Id: Ica15033799b3af1f226d7e784f8781d0c9b03907
2019-12-13 19:07:32 -08:00
Treehugger Robot babc293140 Merge "libsnapshot: snaity check overflow bit at the end of update" 2019-12-14 03:05:19 +00:00
Elliott Hughes 98e1c94816 Merge "adb: improve help for -t/-tt."
am: 7f5116e581

Change-Id: Iacf553efedda8a82741de88a8a05d1dd56126bb7
2019-12-13 18:35:28 -08:00