[HowTo] Install Magisk for Super-User root access

Post Reply
joerg
Posts: 881
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 4 times
Been thanked: 11 times
Contact:

[HowTo] Install Magisk for Super-User root access

Unread post by joerg » Mon Mar 04, 2019 12:35 am

To install Magisk on the N2 I selected the method to patch the boot.img.

1. Get the boot.img (from inside a adb shell):

Code: Select all

cd /storage/emulated/0/Download
dd if=/dev/block/boot of=boot.img
2. Install MagiskManager, actual the version 7.0.0

3. In MagiskManager press on Install (Magisk) and select 'Patch Boot Image File'. Search for the boot.img in folder 'Download'. MagiskManager will produce now a patched_boot.img and store it in Download folder.

4. Copy the patched_boot.img to your PC (from a shell on your PC):

Code: Select all

adb pull /storage/emulated/0/Download/patched_boot.img
5. Bring your N2 into fastboot mode (from inside a adb shell):

Code: Select all

reboot fastboot
5. Flash the patched_boot.img with fastboot and then reboot the N2 (from a shell on your PC):

Code: Select all

(sudo) fastboot flash boot patched_boot.img
(sudo) fastboot reboot
6. Enjoy :)
These users thanked the author joerg for the post (total 3):
codewalker (Fri Apr 12, 2019 7:15 am) • muhgo (Sat Apr 13, 2019 3:41 pm) • FntX (Fri Jun 14, 2019 2:31 am)

User avatar
mad_ady
Posts: 6046
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 107 times
Been thanked: 67 times
Contact:

Re: [HowTo] Install Magisk

Unread post by mad_ady » Mon Mar 04, 2019 4:26 am

Nice guide. But can't you flash the patched boot.img with dd from within the OS, the same way you extracted it?

joerg
Posts: 881
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 4 times
Been thanked: 11 times
Contact:

Re: [HowTo] Install Magisk

Unread post by joerg » Mon Mar 04, 2019 6:51 am

I think yes it should work. I haven't tried it. Although the fastboot flash method is a way more secure.

joerg
Posts: 881
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 4 times
Been thanked: 11 times
Contact:

Re: [HowTo] Install Magisk

Unread post by joerg » Tue Mar 12, 2019 4:19 pm

mad_ady wrote:
Mon Mar 04, 2019 4:26 am
Nice guide. But can't you flash the patched boot.img with dd from within the OS, the same way you extracted it?
I can confirm that it works this way.
dd of=/dev/block/boot if=patched_boot.img
These users thanked the author joerg for the post:
muhgo (Sat Apr 13, 2019 4:24 pm)

User avatar
tobetter
Posts: 3528
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 24 times
Been thanked: 95 times
Contact:

Re: [HowTo] Install Magisk

Unread post by tobetter » Tue Mar 12, 2019 4:31 pm

joerg wrote:
Tue Mar 12, 2019 4:19 pm
mad_ady wrote:
Mon Mar 04, 2019 4:26 am
Nice guide. But can't you flash the patched boot.img with dd from within the OS, the same way you extracted it?
I can confirm that it works this way.
dd of=/dev/block/boot if=patched_boot.img
+1, that command would work on Android itself and this command would also work on the desktop.

Code: Select all

dd if=patched_boot.img of=<your/memory/card> bs=512 seek=6416 conv=fsync

User avatar
mad_ady
Posts: 6046
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 107 times
Been thanked: 67 times
Contact:

Re: [HowTo] Install Magisk

Unread post by mad_ady » Tue Mar 12, 2019 6:00 pm

I find the reversal of if and of confusing :D Must be my old age :)

joerg
Posts: 881
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 4 times
Been thanked: 11 times
Contact:

Re: [HowTo] Install Magisk

Unread post by joerg » Tue Mar 12, 2019 9:56 pm

Ha, it's caused by my laziness. ;)

Found that install Magisk breaks adb root:

Code: Select all

adb root: adbd cannot run as root in production builds
adb remount
Not running as root. Try "adb root" first.
After mount -o remount,rw /system:

Code: Select all

adb push fs/nls/nls_utf8.ko /system/lib/modules
failed to copy 'fs/nls/nls_utf8.ko' to '/system/lib/modules/nls_utf8.ko': fchown failed: Operation not permitted

User avatar
codewalker
Posts: 625
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Has thanked: 17 times
Been thanked: 15 times
Contact:

