doujiangyoutlao
楼主
3318 主题数
123 回复数
楼主 发表于 2018.02.27 11:31:07 4647 浏览 4 回复 0

[OFFICIAL] Magisk v16.0 - Root & Universal Systemless Interface [Android 5.0+]

搬运原帖:https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445


Latest Stable Magisk Version: v16.0
Latest Magisk Manager Version: v5.6.1


Hello, welcome to the official Magisk Release / Announcement thread!
Installing Magisk will give you ROOT, a super powerful Systemless Interface,
Magisk Modules support, and hide from tons of integrity tests like SafetyNet!


This thread and my Github releases are the ONLY official places to download Magisk!
NEVER trust 3rd party sources, don't go to scammy websites!


Magisk only modifies the boot image and install files to /data and /cache
Your /system partition will only be modified if root is installed in /system, or using custom rom with addon.d support!


Features

  • 100% fully open source and easy to build!

  • Magic Mount: 
    Allow you to do any system (vendor) modification without actually tampering the partitions.
    Anything can be loaded with Magisk systemless-ly!

  • MagiskSU: Open Source Root Solution
    Root your device with MagiskSU, based on phh's Superuser, which is based on CM Superuser.

  • Magisk Manager: 
    MagiskSU Root Management, Upgrade Magisk, Manage MagiskHide lists
    Manage, Upgrade, Download, Install Magisk Modules from the community driven online Magisk Module Repo.

  • MagiskHide: 
    Hide Magisk from detections: Google SafetyNet, enterprise / bank system integrity checks, game tamper checks etc.

  • Resetprop: 
    Allow you to do any modifications to system properties, including read-only props.
    This is also used along with magiskhide to trick various device status sent from the bootloader

  • Miscellaneous: 
    (Optional) Remove AVB 2.0, dm-verity, forceencrypt.
    Unlock partitions blocks to support remount to rw

Installation Instructions

  • If you already have Magisk installed, it is strongly recommended to upgrade directly via Magisk Manager

  • Instructions for installing the first time are presented below:

  • If you plan to flash a custom kernel, flash it AFTER installing Magisk

  • Make sure to remove any other root, your best bet would be restoring your boot image back to stock

  • Via custom recovery:Via Magisk Manager (Only support v14.0+):

    • This method does not need root, and also does not require a custom recovery.
      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

    • Install the latest Magisk Manager

    • If you're planning to flash the patched boot image through ODIN, go to Settings > Update Settings > Patched Boot Output Format, and select .img.tar. For normal users leave it as the default .img

    • Press Install > Install > Patch Boot Image File, and select your stock boot image file

    • Magisk Manager will now patch your boot image, and store it in [Internal Storage]/MagiskManager/patched_boot.img[.tar]

    • Copy the patched boot image to your PC. If you can't find it via MTP, you can pull the file with ADB:
      adb pull /sdcard/MagiskManager/patched_boot.img[.tar]

    • Flash the patched boot image to your device and reboot. Here is the command if using fastboot:
      fastboot flash boot /path/to/patched_boot.img

    • Download the latest Magisk zip file

    • Reboot to a custom recovery and flash the flashable zip

    • Reboot to system, and check whether Magisk Manager is installed and the version matches the latest one in the OP
      If for some reason Magisk Manager isn't installed/upgraded automatically, please install/upgrade it manually!


Downloads

Notes & Troubleshoots

  • If you experience any bugs, please install the latest beta, as the beta builds will provide more debugging information, and the bug might have already been fixed. Please follow the instructions in Beta Thread OP to report a bug properly.

  • Please read this if you plan to use the "Hide Magisk Manager" feature: When using the hide Magisk Manager feature, the app will generate a random package name, repackage, and replace itself. If the repackaged manager and the original "com.topjohnwu.magisk" both exist on your device (you got 2 Magisk Managers installed, which in theory should not happen), only "com.topjohnwu.magisk" will work properly. This means that when you install an update, you are required to re-hide Magisk Manager.

  • Q: After flashing Magisk, my device will show a scary popup saying "There's an internal problem with your device. Contact your manufacturer for details"
    A: This is caused by dtbo image patched to remove AVB 2.0 of the vendor partition. This is required for allowing you to mount vendor to rw and make modifications
    If you never plan to modify the vendor partition, in Magisk Manager, "Uninstall > Restore Images" to restore the images, check "Preserve AVB 2.0/dm-verity" box in Advanced Settings, then reinstall Magisk via the app.

  • Some Motorolla devices' stock kernel ships with a flawed F2FS implementation. Change to a custom kernel with the fix or format data to ext4.

  • Additional info are presented below:

  • Magisk Manager CANNOT be placed in adoptable storage, or superuser will not work

  • The addon.d survival only works on newer TWRP versions, because addon.d was never updated to patch boot image, we are using a small trick to make things work.

  • Q: WebView is crashing on my device when I enable MagiskHide!
    A: It's a bug in your ROM, please ask your ROM developer to include this commit to fix the issue

  • MagiskHide relies on mount namespace, which is introduced in Linux kernel 3.8. If you are running ROMs with kernel lower than 3.8, it will not work unless OEMs backports the new features to the older kernel base (which is quite common)

  • Some of the ASUS devices requires boot image signing, search the forums and sign them yourselves.

  • Sony Stock ELF Boot: Please refer to the info when flashing Magisk in custom recovery

  • Q: Safety Net isn't working!
    A: If your ROM itself is not able to pass SafetyNet, then there is nothing Magisk can help.
    Your best bet is to run 100% stock ROMs, since your phone manufacturer is forced to release a device passing CTS.


Donation

Useful Links

Sources

Special Thanks

  • @phhusson for his advice with sepolicy and his sepolicy injection tool, boot image tools, hide su tools, superuser

  • @Chainfire for many shell script code, his supolicy in older versions, and the complete documentation How-To SU

  • @nkk71 for his original resetprop

  • @osm0sis for his shell script magic: unSU, addon.d, also providing numerous support for all kinds of boot image unpacking knowledge

  • @Captain_Throwback, @Didgeridoohan, and @jenslody for being the beta testing MVP

  • @digitalhigh and @DVDandroid for initial contributions to Magisk Manager


回复