Commit graph

75981 commits

Author SHA1 Message Date
Treehugger Robot
3cdaec9d84 Merge changes from topic "adb-remount-f2fs" am: e0fa2905d0 am: 1fc547baf1 am: 7562e11442
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1943366

Change-Id: If2c9cc0d3512df4ebbfd5143be7060134e8f0f6e
2022-01-11 01:33:11 +00:00
Treehugger Robot
7562e11442 Merge changes from topic "adb-remount-f2fs" am: e0fa2905d0 am: 1fc547baf1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1943366

Change-Id: Ic31c8cbd2bbed7251cd02fd4bfacc23470033c5b
2022-01-11 01:12:50 +00:00
Treehugger Robot
1fc547baf1 Merge changes from topic "adb-remount-f2fs" am: e0fa2905d0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1943366

Change-Id: Ifa05ae81886146136172b335e3298f4178409bac
2022-01-11 00:46:40 +00:00
Treehugger Robot
e0fa2905d0 Merge changes from topic "adb-remount-f2fs"
* changes:
  Mount /mnt/scracth with -o sync,nodiscard
  Run check_fs only /data is mounted
  Don't use FSCK_LOG_FILE used for ext4 only
  Don't try to mount if the disk has no FS magic
  Retry to unmount /data
2022-01-11 00:27:35 +00:00
Pirama Arumuga Nainar
81b2bfd233 Merge "Enable continuous coverage: use '%c' specifier in LLVM_PROFILE_FILE" am: f9a54a86ec am: 8a7b296501 am: 78825506d9 am: 7703d26e7e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1729634

Change-Id: I0810fe161081580f0515a43c5b02d55648d1b26d
2022-01-10 23:51:57 +00:00
Pirama Arumuga Nainar
7703d26e7e Merge "Enable continuous coverage: use '%c' specifier in LLVM_PROFILE_FILE" am: f9a54a86ec am: 8a7b296501 am: 78825506d9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1729634

Change-Id: If6ecb21915078335c17dd4af3a6e60b54382b208
2022-01-10 23:30:27 +00:00
Pirama Arumuga Nainar
78825506d9 Merge "Enable continuous coverage: use '%c' specifier in LLVM_PROFILE_FILE" am: f9a54a86ec am: 8a7b296501
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1729634

Change-Id: I30edff87c41d5ceb0e9164adf33fde7a6c59804a
2022-01-10 23:07:31 +00:00
Pirama Arumuga Nainar
8a7b296501 Merge "Enable continuous coverage: use '%c' specifier in LLVM_PROFILE_FILE" am: f9a54a86ec
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1729634

Change-Id: I38d350391163f86156a8f65016693284ddc18849
2022-01-10 22:54:34 +00:00
Pirama Arumuga Nainar
f9a54a86ec Merge "Enable continuous coverage: use '%c' specifier in LLVM_PROFILE_FILE" 2022-01-10 22:36:57 +00:00
Treehugger Robot
5e2690f23e Merge "Remove win_sdk" am: afd4ccd70b am: 84e4de7d4a am: 11bb816e0d am: 01e7120fcd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1941100

Change-Id: I17a8efdb22f415add0e67acc6a999990320502ca
2022-01-10 22:16:40 +00:00
Jaegeuk Kim
b783310e71 Allow to run fsck.f2fs in first_stage_ramdisk
[   23.065933][    T1] init: [libfs_mgr]Running /system/bin/fsck.f2fs -a -c 10000 --debug-cache /dev/block/sda8
[   23.067470][    T1] logwrapper: Cannot log to file /dev/fscklogs/log
[   23.067829][    T1] logwrapper:
[   23.068997][  T332] logwrapper: executing /system/bin/fsck.f2fs failed: Permission denied
[   23.069759][    T1] fsck.f2fs: executing /system/bin/fsck.f2fs failed: Permission denied
[   23.071659][  T332] logwrapper:
[   23.083283][    T1] fsck.f2fs: fsck.f2fs terminated by exit(255)
[   23.083283][    T1]
[   23.111166][    T1] F2FS-fs (sda8): Found nat_bits in checkpoint
[   23.121242][    T1] F2FS-fs (sda8): Mounted with checkpoint version = 6a65cb64
[   23.121831][    T1] init: [libfs_mgr]__mount(source=/dev/block/platform/14700000.ufs/by-name/metadata,target=/metadata,type=f2fs)=0: Success

Bug: 210589189
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I720e2aa4b1ab845af96610cd0d9c6e3c9b4cae03
2022-01-10 21:35:21 +00:00
Jaegeuk Kim
bbad87aeee Mount /mnt/scracth with -o sync,nodiscard
"-o discard" issues UNMAP commands to loopback resulting in punch_hole
on the pinned file in /data. That will break the pinned block map.

