Commit graph

78448 commits

Author SHA1 Message Date
Liu Cunyuan
46ed34b68f Add riscv64 support for libcutils
Signed-off-by: Liu Cunyuan <liucunyuan.lcy@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I3dbe6b6d79c2655ab76f48e48fd22ab72d761dfd
2022-10-12 22:16:41 +08:00
Yi-yo Chiang
cf10e2097d Merge "Replacing fs_mgr_dir_is_writable(work) with fs_mgr_rw_access(work) to check whether the scratch partition is writable." 2022-10-12 10:06:48 +00:00
yi.sun
301adfcc07 Replacing fs_mgr_dir_is_writable(work) with fs_mgr_rw_access(work) to
check whether the scratch partition is writable.

Delate fs_mgr_dir_is_writable, as it may cause remount to fail.

Steps to reproduce:
1.adb root
2.adb remount
3.adb reboot
4.adb remount
5.push files to the system partition until the scratch partition is full
6.check that the Available of /mnt/scratch is zero through the df command
7.reboot
8.adb root
9.adb remount
Now, overlayfs failed to mount.

But I want to continue to view the files that were previously pushed to
the system partition.
Mounting of overlayfs should not be blocked when there is not enough space.
It seems reasonable to use fs_mgr_rw_access(work) to check whether
the partition is writable.
We should allow mount even if scratch is full, because this allows
the user to delete previously pushed files to free up space.

Bug: 240635368
Change-Id: I726ccd064cfabfab29789e7c690ea8cb574a6344
Signed-off-by: yi.sun <yi.sun@unisoc.com>
2022-10-12 03:06:22 +00:00
Thurston Dang
aa9eb7c87a Merge "storageproxyd: Add STORAGE_FILE_GET_MAX_SIZE API on Android side" 2022-10-12 00:27:03 +00:00
Akilesh Kailash
889b446810 Merge "init: Detach daemon only after sepolicy is loaded" 2022-10-11 21:04:42 +00:00
Yi-yo Chiang
9b123de886 Merge "Remove deprecated BOARD_BUILD_SYSTEM_ROOT_IMAGE" 2022-10-11 10:31:19 +00:00
Treehugger Robot
f9ad588898 Merge "fs_mgr_overlayfs: Revert to use /data only if VAB" 2022-10-11 09:44:31 +00:00
Treehugger Robot
8b70bc46fb Merge "wear: add libicu to list of public libraries" 2022-10-11 07:05:11 +00:00
Yi-yo Chiang
c540ab9bf8 fs_mgr_overlayfs: Revert to use /data only if VAB
Partial revert of aosp/2240456 to fix b/251472189

Bug: 251472189
Test: Treehugger
Test: adb-remount-test
Test: g3-app-compat-main
Change-Id: Ifbd608a249fdc599954c34a134ef8497fdf24b46
2022-10-11 05:27:44 +00:00
Akilesh Kailash
035e557fd3 init: Detach daemon only after sepolicy is loaded
The new sequence of operation would be:

1: Load sepolicy - Daemon will continue to be alive and serve any I/O request

2: After sepolicy loading is complete - Switch the device-mapper tables.

3: Kill the block device daemon launched in the first-stage init.

4: Re-launch the daemon with the correct selinux labels set.

5: Enforce the sepolicy

Bug: 240321741
Test: Full OTA on pixel
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Idd392f0f0aae7d93e546c0ec0762e6c07b6263e4
2022-10-10 21:58:52 +00:00
Steven Moreland
b9d8e8289e Merge changes I732e5b8a,I4271909e
* changes:
  libutils: RefBase DEBUG_REF love
  libutils: DEBUG_* modes compile forever
2022-10-10 20:40:35 +00:00
Steven Moreland
b7412c8cd6 libutils: RefBase DEBUG_REF love
Done here:
- path saved to a useable location on host
- path always printed (for visibility for new users)
- open(.., 666) - That's '01204' not '0644' oops

Future considerations:
- make defines constexpr instead of ifdef
- copy malloc hook design to avoid needing to recompile code
- make libutilscallstack default on host
- run libutils tests, not just test compile debug mode
- code incorrectly prints ref 'doesn't exist'
  seems it's gotten out of sync, but still good enough
  to use stacktraces

Bug: 244325464
Test: manual
Change-Id: I732e5b8aec3cd946ef3559a2a814caf693846cc0
2022-10-10 16:58:57 +00:00
Ludvig Hansson
f2435108ce wear: add libicu to list of public libraries
Bug: 250668939
Test: atest CtsIcu4cTestCases:Icu4cGTests

Change-Id: I3348171dbbe5c22f601427de763109e02bd7e913
2022-10-10 14:56:20 +00:00
Sayanna Chandula
1d0fec78c4 Merge "init: Support reboot reason with thermal warmreset" 2022-10-08 15:47:35 +00:00
Steven Moreland
377adea81c libutils: DEBUG_* modes compile forever
I've seen these fixed before, so we compile the debug modes
now.

