Phone stuck in fastboot mode


Question

I've rooted my OnePlus 6 yesterday. To do so, I followed this guide:


Root Your OnePlus 6 with Magisk — A Beginner's Guide


TWRP version: 3.5.1_9-0
Magisk version: 22.0

I also installed the Magisk app on my phone


Now I've edited my hosts-file (needed to change some permissions to be able to modify this file
) to block some sites. I've restarted the phone once successfully, but now the phone will not boot anymore. When I power on, I see the OnePlus logo very briefly and then it gets stuck on the "bootloader is unlocked" warning for a long time. It then goes on into fastboot mode. If i press start from there, the process repeats. If I press recovery mode I still get into TWRP, but rebooting from there also repeats the process and does not boot up my phone successfully.


I'm not sure, but I don't think editing the hosts file is what caused this? Shouldn't I be able to edit this file without bricking my device?


Any help on what happened and how I can fix this bootloop without wiping/reinstalling my entire device would be greatly appreciated; I don't want to lose all my settings =).


Answer

The problem was that I edited the system hosts file. This causes the system to be unable to boot; the reason is dm-verity which denies boot (chain of trust) when any modified system file is detected.


To fix the issue, I followed https://www.droidwin.com/restore-oneplus-6-stock-via-fastboot-commands/


Basically, it explains how to download the stock ROM, extract the .bin file into multiple .img files, and how to flash them subsequently.


Since only the boot and system partitions were modified, and I did not want to lose my data, I flashed them using


fastboot flash boot_a boot.img 
fastboot flash boot_b boot.img
fastboot flash system_a system.img
fastboot flash system_b system.img

This fixed the issue =).


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