Unlocking Bootloader/ Magisk Attempt

ishockwave

New member
Nov 13, 2020
1
0
0
att variant

just wanted to add i followed this thread as of 11/10/2020 to unlock and root my surface duo. definitely had me confused since its been awhile for me rooting any device. but a few things that were mandatory and all 3 devices i did.

1-dev options and usb debug reboot into bootloader and unlock_critical.

2-get boot image from Microsoft support to match your build. extract payload.bin and place boot image on surface duo.

3-use magisk to patch the original boot file you placed on duo.

4-reboot into bootloader and boot magisk_patched image

5-after booted adb shell and continue to make permanent section. done.

this by no means is a guide just hopefully connects some dots. i will say anyone after reboot experiencing unresponsive ness DO NOT PANIC. i experienced it every time on each device i simply held down power button until it rebooted itself and it was like it never happened. also after the initial reboot from unlocking the bootloader if you reboot device anymore than once before booting with magisk patched image. the su or root request will not work. hope this helps in some way.
 

LocBox

Senior Member
Aug 16, 2009
105
12
38
OP should mark that the original listed Magisk patched file is for AT&T to forewarn Unlocked users. Unlocked users need the img file from Page 12, and then extract the payload.bin and Magisk patch that.
 

LocBox

Senior Member
Aug 16, 2009
105
12
38
To unroot, you could sideload restore the whole recovery image as suggested by @AndroidFileHost.
I prefer to just restore the original boot image from before the magisk patch.

!!! Before writing either a magisk patched or a stock boot image:
  • Make sure the boot image matches the build you are currently running (Settings | About | Build number)
  • Make sure the boot image matches your Surface Duo variant (Unlocked vs. AT&T)
Remember, you can test a boot image to ensure it works as expected prior to making it "permanent" with:
Code:
adb reboot bootloader
fastboot boot YOUR_IMAGE_NAME_HERE.img
If you have the proper stock boot image, boot from your rooted image and write the stock image just like the magisk patched image was first written:
Code:
adb shell
su
dd of=/dev/block/by-name/boot_b if=/sdcard/boot.img
dd of=/dev/block/by-name/boot_a if=/sdcard/boot.img
Again, no promises on keeping these links alive, but here are some stock boot images if you didn't keep a backup... ;)

Stock Unlocked Variant 2020.812.86:
boot_2020.812.86.img (96 MB; SHA-1: 9604C31D8E2DE136D5175A2195BF68992F0E68BA)
Stock Unlocked Variant 2020.910.72:
boot_2020.910.72.img (96 MB; SHA-1: C9D455AAE1DBD5F85E66BB65711D91F8BEA694E7)
when i do the adb command, it just sits at $Duo. i reset the phone and root is gone.

---------- Post added at 09:41 PM ---------- Previous post was at 08:58 PM ----------

when i do the adb command, it just sits at $Duo. i reset the phone and root is gone.
nvm i figured it out. had to type out each line.
 

LocBox

Senior Member
Aug 16, 2009
105
12
38
Mini-Guide for Monthly Security Update w/ Root

Through more of my trials and errors i figured out what was meant earlier about mismatching patched boot.imgs, which WILL cause your touch input to stop working. The cleanest way to do this all is like @arcanemagick said. Thanks Again :good:

1. Download the latest image off of Microsoft's site: https://support.microsoft.com/en-us/surfacerecoveryimage

2. Extract the boot.img out of payload.bin: https://nerdschalk.com/how-to-extract-payload-bin-from-ota-update-or-firmware/

3. Follow the flashing guide using the boot.img instead of magisk_patched.img:

adb reboot bootloader
fastboot boot boot.img

4. Place boot.img in the root of Internal SD; Make it permanent:

adb shell
su
dd of=/dev/block/by-name/boot_b if=/sdcard/boot.img
dd of=/dev/block/by-name/boot_a if=/sdcard/boot.img

5. Restart phone and run OTA update

6. Download the latest Magisk Manager. Open and hit the top install button. Select patch a file, and select your boot.img. Patch it, and it should show up in your Downloads folder renamed magisk_patched.img.

7. After it's done, run the rooting process like before this time using
magisk_patched.img:

adb reboot bootloader
fastboot boot magisk_patched.img

8. Place magisk_patched.img in the root of Internal SD; Make it permanent:

adb shell
su
dd of=/dev/block/by-name/boot_b if=/sdcard/magisk_patched.img
dd of=/dev/block/by-name/boot_a if=/sdcard/magisk_patched.img

9. Restart/ Done
*Currently running November's update with full root.

this..was..hard. :silly:
 
Last edited:
  • Like
Reactions: loloudoudara

LocBox

Senior Member
Aug 16, 2009
105
12
38
Original: boot_2020.910.72.img (96 MB; SHA-1: C9D455AAE1DBD5F85E66BB65711D91F8BEA694E7)
Patched: magisk_patched_2020.910.72.img (57 MB; SHA-1: 1D5B332CF7595E4FEEF44DC5B4626F6852DBA2CE)

No promises on keeping these links available of course. :p

Do you have any idea why ramdisk access is showing no? It's rooted but i can't use magisk really. Theres no modules to pick..
 

arcanemagick

Member
Oct 22, 2013
6
0
0
Do you have any idea why ramdisk access is showing no? It's rooted but i can't use magisk really. Theres no modules to pick..
I thought mine had always shown Ramdisk No.
Magisk considers that most devices fall into a particular type, from Type I to Type IV (see https://topjohnwu.github.io/Magisk/boot.html). I'm speculating here... It seems that starting with Type III devices, Magisk may not be able to tell if the kernel will load patched initramfs files. It therefore marks Ramdisk as No to suggest that a systemless root might not be possible, or the recovery image might need to be patched instead. I believe the Surface Duo would be classified as a Type IV device, but the same limitation in knowing that boot/recovery image patching will work might apply. It has been empirically found that patching the boot image does work for the Duo, so I guess we can ignore Ramdisk No.
:D

Regarding Magisk modules: I am not using any. I currently just use Magisk for root. I have used Xposed in the past, but that was before the days of Magisk. That said, I do see all the modules on the Modules page. However, if you are seeing "Latest: N/A," on the Home page, that perhaps suggests a connection problem which could also be preventing the list of online modules from loading.
:confused:
 

capmusicman

New member
Nov 23, 2020
1
0
0
Recovery Mode vs Fastboot mode

I have the factory unlocked Duo. I can get it to boot into recovery mode, but for some reason I can't get it to boot into fastboot. I've tried the reboot>>volume down+power>>release on fastboot screen, but it just boots up like normal.

What am I doing wrong? There is very little instruction on the interwebs on how to do this.
 

jimmng

Member
Jan 11, 2013
37
3
8
Can someone explain how to do this like I'm 2 years old please? I'm willing to try but I don't wanna screw up my device since there's no warranty cause I've imported it to Aus