Skip to content

Latest commit

 

History

History
344 lines (201 loc) · 15.4 KB

Uninstall-SurfaceDuo1.md

File metadata and controls

344 lines (201 loc) · 15.4 KB

Uninstall Windows and revert your Surface Duo (1st Gen) to stock

This guide will help you go back to a normal Surface Duo, with Android™ only.

Just like you had it before installing Windows.

Android™ will have access to the whole memory back again.

Your data will be erased, please make backups if you need it before proceeding!

This guide works if you haven't broke anything else in the meantime.

If you broke anything, this guide wont help you and will likely make things worse.

Contact us instead for help!

Files/Tools Needed

  • TWRP image:
File Name Target Device
surfaceduo1-twrp.img Surface Duo (1st Gen)

Disclaimers

Important

THIS WILL WIPE ALL YOUR ANDROID™ DATA

We don't take any responsibility for any damage done to your phone. By following this guide, you agree to take full responsibility of your actions. We have done some testing,

but this is STILL IN PREVIEW and things can go wrong.

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.

Steps

Acquiring all files

Here's how to acquire the Android SDK Platform Tools: Click to expand

First, start by going to the Android Platform SDK download page on your computer.

SDK-1-Top

Once on the page, scroll a little bit down til you see the link to download the platform tools for Windows.

SDK-2-Mid

Click on it, an EULA will open like below:

SDK-3-EULA

Scroll all the way down (after reading it if that's your thing)

SDK-4-EULA-Bottom

Tick "I have read and agree to above terms conditions"

SDK-5-EULA-TICK (alt)

And click download

SDK-5-EULA-TICK

Save the file on your computer, and extract the zip file by opening it, and selecting extract all.

SDK-6-DL

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

image

  • Go to the folder where you extracted the Google Android™ Platform tools using the CD command and the path of the folder, like so:

image

  • Run the following command to ensure your phone is detected by your PC
adb devices

Tip

If you see no device listed, check for updates in Windows Update, you likely have a Driver Update pending so the phone is recognized, when you're good to go, you should see the following image below this notice. It is possible certain computers see no update offered (like Windows ARM64 Computers or other older machines with no functional Windows Update). If this is your case, we also provide Drivers for you to download at the following location, you will have to install them using Device Manager on your PC. Download USB Drivers

image

  • Run the following command now
adb reboot bootloader

You will be rebooted to Surface Duo's bootloader.

Surface Duo in Bootloader mode 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

image

  • Go find the surfaceduo1-twrp.img file you downloaded earlier, right click it, click "Copy as path"

image

  • 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:

image

  • Now you can press enter

image

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"

image

  • Now, let's copy parted onto the device, first, start by typing the following text, but do not press enter just yet
adb push

image

  • Go find the parted file you downloaded earlier, right click it, click "Copy as path"

image

  • 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:

image

  • And now, continue to write the rest of the command, like so:
 /sdcard/

image

  • Now you can press enter

image

  • 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"

image

  • Now, let's open a shell onto the device, by running the following command
adb shell

image

  • Let's now run parted:
parted /dev/block/sda

image

  • And let's execute parted's print command:
print

image

You'll get a list of partitions.

Caution

Make sure that partitions 6, 7 and the last one are your esp, win and userdata partitions. If they aren't, you will end up damaging your device (potentially in a permanent manner), please contact us on telegram for assistance in such case. It is possible for you to see more partitions than esp, win, and userdata. Typically, some devices may have partitions for the Windows Recovery Environment after the win partition and then userdata. The following guidelines cover even above scenario, and can be followed safely, on both devices with just esp, win, and userdata, and the other devices, with esp, win, some recovery partitions, and userdata. What remains important is that these partitions start at index 6, and you see no other partition than the aforementioned esp, win, recovery environement or userdata partitions. If you do, please reach out to us on telegram for assistance.

Warning

The next command will wipe all your windows and Android™ data. Before continuing, if you have important documents, please make sure that you have backed everything up on both Android™ and Windows.

  • 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:

Image Of win/esp/userdata

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

image

  • Then number 7 (win)
rm 7

image

  • And lastly, for us, the last index, number 8 (userdata)
rm 8

image

  • 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:

Image Of userdata creation

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:

image

  • Let's now run the print command:

image

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.

Image Of device shell after parted quit

  • Now let's make the userdata partition actually usable:
mke2fs -t ext4 /dev/block/sda6

image

  • As you can see, mke2fs notifies us, the previous partitions (esp) is here, simply confirm by answering "y" like so:

image

  • And leave the device shell
exit

image

  • 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.

image

  • You should now be seeing the Android™ Out of Box Experience (OOBE). Setup your phone to confirm it works correctly if you need it.

Android™ - OOBE

  • 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

Follow the Restoring Bootloader Guide


© 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.