Unlocking Bootloader/ Magisk Attempt

Perseu5

Member
Apr 14, 2016
16
0
0
Just updated it for you guys. I have a link to the boot image. Make sure you are unlock_critical for the bootloader. This is "tethered" meaning after reboot you have to boot the image again. Working on a permanent solution currently!
 

bggold

Senior Member
Sep 13, 2013
1,047
359
103
I am excited to see progress. There must be a way to repack the factory image with the modified boot.img. I have been researching this and found a windows app that would do this but fails. It is called SUR 2.0.

Was thinking we could dirty flash the zip with adb sideload.

I will keep researching this on my end and update if I find something.
 

bggold

Senior Member
Sep 13, 2013
1,047
359
103
Alright you wonderful people, I now have a permanent root method for our beloved Surface Duo's! Updating here soon after some testing!
Great news would you mind updating the boot.img too? I tried and after booting the patched one it boots back to the bootloader. I tried patching the file from magisk manager with and without the recovery option checked.

Thanks
 

Perseu5

Member
Apr 14, 2016
16
0
0
JUST UPDATED! I will have an app streamlining the process for you all by the end of the week.
Also, make sure youre unlock_critical and you may have to run "fastboot boot magisk_patched.img" a second time if it fails the first time. Flashing the boot works perfectly fine so far.
 

jgoorn

Senior Member
Sep 10, 2018
78
20
0
MAGISK FULL GUIDE (APK for install and other mods coming soon!)

The bootloader unlock is pretty similar to any other phone.
Go to settings>about> click on build number until developer options are enabled. Go back and select system>Developer Options. Make sure to enable OEM unlocking.
(On PC) "adb reboot bootloader", "fastboot flashing unlock_critical", use volume to select unlock. THIS WILL ERASE ALL CONTENT ON YOUR DEVICE.

IF YOU DONT WANT TO DO THIS FROM SCRATCH, SKIP TO PART 2
Go to https://support.microsoft.com/en-us/surfacerecoveryimage
Select Surface Duo from the drop down
Enter your serial number and download the file
Extract the firmware .zip
Extract the Payload file
Moved bootloader to root
Installed Magisk Manager apk and patched bootloader image
Attempted to flash which resulted in "cannot write to partition_b"

PART 2:
download the patched magisk_boot.img from here https://drive.google.com/file/d/1-7NWj8_jFH8AtpTTpXITOv1eh-wo7xlz/view?usp=sharing
adb reboot bootloader
fastboot boot magisk_patched.img

PART 3 - All right, lets make it permanent!
Place magisk_patched.img on your sd root

adb shell
su
cd /dev/platform/soc/*/by-name/
chmod 777 boot_a
chmod 777 boot_b

DEV=$(ls /dev/block/platform/soc/*/by-name/boot_b); echo $DEV
dd of=$DEV if=/sdcard/magisk_patched.img
DEV=$(ls /dev/block/platform/soc/*/by-name/boot_a); echo $DEV
dd of=$DEV if=/sdcard/magisk_patched.img

Reboot and we are good!
I am working on an app to streamline the process as well as provide additional mods and addons to the device. I hope to have something for you guys by the end of the week.
I do plan on streaming some of this stuff (twitch.tv/goingh0st), and am working on a section of my discord for the same thing (World of Gh0st)
Thank you for your support and I cant wait to get more stuff to you guys!
I am trying this out and whenever I get to this step (cd /dev/platform/soc/*/by-name/) I get : No such file or directory from ADB.

Do I need to replace the * with something and if so how/what? Thank you.
 
Last edited:

Perseu5

Member
Apr 14, 2016
16
0
0
I am trying this out and whenever I get to this step (cd /dev/platform/soc/*/by-name/) I get : No such file or directory from ADB.

Do I need to replace the * with something and if so how/what? Thank you.

Sorry! Do cd dev/block/by-name/ instead

Just updated the tutorial again to reflect this.
 
Last edited:

bggold

Senior Member
Sep 13, 2013
1,047
359
103
Happy to help! I love doing this kind of stuff.
Sorry, updated again lol. I was at work when I made the first edit lol.
Just wanted to thank you and let you know works like a chance on the first try. Can I ask how you patched the boot.img. when I have tried it just boots back to the bootloader. I am using your patched file currently and wanted to update to the latest canary.

Thanks for the great work.
 

Brutal-Force

Senior Member
Jan 2, 2009
414
7
0
D:\ADB Tools\ADB Tools>fastboot flashing unlock_critical
OKAY [ 0.071s]
Finished. Total time: 0.071s

D:\ADB Tools\ADB Tools>adb reboot bootloader



D:\ADB Tools\ADB Tools>fastboot boot magisk_patched.img
Sending 'boot.img' (58100 KB) OKAY [ 1.308s]
Booting FAILED (remote: 'Fastboot boot command is not available in locked device')

I wish I could say it went smoothly for me. Any suggestions where I went wrong. I should technically be unlocked, but its saying this command is not available in a locked device.
 

jgoorn

Senior Member
Sep 10, 2018
78
20
0
D:\ADB Tools\ADB Tools>fastboot flashing unlock_critical
OKAY [ 0.071s]
Finished. Total time: 0.071s

D:\ADB Tools\ADB Tools>adb reboot bootloader



D:\ADB Tools\ADB Tools>fastboot boot magisk_patched.img
Sending 'boot.img' (58100 KB) OKAY [ 1.308s]
Booting FAILED (remote: 'Fastboot boot command is not available in locked device')

I wish I could say it went smoothly for me.
You must have only done unlock critical.

Try this
C:\ADB Tools\ADB Tools>fastboot flashing unlock
 

Brutal-Force

Senior Member
Jan 2, 2009
414
7
0
You must have only done unlock critical.

Try this
C:\ADB Tools\ADB Tools>fastboot flashing unlock
That worked. Thanks,

---------- Post added at 10:16 PM ---------- Previous post was at 10:05 PM ----------

That worked. Thanks,
D:\ADB Tools\ADB Tools>adb shell
duo:/ $ su
Permission denied
13|duo:/ $

Tried as administrator as well. Normally no su = no root.

Do I need to install superuser first? or Magisk App?
 
Last edited: