[HowTo] Install Magisk for Super-User root access

User avatar
joerg
Posts: 1117
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 50 times
Been thanked: 118 times
Contact:

[HowTo] Install Magisk for Super-User root access

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 4):
codewalker (Fri Apr 12, 2019 7:15 am) • muhgo (Sat Apr 13, 2019 3:41 pm) • FntX (Fri Jun 14, 2019 2:31 am) • toffler19 (Mon Jan 06, 2020 8:25 am)

User avatar
mad_ady
Posts: 8156
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 568 times
Been thanked: 404 times
Contact:

Re: [HowTo] Install Magisk

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?

User avatar
joerg
Posts: 1117
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 50 times
Been thanked: 118 times
Contact:

Re: [HowTo] Install Magisk

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.

User avatar
joerg
Posts: 1117
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 50 times
Been thanked: 118 times
Contact:

Re: [HowTo] Install Magisk

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: 5211
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: 176 times
Been thanked: 546 times
Contact:

Re: [HowTo] Install Magisk

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: 8156
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 568 times
Been thanked: 404 times
Contact:

Re: [HowTo] Install Magisk

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 :)

User avatar
joerg
Posts: 1117
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 50 times
Been thanked: 118 times
Contact:

Re: [HowTo] Install Magisk

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: 972
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Has thanked: 35 times
Been thanked: 60 times
Contact:

Re: [HowTo] Install Magisk

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 17832 times
Screenshot_20190411-085344.png
Screenshot_20190411-085344.png (71.34 KiB) Viewed 17832 times

User avatar
poincare
Posts: 39
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

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: 5211
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: 176 times
Been thanked: 546 times
Contact:

Re: [HowTo] Install Magisk

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

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: 32
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 18 times
Been thanked: 4 times

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

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: 972
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Has thanked: 35 times
Been thanked: 60 times
Contact:

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

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: 32
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 18 times
Been thanked: 4 times

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

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: 32
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 18 times
Been thanked: 4 times

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

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: 55
Joined: Wed Apr 10, 2019 4:39 pm
languages_spoken: english, german
ODROIDs: ODROID-N2
Location: Germany
Has thanked: 1 time
Been thanked: 2 times
Contact:

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

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: 140
Joined: Wed Jun 05, 2019 1:02 am
languages_spoken: english
ODROIDs: ODROID N2
Has thanked: 0
Been thanked: 15 times
Contact:

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

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: 5211
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: 176 times
Been thanked: 546 times
Contact:

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

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: 21
Joined: Tue May 07, 2019 8:01 am
languages_spoken: spanish
ODROIDs: Odroid N2
Has thanked: 13 times
Been thanked: 3 times
Contact:

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

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

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

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

Post by systemservice » Fri Jul 19, 2019 8:29 pm

After installing updatepackage-odroidn2-eng-s922_9.0.0_master-20190719.zip the root was lost again as always.

But than, after rooting again with the same Magisk v19.3 and Magisk Manager v7.3.2 as before and rebooting,
the following popup appear: "There's an internal problem with your device. Contact manufacture for details".

Also the screen rotation setting is lost, but it also had happened before. The error popup however, means something critial.

There are so many messages in logcat, I don't know which of them are related to this popup.

Can anybody reproduce this issue by installing updatepackage-odroidn2-eng-s922_9.0.0_master-20190719.zip and rooting with Magisk v19.3?

It'd be nice if you included root in the image, because it is lost on each update AND errors like this may happen.

i82blikeu
Posts: 4
Joined: Mon Apr 18, 2016 6:08 am
languages_spoken: english
Has thanked: 2 times
Been thanked: 0
Contact:

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

Post by i82blikeu » Sat Jul 20, 2019 12:16 am

Same happened here without the "screen rotation setting" thing.

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

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

Post by systemservice » Sat Jul 20, 2019 12:27 am

Good that you have tested it, because otherwise I would think I did something wrong.
i82blikeu wrote:
Sat Jul 20, 2019 12:16 am
Same happened here without the "screen rotation setting" thing.
I think you would also get it if you set the screen rotation to portrait BEFORE rooting, than after rooting and reboot it will change to landscape, but than you can change it quickly back to portrait ,
so it's not a big problem for me.
Much more important area 1) preserve root on updates, and 2) make root work without the critical error in popup.