Re: [HowTo] Install Magisk

Unread post by codewalker » Thu Apr 11, 2019 6:00 pm

Thank you.
After Installing Magisk, su become available.
Screenshot_20190411-085329.png
Screenshot_20190411-085329.png (99.85 KiB) Viewed 1697 times
Screenshot_20190411-085344.png
Screenshot_20190411-085344.png (71.34 KiB) Viewed 1697 times

User avatar
poincare
Posts: 34
Joined: Sun Feb 08, 2015 9:41 am
languages_spoken: English, German, French
ODROIDs: ODROID XU4, ODROID C2, ODROID N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: [HowTo] Install Magisk

Unread post by poincare » Sat Apr 13, 2019 9:34 pm

From the OP, at Step 2 ("Install MagiskManager" v7), is that just from the Google Play Store or are you using something like Aptoide, etc.?

User avatar
tobetter
Posts: 3528
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 24 times
Been thanked: 95 times
Contact:

Re: [HowTo] Install Magisk

Unread post by tobetter » Sat Apr 13, 2019 9:54 pm

poincare wrote:
Sat Apr 13, 2019 9:34 pm
From the OP, at Step 2 ("Install MagiskManager" v7), is that just from the Google Play Store or are you using something like Aptoide, etc.?
https://magiskmanager.com/

SAM41
Posts: 17
Joined: Wed Feb 20, 2019 6:48 pm
languages_spoken: german, english
ODROIDs: none yet
Has thanked: 2 times
Been thanked: 5 times
Contact:

Re: [HowTo] Install Magisk

Unread post by SAM41 » Sat May 18, 2019 1:52 am

tobetter wrote:
Sat Apr 13, 2019 9:54 pm
poincare wrote:
Sat Apr 13, 2019 9:34 pm
From the OP, at Step 2 ("Install MagiskManager" v7), is that just from the Google Play Store or are you using something like Aptoide, etc.?
https://magiskmanager.com/
I wouldn't use that site.
Magisk does NOT have a website. Do NOT download Magisk from unofficial sites
https://forum.xda-developers.com/apps/m ... s-t3473445
These users thanked the author SAM41 for the post (total 2):
joerg (Sat May 18, 2019 6:39 am) • odroid (Tue May 21, 2019 8:41 am)

Kernel
Posts: 20
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 9 times
Been thanked: 1 time

Re: [HowTo] Install Magisk for Super-User root access

Unread post by Kernel » Wed May 29, 2019 5:59 am

joerg wrote:
Mon Mar 04, 2019 12:35 am
2. Install MagiskManager, actual the version 7.0.0
3. In MagiskManager press on Install (Magisk) and select 'Patch Boot Image File'. Search for the boot.img in folder 'Download'. MagiskManager will produce now a patched_boot.img and store it in Download folder.
I followed these steps using MagiskManager v 7.2.0 from
https://github.com/topjohnwu/Magisk/releases
https://github.com/topjohnwu/Magisk/rel ... ger-v7.2.0
That is linked as the official github from the XDA thread and when I select install to .img and the animation finishes it never produces a "patched_boot.img" and remains "boot.img".
Is this a file permission issue or possibly a bug with the newer version of MagiskManager?
I ended up making a backup and flashing the .img and it remained the same without root so it appears that it never modified the boot.img at all.
I'll try again later with version 7.0.0 when I get some time and verify the owner/group permissions.

User avatar
codewalker
Posts: 625
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Has thanked: 17 times
Been thanked: 15 times
Contact:

Re: [HowTo] Install Magisk for Super-User root access

Unread post by codewalker » Wed May 29, 2019 9:29 am

https://codewalkerster.blogspot.com/201 ... droid.html
Kernel wrote:
Wed May 29, 2019 5:59 am
joerg wrote:
Mon Mar 04, 2019 12:35 am
2. Install MagiskManager, actual the version 7.0.0
3. In MagiskManager press on Install (Magisk) and select 'Patch Boot Image File'. Search for the boot.img in folder 'Download'. MagiskManager will produce now a patched_boot.img and store it in Download folder.
I followed these steps using MagiskManager v 7.2.0 from
https://github.com/topjohnwu/Magisk/releases
https://github.com/topjohnwu/Magisk/rel ... ger-v7.2.0
That is linked as the official github from the XDA thread and when I select install to .img and the animation finishes it never produces a "patched_boot.img" and remains "boot.img".
Is this a file permission issue or possibly a bug with the newer version of MagiskManager?
I ended up making a backup and flashing the .img and it remained the same without root so it appears that it never modified the boot.img at all.
I'll try again later with version 7.0.0 when I get some time and verify the owner/group permissions.
These users thanked the author codewalker for the post:
loznic89 (Fri Jun 14, 2019 5:27 am)

