What is Direct Boot or File Encryption in Android N


Question

The title says it all



What is it and how does it help users?



While this is a self answered question, additional inputs especially from hands on experience are welcome


Answer

TL;DR In previous Android versions you risked missing notifications, text messages etc, in case your phone rebooted or restarted for some reason when you didn't notice. Reason being, you had to boot in with your password or PIN for the device and apps in it to communicate notifications. In Nougat, this is overcome by allowing the device to boot (without any security risk) without entering PIN or password and access limited functionality such as notifications. You would however need to sign with your PIN or password for complete access of your device



Source




  • To overcome such problems, in Android Nougat, Google decided to add a new type of system encryption that it calls “File Encryption" This is comprised of two different types of data:



    Credential encrypted data: This data is protected and is only accessible once the device has been fully unlocked via PIN, pattern, or password. In practice, this acts similarly to full-disk encryption in terms of user experience.



    Device encrypted data: This is what’s new in Nougat. It makes certain non-personal data available to the operating system before the user inputs their unlock info. This includes generic system files needed to get the OS up and running in a usable state, allowing Nougat to boot up to the lock screen without any user interaction.


  • With this, developers can also push certain files into this encrypted space, allowing things like alarms, phone calls, and notifications to come through before the device has been fully unlocked. That means no accidentally sleeping in because your phone crashed and rebooted in the middle of the night.




When apps are allowed to run in this “device encrypted” state, they can push data to credential encrypted storage, but they can’t read it—it’s a one-way street.




  • Android’s file-based encryption is also known by a much simpler name: “Direct Boot”. This name, which doesn’t really exist in Android’s menus but was used at Google I/O with the announcement of Nougat.



Related How does Nougat encryption work technically?



Additional Reading: All The New Security Improvements In Android N


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes