<activity|provider|receiver|service ... android:directBootAware=”true”>
Context deviceProtectedContext = context.createDeviceProtectedStorageContext(); deviceProtectedContext.openFileInput( ... )
$ adb reboot-bootloader $ fastboot --wipe-and-use-fbe
$ adb shell sm set-emulate-fbe true $ adb shell sm set-emulate-fbe false