Commit graph

18 commits

Author SHA1 Message Date
David Anderson
8ee048d750 Update recovery to use Health AIDL HAL V3.
Bug: 309792384
Test: m
Change-Id: I253dbee446c88e6a18718cedec090c3be1b56cfd
2023-11-17 20:39:19 -08:00
Jack Wu
6b39dee45d Update health AIDL HAL to V2
Bug: 251425963
Test: Build
Change-Id: I471f8fb9c7eb1044ea0b920d55728613188bfbdf
Signed-off-by: Jack Wu <wjack@google.com>
2022-12-24 13:13:18 +00:00
Shikha Malhotra
d21e516def Enable ProjectID by default.
This is in conjunction with enabling the project id for internal directories. The check whether project ids should be used or not, is done in installd process. If they cannot be used, then the installd process falls back to previous approaches.

Bug: b/215154615
Test: atest installd/StorageHostTest
Test: atest installd/installd_service_test.cpp
Change-Id: I9a45a14cf10c040f7ce84f78c5e9c8ce60c17958
2022-03-17 11:22:48 +00:00
Yifan Hong
d33b067f04 Merge "GetBatteryInfo() also reads AIDL health HAL." 2021-12-07 18:18:07 +00:00
Yifan Hong
67a8fd2175 GetBatteryInfo() also reads AIDL health HAL.
Test: call GetBatteryInfo manually with and without AIDL health HAL
Bug: 170338625
Bug: 177269435
Change-Id: I123739e5bc372d5198fd711f592ceac04d46ab28
2021-12-06 16:53:58 -08:00
Jaegeuk Kim
fa95165300 Use metadata_key_dir instead of metadata_encryption
Eric pointed that metadata_key_dir is what specifies that metadata encryption
is enabled, whereas metadata_encryption is the metadata encryption options,
which don't have to be specified if the default options are sufficient.

Bug: 208161227
Fixes: 80a1d8e341 ("Avoid to format raw disk if metadata encryption is enabled")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I390450ba49c528b1f465c247d32174d36c7937a2
2021-12-02 20:57:39 +00:00
Jaegeuk Kim
80a1d8e341 Avoid to format raw disk if metadata encryption is enabled
The current flow is

1. factory reset formatted raw disk.
2. next boot tries to convert it to metadata encryption
 2.a mount sda27
 2.b umount sda27
 2.c encrypt_inplace()
 2.d fsck on dm-x
 2.e mount dm-x

The #2 flow is unnecessary, if we know the disk will be encrypted. And, that
gives a change of the failure when unmounting the raw disk by starting some
file operations on /data. That can cause the entire encryption failure.

Bug: 208161227
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Iaedfeb74bb6abb667efee6dcadf8d66272466ee0
2021-12-02 10:54:25 -08:00
Eric Biggers
a762e14f03 recovery_utils: remove FDE support
Support for FDE is being removed from Android, having been replaced by
FBE.  This CL removes the FDE-specific code from recovery_utils:

- Remove the code that wiped FstabEntry::key_loc if it is a block
  device, since key_loc was only used by FDE.

- Remove support for reserving a crypto footer when formatting volumes,
  since crypto footers were only used by FDE.

Bug: 191796797
Change-Id: I90b1e4cacd2f3e5cce77a82a0af744fcc7da9400
2021-11-09 17:20:32 -08:00
Bob Badour
29be3f6ef1 [LSC] Add LOCAL_LICENSE_KINDS to bootable/recovery
Added SPDX-license-identifier-Apache-2.0 to:
  applypatch/Android.bp
  bootloader_message/Android.bp
  edify/Android.bp
  fuse_sideload/Android.bp
  install/Android.bp
  minadbd/Android.bp
  minui/Android.bp
  otautil/Android.bp
  recovery_ui/Android.bp
  recovery_utils/Android.bp
  tests/Android.bp
  tools/image_generator/Android.bp
  tools/recovery_l10n/Android.bp
  uncrypt/Android.bp
  update_verifier/Android.bp
  updater/Android.bp
  updater/Android.mk
  updater_sample/Android.bp
  updater_sample/tests/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-OFL
to:
  Android.bp
  Android.mk

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I3da761b525452838977297f773974000d4de7bd6
2021-02-14 10:37:20 -08:00
Martijn Coenen
5a4a7fffb7 Rename external storage properties.
According to property naming guidelines.

Bug: 152170470
Bug: 153525566
Test: N/A
Change-Id: I64c6d8ca49fbd72f923a8794df0929bd500dd8e9
2020-04-15 17:29:43 +02:00
Jaegeuk Kim
3210600737 Support F2FS compression
Bug: 134580167
Change-Id: I13e481b14c1ba2f05c31ed0391a8ef29845933c9
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-04-03 14:03:54 -07:00
Jaegeuk Kim
a8d36e1ea9 recovery: add a way to enable metadata_csum for ext4
Requires to add "metadata_csum" in fsmgr_flag of fstab.

Bug: 149039306
Change-Id: I2b95dcaaf2ba224135ad51f117b7b01bbf342b7e
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-02-12 12:16:05 -08:00
Daniel Rosenberg
f25b977740 Set Casefold and PrjQuotas in Factory Reset
This sets up devices to have casefolding and project quotas if they have
enabled the relevant product properties. For ext4, we must set wide
inodes at makefs time, but other things are enabled by fs_mgr with
tune2fs at boot time.

Bug: 138321217
Bug: 138322712
Test: Enable on a device.
      Reformat from recovery. Check that /data has the expected values
      using tune2fs/f2fs.fsck
Change-Id: If706a3cad591f311eb904df4deca531d0b3fe0c4
2020-01-24 15:49:00 -08:00
Nick Desaulniers
1cb510d96f [bootable][recovery] fix -Wreorder-init-list
C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: I6f8d658448f7e5dd980bf95b890b15cb0aab7407
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-10 16:33:58 -07:00
Tao Bao
b548bea778 minadbd: Return battery level via getprop.
`adb rescue getprop rescue.battery_level` returns the current battery
level.

Bug: 134560109
Test: Build and boot into rescue mode.
Test: `adb rescue getprop ro.build.fingerprint`
Test: `adb rescue getprop rescue.battery_level`
Test: `adb rescue getprop` to dump all the properties.
Test: Run recovery_unit_test.
Change-Id: I78a9e8ab9783ffc8532cb93e6a64fb2157c19bd5
2019-10-04 15:33:27 -07:00
Tao Bao
640175e9d1 recovery_utils: Use libvoid_headers.
Test: mmm bootable/recovery
Change-Id: I2ad7620d0f967cb018a415358379c34804e232c5
2019-10-03 08:48:49 -07:00
Tao Bao
832c9cd24f Refactor battery info querying functions into librecovery_utils.
Bug: 134560109
Test: Run recovery_unit_test.
Change-Id: Ibbcdcfd507fa23657ee7ff677208b0003ec382ba
2019-10-02 22:04:25 -07:00
Tao Bao
e3f09a72f5 otautil: Factor out the utils that're private to recovery.
A number of utility functions are intended for serving recovery's own
use. Exposing them via libotautil (which is a static lib) would pass the
dependencies onto libotautil's users (e.g. recovery image, updater, host
simulator, device-specific recovery UI/updater extensions etc). This CL
finds a new home for the utils that are private to recovery.

Test: mmma bootable/recovery
Change-Id: I575e97ad099b85fe1c1c8c7c9458a5a43d4e11e1
2019-10-02 10:56:46 -07:00