Partitioning Surface Duo 2
January 1, 2026 · View on GitHub
Files/Tools Needed
- TWRP image:
| File Name | Target Device |
|---|---|
| surfaceduo2-twrp.img | Surface Duo 2 |
- Parted: parted
- File System Support Package for TWRP image: surfaceduo2-twrp-fssupport.tar
- Platform Tools from Google (ADB and Fastboot)
- A Windows PC
Disclaimers
Warning
- Don't create partitions from Mass Storage Mode on Windows (because ABL will break with blank/spaces in names), your phone may be irrecoverable otherwise
- If you see a warning and/or error during the process, it is not normal. Contact us on telegram if you see anything odd, but do not continue or proceed on your own, you will break things further.
- Don't rerun the commands if you interrupt the process. You may break your partition table. Parted is a very delicate tool, anything you do may cause permanent damage to your device.
- Do not run all commands at once. Parted is a very delicate tool, anything you do may cause permanent damage to your device.
- Do not commit any typo with any commands. Parted is a very delicate tool, anything you do may cause permanent damage to your device.
- Be familiar with command line interfaces. Parted is a very delicate tool, anything you do may cause permanent damage to your device.
- When using TWRP, it is normal and expected for the phone to be detected as an Asus phone and for touch to not work.
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
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.
Once on the page, scroll a little bit down til you see the link to download the platform tools for Windows.
Click on it, an EULA will open like below:
Scroll all the way down (after reading it if that's your thing)
Tick "I have read and agree to above terms conditions"
And click download
Save the file on your computer, and extract the zip file by opening it, and selecting extract all.
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
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
- 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 surfaceduo2-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. Touch will not be working and the device will say it is locked. This is completely normal. Keep the phone plugged to your PC and continue along.
Preparing TWRP
- 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 install some support files we'll need:
adb push <path to downloaded surfaceduo2-twrp-fssupport.tar> /sdcard/
adb shell "tar -xf /sdcard/surfaceduo2-twrp-fssupport.tar -C /sdcard/fssupport --no-same-owner"
adb shell "chmod 755 /sdcard/fssupport/*"
adb shell "mv /sdcard/fssupport/* /sbin/"
- Now, let's open a shell onto the device, by running the following command
adb shell
- Now we are issuing commands directly from inside Surface Duo using the PC.
Making the partitions
Dangerous section
Anything in this section is DANGEROUS and may PERMANENTLY damage your phone if you do any step wrong. Please carefully read all warnings and all instructions and make NO MISTAKE. Do not proceed if late at night or tired or drunk (yes, we're serious).
Warning
!!!! Warning reminder !!!!
Do not run all commands at once, instead run them one by one
DO NOT MAKE ANY TYPO! Parted is a very delicate tool, you MAY BREAK YOUR DEVICE PERMANENTLY WITH BELOW COMMANDS IF YOU DO THEM WRONG!
If you see any warning, or error, it is not normal. Contact us on telegram
You can kill your phone permanently if you do below's steps wrong, for real.
DO NOT, UNDER ANY CIRCUMSTANCES, RERUN, ANY, OF BELOW'S COMMANDS, EVEN IF A SINGLE ONE. DOING THIS WILL PERMANENTLY CAUSE HAVOC TO YOUR DEVICE. DO. NOT. RERUN. ANY. OF. THESE. COMMANDS. AFTER. RUNNING. ANY. SINGLE. ONE. OF. THEM. ONCE. You can rerun them only if you completed the installation, and followed the uninstall guide, never if you messed up anything, or didn't proceed with the uninstall guide yet.
If you end up messing up, or "forgetting" to run a command, DO NOT RERUN ANYTHING. CONTACT US IMMEDIATELY ON TELEGRAM. EXPLAIN WHAT YOU DID. POST A SCREENSHOT OF THE "print" PARTED COMMAND OUTPUT DONE LAST TO KNOW THE CURRENT STATUS AND NOT THE ONE PRIOR TO 20 OTHER COMMANDS.
- Let's run parted and make the partitions (ONE BY ONE WITH NO TYPO!):
setenforce 0
parted /dev/block/sda
print
Make sure that the last partition listed is numbered 8. If it is not, below's commands may DESTROY your phone in a permanent manner
Take note of original sizing, here it was 401MB -> 110GB (256GB variant: 401MB -> XXXGB TODO (Please file an issue so we know!)) (512GB variant: 401MB -> XXXGB TODO (Please file an issue so we know!)) and replace every occurence of 401MB and 110GB with your original sizing that you noted down (these may not differ, but if they do, replace them)
Run these commands one by one for 128GB devices (Click to expand)
This command removes the userdata partition
rm 8
This command creates the EFI system partition for Windows. It is possible parted shows a warning message at this step saying the partition is not properly aligned for best performance. It is safe to ignore such warning. (Note: to ignore in parted, just type 'i' (without the quotes))
mkpart esp fat32 401MB 674MB
This command creates the Windows partition.
mkpart win ntfs 674MB 69394MB
This command creates the Android™ data partition back.
mkpart userdata ext4 69394MB 110GB
This command sets the ESP partition created earlier as an EFI system partition type.
set 8 esp on
This command leaves parted.
quit
Run these commands one by one for 256GB devices (Click to expand)
This command removes the userdata partition
rm 8
This command creates the EFI system partition for Windows. It is possible parted shows a warning message at this step saying the partition is not properly aligned for best performance. It is safe to ignore such warning. (Note: to ignore in parted, just type 'i' (without the quotes))
mkpart esp fat32 401MB 674MB
This command creates the Windows partition.
mkpart win ntfs 674MB 138113MB
This command creates the Android™ data partition back.
mkpart userdata ext4 138113MB 238GB
This command sets the ESP partition created earlier as an EFI system partition type.
set 8 esp on
This command leaves parted.
quit
Run these commands one by one for 512GB devices (Click to expand)
TODO: Please file an issue to help us!
This will get you out of parted.
We have deleted partition 8, which was the Android™ userdata partition, and created 3 partitions: an esp partition which will contain the Windows boot files, a win partition that will have Windows, and the last one is the new userdata partition for Android™, just smaller.
Now let's make these partitions actually usable:
setenforce 0
mkfs.fat -F32 -s1 /dev/block/sda8
mkfs.ntfs -f /dev/block/sda9
mke2fs -t ext4 /dev/block/sda10
exit
End of the Dangerous section
Rebooting into Android
Now, reboot into Android again:
adb reboot
- You should now be seeing the Android™ Out of Box Experience (OOBE). Setup your phone to confirm it works correctly.
Congratulations, you successfully partitioned your device.
| Steps | Illustration |
|---|---|
| Assuming your Surface Duo is booted to Android™, plugged to your PC, 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 | |
| Scroll all the way down til you see the "USB debugging" option | |
| And turn on the "USB debugging" option |
The End
And we're done, please continue with the previous guide that made you land here :)
Additional Context and Notes
If you somehow break entirely your partition table, you might be interested in the original offsets of each partition in order to fix it.
mkpart ssd 6s 7s
mkpart persist 8s 8199s
mkpart metadata 8200s 12295s
mkpart frp 12296s 12423s
mkpart misc 12424s 12679s
mkpart rawdump 12680s 89479s
mkpart vm-data 89480s 97835s
The offsets are valid for both the Surface Duo 2 128GB model, and the Surface Duo 2 256GB model, and the Surface Duo 2 512GB model. They do not include userdata. You will have to recreate this yourself.
(NEVER RUN THESE COMMANDS IF YOU DO NOT NEED TO OR YOU ALREADY PARTITIONS IN PLACE, ADVANCED USERS ONLY, YOU MAY KILL YOUR PHONE HERE)
© 2020-2026 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.