Kernel
Posts: 20
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 9 times
Been thanked: 1 time

Re: [HowTo] Install Magisk for Super-User root access

Unread post by Kernel » Wed May 29, 2019 10:16 am

Thanks for the link codewalker!
I'll be sure to have another go at it.

Kernel
Posts: 20
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 9 times
Been thanked: 1 time

Re: [HowTo] Install Magisk for Super-User root access

Unread post by Kernel » Thu May 30, 2019 8:40 am

Initially I had the same issue when I followed Codewalker's tutorial but I reinstalled the MagiskManager apk and this time it asked for access to storage and I clicked yes and it was able to patch the image so it was just a permission issue after all.

I can confirm that I have root working now with the newest Android image version:20190523 and MagiskManager 7.2.0.
Thanks for the help guys!

systemservice
Posts: 29
Joined: Wed Apr 10, 2019 4:39 pm
languages_spoken: english, german
ODROIDs: ODROID-N2
Location: Germany
Has thanked: 1 time
Been thanked: 0
Contact:

Re: [HowTo] Install Magisk for Super-User root access

Unread post by systemservice » Mon Jun 03, 2019 7:40 pm

I have found out that after rooting with Magisk the screen rotation setting is lost (if the screen was rotated portrait it will be rotated landscape after rooting with Magisk doing it codewalker's way).

Sholander
Posts: 31
Joined: Wed Jun 05, 2019 1:02 am
languages_spoken: english
ODROIDs: ODROID N2
Has thanked: 0
Been thanked: 3 times
Contact:

Re: [HowTo] Install Magisk for Super-User root access

Unread post by Sholander » Wed Jun 12, 2019 6:19 pm

Is root access lost after OTA update, and the procedure to get it has to be repeated ?
These users thanked the author Sholander for the post:
loznic89 (Fri Jun 14, 2019 7:10 am)

User avatar
tobetter
Posts: 3528
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 24 times
Been thanked: 95 times
Contact:

Re: [HowTo] Install Magisk for Super-User root access

Unread post by tobetter » Wed Jun 12, 2019 6:22 pm

Probably it is, since most update today include the new boot image and it will replace the boot image installed and su is enabled.

"Tapatalk wishes you to have fun with ODROID"


loznic89
Posts: 6
Joined: Tue May 07, 2019 8:01 am
languages_spoken: spanish
ODROIDs: Odroid N2
Has thanked: 9 times
Been thanked: 1 time
Contact:

Re: [HowTo] Install Magisk for Super-User root access

Unread post by loznic89 » Fri Jun 14, 2019 5:29 am

codewalker wrote:
Wed May 29, 2019 9:29 am
https://codewalkerster.blogspot.com/201 ... droid.html
Kernel wrote:
Wed May 29, 2019 5:59 am
joerg wrote:
Mon Mar 04, 2019 12:35 am
2. Install MagiskManager, actual the version 7.0.0
3. In MagiskManager press on Install (Magisk) and select 'Patch Boot Image File'. Search for the boot.img in folder 'Download'. MagiskManager will produce now a patched_boot.img and store it in Download folder.
I followed these steps using MagiskManager v 7.2.0 from
https://github.com/topjohnwu/Magisk/releases
https://github.com/topjohnwu/Magisk/rel ... ger-v7.2.0
That is linked as the official github from the XDA thread and when I select install to .img and the animation finishes it never produces a "patched_boot.img" and remains "boot.img".
Is this a file permission issue or possibly a bug with the newer version of MagiskManager?
I ended up making a backup and flashing the .img and it remained the same without root so it appears that it never modified the boot.img at all.
I'll try again later with version 7.0.0 when I get some time and verify the owner/group permissions.
thank you bro, working. and too finally adb and fastboot work in my windows 10 thanks to shoolander

Post Reply

Return to “Android”

Who is online

Users browsing this forum: benwillcox and 1 guest