Bug: 244325464
Test: 'm libutils_test_compile'
Change-Id: I4271909e81893ad448bc46b8a3a567a84c40f8a3
2022-10-08 05:13:47 +00:00
Sayanna Chandula
5754b5ab10 init: Support reboot reason with thermal warmreset
Thermal shutdown could be due to tskin temperature or
battery temperature. Pass reason while rebooting the
system to reflect properly in boot.reason

Bug: 238464124
Test: Build and boot on device. Check reboot reason
for thermal shutdown and battery thermal shutdown with
thermal warmreset enabled.

Change-Id: I192562fed48ae7da7843e383362cd22a76ce479f
2022-10-07 14:11:25 -07:00
Yi-Yo Chiang
ddc9763ee2 Remove deprecated BOARD_BUILD_SYSTEM_ROOT_IMAGE
This variable is always false or empty now, so clean up remaining
references of the variable.

Bug: 241346584
Test: Presubmit
Change-Id: Id5c37a1391239206477fd802d364a2678692f513
2022-10-07 21:17:40 +08:00
Treehugger Robot
460f70bb52 Merge "Adding target (sdk-repo-platform-tools) that is used by gmac(sdk_mac) build." 2022-10-07 04:13:51 +00:00
Yi-yo Chiang
ae57e8da32 Merge "remount: Remove AVB 1.0 code & opaque exit code" 2022-10-07 03:47:03 +00:00
Shaju Mathew
6c27f235cf Adding target (sdk-repo-platform-tools) that is used by gmac(sdk_mac) build.
Bug: 249370316
Test: N/A (coastguard)

Signed-off-by: Shaju Mathew <shaju@google.com>
Change-Id: I641d4f8dc60652c7e8eaebafd905090d3c0324f2
2022-10-06 22:37:09 +00:00
Bob Badour
e2b1d3c846 Merge "Add LOCAL_LICENSE_KINDS to system/core" 2022-10-06 22:28:09 +00:00
Bob Badour
03d5052754 Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  init/fuzzer/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I2db55c80799d0a8fc5935d9b07a2ddb17eb7235e
2022-10-06 19:59:07 +00:00
Treehugger Robot
71d9f3607b Merge changes I264d0891,I1af733e7,Iae344c1e
* changes:
  Added init_ueventHandler_fuzzer
  Added init_property_fuzzer
  Added init_parser_fuzzer
2022-10-06 13:59:37 +00:00
Yi-Yo Chiang
ce2dbd009f remount: Remove AVB 1.0 code & opaque exit code
* Remove AVB 1.0 (fec).
* Assert device is bootloader unlocked in main().
* Since error is already logged to stderr and logd, there is no need to
  return an opaque enum value as error code. Just return 1 if main()
  encounters any error.

Bug: 241688845
Test: Presubmit
Test: adb-remount-test
Change-Id: I06df6f92a3d4adaca77061920736056c9051c112
2022-10-06 18:54:19 +08:00
Yi-yo Chiang
5653687caf Merge changes I8b5e08a3,Iccfe06f9
* changes:
  fs_mgr_overlayfs: Remove support for physical scratch
  fs_mgr_overlayfs: Refactor scratch mounting code
2022-10-06 06:19:12 +00:00
Wayne Ma
78e23f23ce Merge "Make libstatspull_bindgen available to resolv apex." 2022-10-06 01:28:18 +00:00
Thurston Dang
8ae1c1db42 storageproxyd: Add STORAGE_FILE_GET_MAX_SIZE API on Android side
This is the Android-side companion change to go/oag/2241573,
adding the interface for STORAGE_FILE_GET_MAX_SIZE (implementation
sold separately).

Bug: 247003431
Test: None
Change-Id: Ie834c91a085b2e4a668e0d9d22ec0f6b1e4e6c1c
2022-10-06 00:12:00 +00:00
Yi-yo Chiang
27cf51e71c Merge "fs_mgr_overlayfs: Cleanup -user build stubs" 2022-10-05 09:19:45 +00:00
Yi-Yo Chiang
9032c00869 fs_mgr_overlayfs: Remove support for physical scratch
Deprecate physical scratch path, support only dynamic partition scratch
and scratch on /cache.

Bug: 243116800
Test: adb-remount-test
Change-Id: I8b5e08a38e323139b56b169865dcaf1a6620cf20
2022-10-05 01:13:32 +08:00
Yi-Yo Chiang
ea2f32a438 fs_mgr_overlayfs: Refactor scratch mounting code
Make the control flow less chaotic and rename to cpp style function
name.

Bug: 243116800
Test: adb-remount-test
Change-Id: Iccfe06f9cb9659b7b0bad085250422e298cc4f27
2022-10-05 01:11:18 +08:00
Wayne Ma
8044045a1e Make libstatspull_bindgen available to resolv apex.
Test: m successed
Change-Id: Ia367ab5a87794c82238291b27a783278f319e767
2022-10-05 00:54:47 +08:00
David Anderson
aaa16bbad4 Merge "init: Statically link libbootloader_message." 2022-10-04 16:32:50 +00:00
Yi-yo Chiang
7214c98d2e Merge "remount: Remove errno test & improve messaging of fs_mgr_overlayfs_mount_all" 2022-10-04 06:27:27 +00:00
David Anderson
12e53bc350 init: Statically link libbootloader_message.
This is to resolve idiosyncracies with test packaging.

