不要从大容量存储模式创建分区(因为 ABL 会因名称中的空格/空格而中断)
这将擦除您所有的安卓数据
对于您的手机造成的任何损坏,我们不承担任何责任。遵循本教程,即表示您同意对您的行为承担全部责任。我们已经进行了一些测试,但这是一个早期预览,可能会出现问题。
这尚未在 256GB 设备上进行测试。本教程仅针对 128GB 设备。
请阅读并确保在开始之前理解整个教程
你最终会在 Duo 上同时使用 Android 和 Windows。Android 和 Windows 都将拆分 128GB 内存(64GB 和 64GB)
Android 将正常启动,您必须在需要时使用 PC 启动 Windows。
假设你的 Duo 启动到 Android 并插入你的 PC:
adb reboot bootloader
fastboot flashing unlock
fastboot boot twrp.img
adb push /sdcard/
adb shell \"cp /sdcard/parted /sbin/ && chmod 755 /sbin/parted\"
adb shell
parted /dev/block/sda
print
rm 6
mkpart esp fat32 51.9MB 180MB
mkpart win ntfs 180MB 57344MB
mkpart userdata ext4 57344MB 112GB
set 6 esp on
quit
这会让你摆脱分手。
我们删除了第 6 分区,即 Android userdata 分区,并创建了 3 个分区:一个包含 Windows 启动文件的 esp 分区,一个包含 Windows 的 win 分区,最后一个是 Android 的新 userdata 分区,只是更小。现在让我们让它们真正可用:
mkfs.fat -F32 -s1 /dev/block/sda6
mkfs.ntfs -f /dev/block/sda7
mke2fs -t ext4 /dev/block/sda8
mkdir /sdcard/espmnt && mount /dev/block/sda6 /sdcard/espmnt/
quit
adb push /sdcard/
adb shell \"tar -xf /sdcard/DuoBoot.tar -C /sdcard/espmnt\"
adb shell \"mv /sdcard/espmnt/Windows/System32/Boot/ffuloader.efi /sdcard/espmnt/Windows/System32/Boot/ffuloader.efi.bak\"
adb shell \"cp /sdcard/espmnt/Windows/System32/Boot/developermenu.efi /sdcard/espmnt/Windows/System32/Boot/ffuloader.efi\"
adb reboot bootloader
您将回到 Duo 的引导加载程序。
让我们启动自定义 UEFI:
fastboot boot boot.img
每次您要启动 Windows 时都需要执行上述步骤。
你应该被扔进开发者菜单。
THESE ARE NOT ALL COMMANDS. DISKPART COMMANDS VARY A LOT, SO THESE ARE SOME ROUGH INSTRUCTIONS.
ACTUAL COMMANDS START WITH AN HASHTAG (which you\'ll need to remove)
# list disk
Find the Duo Disk, and take note of the number.
# select disk
# list partition
You\'ll be able to recognize the partitions we made earlier by their size. take note of the ESP and WIN partition numbers.
# select partition
# assign letter=Y:
# select partition
# assign letter=X:
警告:我们假设 X: 是 Win 分区,而 Y: 是下一个命令的 ESP 分区。正确更换它们,否则您将丢失 PC 上的数据。
dism /apply-image /ImageFile:\"\" /index:1 /ApplyDir:X:\\
这将需要一些时间。
bcdboot X:\\Windows /s Y: /f UEFI
现在已安装 Windows,但没有驱动程序。
dism /image:X:\\ /add-driver /driver:\"\" /recurse
我们准备好启动了!
从命令提示符:
fastboot boot boot.img
如果您做对了一切,Windows 现在将启动!享受!
仍然假设 X: 是已安装的 Duo Windows 分区:
reg load RTS X:\\Windows\\System32\\config\\SYSTEM
现在打开 regedit.exe 并编辑此注册表项:
HKEY_LOCAL_MACHINE\\RTS\\ControlSet001\\Control\\USB
OsDefaultRoleSwitchMode
将键设置为值 1,您就完成了。