Bug: 210589189
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ia927c43fc75164ce5929173f5740737eac4de484
2022-01-10 21:34:00 +00:00
Jaegeuk Kim
06db803f32 Run check_fs only /data is mounted
After switching to /system from ramdisk, first_stage_init has no required
libraries for check_fs.

[   20.838811][    T1] init: [libfs_mgr]Created logical partition scratch on device /dev/block/dm-6
[   20.972704][    T1] init: [libfs_mgr]Running /system/bin/fsck.f2fs -a -c 10000 --debug-cache /dev/block/dm-6
[   20.977879][  T345] logwrapper: executing /system/bin/fsck.f2fs failed: No such file or directory
[   20.978470][    T1] fsck.f2fs: executing /system/bin/fsck.f2fs failed: No such file or directory
[   20.981137][    T1] fsck.f2fs: fsck.f2fs terminated by exit(255)
[   21.002958][    T1] init: [libfs_mgr]__mount(source=/dev/block/dm-6,target=/mnt/scratch,type=f2fs)=0: Success
[   21.017748][    T1] init: [libfs_mgr]umount(/mnt/scratch)
[   21.021028][    T1] init: [libfs_mgr]Running /system/bin/fsck.f2fs -a -c 10000 --debug-cache /dev/block/dm-6
[   21.028759][  T347] logwrapper: executing /system/bin/fsck.f2fs failed: No such file or directory
[   21.028793][    T1] fsck.f2fs: executing /system/bin/fsck.f2fs failed: No such file or directory
[   21.049100][    T1] fsck.f2fs: fsck.f2fs terminated by exit(255)
[   21.068101][    T1] init: [libfs_mgr]__mount(source=/dev/block/dm-6,target=/mnt/scratch,type=f2fs)=0: Success

Bug: 210589189
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ie41cba4e7553860fdb48996d9b58a34093f0b723
2022-01-10 21:33:50 +00:00
Jaegeuk Kim
d595de5139 Don't use FSCK_LOG_FILE used for ext4 only
Bug: 210589189
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Iaf7a61c6c9c6cd557f953b1a665e7a1640d357ae
2022-01-10 21:31:46 +00:00
Treehugger Robot
01e7120fcd Merge "Remove win_sdk" am: afd4ccd70b am: 84e4de7d4a am: 11bb816e0d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1941100

Change-Id: Ia1e4175e602a9d75438c8fd046aaaee0cf230f60
2022-01-10 21:09:26 +00:00
Treehugger Robot
11bb816e0d Merge "Remove win_sdk" am: afd4ccd70b am: 84e4de7d4a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1941100

Change-Id: I67e5eace96aa7c9e7da2d563b7a5c4c185dd24e0
2022-01-10 20:57:20 +00:00
Treehugger Robot
84e4de7d4a Merge "Remove win_sdk" am: afd4ccd70b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1941100

Change-Id: Ic8329df9b616367ff6e23ee0be63b1057b15d372
2022-01-10 20:39:18 +00:00
Treehugger Robot
afd4ccd70b Merge "Remove win_sdk" 2022-01-10 20:18:16 +00:00
Jaegeuk Kim
9547726f4a Don't try to mount if the disk has no FS magic
This avoids:
[   22.932529][    T1] init: [libfs_mgr]Invalid f2fs superblock on '/dev/block/platform/14700000.ufs/by-name/metadata'
[   22.934609][    T1] F2FS-fs (sda8): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[   22.935061][    T1] F2FS-fs (sda8): Can't find valid F2FS filesystem in 1th superblock
[   22.937306][    T1] F2FS-fs (sda8): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[   22.943700][    T1] F2FS-fs (sda8): Can't find valid F2FS filesystem in 2th superblock
[   22.951937][    T1] init: [libfs_mgr]__mount(source=/dev/block/platform/14700000.ufs/by-name/metadata,target=/metadata,type=f2fs)=-1: Invalid argument

Bug: 210589189
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I27989b25769eae83eb06ac86146f27baf288b7e1
2022-01-10 18:02:03 +00:00
Jaegeuk Kim
bdb981d113 Retry to unmount /data
If we fail to umount /data, device won't boot up at all.

