Encryption Unsuccessful even after system backup restore


Question

The steps I performed:




  1. Flashed TWRP with Odin

  2. Made backup

  3. Flashed LineageOS 14.1 with TWRP

  4. Flashed SuperSU with TWRP

  5. Flashed Open GApps with TWRP

  6. There was a problem, Google Play Services kept crashing, I decided to restore stock ROM

  7. Restored the backup I made in 2 with TWRP

  8. Opened my restored system and decided to encrypt the device

  9. Either the encryption failed itself or I somehow disturbed it

  10. After restart Encryption Unsuccessful keeps appearing

  11. I restored backup from 2 again I still get Encryption Unsuccessful

  12. I flashed LineageOS again - started nicely

  13. Once again I restored backup from 2 again I still get Encryption Unsuccessful



In the meantime I wiped Cache, Dalvik Cache, Data and System numerous times.



So it looks like the stock ROM keeps seeing the information about the failed encryption process even though I wiped the 4 partitions mentioned above. Interesting part is that LineageOS doesn't care.



Any ideas on how to get the stock ROM back on its feet?



EDIT



Flashing the stock rom with Odin didn't help either


Answer

Found out the way to fix it:




  1. Download stock firmware (*.tar.md5)

  2. Flash it with Odin (it removes TWRP and replaces it with a standard recovery)

  3. Start Android - still "Unsuccessful encryption" error

  4. Boot into recovery mode (now it's standard recovery instead of TWRP)

  5. Run factory reset

  6. Start Android - now it finally starts - problem solved

  7. Flash again TWRP with Odin

  8. Restore the old good backup with TWRP

  9. Done



So basically the factory reset form the original recovery mode fixes it.



Also I found out why the tablet bricked. When it performs encryption process it looks like it's off (no lights, sounds or anything). Do not disturb it, after 20-30 minutes it finishes the encryption and turns itself on. Just leave it be until the screen turns on.


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