User avatar
voodik
Posts: 1839
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: armenian, english, russian
Location: Armenia
Has thanked: 35 times
Been thanked: 220 times
Contact:

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

Post by voodik » Sat Jul 20, 2019 1:45 am

systemservice wrote:
Sat Jul 20, 2019 12:27 am
Good that you have tested it, because otherwise I would think I did something wrong.
i82blikeu wrote:
Sat Jul 20, 2019 12:16 am
Same happened here without the "screen rotation setting" thing.
I think you would also get it if you set the screen rotation to portrait BEFORE rooting, than after rooting and reboot it will change to landscape, but than you can change it quickly back to portrait ,
so it's not a big problem for me.
Much more important area 1) preserve root on updates, and 2) make root work without the critical error in popup.
You can try LineageOS-16.0 build. It's pre-rooted from stock.
viewtopic.php?f=178&t=35690
Buy me a beer ;)
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY :!:
https://github.com/voodik/puttyadb/releases

linuxo
Posts: 6
Joined: Thu May 16, 2019 1:19 am
languages_spoken: english
ODROIDs: U2, C1, C2, N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

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

Post by linuxo » Tue Jul 23, 2019 5:49 pm

With the newest magisk and odroid image I'm also getting an error popup after startup:

Image

"Android System - There's an internal problem with your device. Contact your manufacturer for details"

Odroid: odroidn2-eng 9 PQ3A.190705.001 20190719 test-keys
Magisk: 19.4-736729f5 (19307)
Magisk Manager: 7.3.3-f1112fdf (228)

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

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

Post by systemservice » Thu Aug 01, 2019 6:51 pm

Few questions to codewalker & Co.:
1. Do you think it's an issue of Magisk and should be reported to Magisk community, or do you think it is caused by your modifications of AOSP and can only be fixed by you?
2. Idea: what if you add root to the image the same way as LineageOS did it - it's not enabled by default but the user can enable it in Developer Options, su binary is already included if built with "export WITH_SU=true". Probably it's not too much work if you can reuse some source code of LineageOS?

User avatar
voodik
Posts: 1839
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: armenian, english, russian
Location: Armenia
Has thanked: 35 times
Been thanked: 220 times
Contact:

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

Post by voodik » Thu Aug 01, 2019 8:46 pm

systemservice wrote:
Thu Aug 01, 2019 6:51 pm
Few questions to codewalker & Co.:
1. Do you think it's an issue of Magisk and should be reported to Magisk community, or do you think it is caused by your modifications of AOSP and can only be fixed by you?
2. Idea: what if you add root to the image the same way as LineageOS did it - it's not enabled by default but the user can enable it in Developer Options, su binary is already included if built with "export WITH_SU=true". Probably it's not too much work if you can reuse some source code of LineageOS?
It's much, because lot of framework modifications in lineage to have a own root.
Buy me a beer ;)
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY :!:
https://github.com/voodik/puttyadb/releases

Vasant
Posts: 139
Joined: Mon Jan 19, 2015 3:44 pm
languages_spoken: english
ODROIDs: Odroid-c1
Has thanked: 0
Been thanked: 12 times
Contact:

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

Post by Vasant » Fri Sep 13, 2019 4:40 am

I just installed the latest Magisk and su works fine but when I run a script that needs root access it fails.
The same script is run from my Android application via "su -c command", which also fails.
I switched to Lineage OS enabled root access and application works correctly.
My conclusion is that Magisk is not fully functional and I hope HK will provide a rooted image.

minoccio
Posts: 36
Joined: Thu Sep 12, 2019 3:20 pm
languages_spoken: Italian
ODROIDs: N2
Has thanked: 13 times
Been thanked: 4 times
Contact:

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

Post by minoccio » Thu Sep 19, 2019 11:30 pm

joerg wrote:
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
Does it only work with a pc? I tried with terminal emulator but the response is "dd: /dev/block/boot: Permission denied"

User avatar
joerg
Posts: 1117
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 50 times
Been thanked: 118 times
Contact:

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

Post by joerg » Fri Sep 20, 2019 2:19 am