Bug: 208161227
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I92d34a253039eb677d4df9fad8a0821fbc684f57
2022-01-10 09:50:23 -08:00
Yi-Yo Chiang
0c99f93351 Remove unused rootdir/avb/*-gsi.avbpubkey modules
They were moved to test/vts-testcase

Bug: 176869478
Test: presubmit
Change-Id: I4f4f1c50e624125c839161d83e28f051099e6ec0
2022-01-10 14:25:42 +00:00
Yi-yo Chiang
0c82533925 Merge "Move *-gsi_avbpubkey filegroup to vts directory" am: 28d7b767a9 am: e23ae1ae39 am: 21737ef489 am: d20afb51bd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1938281

Change-Id: Ibd2f05363bb7c445ca5e4007db364c4c91c55686
2022-01-10 09:28:24 +00:00
Yi-yo Chiang
d20afb51bd Merge "Move *-gsi_avbpubkey filegroup to vts directory" am: 28d7b767a9 am: e23ae1ae39 am: 21737ef489
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1938281

Change-Id: If34f22a53a3290bbfa3aa2a592fb1a669e41432d
2022-01-10 09:14:28 +00:00
Yi-yo Chiang
21737ef489 Merge "Move *-gsi_avbpubkey filegroup to vts directory" am: 28d7b767a9 am: e23ae1ae39
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1938281

Change-Id: Ic2e3d8ebaff996d685d5b1b0873849748b0ffcb9
2022-01-10 08:53:14 +00:00
Yi-Yo Chiang
d543bebbf7 libfs_avb: Export more utilities to facilitate VTS
Change should be no-op, it just export some private methods.

Bug: 211741246
Test: ./run_tests.sh
Test: presubmit
Change-Id: Ia4ac739018f188a0154625ec574fc4bebf7c62ee
2022-01-10 16:36:51 +08:00
Yi-yo Chiang
e23ae1ae39 Merge "Move *-gsi_avbpubkey filegroup to vts directory" am: 28d7b767a9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1938281

Change-Id: I678abd1576c0493a3db73bfae3d22a5311f430ec
2022-01-10 08:33:14 +00:00
Bowgo Tsai
68c97406a2 libfs_avb: updating run_tests.sh
Adding `--host` for host-side test cases with atest, so we
still can run the test when there is no device connected.

Otherwise, TradeFed will emit the follow error:
  TradeFed subprocess exited early with exit code=7(NO_DEVICE_ALLOCATED).

Bug: None
Test: ./system/core/fs_mgr/libfs_avb/run_tests.sh
Change-Id: I0a593e6dc42861c2dc9cfff308cd7fd76b39ef2c
2022-01-10 16:26:58 +08:00
Yi-yo Chiang
28d7b767a9 Merge "Move *-gsi_avbpubkey filegroup to vts directory" 2022-01-10 08:19:43 +00:00
David Anderson
662005edab [automerger skipped] libsnapshot: Fix CHECK failure during second phase merge am: 739f4f5f60 -s ours am: 15905fdebe -s ours
am skip reason: Merged-In I8bf00e3016546ef7039bb0b18eb977cc3dc1066a with SHA-1 dd620ccf24 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/16579007

Change-Id: I3003054018bf4ca472013ae2a787d7f81d2c0c17
2022-01-10 03:55:29 +00:00
David Anderson
40a2e15d31 [automerger skipped] libsnapshot: Propagate merge phase across merge failures. am: 6834fe66d7 -s ours am: d7d520c90d -s ours
am skip reason: Merged-In I31fdae6bde48e3a71b6f3fcc663541257f7ebd8f with SHA-1 c2bb3ee6d6 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/16571141

Change-Id: I965cbcaeca9088fc356ba2f8553e3c0be21098fa
2022-01-10 03:55:28 +00:00
David Anderson
15905fdebe [automerger skipped] libsnapshot: Fix CHECK failure during second phase merge am: 739f4f5f60 -s ours
am skip reason: Merged-In I8bf00e3016546ef7039bb0b18eb977cc3dc1066a with SHA-1 dd620ccf24 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/16579007

Change-Id: I238a46c472fcfcbd4f2baedd7730a1acb598a014
2022-01-10 03:35:53 +00:00
David Anderson
d7d520c90d [automerger skipped] libsnapshot: Propagate merge phase across merge failures. am: 6834fe66d7 -s ours
am skip reason: Merged-In I31fdae6bde48e3a71b6f3fcc663541257f7ebd8f with SHA-1 c2bb3ee6d6 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/16571141

Change-Id: Ib3d35524f9817460b4f56369baa18d831c87ff4a
2022-01-10 03:35:51 +00:00
Devin Moore
e4c9d22537 Merge "fastboot: make copy_boot_avb_footer more generic" am: f56e0dbf33 am: 31009d55ce am: dc167e06f7 am: 33ad9bd473
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1941095

Change-Id: I6787bb833c8b833a6103ba3667b8a1ba725746af
2022-01-07 23:21:25 +00:00
Devin Moore
33ad9bd473 Merge "fastboot: make copy_boot_avb_footer more generic" am: f56e0dbf33 am: 31009d55ce am: dc167e06f7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1941095

Change-Id: Ibbac19d6658c77c6b5d263871ec055193216ec6f
2022-01-07 23:03:03 +00:00
Cole Faust
eea1dadba8 Remove win_sdk
win_sdk is deprecated, if given on the command line
sdk will be build instead.

Bug: 212724080
Test: Presubmits
Change-Id: Ia92b879fe08f0a1d9ebefc90e369adf1d4aa4112
2022-01-07 14:55:54 -08:00
Devin Moore
dc167e06f7 Merge "fastboot: make copy_boot_avb_footer more generic" am: f56e0dbf33 am: 31009d55ce
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1941095

Change-Id: I6d515fc96c545991acbf55a1ffecc4d9bbaeb986
2022-01-07 22:54:09 +00:00
Devin Moore
31009d55ce Merge "fastboot: make copy_boot_avb_footer more generic" am: f56e0dbf33
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1941095

Change-Id: Iabf4f4201f7156ec9c192f9566a767be84432812
2022-01-07 22:33:08 +00:00
Devin Moore
f56e0dbf33 Merge "fastboot: make copy_boot_avb_footer more generic" 2022-01-07 22:13:19 +00:00
Treehugger Robot
565b3403eb Merge "Use insert() with ranges instead of reserve" am: e664e8fb72 am: 47d6a849d1 am: 36fbb59129 am: a61dc8573f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1940642

Change-Id: Id31b12444d7441c490a56774eecd82334fd55790
2022-01-07 21:20:03 +00:00
Treehugger Robot
a61dc8573f Merge "Use insert() with ranges instead of reserve" am: e664e8fb72 am: 47d6a849d1 am: 36fbb59129
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1940642

Change-Id: I22b5e7712fad6d351b394a46d56555a7c9e480e3
2022-01-07 21:03:43 +00:00
Treehugger Robot
36fbb59129 Merge "Use insert() with ranges instead of reserve" am: e664e8fb72 am: 47d6a849d1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1940642

Change-Id: Ie7bf8453786877f0875cf5ebd4edc4185a037b5a
2022-01-07 20:53:24 +00:00
Treehugger Robot
47d6a849d1 Merge "Use insert() with ranges instead of reserve" am: e664e8fb72
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1940642

Change-Id: I348f5f8db4b8fa5175b59bb4e6220604a684bebf
2022-01-07 20:37:16 +00:00
Treehugger Robot
e664e8fb72 Merge "Use insert() with ranges instead of reserve" 2022-01-07 20:25:00 +00:00
Devin Moore
cb5098f547 fastboot: make copy_boot_avb_footer more generic
The funciton is now used for init_boot and boot partitions, so the name
and the error messages should be more generic.

Bug: 203698939
Test: m
Change-Id: I168fdcb08accb11b2c9cfc402168744274f59665
2022-01-07 18:03:33 +00:00
Kelvin Zhang
500ed210e0 Use insert() with ranges instead of reserve
STL implementation of insert() is generally smart enough to reserve
storage before hand. No need to do reserve() followed by for each loop

Test: th
Change-Id: I36e88c121868b97ea525b292a67b36983c530e56
2022-01-07 09:55:38 -08:00
Devin Moore
ef87e9c5ab Merge changes Ib5a63a7b,If00f581a am: 12e5f038a9 am: c913a4781b am: 517364d305 am: fb99fd1756
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1938910

Change-Id: I24a366421a92e70e607add7c0c9cb6ed7389f5d5
2022-01-07 17:26:38 +00:00
Devin Moore
fb99fd1756 Merge changes Ib5a63a7b,If00f581a am: 12e5f038a9 am: c913a4781b am: 517364d305
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1938910

Change-Id: Idb325c8a22b6e32a6ec725eb22507232b2a50af4
2022-01-07 17:12:38 +00:00
Devin Moore
517364d305 Merge changes Ib5a63a7b,If00f581a am: 12e5f038a9 am: c913a4781b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1938910

Change-Id: I2fbaca7f56a21e8991aa99d4c0675266bb3b81f8
2022-01-07 16:56:45 +00:00
Devin Moore
c913a4781b Merge changes Ib5a63a7b,If00f581a am: 12e5f038a9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1938910

Change-Id: I3bb41a66de6fc6a1496fb0750b2721970ffe378d
2022-01-07 16:36:04 +00:00
Devin Moore
12e5f038a9 Merge changes Ib5a63a7b,If00f581a
* changes:
  fastboot: copy AVB footer from init_boot.img to end of partition
  fastboot: Support flashing init_boot.img into init_boot partition
2022-01-07 16:24:13 +00:00