Bug: 244284630
Test: ldd -d -r CtsInitTestCases
Change-Id: Iec2c14c3ca5cd359b79d9e1f12e689c0eeffb122
2022-10-03 21:37:56 -07:00
Florian Mayer
0b2cf1d6ec Merge "[MTE] add device config for permissive mode" 2022-10-03 21:04:24 +00:00
Treehugger Robot
d07f11168b Merge "[MTE] Reset MTE state for userdata wipe in fastbootd" 2022-10-03 19:39:33 +00:00
Treehugger Robot
6e74f8c4a6 Merge "bootstat: remove unused FDE boot events" 2022-10-03 18:46:56 +00:00
Florian Mayer
4c3c526e54 [MTE] Reset MTE state for userdata wipe in fastbootd
Test: $ adb shell su root [...]/mtectrl memtag,memtag-kernel default
      $ adb shell 'su root dd bs=1 skip=32832 if=/dev/block/bootdevice/by-name/misc count=15 | xxd'
      00000000: 015a fefe 5a05 [...]
      $ adb reboot fastboot
      $ fastboot -w
      $ fastboot reboot
      $ adb shell 'su root dd bs=1 skip=32832 if=/dev/block/bootdevice/by-name/misc count=15 | xxd'
      00000000: 0000 0000 0000 [...]

Bug: 245596152
Change-Id: I5e2d4584776ab1685bdf37124e32dcb827eaf05a
2022-10-03 11:01:36 -07:00
Florian Mayer
84a30c8526 Merge "[MTE] Add device config to control upgrade time" 2022-10-03 17:47:12 +00:00
Florian Mayer
7a6079000c [MTE] add device config for permissive mode
Change-Id: Ifb16c0f29f07870f59ab50522d010689ee232de8
2022-10-03 09:58:39 -07:00
Treehugger Robot
f2065c8890 Merge "simg_dump.py: fix error for CHUNK_TYPE_FILL" 2022-10-03 15:51:33 +00:00
Bowgo Tsai
dbf62d939a simg_dump.py: fix error for CHUNK_TYPE_FILL
In python3, division of two integers produces a float,
which cannot be used to multiply a bytes sequence.

Using // to produce an integer quotient.

Bug: 245257511
Test: ./system/core/libsparse/simg_dump.py -sv path/to/image
Change-Id: Ibe95056409ac3676a68f5e7693331ca4a66e9fb7
2022-10-03 16:27:49 +08:00
Peter Collingbourne
9f7a19d0f3 Merge "Resync zygote64 and zygote64_32 rc files." 2022-09-30 18:56:35 +00:00
Krzysztof Kosiński
27bccbfdef Merge "storaged: Fix deprecated usages of protobuf API." 2022-09-30 00:31:19 +00:00
Peter Collingbourne
d77b91b4ba Resync zygote64 and zygote64_32 rc files.
I noticed that the zygote64 and zygote64_32 files
had gotten slightly out of sync as a result of change
I3aad4b4b1d2f54db9e7ba86db8a655d8552bad0a. Merge the zygote64_32 changes
into zygote64, and to prevent this from happening again, replace the
64-bit zygote declaration in zygote64_32 with an import from zygote64.

Change-Id: I7fcceeb22b722c2164b9acf0b517a32ce34731fd
2022-09-29 17:21:54 -07:00
Jiyong Park
b2d8315f10 Merge "Annotate symbols correctly" 2022-09-28 01:22:45 +00:00
Akilesh Kailash
33081c0f90 Merge "snapuserd: Set taskprofile OtaProfiles" 2022-09-27 19:36:59 +00:00
Akilesh Kailash
2e780402e2 snapuserd: Set taskprofile OtaProfiles
Since update-engine already has this profile set,
it is better to have similar profile for the daemon
so that threads don't run at high priority.

Additionally, lower the nice value for worker
threads.

No change in the OTA install time observed.

Bug: 237490659
Test: Full OTA on Pixel
Change-Id: I53ec8c647eb781965792683b04621e6fec5eb5f2
Signed-off-by: Akilesh Kailash <akailash@google.com>
2022-09-27 19:36:49 +00:00
Pete Bentley
751cdc9489 Merge "Add AID for PRNG seeder daemon." 2022-09-26 21:27:42 +00:00
Eric Biggers
d76e4e01c9 bootstat: remove unused FDE boot events
Android 13 dropped support for Full Disk Encryption (FDE) entirely, as
it has been replaced by File Based Encryption (FBE).  Therefore, the
FDE-specific boot events are never emitted.  Remove them from the code:

   * boot_decryption_complete
   * boot_complete_post_decrypt
   * factory_reset_boot_complete_post_decrypt
   * ota_boot_complete_post_decrypt
   * post_decrypt_time_elapsed

Bug: 208476087
Change-Id: Id7a3bbd4f273693bd37b0cd27542dc6080d1c4f4
2022-09-26 19:50:09 +00:00