[Magisk] GingerWare:
Hi everyone,

First I apologize for the post, I understand it is yet one more post about a single user specific issue. I googled extensively the issue and was not able to find a solution, so I decided to open that post.

So, last week I was running a Dr. Ketan ROM on my Galaxy Note4, and I needed/wanted to change. So I decided to go for LineageOS after trying out Resurrection Remix and noticing some bugs. In the meantime I discovered Magisk, which I'd like to try for rooting my phone. I will put here the step I followed. It's not that straightforward considering that I had to flash a stock Galaxy Note4 ROM. But the issue is: right after the Magisk install, the LineageOS boot is stuck on the logo, and loops. This can be fixed by flashing the uninstaller, but I'd like to gain root access with Magisk, and restore my data.

Steps:

1/ Flash Galaxy Note4 Stock ROM . I did this with Heimdall command line tool since I'm on a Mac and I had trouble flashing with Jodin (Jodin was stuck on "running" after clicking start). The stock firmware I used is N910FXXS1DQH8_N910FOXA1DQF1_DBT.zip, which I unzipped, untarred and which contains:

-rwx------@ 18M Aug 11 08:24 NON-HLOS.bin
-rwx------@ 1.1M Aug 11 08:24 aboot.mbn
-rwx------@ 15M Aug 11 08:24 boot.img
-rwx------@ 35M Aug 11 08:26 cache.img.ext4
-rwx------@ 28M Aug 11 08:26 hidden.img.ext4
-rwx------@ 61M Aug 11 08:26 modem.bin
-rwx------@ 17M Aug 11 08:24 recovery.img
-rwx------@ 197K Aug 11 08:24 rpm.mbn
-rwx------@ 353K Aug 11 08:24 sbl1.mbn
-rwx------@ 56K Aug 11 08:24 sdi.mbn
-rwx------@ 3.1G Aug 11 08:24 system.img.ext4
-rwx------@ 458K Aug 11 08:24 tz.mbn

The heimadll command I used after plugging the phone in download mode was (Heimdall v1.4.1)

sudo heimdall flash --APNHLOS NON-HLOS.bin --ABOOT aboot.mbn --BOOT boot.img --HIDDEN hidden.img.ext4 --MODEM modem.bin --RECOVERY recovery.img --RPM rpm.mbn --SBL1 sbl1.mbn --SYSTEM system.img.ext4 --TZ tz.mbn --CACHE cache.img.ext4

Which outputs

Session begun.
Downloading device's PIT file...
PIT file download successful.
Uploading APNHLOS
APNHLOS upload successful
Uploading ABOOT
ABOOT upload successful
Uploading BOOT
BOOT upload successful
Uploading HIDDEN
HIDDEN upload successful
Uploading MODEM
MODEM upload successful
Uploading RECOVERY
RECOVERY upload successful
Uploading RPM
RPM upload successful
Uploading SBL1
SBL1 upload successful
Uploading SYSTEM
SYSTEM upload successful
Uploading TZ
TZ upload successful
Uploading CACHE
CACHE upload successful
Ending session...
Rebooting device...
Releasing device interface...

You would notice that I did not use sdi.mbn. But it seems to work without. Could any one tell me what this is ?

3/ Reboot to check stock: Everything OK. I also put LineageOS, GApps and both Magisk zips (Magisks and it's uninstaller) on the phone memory for later.

I also took the opportunity to download one of the root checker on the play store to check that I did unroot my phone by flashing stock. The root checker showed that my phone was indeed unrooted!

4/ Flash TWRP with heimdall, in download mode

heimdall flash --RECOVERY ../twrp-3.0.2-0-trltexx.img

Gives

Beginning session...
Session begun.
Downloading device's PIT file...
PIT file download successful.
Uploading RECOVERY
RECOVERY upload successful
Ending session...
Rebooting device...
Releasing device interface...

6/ Reboot in recovery

7/ Wipe data/dalvik

8/ Flash Lineage OS from TWRP

9/ Wipe data/dalvik

10/ Flash GApps Nano from TWRP

11/ Reboot to check if everything is OK on Lineage OS: It is.

12/ Reboot to TWRP.

13/ Wipe data/dalvik

14/ Flash Magisk

And after this step I have a bootloop. I let my phone processing for 5min, I was not keen on waiting longer because it was heating up quite a bit. Maybe I should ? :/

Thanks for reading, and if anyone of you has an idea on what failed there, I'd be happy to hear from you. I, of course, can provide more details, or execute additionnal step that could allow me to root my phone with Magisk :)

Cheers,

GingerWare