I think you need a adb shell. If you are working with a windows pc, you need some adb driver to install. You can get them from here: https://adb.clockworkmod.com/.
Once you have, you open a cmd window and give the command adb shell. Then you'll have a shell with root permission and the dd should work.
These users thanked the author joerg for the post:
minoccio (Fri Sep 20, 2019 2:40 pm)

goenjoy
Posts: 1
Joined: Tue Aug 06, 2019 6:23 pm
languages_spoken: english
ODROIDs: ODROID N1
Has thanked: 0
Been thanked: 0
Contact:

Re: [HowTo] Install Magisk

Post by goenjoy » Thu Oct 10, 2019 7:00 pm

joerg wrote:
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
Unable adb remount.
Is there a solution to this problem?

minoccio
Posts: 36
Joined: Thu Sep 12, 2019 3:20 pm
languages_spoken: Italian
ODROIDs: N2
Has thanked: 13 times
Been thanked: 4 times
Contact:

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

Post by minoccio » Fri Oct 18, 2019 12:18 am

magisk installed, but adaway doesn't work :(

User avatar
mad_ady
Posts: 8156
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 568 times
Been thanked: 404 times
Contact:

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

Post by mad_ady » Fri Oct 18, 2019 2:00 am

If you're using magisk try energized module which does dns filtering.
These users thanked the author mad_ady for the post:
minoccio (Fri Oct 18, 2019 4:27 pm)

Kernel
Posts: 32
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 18 times
Been thanked: 4 times

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

Post by Kernel » Thu Oct 24, 2019 3:17 am

I can confirm that Magisk root is working with (as of now) the newest Android 64-bit image (20191018) with Magisk Manager v7.3.5, and Magisk v20.
These users thanked the author Kernel for the post:
odroid (Wed Oct 30, 2019 11:04 am)

Argentum_90
Posts: 16
Joined: Sat Nov 02, 2019 1:42 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

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

Post by Argentum_90 » Sat Nov 02, 2019 6:41 am

When I write

Code: Select all

dd if=/dev/block/boot of=boot.img
command, I get Permission Denied.
Why?

User avatar
mad_ady
Posts: 8156
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 568 times
Been thanked: 404 times
Contact:

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

Post by mad_ady » Sat Nov 02, 2019 2:33 pm

Are you root? What is your current working directory?

Argentum_90
Posts: 16
Joined: Sat Nov 02, 2019 1:42 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

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

Post by Argentum_90 » Sat Nov 02, 2019 3:03 pm

mad_ady wrote:
Sat Nov 02, 2019 2:33 pm
Are you root? What is your current working directory?
No, I am not root. I thought these steps were for rooting the Odroid.

How can I root then?

Thanks

User avatar
mad_ady
Posts: 8156
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 568 times
Been thanked: 404 times
Contact:

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

Post by mad_ady » Sat Nov 02, 2019 5:47 pm

Hmm, you may not have permission on reading that block device. I wonder how joerg did it

User avatar
joerg
Posts: 1117
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 50 times
Been thanked: 118 times
Contact:

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

Post by joerg » Sat Nov 02, 2019 7:51 pm

I think, you need adb root and then open a adb shell. But as I already stated, after magisk is installed, you can‘t do again adb root.

Argentum_90
Posts: 16
Joined: Sat Nov 02, 2019 1:42 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

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

Post by Argentum_90 » Sun Nov 03, 2019 8:28 pm

But how to root previously the N2?

User avatar
joerg
Posts: 1117
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 50 times
Been thanked: 118 times
Contact:

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

Post by joerg » Mon Nov 04, 2019 1:58 am

When I try it on a fresh installed system, it works:

Code: Select all

joerg@JW-Mint ~ $ adb shell
odroidn2:/ # cd /storage/emulated/0/Download
odroidn2:/storage/emulated/0/Download # dd if=/dev/block/boot of=boot.img
32768+0 records in
32768+0 records out
16777216 bytes transferred in 0.265 secs (63310249 bytes/sec)
odroidn2:/storage/emulated/0/Download # 
You only need to open a adb shell on your host computer. In that shell there is root access.

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

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

Post by Sholander » Thu Jan 23, 2020 7:52 am

