How to decrypt Island / Work profile and Parallel Apps user in TWRP?


Question

TWRP 3.4.0.0 release introduced multiuser decryption which means no more error 255 or other multiuser backup errors on devices with multiple users setup. The problem is, TWRP requires all the users to be decrypted in order for the backup to be successful. But, I can't seem to decrypt Island / Work profile user (user 11) and Parallel apps user (user 999) in my OnePlus 6 running Android 10.


Note: Parallel apps user is specific to OnePlus devices.


Here's what happens when I enter my PIN in TWRP on boot or through command-line:



Attempting to decrypt data partition or user data via command line.
Attempting to decrypt FBE for user 0...
User 0 Decrypted Successfully
Attempting to decrypt FBE for user 10...
Failed to decrypt user 10
Attempting to decrypt FBE for user 11...
Failed to decrypt user 11
Attempting to decrypt FBE for user 999...
Failed to decrypt user 999
Data successfully decrypted
Updating partition details...
...done

I can explicitly decrypt secondary user 10, so no problem there, but I am unable to do that for Work Profile / Island user and Parallel Apps user (user 999).


Doing twrp decrypt MY_PIN_FOR_USER_0 999 doesn't work. Running locksettings verify --user 11 and locksettings verify --user 11 gives me


Profile uses unified challenge

So, how do I decrypt these user accounts so that I can make TWRP backups?


I am unable to put the answer to this question to my use. What is a "synthetic password" and how is it used by Android?




Edit: From the TWRP issue tracking link shared by alexcs, the solution for work profile is to separate its lockscreen credentials from the primary/main user. This seems to work so far. However, it doesn't not work for decrypting parallel apps user (999).


Answer

Note: this solution is tested on Android 10 (OxygenOS 10.3.2) in OnePlus 6 with TWRP 3.4.0.3.


The idea for things to work smoothly in TWRP is that your main user must not have any lock screen security/credential for the purpose of taking backup in TWRP. This way, TWRP can automatically decrypt main user, work profile user and also the Parallel Apps user.


Follow these steps:



  1. Setup a Screen Lock to PIN/Password/Pattern for your main user/profile, if you don't have it already.

  2. In Settings → Security & lock screen, enable/tick Use one lock for Work Profile. This means that neither Android system, nor your work profile apps would ask for additional credentials to be used.

  3. Set Screen Lock for your main user/profile to None. That is, remove lock screen security.


Now, boot into TWRP. TWRP would automatically decrypt your main user account (user 0), your work profile account, and also the Parallel Apps user (user 999). If you have setup a secondary user account, you can easily decrypt it with the command:


twrp decrypt CREDENTIALS SECONDARY_USER_ID

Alternatively, in TWRP, go to Advanced → Decrypt User → select your secondary user → enter its credentials.


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