Stock image dump for running Magisk necessary?


Question

In the offitical installation instructions for Magisk it says: “However, you MUST have a stock boot image dump beforehand, and you also have to be able to flash the patched boot image, either through fastboot/download mode or ODIN”



What’s the rationale for having the stock boot image dump beforehand?



If the rationale is to have a backup when something goes wrong, then strictly having a stock boot image dump is not necessary for running Magisk.



Furthermore, it is unclear to me how to create that dump.



PS: My plan is to root the Xiaomi A2, to be able to directly interface with USB OTG devices from within Termux. The Xiaomi A2 is an Android One device.


Answer


Stock image dump for running Magisk necessary?



No. Far more easier is to use the flashable ZIP that does all- That performs all the steps: backing up the boot image, creating a patched version, flashing that, installing Magisk Manager (thanks to Izzy in comments)


But to clarify on the instructions



What’s the rationale for having the stock boot image dump beforehand?



For devices that don't have custom recovery but you would want to root


Magisk needs the stock boot image for two things



  • To be able to patch it so that Magisk can be installed.



  • If you wish to uninstall Magisk, it replaces the patched boot image with stock boot image





Furthermore, it is unclear to me how to create that dump



For MiA1 you can see the details on this XDA thread. In essence:



  • You need to have fastboot image of the stock ROM (for MiA1 they are released every month)



  • Extract boot.img and store it on your device



  • Install Magisk Manager .Tap on Install on the prompt and then "Patch Boot Image File". Select the untouched boot.img through your File Explorer. Wait for it to do its thing.
    The patched_boot.img was created and it should be located at /storage/emulated/0/MagiskManager/patched_boot.img.



  • Copy the patched boot.img to your PC and fastboot into it (fastboot boot patched_boot.img)



  • From Magisk manager Direct Install and you are done




If that is too much work, you can wait for somebody at XDA to provide patched boot images


Edit : See this for more How do you root a device with Magisk when it doesn't have a custom recovery


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