[Magisk] flipmode_11:
Magisk Help, Troubleshooting & Documentation

May I make some suggestions and highlight some issues with the documentation? I personally found very vague and unspecific when I first read it when first learning about Magisk.

Consider "idiot-proofing" your most important articles, by making a statement and then providing a summary of that statement again at the end of the paragraph. Also adding 2-3 examples of important commands (e.g ADB & LogCat) so people can just copy and paste (adb devices, adb connect, adb -clear stuff, adb pull something...).

The "»»" symbols below are suggestions for improving and replacing existing documentation.

Suggested Edits:

"Recovery log." I suggest adding more concise details as to whether "installing" refers to flashing Magisk .zip, flashing the patched boot.img, or manually flashing modules.

»» The Magisk Recovery log is available from within the TWRP Recovery interface. Shoud you experience any problems or errors and the process does not complete (and you cannot solve it by reading the error message) when flashing Magisk.zip or Magisk Modules via TWRP.... or flashing the Magisk Patched Boot.img via TWRP... DO NOT REBOOT! Instead go to the TWRP main menu > Click "Advanced" > Click "Copy Log" (Save to SD Card or USB drive). You can now transfer the log to a computer to examine the log file.

"Installation log" description provides little insight to users.

»» The Magisk Installation log is generated on-screen within the Magisk Manager UI. After installing or updating Magisk Root or a Magisk Module, simply click "Save Log" for the log to be saved to the ./MagiskManager/Logs/install_xxxxxxxxx.log path. Transfer the log to a computer to examine it for errors.

"Magisk log " description is fragmented. I forget the exact path, but do you mean ./data/app/magisk/cache/ or ./cache/ ?? My Magisk logs are within ./MagiskManager/Logs/magisk_xxxxxxxx.log unless you are referring to different logs?

»» The Magisk log is available from within the Magisk Manager UI in the left menu under "Logs" >> "Magisk". Click the save icon at the top-right to have the log output to the default Magisk directory. Use the Trash icon to clear the log and repeat the process that is causing an error to make it easier to find and share on the forums. After installing or updating Magisk Root or a Magisk Module, simply click "Save Log" for the log to be saved to the ./MagiskManager/Logs/magisk_xxxxxxxxx.log path. Transfer the log to a computer to examine it for errors.

"LogCat". Please insert an explanation that tells people what is is. Your time is valuable. Save it.

»» A Logcat is an ADB Shell tool used to pull a log of all system events. This includes errors, warnings, stack traces, and general system occurrences. When an error occurs, key information pointing towards the source of failure is output through this log, making it a very useful tool for troubleshooting.

Then insert relevant Magisk ADB aLogCat / CatLog / MatLog example commands.

Then various links to XDA LogCat topics and third party resources on how to use all 3 LogCat options.

"The Magisk log is empty". This is not helpful. Sending someone on an unknown path that they don't even know what they're looking for. However, I suggest a list of ALL paths Magisk uses to store its logs and some example log file names, would be VERY useful and helpful to hundreds of thousand non-Linux experts trying Magisk and looking for these log files.

Example list of Log locations:

- %internal%/MagiskManager/Logs/install_yyyymmdd_hhmmss.log (Installation & Rooting Issues)

- %internal%/MagiskManager/Logs/magisk_yyyymmdd_hhmmss.log (Magisk Manager Issues)

- ./tmp/recovery.log [use 'adb pull ...' -OR- TWRP > Advanced > Copy Log to save]

- ./data/adb/magisk_debug.log (Magisk SuperUser Beta debugging log output)

- ./root/cache/magisk (file w/o any extension)

- ./data/media/0/recovery.log (Recovery-related logs) [?]

- ./cache/recovery/ [file: log, last_log] (Recovery-related logs) [?]

- ./data/app/magisk/cache/ (including sub-directories) [?]

- ./data/user/0/com.topjohnwu.magisk/ [?]

and no doubt more...

NOTE: "%internal%" = ./mnt/sdcard/ or ./storage/sdcard/ or ./storage/emulated/0/ [Device Dependent!]

You may also use a LogCat ADB shell tool to pull and save all system log events (errors, warnings, stack traces). When an error occurs, key information pointing towards the source of failure is output through this log, making it a very useful tool for troubleshooting. You may search the forums or the web for 'aLogCat', 'CatLog' & 'MatLog' example ADB commands.

Suggestions to add at the bottom of the page:

»» Please check the status of 'logd' and that it is running on your device as Magisk will not work if it cannot monitor the system logs. Repeat: Logging MUST be enabled and running!

»» Ensure your device Boot image is not already modified. If you do not know, then back it up with TWRP App and restore the stock boot image from your current ROM version (use DevCheck, Aida64, Device Info H/W apps for identification). Then have Magisk patch the clean/original boot image and flash with TWRP or Download mode or Odin v3 for Windows....

»» Unroot your device and reverse all system modifications and start from scratch. Download and flash via TWRP either Osmosis's UnSu ZIP or the Magisk Uninstaller ZIP. Once your device is back to a blank canvas, start the Magisk root procedure again - Flash Magisk, Flash Boot (if req'd),etc...

Seems like most common issues could be taken care of with a 10-20min update of the article! :D

I hope suggestions are welcome and you see why so many people have not understood this article.

Cheers!