Used to protect process-level SELinux changes from racing with each
other between multiple threads.
Test: builds, boots
Bug: 67041047
Change-Id: I242afed3c3eb7fba282f1f6b3bdb2d957417c7e8
Make the main thread do something useful instead of sitting around
twiddling its thumbs.
Test: builds, boots
Bug: 67041047
Change-Id: I88f7f4fe151ae2b81f80aa575530c12b56ba4d75
We heavily leverage sgdisk, which already has a bunch of logic to
optimally align partitions. We've been using it for the adoptable
storage GPT tables, and now we also use it for MBR tables.
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 63735902
Change-Id: I846a8c96930ec2c6ab12e54dc2d464b17f7c54a9
These are the same rules used by system/core/. We'll apply it to
existing code in a future CL.
Test: none
Bug: 67041047
Change-Id: I407581a9ba155aea87ac87f231f5269f7c444a2e
We've been allocating task objects without freeing them, oops. We
don't really need full classes for these tasks, so move them to
blocking methods, and invoke them from a detached thread.
Remove FIDTRIM support, which isn't meaningful on UFS-based flash
devices. Modern devices require FBE/FDE which gives us better
protection against trimmed data lingering around.
Rename "Trim" to more generic "IdleMaint", since it'll soon extend
to include custom F2FS optimization logic.
Check for shady ".." when validating paths.
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 67041047
Change-Id: I4fb194c5d5ef13f413c02acedfbaaf79c567582b
Moves away from crufty char* operations to std::string utility
methods, including android::base methods for splitting/parsing.
Rewrite of how Process handles scanning procfs for filesystem
references; now uses fts(3) for more sane traversal.
Replace sscanf() with new FindValue() method, also has unit tests.
Remove some unused methods. Switch almost everyone over to using
modern logging library.
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 67041047
Change-Id: I70dc512f21459d1e25b187f24289002b2c7bc7af
Use vold_prepare_subdirs since only it has the privilege needed.
Bug: 25861755
Test: Boot device, create user, create files, remove user, observe logs
Change-Id: I90fb2517ccd177c9b009001e7a2b00f537152f8c
Battery check could be replaced by hwbinder calls into
android.hardware.health@2.0 instead, but because
of b/16868177, this is actually not needed.
Bug: 62229583
Test: pass
Change-Id: Ieb03e6ee2f648d9c1d85dbbdc10626726f5fe39b
This reverts commit 5687066dcc.
Reason for revert: ag/2966951 fixes the underlying problem.
Bug: 66739076
Bug: 65737446
Test: reboot-cycle.sh doesn't show a problem.
Change-Id: If4b9c5cc39e9e905d2b1e78f091609be641fc22a
This reverts commit a3a60b372e.
Reason for revert: All kernel prebuilts merged
(cherry picked from commit 75ae529bf8)
Bug: 65600849
Bug: 65573871
Test: m
Change-Id: I75b0cb1d82213b875cbef8d39f4f1a8fb34b9795
This reverts commit 1b38e33003.
Causes a boot loop on bullhead.
(cherry picked from commit a3a60b372e)
Bug: 63245673
Bug: 65660058
Test: m
Merged-In: I9c8afd3ba22547aff5aff06b71cb8ff3b8a07350
Change-Id: I9c8afd3ba22547aff5aff06b71cb8ff3b8a07350