Skip to content

An Android shell script that creates two rescue boot images ('coreonly' and 'remove') from magisk_patched.img

Notifications You must be signed in to change notification settings

nooriro/paracore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Paracore

An Android shell script that creates two rescue boot images ('coreonly' by Tulsadiver and 'remove' by osm0sis) from magisk_patched.img.

Requirements

This script does not use Android Image Kitchen but uses magiskboot contained in Magisk zip. So you need a working Android device to run this script, since magiskboot binary in Magisk zip runs only on Android. But root access is NOT needed.

Working with a PC

Screenshot: paracore-windows-cmd-200525.png
Latest SDK Platform Tools download: Windows | Mac | Linux

  1. On your PC, download the factory image of your device and build number currently in use, and extract boot.img from there.

    • If your device is stuck on the boot screen or in a boot loop, reboot into fastboot mode using key combo. Then, boot from boot.img without flashing it. The device will probably boot.
      fastboot boot boot.img
  2. Copy boot.img from your PC to your device.

    adb push boot.img /sdcard/Download/
  3. On your device, download Magisk Manager apk (e.g. MagiskManager-v7.5.1.apk) and install the apk.

  4. Run Magisk Manager app and press [Install] > [Install] > [Select and Patch a File].
    Select boot.img in Download folder and wait.
    After the patch is complete, press [Back button] to return to the main screen of Magisk Manager.

  5. On your device, download Magisk zip (e.g. Magisk-v20.4.zip).
    • Be sure the Magisk zip file is in Download folder (/sdcard/Download).
    • Or, in Magisk Manager, press [Install] > [Install] > [Download Zip Only] and wait for downloading to complete.

  6. On your PC, download paracore-master.zip and extract paracore.sh from there.

  7. Copy paracore.sh from your PC to your device's /data/local/tmp folder, and set "execute" permission on paracore.sh.

    adb push paracore.sh /data/local/tmp/ && adb shell chmod u+x /data/local/tmp/paracore.sh
  8. Run paracore.sh.

    adb shell /data/local/tmp/paracore.sh
  9. Copy the created img files to your PC.

    adb pull /sdcard/Download/magisk_patched.img
    adb pull /sdcard/Download/magisk_patched_coreonly.img
    adb pull /sdcard/Download/magisk_patched_remove.img
  10. Reboot your device into fastboot mode using key combo. Then, boot from magisk_patched_coreonly.img without flashing it.

    fastboot boot magisk_patched_coreonly.img

    Device will probably boot with Magisk core only mode. Run Magisk Manager and remove the offending module.
    Then turn off 'Magisk Core Only Mode' in Magisk Manager Settings, and reboot system.

Working without a PC

Screenshot (Terminal Emulator): paracore-terminal-emulator-200525.png
Screenshot (Termux): paracore-termux-1-200525.png | paracore-termux-2-200525.png

The process below is how to create two boot images using only a working Android device. You will eventually need a PC to boot from magisk_patched_coreonly.img or magisk_patched_remove.img.

  1. Download the factory image of the target device and build number you need, and extract boot.img from there.

  2. Download Magisk Manager apk (e.g. MagiskManager-v7.5.1.apk) and install the apk.

  3. Run Magisk Manager app and press [Install] > [Install] > [Select and Patch a File].
    Select boot.img and wait.
    After the patch is complete, press [Back button] to return to the main screen of Magisk Manager.

  4. Download Magisk zip (e.g. Magisk-v20.4.zip).
    • Be sure the Magisk zip file is in Download folder (/sdcard/Download).
    • Or, in Magisk Manager, press [Install] > [Install] > [Download Zip Only] and wait for downloading to complete.

  5. Download paracore-master.zip and extract paracore.sh from there.
    • Be sure paracore.sh is in Download folder (/sdcard/Download).

  6. Install Terminal Emulator or Termux from the Google Play Store.

  7. Run Terminal Emulator or Termux, and execute the commands below. (Select all the commands, then copy & paste them.)

    cp /sdcard/Download/paracore.sh ~; chmod u+x ~/paracore.sh; ~/paracore.sh

    For Terminal Emulator: You can't paste the commands directly.
    Paste into the address bar of Chrome, then copy the commands again, and paste them into Terminal Emulator.
    For Termux: You must grant storage permission before executing the commands.
    Press and hold Termux app icon in launcher, then press [circled i icon]. And then press [Permissions] > [Storage] > [Allow].

References

  1. https://forum.xda-developers.com/pixel-4-xl/how-to/magisk-modules-disabler-booting-magisk-t3990557

  2. https://github.com/nooriro/parasite/blob/master/parasite.sh

  3. https://github.com/topjohnwu/Magisk/blob/master/docs/guides.md#root-directory-overlay-system

Acknowledgements

Thanks: Tulsadiver, osm0sis, and topjohnwu

About

An Android shell script that creates two rescue boot images ('coreonly' and 'remove') from magisk_patched.img

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages