Invalid zip file format - Magisk 22.1


Question

I have OnePlus 5t, Twrp 3.5.2_9-0-cheeseburger_dumpling, and when I'm trying to flash the magisk zip it's tell me: Invalid zip file format.


I searched google and found that I need the least TWRP version, but I have the least version... What can I do?


Edit:


In V22.1 (least) the only zip file is called "Source code (zip)", and in the TWRP its says Invalid zip file format. Same in V22.0. The next version available is 21.4, in V21.4 the link name is not "Source code (zip)", the link name is: "Magisk-v21.4.zip", and in the TWRP it's working well and flash into the system! Why it is like that? And what I don't understand?


Link to all versions: https://github.com/topjohnwu/Magisk/releases


Answer

You have downloaded the "Source code" release of Magisk which is for developers you want to build/compile Magisk on their own or make modifications to the code.


If you want to install Magisk from within a custom recovery ROM such as TWRP since Magisk v22.0 you have download the "APK" release which is at the same time a ZIP file with can be installed via recovery:



In some custom recoveries, the installation may fail silently (it
might look like success but in reality it bootloops). This is because
the installer scripts cannot properly detect the correct device info
or the recovery environment does not meet its expectation. If you face
any issues, use the Patch Image method as it is guaranteed to work
100% of the time. Due to this reason, installing Magisk through custom
recoveries on modern devices is no longer recommended. The custom
recovery installation method exists purely for legacy support.



  • Download the Magisk APK

  • Rename the .apk file extension to .zip, for
    example: Magisk-v22.0.apk → Magisk-v22.0.zip. If you have trouble
    renaming the file extension (like on Windows), use a file manager on
    Android or the one included in TWRP to rename the file.

  • Flash the zip
    just like any other ordinary flashable zip.

  • Warning: sepolicy.rule
    file of modules may be stored in cache partition, do not clear it.

  • Check whether the Magisk app is installed. If it isn’t installed
    automatically, manually install the APK.



https://topjohnwu.github.io/Magisk/install.html#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