summaryrefslogtreecommitdiff
path: root/cmds/sm/src/com/android
Commit message (Collapse)AuthorAgeFilesLines
* Do not throw exception if storage app data isolation is not enabledRicky Wai2022-01-131-1/+2
| | | | | | | | | As the feature is not enabled yet, we should not throw exception and block all tests. We should show error message instead. Bug: 213442885 Test: atest android.os.storage.cts.StorageManagerTest#testCallback Change-Id: I9a46c9ed1aeb59d982ba3841943016bd7a357ac5
* Revert "Change mounting storage data and obb flag to on by default"Wale Ogunwale2021-05-141-1/+1
| | | | | | | | | | | | | | | | Revert "Remove storage app data isolation checking in CTS" Revert submission 14325408-enable_storage_iso_2 Reason for revert: b/187939590 Reverted Changes: I6391b7381:Change mounting storage data and obb flag to on by... Ic2f3d1be2:Remove storage app data isolation checking in CTS Iffa8339b1:Change mounting storage data and obb flag to on by... Bug: 187939590 Bug: 148049767 Change-Id: I7fa2947593d0fe743def804bf4f7b57920978e40
* Change mounting storage data and obb flag to on by defaultRicky Wai2021-04-291-1/+1
| | | | | | | | | | | | Change mounting storage data and obb flag to on by default Test: unbundled/launcher/nexus_unit_test_multi_device_platform Test: atest android.appsecurity.cts.ExternalStorageHostTest Test: atest AdoptableHostTest Test: pass cts/cts_postsubmit_cf_stable-cloud-tf Bug: 148049767 Change-Id: Iffa8339b10427bea96aa90030463ed18c96eafce
* Revert "Change mounting storage data and obb to on by default"Ricky Wai2021-03-191-1/+1
| | | | | | | | | | | Revert submission 13469849-turn_on_iso-sc-dev Reason for revert: Failing existing CTS b/182843583 Reverted Changes: If819ee161:Change mounting storage data and obb to on by defa... I46a095448:Change mounting storage data and obb to on by defa... Change-Id: I7b33baebe150ab78551c7b4368320f056cdcbceb
* Change mounting storage data and obb to on by defaultRicky Wai2021-02-031-1/+1
| | | | | | | Bug: 148049767 Test: atest AdoptableHostTest Test: pass cts/cts_postsubmit_cf_stable-cloud-tf Change-Id: If819ee1612e750689f5d33c30952675f96306be2
* Merge "Return error in "sm unmount-app-data-dirs" if app data isolation is ↵rickywai2021-01-221-0/+7
|\ | | | | | | | | | | | | | | | | | | not enabled" am: 4d53e3b9bc am: 361fd37803 am: 2830048b80 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556237 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ibca0f1cb06a9468c8f24911666432cac17822ec6
| * Return error in "sm unmount-app-data-dirs" if app data isolation is not enabledRicky Wai2021-01-221-0/+7
| | | | | | | | | | | | | | | | | | This command should not do anything when feature flag is off, and let developer knows this command fails. Bug: 177228735 Test: run "sm unmount-app-data-dirs" when the app data isolation flag is off and returns error message Change-Id: If07107712e8215a58ffade08aedce3e80ad1ac12
* | Merge "New sm command to unmount app data and obb app visibility mount" am: ↵Treehugger Robot2021-01-181-0/+11
|\| | | | | | | | | | | | | | | | | | | 3299d00b87 am: 40c7e3d17d am: 05af40c490 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552534 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ie35b99efa56faaf4339a7c344743092a5b5d540b
| * New sm command to unmount app data and obb app visibility mountRicky Wai2021-01-151-0/+11
| | | | | | | | | | | | | | | | | | This command will be used in tests so tests won't mount data and obb dirs anymore so won't be killed by system when volume is unmounted. Bug: 148049767 Test: Enable storage app visibility flag, then run "sm unmount-app-data-dirs PKG PID USER_ID", data and obb are not mounted in /proc/$PID anymore. Change-Id: Ie5ddf55471f59c61e1906664b87a9bf889702536
| * Add shell commands to start checkpoint/check it is supportedNikita Ioffe2020-01-151-0/+29
| | | | | | | | | | | | | | | | | | Test: adb shell sm supports-checkpoint Test: adb shell sm start-checkpoint 1 && adb reboot Bug: 135984674 Change-Id: I08cd675b147cea88ad5b29ab4b0cd64ac445879d Merged-In: I08cd675b147cea88ad5b29ab4b0cd64ac445879d (cherry picked from commit 6d74942719bfedfe25f8c20af6fdd726ca14e15e)
* | Remove dead isolated storage code from StorageManagerServiceZim2020-11-271-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Isolated storage was added in Q (and enabled by default) and has been replaced by FUSE in R Additionally, we can remove the ExternalStorageMountPolicy concept which is only required if isolated storage is false Cleanup in preparation to introduce DeviceConfig changes for transcoding Bug: 169327180 Test: Builds Change-Id: Ie2686d8efa6654ea6c4b4ca8c121c0c1841a6356
* | Add shell commands to start checkpoint/check it is supportedNikita Ioffe2020-01-151-0/+29
|/ | | | | | | Test: adb shell sm supports-checkpoint Test: adb shell sm start-checkpoint 1 && adb reboot Bug: 135984674 Change-Id: I08cd675b147cea88ad5b29ab4b0cd64ac445879d
* Remove greylist of apps that gain legacy access.Jeff Sharkey2019-04-011-8/+0
| | | | | | | | | | Per design pivot, access to legacy behavior will be determined by the new "allowExternalStorageSandbox" manifest flag. Bug: 124818022, 129487770 Test: atest --test-mapping packages/providers/MediaProvider Test: atest android.appsecurity.cts.ExternalStorageHostTest Change-Id: I169e5eb3612c23aad47204cde9ff263f9df6f8c1
* Developer option to disable legacy greylist.Jeff Sharkey2019-02-271-10/+9
| | | | | | | | | The app developers on the legacy greylist need an option to disable the greylist so they can debug. Bug: 124818022 Test: manual Change-Id: I84785a235830761794dee5c603c1ea43f8ace73e
* Local and remote isolated storage feature flags.Jeff Sharkey2018-12-151-5/+22
| | | | | | | | | | | | | | | | | | | Moving forward as we start enabling isolated storage in various dogfood groups, we'll need to maintain separate values for the feature flag for both "local" and "remote" opinions. Any strongly expressed local opinion will always take precidence over any remote opinion. Any changes to these feature flags means that we need to invalidate any PackageManager parsed APKs, since PackageParser changes it's output depending on the flag state. Since other feature flags are likely to need this type of invalidation in the future, define the PackageManager cache using a SHA-1 hash of a collection of values that should invalidate the cache. Bug: 112545973 Test: atest android.os.SystemPropertiesTest Change-Id: Ifafcdf15e40e694eb4126e06981aeb82df51da33
* Merge "Introducing StubVolume in StorageManager" am: b499af866c am: eb871cc916Risan2018-11-131-1/+3
|\ | | | | | | | | | | am: ee32e0d473 Change-Id: I4098132df9833b7cbac0db9bdadac297d324a822
| * Introducing StubVolume in StorageManagerRisan2018-11-081-1/+3
| | | | | | | | | | | | | | | | | | Bug: 110380403 Test: Tested in ARC++ (with Settings and vold changes in separate CLS) - able to see the external storage under StorageSettings. Also tested the sm command to print stubvolumes. Change-Id: I7517260a40399bd9800424bb394512601f6af617
* | Add sm set-isolated-storage [true|false]Sudheer Shanka2018-11-081-0/+18
|/ | | | | | Bug: 119038726 Test: manual Change-Id: I29eeec7872584f1173e9b6d31434b36487515d9e
* Extend adoptable override to force on or off.Jeff Sharkey2018-04-201-4/+16
| | | | | | | | | | Virtual disks are adoptable by default, but for debugging purposes we want to treat them as unadoptable in some cases. Add the ability for the "sm" shell command to force on/off, or return to default. Bug: 77849654, 74132243 Test: manual Change-Id: Ieda317396624ca081e5dd9568795483f684f9297
* FBE devices now fully support adoptable storage.Jeff Sharkey2018-01-041-15/+1
| | | | | | | | | | | | We've finished all the underlying work to support adoptable storage on FBE devices, so remove the code that was disabling it by default. Introduce feature flag to make it easier to detect devices that support adoptable storage. Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest Bug: 29923055, 25861755, 33252673, 37289651 Change-Id: I3630d690c9e66c7e41e316a4263ea2eb1e752ad3
* Add 'idle-maint' command for use from shellJin Qian2017-11-141-0/+12
| | | | | | Test: adb shell sm idle-maint [run|abort] Bug: 67776637 Change-Id: I5f20adc45aad29dc9267a70bf3eea6a1fa490688
* Abort long-running benchmarks, report progress.Jeff Sharkey2017-11-071-4/+37
| | | | | | | | | | | | | | | A typical storage device finishes the benchmark in under 10 seconds, but some extremely slow devices can take minutes, resulting in a confusing UX that looks like we've frozen. Even worse, we keep churning through all that I/O even though we know the device will blow past our user-warning threshold. So periodically check if we've timed out, and also use that to report progress up into the Settings UI. Test: manual Bug: 62201209, 65639764, 67055204 Change-Id: Id28e63a7ea1476d83184abab5aea737a1d193f3a
* Move long-running calls to async with listeners.Jeff Sharkey2017-09-151-1/+13
| | | | | | | | | | | | | | | | Now that we're using Binder, we can have callers provide explicit listeners for every request instead of trying to squeeze them all into unsolicited socket events. Move benchmarking to be async to avoid blocking other commands for up to several minutes. Remove post-trim benchmarking flag, since benchmarking now requires a separate callback. Will bring back in a future CL. Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest Test: adb shell sm fstrim Bug: 62201209, 13758960 Change-Id: I26f76c66734ac2fd0f64713b8ab9828430499019
* Add a new "virtual disk" feature.Jeff Sharkey2017-03-251-0/+9
| | | | | | | | | | | | | | It's extremely difficult to test storage related logic on devices that don't have physical SD card slots. So to support better debugging and testing, add a new "virtual disk" feature which mounts a 512MB file through loop device. Also move ParcelFileDescriptor.open() over to using Os.open() so that it gets StrictMode treatment. Bug: 34903607 Test: builds, boots, virtual disk works Change-Id: I072a3a412cfcc8a2a3472919b7273a1ed794fd98
* Add 'fstrim' command for use from shell.Jeff Sharkey2016-11-211-1/+8
| | | | | | Test: builds, boots, new command works Bug: 20948199 Change-Id: If7b122a6c98a4ce2a2f38e545015a22decd1b516
* Rename MountService to StorageManagerService.Sudheer Shanka2016-11-151-3/+3
| | | | | | Bug: 30977067 Test: Existing tests pass Change-Id: Ieac0f11c2b249dcd60441b14c1f391e6f8131d42
* Give users and devices control over sdcardfs.Jeff Sharkey2016-04-071-0/+18
| | | | | | | | | | Instead of relying only on kernel support for sdcardfs, give each device the ability to quickly toggle between sdcardfs and FUSE. Also add the ability to users to explicitly enable/disable the behavior for testing and debugging purposes. Bug: 27991427 Change-Id: Ia57f12f6ead888ab85101004bdd8c8003537b116
* Support direct-boot tests.Jeff Sharkey2016-04-021-0/+12
| | | | | | | | | | | Add shell commands to check on current FBE status and system ready status. Mark variables without first-class locking as volatile. Fix bug where UI automation would crash while device was locked by marking it as forced direct-boot aware. Bug: 26498834 Change-Id: Ib4dfb9350925e5413f93a09baacf84c62f2ba0ea
* More file-based encryption work.Jeff Sharkey2015-11-111-0/+10
| | | | | | | | | | | | | | | | | | | | | Add granular StorageManager APIs for key creation/destruction and unlocking/locking. Start passing through an opaque token as part of the unlock command, but leave it empty for now. We now have a separate "prepare" method that sanity checks that user directories are correctly setup. Define a handful of system properties used for marking devices that should be operating in FBE mode, and if they're emulating FBE. Wire a command to "sm", but persisting will come later. Start using new "encryptionAware" flag on apps previously marked with coreApp flag, which were apps running in the legacy CryptKeeper model. Small tweaks to handle non-encryptionAware voice interaction services. Switch PackageManager to consult StorageManager about the unlocked state of a user. Bug: 22358539 Change-Id: Ic2865f9b81c10ea39369c441422f7427a3c3c3d6
* Fixes for sm and pm usageBrian Carlstrom2015-11-051-0/+1
| | | | | | | | sm showed IllegalArgumentException after usage. pm inconsistently used "return showUsage()" Bug: 20948199 Change-Id: I5828489a9d4ef2eabfb97dd408d66e1560a5a983
* More info to support CTS, fix reconcile bug.Jeff Sharkey2015-07-221-2/+13
| | | | | | | | | Surface more details and commands for storage volumes to support CTS testing. Fix user reconciliation bug that skipped user setup on empty volumes. Bug: 22658804, 22633097 Change-Id: I4221312d1cce24d1f5a2c108095cf3cf471598ed
* Command to change force adoptable state.Jeff Sharkey2015-05-151-2/+10
| | | | | | | | Since user builds can't setprop, add an explicit "sm" verb to change the force adoptable state. Bug: 21191915 Change-Id: I719d9b18c1a98c97442a5ddb1cc5512e8e4d3d3f
* Determine if we have adoptable disks.Jeff Sharkey2015-05-131-1/+11
| | | | | Bug: 19993667 Change-Id: I9b21b05736c22d34ca22f5ad6e1a6ebec440cfb6
* New "sm" shell tool to call StorageManager.Jeff Sharkey2015-05-121-0/+180
Surface basic StorageManager commands through shell tool, like simple listing of disks and volumes, and commands like mounting and partitioning. The output is designed to be parsed by host-side testing tools, instead of relying on fragile dumpsys parsing. Bug: 19993667 Change-Id: I993e92ecf57996678965945f0ae648b392a77ea2