[HowTo] Install Magisk for Super-User root access

Post Reply
joerg
Posts: 873
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 1 time
Been thanked: 6 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 2):
codewalker (Fri Apr 12, 2019 7:15 am) • muhgo (Sat Apr 13, 2019 3:41 pm)

User avatar
mad_ady
Posts: 5838
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 72 times
Been thanked: 41 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: 873
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 1 time
Been thanked: 6 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: 873
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 1 time
Been thanked: 6 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: 3277
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: 17 times
Been thanked: 69 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: 5838
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 72 times
Been thanked: 41 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: 873
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 1 time
Been thanked: 6 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: 587
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Has thanked: 5 times
Been thanked: 6 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 681 times
Screenshot_20190411-085344.png
Screenshot_20190411-085344.png (71.34 KiB) Viewed 681 times

User avatar
poincare
Posts: 29
Joined: Sun Feb 08, 2015 9:41 am
languages_spoken: English, German, French
ODROIDs: ODROID XU4, ODROID C2, ODROID N2
Has thanked: 0
Been thanked: 0
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: 3277
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: 17 times
Been thanked: 69 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: 12
Joined: Wed Feb 20, 2019 6:48 pm
languages_spoken: german, english
ODROIDs: none yet
Has thanked: 1 time
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)

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 0 guests