• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[KERNEL] Stock Kernel with Magisk

Search This thread

ken442266

Member
Jun 29, 2014
49
86
Android 11 (R)
HK_58.1.A.1.178


Stock Kernel With Magisk Inside

Download:
AFH


Screenshots:
Screenshot_20210128-204851.pngScreenshot_20210128-204925.pngScreenshot_20210128-204933.png


----------

Contribution by @Nezorflame: Step-by-Step Guide, MEGA Folder Link

Contribution by @fengmubai: Script to Remove system_ext Record from ramdisk,
Google Drive Folder Link
 
Last edited by a moderator:

Yoannjap

Senior Member
Sep 20, 2017
55
10
Sony Xperia 5 II
Brillant!
What's the step-by-step process with using adb or newflasher to:
0. Unlock my Xperia 5 ii and root it
1. Get Android 11 with magisk.
2. And get Orangefox or Twrp ?

Thanks a lot for your help for me and other users
 
  • Like
Reactions: Sado20

kattara

Senior Member
May 2, 2011
299
26
Vancouver
Brillant!
What's the step-by-step process with using adb or newflasher to:
0. Unlock my Xperia 5 ii and root it
1. Get Android 11 with magisk.
2. And get Orangefox or Twrp ?

Thanks a lot for your help for me and other users

 

Element-Z

Member
Sep 26, 2017
22
5
Sony Xperia 1 II
I've updated the Magisk-patched version to the latest v23 release.
It's in the same folder as before, but if you need it separately, here's the link: https://mega.nz/folder/yi5mlDJR#a775v2eDTNc8-UmLKfkQhA/file/Tn42zShD
Works perfect, thank you, exactly what I was looking for. Made my day.
Do you maybe have a working/not-encrypted recovery for 58.1.A.5.159 aswell?

Edit: Nevermind, Orange Fox works well!
 
Last edited:
  • Like
Reactions: Nezorflame

xda177

New member
May 31, 2021
3
0
I do as https://github.com/topjohnwu/Magisk/issues/3752 said,

  1. Patch 58.1.A.5.159 boot.img with magisk
  2. use Image Kitchen and unpack boot.img
  3. Locate fstab.qcom and edit with notepad++ remove the system_ext line and save
  4. Repack and flash the new .img ,fastboot flash boot_a & boot_b boot.img
but there is also a bootloop with xperia1 II ... so is there any solution to this issue now?
 

Element-Z

Member
Sep 26, 2017
22
5
Sony Xperia 1 II
I do as https://github.com/topjohnwu/Magisk/issues/3752 said,

  1. Patch 58.1.A.5.159 boot.img with magisk
  2. use Image Kitchen and unpack boot.img
  3. Locate fstab.qcom and edit with notepad++ remove the system_ext line and save
  4. Repack and flash the new .img ,fastboot flash boot_a & boot_b boot.img
but there is also a bootloop with xperia1 II ... so is there any solution to this issue now?
Use Nezorflames kindly shared boot kernel from post #13. I even upgraded to 58.1.A.5.222 and that boot.img still works rooted without any bootloops or problems 💪
 
  • Like
Reactions: Nezorflame

gavilan2010

Senior Member
Mar 14, 2011
686
217

gavilan2010

