yashsingh1/xdaforums huggingface dataset:
[Microsoft Surface Duo Guides, News, & Discussion] jgoorn:
You need to boot the magisk patched image. Once you have that running you can run adb shell and then su.

Su is sudo so you will have to tap grant access on the notification/toast thing or you can open the magisk app and under the superuser tab you toggle the switch to grant root access to the "app" adb shell

Follow these steps:

PART 2:

download the patched magisk_boot.img from here https://drive.google.com/file/d/1-7N...ew?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
[Microsoft Surface Duo Guides, News, & Discussion] Brutal-Force:
duo:/dev/block/by-name # dd of=$DEV if=/sdcard/magisk_patched.img

dd: /sdcard/magisk_patched.img: No such file or directory

I keep getting this. I am so close I can taste it.

---------- Post added at 10:48 PM ---------- Previous post was at 10:47 PM ----------

Yes, I realized I needed the Magisk Manager. Its been a while since I rooted a phone.

I was able to get to dd of=$DEV and then it tells me No such file or directory.
[Microsoft Surface Duo Guides, News, & Discussion] jgoorn:
lol it is tasty...

on your phone access this link

PART 2:

download the patched magisk_boot.img from here https://drive.google.com/file/d/1-7NWj8_jFH8AtpTTpXITOv1eh-wo7xlz/view and copy it to the sdcard level (where you android / downloads/ music folder etc is) place it at the root level of that directory.

then run the commands you intend to do to flash the img
[Microsoft Surface Duo Guides, News, & Discussion] Brutal-Force:
Bingo, I have success. Thank you jgoorn.
[Microsoft Surface Duo Guides, News, & Discussion] Just about right:
Ok, I know I am missing something here. I try to do the fastboot flashing unlock or the critical_unlock, but all I get is "waiting for any device".

Any help is greatly appreciated.
[Microsoft Surface Duo Guides, News, & Discussion] jgoorn:
On your phone

Enable USB debugging in developer options.

Then connect to computer with USB a to c

Open your adb / fastboot on computer (I use minimal adb/fastboot)

Type adb devices

It should say there is a device.

Then type adb reboot bootloader

It should reboot into the bootloader you will see this on the left screen of the phone.

Then once you're in the bootloader you can unlock the bootloader with the fastboot commands you want to use. Unlock and unlock critical.
[Microsoft Surface Duo Guides, News, & Discussion] Just about right:
I am unlocked, but now it is just acting a fool.

I do the 2d step and all is well.

The magisk img is in the root folder.

I do adb shell and it works.

I type su and get Permission denied.

I feel like a noob, when I have rooted so many phones. This one is just killing me.
[Microsoft Surface Duo Guides, News, & Discussion] jgoorn:
Have you done what I mentioned in the above posts? I have quoted them to make it easy for you.
[Microsoft Surface Duo Guides, News, & Discussion] Just about right:
I know why you quoted everything, which I would have done the same. I did fastboot boot magisk_patched.img and it sent. The magisk_patched.img is in the root folder already. I type adb shell and it works. I type SU and get permission denied. What am I missing, because I know I am missing something. Do I need to install or sideload anything? I am reading about magisk, which I have never messed with, but am very familiar with twrp.

Just be patient with me, and I'll get through this.
[Microsoft Surface Duo Guides, News, & Discussion] jgoorn:
OK in your app search on your phone open the app magisk

Then connect phone to your computer and do the adb shell

Then do su

su will trigger a superuser request on your phone in magisk so you must grant it.

That is where you are getting stuck.

No worries it is an easy fix.
[Microsoft Surface Duo Guides, News, & Discussion] Just about right:
This is what I get -

duo:/ $ su

/system/bin/sh: su: inaccessible or not found

Check your PM.
[Microsoft Surface Duo Guides, News, & Discussion] gsmumbo:
Can this be added to the first post? I kept getting permission denied errors until I granted root to Shell in Magisk :)
[Microsoft Surface Duo Guides, News, & Discussion] jgoorn:
I am not op, just an enthusiastic duo user.
[Microsoft Surface Duo Guides, News, & Discussion] panzercool:
adb reboot bootloader

fastboot boot magisk_patched.img

after running that command, i get the below output in the command line

D:\Duo Apps\Duo Root\platform-tools>fastboot boot magisk_patched.img

creating boot image...

