| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Android Emulator isn't the only virtual device the virtio-block
detection code is useful for, and those platforms might not set any
discriminating properties to indicate that they are virtual.
Rework the virtio-block major detection to use /proc/devices instead
of hardcoding the assumption that any virtual platform can have
virtio-block at any experimental major; the new code permits only the
exact experimental major assigned to virtio-block.
The new code runs everywhere, but it will only run once and could be
expanded later to detect dynamic or experimental majors.
Bug: 156286088
Change-Id: Ieae805d08fddd0124a397636f04d99194a9ef7e5
Merged-In: Ieae805d08fddd0124a397636f04d99194a9ef7e5
(cherry picked from commit d3c230b5c9ba6e242c0a6b290a185517f2c118e8)
|
| |\
| |
| |
| |
| |
| | |
Android 10.0.0 Release 37 (QQ3A.200605.001)
Change-Id: I63dbaedefa79ed9f744a1fd82215c326326a9a91
|
| | |\
| | |
| | |
| | |
| | |
| | | |
qt-qpr3-release
Change-Id: Iedec906e4510248a5946cb3a8f2ca79e68c5e042
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
asynchronously.
Bug: 134711825
Bug: 149462396
Test: StorageManagerTest
Change-Id: Id8616804bba622226ca21b8eff0d3eb577b4b7e0
Merged-In: Id8616804bba622226ca21b8eff0d3eb577b4b7e0
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* If we shutdown all volumes (during crypto), vold throws up an
assert at us when reset() is called due to destroying an
already destroyed volume. This is actually fine, just return
an error instead of crashing.
Change-Id: I51f8561da83e27de8e80d74f3a600fb0139d3035
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ext4/f2fs partitions are usually created using the Linux partition
type on GUID partition tables, which is not recognized by vold.
Add the Linux partition type GUID to vold so ext4/f2fs partitions
on external SD cards with GPT are detected correctly.
Change-Id: I5e3947bb6b086eec4e5aa8a4825aaa93b7e9d99d
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When converting a public (MBR) partition to private (GPT) partition,
'sgdisk --zap-all <path>' triggers a disk change netlink event
when converting from MBR to GPT. Then, 'sgdisk --new=....' triggers
another disk change netlink event.
vold informs clients a new volume is created after the first disk
change event occurs. system server reacts by requesting to mount
the volume. If this request is honored before the second disk change
event, the volume will be unmounted immediately after system server's
request to mount is honored. The next time system server performs
an operation (createnewuser) on this volume, it will fail due to
the volume being unmounted.
This is reproduced by running the following commands in a loop:
adb shell sm partition <disk> private
adb shell sm partition <disk> public
adb shell sm forget all
OR
run cts -c com.android.cts.appsecurity.AdoptableHostTest -m testPackageInstaller
This change causes vold to delay notifying clients that the volume is
ready until after it's actually partitioned.
CYNGNOS-2283
Change-Id: I457cc1508573d73ef2be2f0cfdc5c2237bfabad7
|
| | |
| |
| |
| |
| |
| | |
If the root is not writable, we cannot create new files or folders there.
Change-Id: I3edad81f105bbeabc9dcd1f5322acea6fbfc63bb
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Change-Id: I6f8ca75385c2d4080b1430c0b6545b61e6632e2c
Fix mounting ext4 adopted storage
Change-Id: I36cb858b96968a949632017874addb278679b3a4
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit is a forward port of following commits:
Author: Michael Stucki <mundaun@gmx.ch>
Change-Id: Ia34ad91444951e62f6d17374f480dcbdfa34cca3
Author: Tom Marshall <tdm@cyngn.com>
Change-Id: I05d9b57cc28ffd1f8deb8148d81c7f6fad0aa8db
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Change-Id: I1364f37018b25d79b1826c85849def64e868d72f
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Change-Id: I873af4dc2309d3d0942ce466b8acf8158abb85ae
Author: Jorge Ruesga <jorge@ruesga.com>
Change-Id: Ic0bb314b30e42489c45caec29d35d6896c9849eb
Signed-off-by: Michael Bestas <mikeioannina@cyanogenmod.org>
Change-Id: I9699643987c53d8e2538720f33da28de35230dfe
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Save mount options and fstype for DiskPartition objects
* Pass mount options and fstype to PublicVolume ctor
* Pass mount options to ext4::Mount/f2fs:Mount
* Use specified/default fstype if blkid fails
This is trivially extensible for other fs types.
[mikeioannina] Adapt for Pie and Q
Change-Id: Ie5dd27f26a4a7129dd9efe6a7ad0a589928282a0
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Support nonremovable disks and expose a nonremovable flag in the
DiskCreated message.
* New DiskPartition class to hold single partitions. DiskPartition is
used when the fs_mgr entry has a partnum (eg. when fs_mgr_flags
contains voldmanaged=label:#). Override disk partitioning methods
to prevent destroying the emmc.
Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33
vold: Correct base header paths
These headers were moved to android-base
Change-Id: I3eaa8316006b9017c5f5e31cd1e91efc2862106d
DiskPartition.cpp: Add sysmacros.h dependency for major/minor
Change-Id: I22c267c8f12b40fb3e2295becd88f12b75907b69
Signed-off-by: Adrian DC <radian.dc@gmail.com>
[mikeioannina] Adapt for Pie and Q
Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* Fsck was hitting a neverallow on public volumes not formatted in vfat
because it was always using the trusted context
* Always run trusted fsck for private volumes and untrusted for public
Change-Id: I0a6ee9aea907bae9ed097b920df0559df7b45d7d
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add exfat and ntfs support based off f2fs and ported to use
fuse
* Add support for both along with f2fs and ext4 to PublicVolume
* Also attempt to mount any volume if it's been determined that
the kernel supports it
Change-Id: I0a83761cefd97791e3ec84a18e199dfd27a5ed0b
vold: fs: Fix build errors
* Migrate from base to android-base
* Add missing , in Ext4 Mount function
[AdrianDC] Ignore unpatched ext4 arguments
[mikeioannina] Update for Pie native exfat
Change-Id: I875b5763c472aa7da2976ec7c5db7cf28c913876
vold: ntfs: Use strlcat
Clang now enforces length checking :/
Change-Id: I495b4cb2ee530e72b1084248f0549d63589523b0
Change-Id: I0a83761cefd97791e3ec84a18e199dfd27a5ed0b
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the partition is f2fs and the OS is 32bit, the data.f_bavail and
data.f_frsize are 32 bits in size. The product of them is also 32 bits
in size. If the available size of storage is greater than 4G, the
product may be greater than the unsigned long max value. If the product
is overflow and less than 100M. The UDC feature will be disabled.
There is also an overflow for std::strtoul when the variable content
is a very big number(more the unsigned long max value).
To avoid the overflow:
1. convert the variable data.f_bavvail to uint64_t and then compute the
multiplication.
2. use std::strtoull replace to std::strtoul.
Bug: 147118861
Change-Id: I60172ae4cb7c997e2ad4a36583be74736c25e565
(cherry picked from 5d0aaaf8e0b111e751bc5de8b70f0996927ddcac)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
time_started in encryptGroupsData is set from and compared to
clock_gettime(CLOCK_MONOTONIC, ...) nearly everywhere: "Clock that
cannot be set and represents monotonic time since some unspecified
starting point". However in cryptfs_enable_inplace_f2fs() it is set
from a different clock, time(NULL), with the result that the setprop
calls that indicate progress are wrong and can be called much too
often. The fix is to make this function consistent with
cryptfs_enable_inplace_ext4.
Bug: 146877356
Change-Id: I2707180e5c5bf723a5a880f6a3aac47f2bb34ccd
(cherry picked from commit 1740effeaa29f7dd84d9068a98b42590ea7e99ce)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix to open the correct block dev path during
doCreate().
CRs-Fixed: 2516452
Change-Id: Ice29f9a5a8b2d3c7c4554448a69c6f091ae4ac22
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Identify UFS Card while mounting during adoptable
storage, and use ICE for encryption/decryption if
it is the case as compared to software encryption
being used for SD card.
CRs-Fixed: 2491182
Change-Id: Iea7e34b06e3ceab8e292ac14d5115566382609ab
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Wrapped key feature is needed for better security of encryption keys and to
ensure data integrity when crypto key cache is cleared during reset operation
of storage/crypto hardware.
CRs-Fixed: 2367150
Change-Id: I83d14861bf81e102151fa3417d84008c214a9ac0
|
| | |
| |
| |
| |
| |
| |
| |
| | |
FsCrypt: wrapped_key use C++ flags
Use get_crypto_info instead of fs_mgr_*
Test: builds and boots
Change-Id: I9c6803fb228f4f62e67b05f24b849048216e2a63
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add support to upgrade key when export fails
with KEY_REQUIRES_UPGRADE.
CRs-Fixed: 2365225
Change-Id: I6b886929bd549920e42624261a63510a4b6a1ceb
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add support for clearing key in trustzone and ICE
when a user is deleted.
CRs-Fixed: 2334473
Change-Id: I5fd75aaa3b35145b744bed384dc3c842185ff267
|
| | |
| |
| |
| | |
Change-Id: I56c32d0ed88540200ee4bcf62d295ba8acbdd57c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Use a separate fstab flag for wrappedkey
support rather than file_contents_mode.
CRs-Fixed: 2316112
Change-Id: I4972514cdfc8e17abf1fca777cae39fb7a2e19a8
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Changes to key management in vold such that no keys
are present in the clear in HLOS. Using keymaster to
generate and manage keys.
CRs-Fixed: 2288316
Change-Id: Iaf5bf2eb60c60364f495e6d176e19b4848850028
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* Before moving to binder, 'changepw' was
supported, and people used it to set
different FDE decryption pwd from the
lockscreen one. This change adds it back.
Change-Id: Id83ebb8eafe15263d8a694da9a3353866f912e3f
|
| | |
| |
| |
| | |
Change-Id: I71d71d6143d6e611f441bedec6b093f8cdedee92
|
| | |
| |
| |
| |
| |
| | |
* Match the new Lineage naming convention, while at it.
Change-Id: If6a7a0c159ccf4ffed4c5946bf8be6ad04b6665a
|
| | |
| |
| |
| |
| |
| |
| | |
skipped: 4b5c1b2db2
CRs-Fixed: 2457311
Change-Id: I5e5116480818586cc791fb23e19a0571c0d63d95
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Device mapper needs proper format of argument passed to load
the crypto table to serve block IO request.
CRs-Fixed: 2406004
Change-Id: I7889fb5019c34be453a2749b8c00179acfba6e6b
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Crypto block device is needed for device mapper based data
encryption for any partition. Close the device file pointer
when data packet is encrypted.
CRs-Fixed: 2417032
Change-Id: I0fa7c4829665b8a505a5abf598bb54b7835f71e0
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Use get_crypto_info instead of fs_mgr_*
Test: builds and boots
Original Change-Id: I9c6803fb228f4f62e67b05f24b849048216e2a63
Change-Id: I7242e33f39b7f0558c44a0328d10569cf1a64253
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Metadata encryption essentially encrypts userdata filesystem metadata
using Inline crypto engine based block disk encryption concept. New
Inline crypto engine based block disk encryption design do not create
crypto block device. When metadata encryption was enabled it needed
crypto block device to encrypt the metadata. So if metadata partition
is mounted on device block disk encryption did not work. Fix this by
checking whether crypto block device was created or not to switch
between two data encryption calls.
CRs-Fixed: 2389467
Change-Id: Ic46244ab08f31e71865636f1a2470f914ca88547
|
| | |
| |
| |
| | |
Change-Id: Id0338eaa1f1747bfcf08a0dc94b378d8d6c465a0
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix random failures while running CtsAppSecurityHostTestCases with
adoptable storage due to a format failure. The crypto_blkdev node
might not be immediately available after create sometimes. Adding
a wait in create to make sure the node is available.
CRs-Fixed: 2324063
Change-Id: I8a7599a9253ac530b05a97ed34829dad1f7f7a40
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Crypto block device is not required for ICE based
HW FDE solution. This introduces additional delay
and is redundant since data is encrypted inline.
CRs-Fixed: 2210986
Change-Id: I67c044c35e92d2aa9413bc3448b6193f6b6a01d7
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add HW FDE changes to new tip along with soong rules for
conditional compilation.
Following changes for HW FDE as well ported:
- Restart Android framework after HW FDE key has been created
- Add support of Inline Cryto Engine
- Use new HW FDE apis to update password
- vold: Tie HW FDE keys with Root of Trust(ROT)
- vold: Fix HW FDE OTA support on SW FDE encrypted device
- vold: Fix return value from get_keymaster_hw_fde_passwd()
- vold: Remove creation of new keymaster key for password update
- vold: Fix password update issue with HW FDE
- vold: hw_fde: fix OTA issues from L to M
- vold: Branch out SW and HW FDE paths to improve boot up time
- cryptfs: Use lower case alphabets for hex key during OTA upgrades
- vold: Improve device boot up time (Tune sleep calls)
- Retry mount if mount fails after setting HW FDE key
- cryptfs: Fix compilation error
- cryptfs: Fix mount failure when encryption triggered from settings
- cryptfs: fix issue that caused problems with forced HW encryption
- cryptfs: fix wrong password set by user during bootup.
CRs-Fixed: 2210986
Change-Id: I77279fc7e309ac94535123a2b2dbcb228bb47251
|
| |\|
| |
| |
| |
| |
| | |
qt-qpr1-release
Change-Id: Ibb3cf7ec9163d5870c6b51d8d14bdf4985b63feb
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Current behavior:
Assume not checkpointing
cp_startCheckpoint creates the file in metadata
cp_needsCheckpoint will now set isCheckpointing to true
cp_commitCheckpoint will now think there is a checkpoint, and try to
commit it. This will fail on ext4 and it will return false, leading to
bad things.
cp_startCheckpoint is called when staging an apex module for update.
After this point, several things could go wrong:
If a keystore key is deleted, it calls cp_needsCheckpoint to see if the
delete should be deferred until cp_commitCheckpoint. The delete will now
be deferred, meaning that this key will never be deleted, using up the
key sots in trustzone
If a trim is scheduled through idle maintenance, this also calls
cp_needsCheckpoint, so the trims will not occur.
If either of these happens before a system crash, the device will not
recover since the system calls commitCheckpoint which will now crash.
When the system then goes on to reboot, the checkpoint will not be
triggered, since the commitCheckpoint call will have deleted the
checkpoint flag file before crashing.
Bug: 138952436
Test: vdc checkpoint startCheckpoint 5
vdc checkpoint needsCheckpoint
vdc checkpoint commitChanges
stop;start
commitChanges fails, then device loops
After applying this test, commitChanges succeeds and device does
not loop
Change-Id: I135099625f77344d1f8d2e8688735871c44ef2f5
Merged-In: I135099625f77344d1f8d2e8688735871c44ef2f5
|
| |\|
| |
| |
| |
| |
| | |
qt-qpr1-release
Change-Id: I0f78ab10be71bca6f4230d4ac0e43a91b71d0c28
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 140882488
Test: Booted twice, checked logs to ensure encryption
is different each time, adb created files in directory.
Cherry-Picked-From: c8a3ef3f3c501c7bc14a2078dde513765cdb56d7
Merged-In: I74077bf8f727dab726c25f512ed7406a74cbe0bf
Change-Id: I74077bf8f727dab726c25f512ed7406a74cbe0bf
|
| |\|
| |
| |
| |
| |
| | |
qt-qpr1-release
Change-Id: I75ee6568ee6a69aaf4501dd7f0deee1f9160ac4f
|
| | |\
| | |
| | |
| | |
| | |
| | | |
am: 6c5e453f9e
Change-Id: I5710fcce302d040a29ff798df85bf71ef6e3fbb5
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't make stale zero'ing IO in block device after unlink, since filesystem
can reuse the block addresses and issue some IOs. If block layer reordered
two IOs, filesystem will see zero data, which crashes filesystem consistency.
Bug: 136964285
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.CrossProfileAppsHostSideTest
Change-Id: I43c13622d094cecda1c53468adc240002111d605
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
|
| |\|
| |
| |
| |
| |
| | |
qt-qpr1-release
Change-Id: Ic934f150452f38c6671c217505f90be13ff4d2a1
|
| | |\
| | |
| | |
| | |
| | |
| | | |
am: dde9704664
Change-Id: I091c8d095b29dc966da86c2d4c93281615043355
|
| | | |\ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When both ext4 user data checkpoints and metadata encryption are
enabled, we are creating two stacked dm devices. This had not been
properly thought through or debugged.
Test: Enable metadata encryption on taimen (add
keydirectory=/metadata/vold/metadata_encryption to flags for userdata in
fstab.hardware)
Unfortunately metadata is not wiped by fastboot -w, so it is
necessary to rm metadata/vold -rf whenever you wipe data.
fastboot flashall -w works
fastboot reboot -w works
A normal boot works
Disable checkpoint commits with
setprop persist.vold.dont_commit_checkpoint 1
vdc checkpoint startCheckpoint 10
adb reboot
wait for device to fully boot then
adb reboot
Wait for device to fully boot then
adb logcat -d | grep Checkpoint shows the rollback in the logs
This tests encryption on top of checkpoints with commit, encryption
without checkpoints, and rollback, which seems to be the key cases.
Also ran same tests on unmodified Taimen and Blueline
Bug: 135905679
Merged-In: I8365a40298b752af4bb10d00d9ff58ce04beab1f
Change-Id: I8365a40298b752af4bb10d00d9ff58ce04beab1f
|
| |\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
qt-qpr1-release
Change-Id: I4e998f1f8677812e3cd721fb458014a07917f882
|
| | |\| |
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 3601f4790b
Change-Id: I0c362a06814657e2ecf1059a942b7c21cf4e3051
|