Senior Member
Mar 14, 2011
686
217

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I've updated the kernel files again (original, repacked and Magisk-patched) for the XQ-AS52 58.1.A.5.330 firmware in the MEGA folder.

    All of the files are now placed in the Xperia 5 II folder, so you can go there to get the older repacked kernel versions as well.
    ___________________________________________________

    Just in case anyone needs to repeat this process or files get lost from MEGA, here's how I do this, step-by-step.

    Prerequisites​

    • Kernel in the SIN format from your firmware - use the XperiFirm tool for this
    • UnSIN tool to convert the kernel image to IMG format
    • Android Image Kitchen (aka AIK) to unpack, edit and repack the kernel files
    • Your favorite text editor to edit the fstab (I personally prefer VSCode)

    The process​

    Most of this info comes from the awesome flashing guide by @Miustone & the issue in the Magisk's Github repo by yours truly.

    I do it in WIndows but assuming you have your firmware's files, you can do it in other OS'es as well, as long as it's supported by the tools.

    Here's what you need to do:
    1. Get the boot_*.sin file from your firmware files.
      In our case we're using the XQ-AS52 firmware, so the filename for the kernel is:
      boot_X-FLASH-ALL-2389.sin
    2. Use the unsin.exe (you can just drag&drop the boot_X-FLASH-ALL-2389.sin file in Explorer to the unsin.exe file) to convert the kernel into the IMG format.
      Resulting filename will be:
      boot_X-FLASH-ALL-2389.img
    3. Move the kernel image boot_X-FLASH-ALL-2389.img into the AIK folder
    4. Launch the unpackimg.bat script. You'll get new folders in the AIK's folder as the result of unpacking
    5. Go into the ramdisk folder and edit the fstab.qcom file - either delete or comment out (add a leading # before the first symbol) the line containing system_ext record (in my case it was line number 39). Save the file and return to the AIK's folder
    6. Launch the repackimg.bat script. You'll get repacked ramdisk and kernel image with the filename:
      image-new.img
      Rename the file if you want (in my case I named it boot_X-FLASH-ALL-2389-repacked.img) and move it to your device
    7. (optional) Launch the cleanup.bat script to clean up the kernel remains in the AIK's folder and delete the original boot image
    Now you should have a perfectly working boot_X-FLASH-ALL-2389-repacked.img repacked boot image which you can use to install Magisk into from the Magisk Manager app.

    This wouldn't be possible without the aforementioned tools, so make sure to thank @IgorEisberg and @osm0sis and consider a donation both to them and to the Magisk author @topjohnwu.
  • 9
    Android 11 (R)
    HK_58.1.A.1.178


    Stock Kernel With Magisk Inside

    Download:
    AFH


    Screenshots:
    Screenshot_20210128-204851.pngScreenshot_20210128-204925.pngScreenshot_20210128-204933.png


    ----------

    Contribution by @Nezorflame: Step-by-Step Guide, MEGA Folder Link

    Contribution by @fengmubai: Script to Remove system_ext Record from ramdisk,
    Google Drive Folder Link
    1
    Brillant!
    What's the step-by-step process with using adb or newflasher to:
    0. Unlock my Xperia 5 ii and root it
    1. Get Android 11 with magisk.
    2. And get Orangefox or Twrp ?

    Thanks a lot for your help for me and other users
    1
    I've updated the Magisk-patched version to the latest v23 release.
    It's in the same folder as before, but if you need it separately, here's the link: https://mega.nz/folder/yi5mlDJR#a775v2eDTNc8-UmLKfkQhA/file/Tn42zShD
    1
    I've updated the Magisk-patched version to the latest v23 release.
    It's in the same folder as before, but if you need it separately, here's the link: https://mega.nz/folder/yi5mlDJR#a775v2eDTNc8-UmLKfkQhA/file/Tn42zShD
    Works perfect, thank you, exactly what I was looking for. Made my day.
    Do you maybe have a working/not-encrypted recovery for 58.1.A.5.159 aswell?

    Edit: Nevermind, Orange Fox works well!
    1
    I do as https://github.com/topjohnwu/Magisk/issues/3752 said,

    1. Patch 58.1.A.5.159 boot.img with magisk
    2. use Image Kitchen and unpack boot.img
    3. Locate fstab.qcom and edit with notepad++ remove the system_ext line and save
    4. Repack and flash the new .img ,fastboot flash boot_a & boot_b boot.img
    but there is also a bootloop with xperia1 II ... so is there any solution to this issue now?
    Use Nezorflames kindly shared boot kernel from post #13. I even upgraded to 58.1.A.5.222 and that boot.img still works rooted without any bootloops or problems 💪