Uninstall Windows and revert your Surface Duo 1 to stock
Edit This PageFiles/Tools Needed đ
- TWRP image: surfaceduo1-twrp.img
- Parted: parted
- Platform Tools from Google (ADB and Fastboot)
- A PC.
PLEASE READ AND BE SURE TO UNDERSTAND THE ENTIRE GUIDE BEFORE STARTING
If you caused modifications to Android⢠system partitions and are not knowingly using Custom Trusted Boot certificates or do not know what weâre talking about here but flashed a dual boot image onto your device, you need to revert this. Please see the dual boot guide for assistance first and foremost. Otherwise belowâs steps will brick your device.
What youâll get đ
A normal Surface Duo, with Android⢠only. Just like you had it before installing Windows. If you havenât broke anything else in the meantime.
Android⢠will have access to the whole memory back again.
Steps đ ď¸
Make sure you have not done any dual boot guide!
If you have followed a guide to use dual boot, please first remove dual boot by following the uninstall section in the dual boot guide, this is important: DualBoot
Going to the Bootloader menu
Start by turning on your Surface Duo into Androidâ˘, and unlock it
Open a command prompt on your PC
- Go to the folder where you extracted the Google Android⢠Platform tools using the CD command and the path of the folder, like so:
- Run the following command to ensure your phone is detected by your PC
adb devices
- Run the following command now
adb reboot bootloader
You will be rebooted to Surface Duoâs bootloader.
Image of what you should see right now: Surface Duo in Bootloader mode
Booting to TWRP
- Plug your phone to your PC, open a command prompt and start by typing the following text, but do not press enter just yet
fastboot boot
- Go find the surfaceduo1-twrp.img file you downloaded earlier, right click it, click âCopy as pathâ
- Then go back to the Command Prompt window we started writing text in previously, and simply, right click on it with your mouse (or long press if youâre on a touch device), you should now see this:
- Now you can press enter
You will now boot to TWRP. Reminder that touch doesnât work on TWRP for now, so youâll have to work through your PC.
Restoring the original partitions
- Once booted into TWRP, start by running the following command to make sure everything we do is accepted by the device:
adb shell "setenforce 0"
- Now, letâs copy parted onto the device, first, start by typing the following text, but do not press enter just yet
adb push
- Go find the parted file you downloaded earlier, right click it, click âCopy as pathâ
- Then go back to the Command Prompt window we started writing text in previously, and simply, right click on it with your mouse (or long press if youâre on a touch device), you should now see this:
- And now, continue to write the rest of the command, like so:
/sdcard/
- Now you can press enter
- Now letâs install parted correctly onto the TWRP image, by running the following command
adb shell "mv /sdcard/parted /sbin/parted && chmod 755 /sbin/parted"
- Now, letâs open a shell onto the device, by running the following command
adb shell
- Letâs now run parted:
parted /dev/block/sda
- And letâs execute partedâs print command:
print
Youâll get a list of partitions.
- First, in above print command, locate every partition that exist after the âmiscâ partition, as we can see, for us, they are esp, win, and userdata, you may have the same ones, but you may also see, esp, win, âother partitionsâ, and userdata. These other partitions can be the windows recovery environement, but please make sure they arenât anything else. You should not be seeing partitions named âssdâ, âpersistâ, âmetadataâ, âfrpâ, or âmiscâ starting from index 6 all the way to the end. If you do, please reach out and do not continue with this guide.
Hereâs an example of what weâre keeping an eye on here for our example (remember, for you it may be different but likely not) highlited inside a red rectangle:
All partitions from index 6, to the end here, must be removed, so letâs proceed with removing each, in our case, we want to remove the esp partition (number 6), the win partition (number 7), and the userdata partition (number 8).
- Letâs start from number 6 (esp)
rm 6
- Then number 7 (win)
rm 7
- And lastly, for us, the last index, number 8 (userdata)
rm 8
Now that we have removed all partitions from index 6 to the last one, letâs recreate user data.
If you have a 128GB Surface Duo model, run the following command:
mkpart userdata ext4 51.9MB 112GB
- If you have a 256GB Surface Duo model, run the following command:
mkpart userdata ext4 51.9MB 240GB
In our case we have a 256GB Surface Duo model, so weâre running the second command, like so:
As you can see, parted notifies us the partition may not be aligned for best performance, if you get such warning as well, simply enter i like so:
- Letâs now run the print command:
Please confirm that you see the exact same thing as we do above, except the total storage capacity. If you do not, your device may permanently be damaged if you reboot or turn it off now. Please reach out as soon as you can to prevent rendering your device a paper weight to telegram for assistance, and remain calm and patient.
- Letâs now leave parted after confirming we did well previously:
quit
This will get you out of parted and back to the device shell.
- Now letâs make the userdata partition actually usable:
mke2fs -t ext4 /dev/block/sda6
As you can see, mke2fs notifies us, the previous partitions (esp) is here, simply confirm by answering âyâ like so:
And leave the device shell
exit
- Once it is done, you can reboot your phone using
adb reboot. You will be able to boot to Android⢠and your phone should work normally. In case it doesnât you likely messed up something above.
- You should now be seeing the Android⢠Out of Box Experience (OOBE). Setup your phone to confirm it works correctly if you need it.
- Once your phone is confirmed working, congratulations, you successfully uninstalled Windows from your device.
You may however want to also relock the bootloader of the device, please note that you cannot relock the bootloader of your device if you flashed a custom rom as well as installed Windows before, or modified the boot partition for dual boot, or other purposes. Please look into undoing such changes before proceeding forward.
In order to relock the bootloader
Start by turning on your Surface Duo into Androidâ˘, and unlock it
Using the Microsoft Launcher, find the settings app
- Open the Android⢠Settings app
- Scroll down to the about section, and open it
- Scroll all the way down til you see the Build Number field
- Press the Build number field 7 times consecutively, you should first start to see a popup after 3 taps
- Once done tapping 7 times, you should be seeing this popup instead
- Now go to the System section, you should see a new Developer options section like shown below
- Go to the Developer options section
- Turn on the âOEM unlockingâ option as shown above, then, scroll all the way down til you see the âUSB debuggingâ option
- And turn on the âUSB debuggingâ option
Assuming your Surface Duo is booted to Androidâ˘, plugged to your PC:
- Open a command prompt on your PC
- Go to the folder where you extracted the Google Android⢠Platform tools using the CD command and the path of the folder, like so:
- Run the following command to ensure your phone is detected by your PC
adb devices
- Run the following command now
adb reboot bootloader
- Your phone will ask for permission to authorize your computer to execute commands, accept it:
- Now run the following command again, it should now work properly:
adb reboot bootloader
You will be rebooted to Surface Duoâs bootloader.
Image of what you should see right now: Surface Duo in Bootloader mode
- From there:
fastboot flashing lock
Confirm that you want to relock the bootloader using your device side buttons, your device will erase itself and restart into the Android⢠Out of box Experience Again. If your device doesnât go into Android⢠but the bootloader menu, this means you performed additional modifications to your device previously, and you must undo them. You need to reunlock your device now using âfastboot flashing unlockâ, and undo them according to the instructions you or someone else provided you)
You should now be seeing the Android⢠Out of Box Experience (OOBE). Setup your phone to confirm it works correctly.
Congratulations, you successfully relocked your bootloader.
Now, you may want to forbid unlocking the bootloader again for additional security and peace of mind
In order to turn off the ability to unlock the bootloader of the device
Start by turning on your Surface Duo into Androidâ˘, and unlock it
Using the Microsoft Launcher, find the settings app
- Open the Android⢠Settings app
- Scroll down to the about section, and open it
- Scroll all the way down til you see the Build Number field
- Press the Build number field 7 times consecutively, you should first start to see a popup after 3 taps
- Once done tapping 7 times, you should be seeing this popup instead
- Now go to the System section, you should see a new Developer options section like shown below
- Go to the Developer options section
- Turn off the âOEM unlockingâ option as shown above, then turn off the developer options toggle at the very top
đ Congratulations, your Surface Duo is back to factory settings.
Š 2020-2024 The Duo WOA Authors
Snapdragon is a registered trademark of Qualcomm Incorporated. Microsoft, the Microsoft Corporate Logo, Windows, Surface, Surface Duo, Windows Hello, Continuum, Hyper-V, and DirectX are registered trademarks of Microsoft Corporation in the United States. Android is a registered trademark of Google LLC. Miracast is a registered trademark of the Wi-Fi Alliance. Other binaries may be copyright Qualcomm Incorporated and Microsoft Surface.
Limited emergency calling
Running Windows on your Surface Duo is not a replacement for a proper phone operating system and does not have emergency calling capabilities.
Hello from Seattle (US), France, Italy.