I need some help with root access on a fresh install of Android Pie 64bit (20200110)

Did everything as suggested, got "boot.img" to Download folder, installed Magisk Manager 7.2.0, it updated to new version 7.5.1 (it would not work without update). The new version successfully patched "boot.img" to "magisk_patched.img". Then with fastboot flash boot magisk_patched.img replaced the boot on the uSD card. Rebooted N2 but there is no root access.
I checked that proper boot file was written, but Magisk Manager still shows that Magisk is not installed.
Is there anything that I missed, and how can I get root access on this Android Pie 64bit image ?

EDIT: The problem solved by "itself", without any changes made by me. I just fired up N2 today and there is now root access, so everything I did was OK.
I don't understand how this happened, because yesterday when I finished the procedure to get root access I rebooted N2 several times, and powered off/on several times without any effect... And then powering N2 today I have root :o

sshock
Posts: 18
Joined: Thu Dec 19, 2019 1:04 pm
languages_spoken: english
ODROIDs: XU4, C2, and N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

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

Post by sshock » Fri Feb 07, 2020 2:17 am

All, I need some help getting magisk to "stick". It installed fine and works almost all the time, but sometimes after a reboot it shows up as not installed in Magisk Manager and is indeed not working. However, rebooting again after that always makes it come back fine.

I haven't been able to determine exactly what triggers the problem, but it seems like almost anything I do (installing an app, changing a system setting, etc.) can randomly cause it to lose magisk on the next boot.

Anyone else seeing this problem and any ideas on how to go about diagnosing and fixing it? Thanks!

Eloise-Antoinette
Posts: 1
Joined: Fri Jan 17, 2020 12:50 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

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

Post by Eloise-Antoinette » Tue Feb 11, 2020 9:29 pm

sshock wrote:
Fri Feb 07, 2020 2:17 am
All, I need some help getting magisk to "stick". It installed fine and works almost all the time, but sometimes after a reboot it shows up as not installed in Magisk Manager and is indeed not working. However, rebooting again after that always makes it come back fine.

I haven't been able to determine exactly what triggers the problem, but it seems like almost anything I do (installing an app, changing a system setting, etc.) can randomly cause it to lose magisk on the next boot.

Anyone else seeing this problem and any ideas on how to go about diagnosing and fixing it? Thanks!
I had the same random issue, in fact Magisk isn't uninstall, the daemon randomly stop running. Here's the command : adb shell magisk --daemon

Seems we're not the only ones because a module has been created to fix this issue : https://forum.xda-developers.com/apps/m ... d-t3908748
It just automatically runs the adb command when magisk stop running.
Add it as a module directly in Magist didn't work for me, I had to directly paste the mgkd-helper.sh in the /sbin/.magisk/img/.core/service.d/ directory.
Hope it helps !
These users thanked the author Eloise-Antoinette for the post:
mad_ady (Tue Feb 11, 2020 9:39 pm)

sshock
Posts: 18
Joined: Thu Dec 19, 2019 1:04 pm
languages_spoken: english
ODROIDs: XU4, C2, and N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

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

Post by sshock » Wed Feb 12, 2020 9:40 am

Eloise-Antoinette wrote:
Tue Feb 11, 2020 9:29 pm
sshock wrote:
Fri Feb 07, 2020 2:17 am
All, I need some help getting magisk to "stick". It installed fine and works almost all the time, but sometimes after a reboot it shows up as not installed in Magisk Manager and is indeed not working. However, rebooting again after that always makes it come back fine.
I had the same random issue, in fact Magisk isn't uninstall, the daemon randomly stop running. Here's the command : adb shell magisk --daemon
Hi Eloise. I found that too a few weeks ago and tried it, and it does cause magisk to show up as installed, however it does not fully fix things, at least not for my case. Specifically, it doesn't cause the EdXposed module to start working, and that is what I really need.

sshock
Posts: 18
Joined: Thu Dec 19, 2019 1:04 pm
languages_spoken: english
ODROIDs: XU4, C2, and N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

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

Post by sshock » Tue Feb 25, 2020 5:23 pm