creating boot image - 59496448 bytes

Sending 'boot.img' (58102 KB) OKAY [ 1.254s]

Booting OKAY [ 10.167s]

Finished. Total time: 11.503s​

However, after that the phone reboots and is stuck on the Windows boot logo. What am I doing wrong?

(I can hold the power button to turn it off and reboot it normally. But everytime I try the above I run into the stalled windows reboot logo)

---------- Post added at 02:54 AM ---------- Previous post was at 02:31 AM ----------

HOLY S***

I am unable to login to the device now. Nothing I do works! Its stuck at the green start boot image thing. I tried choosing recovery and the phone reboots but comes back to the boot start screen!!!!! WTF!

I booting through the magisk_patched.img again but I run into the below error now!

D:\Duo Apps\Duo Root\platform-tools>fastboot boot magisk_patched.img

creating boot image...

creating boot image - 59496448 bytes

Sending 'boot.img' (58102 KB) OKAY [ 1.257s]

Booting FAILED (remote: 'Failed to load/authenticate boot image: Device Error')

fastboot: error: Command failed

D:\Duo Apps\Duo Root\platform-tools>​

I am unable move further from this screen! Can anyone help?
[Microsoft Surface Duo Guides, News, & Discussion] panzercool:
Alright I bricked my device lol! Getting a replacement now!

Moral of the story: Be careful with rooting! You will BRICK your device if something goes wrong!
[Microsoft Surface Duo Guides, News, & Discussion] jgoorn:
Please reset and then in your adb/fastboot do

> fastboot flashing unlock

> fastboot flashing unlock_critical.

If your phone erases during either of these steps your bootloader was not properly unlocked.

---------- Post added at 05:30 AM ---------- Previous post was at 05:29 AM ----------

wow, I don't understand how this happened!

This device bricked just after you unlocked your bootloader and attempted to boot the patched .img OP provided?
[Microsoft Surface Duo Guides, News, & Discussion] panzercool:
It says its already unlocked! I tried pushing the orginal boot.img from the recovery image but it does not write to any of the a/b partitions (fails)

I tried erasing the a/b partitions as well but it does not allow that

It does not load into recovery as well!

:crying:

---------- Post added at 04:34 AM ---------- Previous post was at 04:33 AM ----------

Yep! Thats exactly what happened!
[Microsoft Surface Duo Guides, News, & Discussion] Perseu5:
Install the magisk app
[Microsoft Surface Duo Guides, News, & Discussion] ghostENVY:
Been tinkering with the device but I'm wondering if its possible to flash a GSI, I've tried it with no luck.

I'm sure I'm doing something wrong with the commands

fastboot flash system

cool.img

Tried doing system_a also system_b but get an error that cannot write to that partition.
[Microsoft Surface Duo Guides, News, & Discussion] bggold:
Did you try a factory reset on recovery or go throught the steps to adb sideload the factory image?
[Microsoft Surface Duo Guides, News, & Discussion] panzercool:
Well, it does not boot into the recovery mode when I select it (using the volume button). It just reboots and goes back to the start boot mode! :( Is there anything we can do from the start mode (fastboot start mode)
[Microsoft Surface Duo Guides, News, & Discussion] bggold:
You might be able to fastboot boot the stock boot.img to get back in and copy the boot.ing to sd and use same steps as used to make root permanent and dd the stick boot image.

Or get into recovery a d do a factory reset.

Just a thought.
[Microsoft Surface Duo Guides, News, & Discussion] panzercool:
Sure, thank you! Let me try that! I
[Microsoft Surface Duo Guides, News, & Discussion] bggold:
Let us all know so others can use it if needed.
[Microsoft Surface Duo Guides, News, & Discussion] josh_zombie:
Managed to brick mine as well. Sending to Microsoft in the morning. Hoping they don't charge the ~ $650 I saw for an out of warranty repair.
[Microsoft Surface Duo Guides, News, & Discussion] panzercool:
If you have the Microsoft Complete you pay nothing for a replacement!
[Microsoft Surface Duo Guides, News, & Discussion] bggold:
I know all companies except google state that unlocking boot loader voids the warranty. Never had an issue before. But I spoke with microsoft before we got permanent root and l3 support said it will void the warranty.

Please try my steps to see before you get hit possibly with a charge.

Just looking out for you guys.
[Microsoft Surface Duo Guides, News, & Discussion] josh_zombie:
No-go for me. I stupidly relocked bootloader and can't unlock again (Allow OEM unlock not toggled in developer options). Can't flash boot image in fastboot/can't get to ADB to restore factory image/can't boot into recovery. Afraid I have no choice but to send in for replacement at this point. Lessons learned.

---------- Post added at 11:37 PM ---------- Previous post was at 11:29 PM ----------

I can, however, get to Qualcomm EDL mode and my PC recognizes the Duo over USB. But from what I understand (not much with Qualcomm EDL) these Qualcomm EDL tools don't seem to be optimized for a UFS file system. Let alone being able to find the correct files for a reflash... that's a whole different issue I'm not sure is worth pursuing given how new Duo is and my lack of understanding exactly how it works.
[Microsoft Surface Duo Guides, News, & Discussion] panzercool:
Same boat as you! Nothing works at the moment! I hope Microsoft releases a flash tool! That would be really helpful!

---------- Post added at 02:55 AM ---------- Previous post was at 02:53 AM ----------

OP! Please update your original posts with a warning that this may brick your phone! We now have a few devices that are being bricked!!
[Microsoft Surface Duo Guides, News, & Discussion] PROTOCOL:
when trying to fastboot boot magisk_patched.img after adb reboot bootloader im getting a failed (remote) command is not available in locked device.

edit *fixed above bootloader wasnt completely unlocked.

How do you place img file in root of sd? on device or through adb?
[Microsoft Surface Duo Guides, News, & Discussion] bggold:
You can copy it over when you are fully booted or adb push it.
[Microsoft Surface Duo Guides, News, & Discussion] PROTOCOL:
Got the img file to stick. Now for some reason when the phone is booted my computer doesn't recognize device so can't push any commands.

I've compiled a new m launcher APK separately and need root to make changes to try and push the actual Microsoft launcher into device. I haven't done Android work for a while and may have forgotten a few things lol. Any help is appreciated. Thanks.
[Microsoft Surface Duo Guides, News, & Discussion] bggold:
Did you enable developer mode in settings?
[Microsoft Surface Duo Guides, News, & Discussion] PROTOCOL:
Sure did. It might just be cause I'm so rusty but can't get su (showing permission denied) and losing comms between computer and device while it's booted.
[Microsoft Surface Duo Guides, News, & Discussion] jgoorn:
Lack of su permissions when you are running adb shell is because root is not granted to adb shell via magisk superuser tab.
[Microsoft Surface Duo Guides, News, & Discussion] arcanemagick:
Thanks for this, op! A couple observations from going through the process...

1. I made my own magisk_patched.img and its checksum didn't match the file you provided. I'm maybe using a different version of Magisk (v20.4), or MS updated the recovery image (2020.812.86)? Anyway, just pointing it out in case some version mismatch might cause trouble for others.

2. For PART 3, I was concerned about the possibility of leaving the boot partitions writable to all, so I tried it without the chmod (since the partitions are already writable by root which we get through su). This is all I did:

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

No problems so far, so thanks again for putting this together.
[Microsoft Surface Duo Guides, News, & Discussion] Perseu5:
Happy to contribute! Things have been crazy lately, but I hope to have a completed app that will streamline everything within the next week or so. Additional optional modifications will be added as well.

Thank you for letting me know about this and helping the community!
[Microsoft Surface Duo Guides, News, & Discussion] josh_zombie:
In case anyone else lands themselves a hard brick, thought I'd share that Microsoft honored the standard warranty and replaced my Duo with a brand new (not refurb) device, no cost or questions asked. Never had to speak to anyone, only filled out the online service request. I even kept the charger & bumper (per their return instructions) and got new ones in the box. Whole process took about a week. Overall, very pleased with Microsoft Support for truly putting this customer first.
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
Anyone knows how to remove the warning screen each time the phone reboot?

Thanks
[Microsoft Surface Duo Guides, News, & Discussion] panzercool:
Good to know! Thank you!

My bricked device reached Microsoft today! No questions asked as well! Pleased with MSFT!!:cool:
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
There is a new update today but i could not update my Duo despite i tried many times even reboot the phone.
[Microsoft Surface Duo Guides, News, & Discussion] bggold:
You might have to do it through recovery and adb sideload it. There is a link on the firmware page of ms on how to do it.

I have not tried yet but will update this thread once I do.
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
I had no luck to find the update link on MS. If you have the link and instruction please share!

Thanks
[Microsoft Surface Duo Guides, News, & Discussion] s.supreet:
My device seems to be missing even the September update and the system still shows its up to date. how can we force an update ?

also unable to find a place from where i could download the firmware.

Any help will be much appreciated.

Thanks
[Microsoft Surface Duo Guides, News, & Discussion] LocBox:
A tip, whenever you restart the phone and it bootloops.. hold the volume up button to break the loop. Hold it for around 8 seconds at the windows logo, you may be sent to recovery once or twice, but you will break the loop at some point. I figured this out over the weekend.
[Microsoft Surface Duo Guides, News, & Discussion] s.supreet:
I have a strange issue with my device.

Firstly it did not receive even the sept update and is still running security patches from May.

When i try to download the recoveryimage aswell, it says , not available for the device.

Not sure why is that ?

Can anyone help with this please.

And also if the recovery image is common and can be shared, it will be a big help.

Can anyone also upload the update file , which i can use to update it for me
[Microsoft Surface Duo Guides, News, & Discussion] LocBox:
hey, if i want to unroot and return to stock for a moment, how can i? i keep getting status 5 in adb and it doesn't see the device.
[Microsoft Surface Duo Guides, News, & Discussion] LocBox:
Fixed

nevermind, i learned about payload dumper. i figured it out and now im back on stock with the update..im figuring the same method will work with the October boot image...who cares to try it out ?
[Microsoft Surface Duo Guides, News, & Discussion] LocBox:
Nothing I do will let it update... I reset and factory reset, the update still won't install. Just an error message. I only flashed the stock boot img to return back but I guess that didn't help..
[Microsoft Surface Duo Guides, News, & Discussion] dj.est86:
Img files

Whenever i click the link on part 2, it gives me the magisk_patched.img. Not the magisk_boot.img. Anyone has the link for the magisk_boot.img?
[Microsoft Surface Duo Guides, News, & Discussion] LocBox:
it appears my recovery has been changed to ATT recovery, i have unlocked. i think this is what my issue is. how do i get back the unlocked recovery img?
[Microsoft Surface Duo Guides, News, & Discussion] Ntech02:
...

---------- Post added at 03:58 PM ---------- Previous post was at 03:56 PM ----------

It's because it's only for the unlocked variants that come straight from Microsoft. The att versions still have to wait
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
Mine is unlocked version and I am using it with Bell Canada right now.
[Microsoft Surface Duo Guides, News, & Discussion] arcanemagick:
On my unlocked (not AT&T) phone, I restored the original boot.img and successfully applied the October update.

However, I lost root because:

I failed to capture the OTA URL and acquire the OTA zip for patching

the update resets permissions on boot partitions so it cannot be read via adb shell w/o root

using fastboot to boot the old magisk_patched.img results in the touch screen not working

(meaning I'm stuck at lock screen and cannot grant USB debug or super user)

But I'm happily using the updated phone without root for now. ;)

---------- Post added at 04:38 PM ---------- Previous post was at 03:46 PM ----------

Never mind!

Last time I had checked Microsoft's recovery download, it was still the original (2020.812.86). However, I checked today and they have updated it (2020.910.72). So, I was able to extract and patch the new boot.img and now have root again.
[Microsoft Surface Duo Guides, News, & Discussion] ghostENVY:
Can you post the newly patched boot.img?:good:
[Microsoft Surface Duo Guides, News, & Discussion] arcanemagick:
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
[Microsoft Surface Duo Guides, News, & Discussion] r4961:
I've been trying to ride out the unrooted stock stuff on the unlocked version until Android 11 at least. Problem is I need to hide a few apps.

Since non-MS phones are able to w/Microsoft Launcher, I thought it'd be a given that we'd be able to do it as well. No option to do so as far as I see.

I'd like to ask what is the safest way, then, to gain root access w/this device, but still get the automatic updates?
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
Now I could not boot into recovery mode, no matters how I tried, with volume down and power buttons, or with magisk app, or use adb.

Any one could help please?
[Microsoft Surface Duo Guides, News, & Discussion] AndroidFileHost:
Great work. I got it rooted and running perfectly on my unlocked (non At&T) surface running the latest update. Thanks for figuring this out.

---------- Post added at 03:59 PM ---------- Previous post was at 03:59 PM ----------

That magisk patch imaged worked perfectly thank you.

---------- Post added at 04:02 PM ---------- Previous post was at 03:59 PM ----------

This worked for me

After your Surface Duo is powered off, press and hold the Volume down button, then press and release the Power button. Continue to hold down the Volume down button.

After a menu appears, release the Volume down button.

Press and release the Volume down button to change the menu. The menu you want to appear is Recovery mode.

Press and release the Power button to select Recovery mode.

On the screen that shows a small robot lying down, press and hold the Power button, then press and release the Volume up button. Release the Power button.

On the Android Recovery screen, press and release the Volume up or Volume down button to change the menu.

Select Apply update from ADB, then press and release the Power button.

Plug the USB cable into both your Surface Duo and your Windows 10 PC.

Once in recovery (after the robot) you can also choose reboot to bootloader if you didn't want to do the apply update from adb.
[Microsoft Surface Duo Guides, News, & Discussion] AndroidFileHost:
Anyone got a copy of the stock recovery.img that I can grab? Thanks
[Microsoft Surface Duo Guides, News, & Discussion] Frewy1:
SafetyNet Hardware check on the Duo

Can anyone confirm if the Google SafetyNet Hardware check has been implemented on the Duo? If it has Apps that ask will not run. Examples are Banking Apps, McDonalds app and the MS apps. Do they all run on a rooted Duo?
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
thanks alot. I now can access recovery.

In Magisk Manager the Ramdisk: No

If you have time can you post a details or step by step guiding me and another to update surface duo.

Thanks
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
i tried sideload but failed on both surfaceduo_recovery.zip (ran about %47 then aborted) and boot.img.
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
I just found out that my is become att version after root. the recovery.zip was download from microsoft website after input my duo serial number.
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
I think I have the same problem like yours right now.
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
I figure out that the magisk_patched from the first post is att.

I tried the whole process with the boot.img and magisk_patched.img from arcanemagick

Then at:

Adb shell su

I used the script from arcanemagick also.

After that I sideload the recovery zip file that I downloaded from Microsoft.

Now I have the new update from 05/10/2020 also in Magisk Manager I see Ramdisk: Yes.

But there used to be a bar at the bottom screem show the modules but its gone.
[Microsoft Surface Duo Guides, News, & Discussion] jimmng:
Estimated date for the APK release? Im worried that ill brick device. In australia so theres no warranty :) I need to root cause having multiusers function is integral part of my workflow. I am keen to donate or pay towards to development of this!!
[Microsoft Surface Duo Guides, News, & Discussion] Ntech02:
Does anybody know how to install the new firmware update while rooted with magisk?
[Microsoft Surface Duo Guides, News, & Discussion] LocBox:
Man I already went and exchanged mine for a new one.. I got it now and I'm not sure about rooting it anymore. People, this phone will put you in a nightmare loop like you've never seen.. Nothing worked, so be CAREFUL folks.. They won't be nice too much longer with returns. :eek:
[Microsoft Surface Duo Guides, News, & Discussion] josh_zombie:
Not taking any more chances after my own little mishap. I don't need root that badly, and root apps just aren't what they used to be back in the day.
[Microsoft Surface Duo Guides, News, & Discussion] daicaothu:
My question now is how to unroot it!!!???
[Microsoft Surface Duo Guides, News, & Discussion] none24:
please tell us how to go back to stock. i cant install OTA updates while im on magisk
[Microsoft Surface Duo Guides, News, & Discussion] AndroidFileHost:
ADB Sideload the payload.bin file you can get from Microsoft.

https://support.microsoft.com/en-us/surfacerecoveryimage
[Microsoft Surface Duo Guides, News, & Discussion] jimmng:
So is this dead
[Microsoft Surface Duo Guides, News, & Discussion] DaemonDant:
dunno what you mean by dead, but my Duo is rooted and up to date. Adaway and V4A work perfectly fine for me.
[Microsoft Surface Duo Guides, News, & Discussion] jimmng:
From what i can tell issues of bricking device, no clear instructions, no apk. Not many updates? Thats great you have it but just because you have a rooted doesnt mean its alive?

---------- Post added at 07:00 PM ---------- Previous post was at 06:59 PM ----------

Sorry i have no idea what you mean by adaway and v4a