sshock wrote:
Fri Feb 07, 2020 2:17 am
All, I need some help getting magisk to "stick". It installed fine and works almost all the time, but sometimes after a reboot it shows up as not installed in Magisk Manager and is indeed not working. However, rebooting again after that always makes it come back fine.

I haven't been able to determine exactly what triggers the problem, but it seems like almost anything I do (installing an app, changing a system setting, etc.) can randomly cause it to lose magisk on the next boot.

Anyone else seeing this problem and any ideas on how to go about diagnosing and fixing it? Thanks!
I spent some time digging into this and discovered the problem: it's because there is a race condition between when the sd card gets loaded and when magiskinit does early mounting.

I created an issue here: https://github.com/topjohnwu/Magisk/issues/2487

I also created an issue for hardkernel linux here: https://github.com/hardkernel/linux/issues/390

In both issues I just added a note explaining how I am currently working around the problem.

gabesws
Posts: 1
Joined: Mon Mar 09, 2020 1:20 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

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

Post by gabesws » Mon Mar 09, 2020 8:56 am

I'm adding this after requesting feedback I found a solution for this,

It's much later after the original OP, but in case other users may come across it..

using the 64-bit android build, selfinstall-odroidn2-eng-s922_9.0.0_64_master-40-20200130.img.xz and MagiskManager being release 7.5.1.
(mind me saying to the odroid team --- the eMMCs do not come shipped with 64-bit on them, and only in 32-bit for Android 9, perhaps it is still beta for odroid?)

set to enabled 'com.android.shell' in the SuperUser tab of MagiskManager, and that is about it.

I was skeptical about this method because dd shouldn't be used when there is a mountpoint activated. Since /dev/block/boot is not mounted, it should be safe to use it for reading and writing...

Here I would like to mention a permanent fix for the "screen orientation" issue a few users were mentioning -- perhaps this is due for better correction within the android image, but I found that I can use an app called "Rotation - Orientation Manager"(by Pranav Pandey), and that got rid of all the random screen-orientation that was occurring with some of the apps installed.

cheers

Benzelite124
Posts: 46
Joined: Tue Apr 07, 2020 9:13 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 5 times
Been thanked: 0
Contact:

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

Post by Benzelite124 » Sun Apr 12, 2020 4:38 am

joerg wrote:
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 :)
Hello I am a very big amateur and was wondering if there is a video one this, I don't understand where you download magisk manager file on the odroid or in windows before you install it?

User avatar
joerg
Posts: 1117
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 50 times
Been thanked: 118 times
Contact:

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

Post by joerg » Sun Apr 12, 2020 2:44 pm

You can find it here: .
[edit]
Yes, thanks to @Scholander, this is better source: https://github.com/topjohnwu/Magisk/releases.
Last edited by joerg on Sun Apr 12, 2020 8:03 pm, edited 1 time in total.

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

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

Post by Sholander » Sun Apr 12, 2020 6:43 pm

Benzelite124 wrote:
Sun Apr 12, 2020 4:38 am

Hello I am a very big amateur and was wondering if there is a video one this, I don't understand where you download magisk manager file on the odroid or in windows before you install it?
Always install apps from trusted sources. Magisk does not have a website; original development and download is found only on GitHub.
Read all about in and download latest version only from here: https://github.com/topjohnwu/Magisk
These users thanked the author Sholander for the post:
joerg (Sun Apr 12, 2020 7:56 pm)

Benzelite124
Posts: 46
Joined: Tue Apr 07, 2020 9:13 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 5 times
Been thanked: 0
Contact:

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

Post by Benzelite124 » Mon May 11, 2020 2:19 am

joerg wrote:
Sun Apr 12, 2020 2:44 pm
You can find it here: .
[edit]
Yes, thanks to @Scholander, this is better source: https://github.com/topjohnwu/Magisk/releases.
hello I am trying to get magisk to give su access to your shutdown service app and I am getting stuck. I have done all the steps but I get stuck on fastboot. Whene I run the .\fastboot command in my pc adb it puts the odroid in fastboot. Then I try to do the fastboot flash command and it says waiting for device. I then have to unplug the odroid form the power and replug it to get it to restart back into odroid. I am using adb via wifi, is this the issue? I don't have an adb usb connection.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 4 guests