Other

项目介绍

Archfx/duo-de 是一个托管在 GitHub 上的开源项目,主要使用 Shell 编写,采用 Other 许可证,目前获得 367 个 Star、15 次 Fork。

仓库全名
Archfx/duo-de
开源许可证
Other
Star 数
367
Fork 数
15
未关闭 Issue
3

README 摘要

Surface-duo Dual Experience [duo-de][A16] The Surface Duo, Microsoft's dual-screen Android device, aimed to redefine mobile productivity by offering a unique form factor that combined the versatility of two screens with the familiarity of the Android operating system. Although Microsoft officially ceased updates and support for the Surface Duo line in early 2023, with AOSP GSI and the help of the open-source…

完整内容见 GitHub 原始 README 或本页 。

常见问题

duo-de 用什么语言开发?

主要使用 Shell 编写,采用 Other 许可证,目前有 367 个 Star。

duo-de 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 duo-de 的源码?

可以直接克隆仓库:git clone https://github.com/Archfx/duo-de.git,默认分支为 main-16;安装与运行步骤见仓库 README。

duo-de 最近还在维护吗?

仓库最近一次更新为 6 天前,当前有 3 个未关闭 Issue;Star 数为 367,可作为社区活跃度的参考。

简要分析

热度分
409
价值分
225
活跃状态
活跃

语言占比

Dockerfile
Makefile
Python
Shell

Release

README

Surface-duo Dual Experience [duo-de][A16]

The Surface Duo, Microsoft's dual-screen Android device, aimed to redefine mobile productivity by offering a unique form factor that combined the versatility of two screens with the familiarity of the Android operating system. Although Microsoft officially ceased updates and support for the Surface Duo line in early 2023, with AOSP GSI and the help of the open-source community, it is time to give a second life to this awesome and unique hardware.

DUO-DE is a GSI variant Android ROM created for Microsoft Surface Duo devices, offering a clean AOSP experience. This build combines gapps/vanila variants of the GSI ROM from ponces with desktop mode enabled + various tweaks to make it nice and smooth with the help of thain tweaks. All credits go to respective developers. Before you proceed, please take a moment to read this announcement regarding this project. By using this ROM, you are agreeing to the DISCLAIMER.

GitHub Downloads (all assets, all releases) GitHub Actions Workflow Status

drawing

Posture Engine and Dual Modes

With the posture processor engine, both duo1 and duo2 react to various postures. Specifically, the touch configurations and display settings will toggle between left-screen phone mode, right-screen phone mode, and tablet mode based on the hinge position. The hinge gaps can be enabled/disabled through the treble app.

drawing drawing

You can control the active display from quick settings. You can see it in action here. To add this quick setting tile, use the pencil icon in the notification panel and drag and drop the “Active Screen” tile to your panel.

This ROM switches between tablet mode (first image) and phone mode (second image) when you change the postures or active screen. These modes are optimized (both visually and utility-wise) for each of the situations and the screen’s real state. Additionally, it supports peak mode display of device status when the device is unfolded partially.

drawing drawing

Tip 提示

In case your device does not react to tent or ramp mode (landscaped phone mode) by default, you have to enable it from the Home settings. When you are in Phone mode, click and hold on the desktop, click Home settings on the popup menu, and enable the Allow home screen rotation feature. This will enable the launcher to serve the Tent mode and Ramp modes.

Floating Windows

Floating windowed mode can be enabled/disabled for tablet mode and phone mode separately. To do that, click and hold the desktop, click Home settings, and find the settings Tablet Mode Floating Windows and Phone Mode Floating Windows.

Split Windows

You can still launch apps in split window mode (similar to the Stock 12L) using two methods,

  1. Click and hold the application icon, and click the option Split Screen from the popup menu
  2. Launch the apps first, and use the gesture (or recent apps button on the navigation bar) to access the recent apps window and click Split.

Both options will prompt you to open the second application to share the screen.

Surface Duo 2 Status

DUO-DE works smoothly on both Surface Duo (Gen1) and Surface Duo 2. The additional Surface Duo 2 functionalities, including support for its ultrawide and zoom camera sensors and Surface Pen wireless charging, have been implemented.

The Surface Duo 2 reverse-engineering effort was led by Ethanol10, with several significant contributions from mkostersitz. Thanks to their efforts, the previously outstanding Duo 2 issues have been resolved. Discussions and technical details about the reverse-engineering work are available here.

Benchmarks

These results are just for reference (for people who enjoy numbers) to compare the CPU and GPU performance of this ROM (latest build) with other operating system options. The best-case numbers of each operating system are included in the graphs.

Comparison duo-de Results
Duo1 CPU duo-de cpu
Duo1 GPU duo-de gpu

Security

All DUO-DE releases are signed with release keys, ensuring protection against malicious OTA updates and unauthorized system application replacements. Additionally, DUO-DE passes play integrity checks, safeguarding against malicious applications. For more details about the security of GSI images like DUO-DE, visit this post.

Flashing steps

Warning 警告

Try this at your own risk and proceed with caution!

Tip 提示

Please read the release notes before performing OTA updates, Some major updates may require you to wipe user data. I highly recommend you backup your application data!

Caution 注意

BACKUP your user data before proceeding, it might prompt you to wipe the user data partition depending on your current setup.

Following are the steps to flash this image to your surface duo.

  1. Download the release.
wget https://github.com/Archfx/duo-de/releases/download/[[version]]/aosp-arm64-ab-gapps-15.0-[[version]].img.xz
  1. Extract the compressed *.xz file to obtain the *.img. (Windows users can use something like 7-zip, Linux and Mac users can use either of the following commands with respective commandline utilities).
tar -xf aosp-arm64-ab-gapps-15.0-[[version]].img.xz #tar utility
gunzip aosp-arm64-ab-gapps-15.0-[[version]].img.xz #gunzip utility
  1. If you are migrating from Android 12L (stock) follow this step. You need to unlock the bootloader before proceeding. Please pay attention to commands, do not copy and execute the commands blindly.
adb reboot fastboot
fastboot delete-logical-partition system_ext
fastboot delete-logical-partition product

#get the current slot
fastboot getvar current-slot
# if current slot is a, delete the system_b
fastboot delete-logical-partition system_b
# if current slot is b, delete the system_a
fastboot delete-logical-partition system_a

fastboot flash system aosp-arm64-ab-gapps-15.0-[[version]].img
fastboot reboot 
# upon reboot, it will prompt to wipe the user data partition.
  1. Migrating from 13/14 pixel experience, follow the below steps
adb reboot fastboot
fastboot flash system aosp-arm64-ab-gapps-15.0-[[version]].img
fastboot reboot 
  1. When the device is booted, perform a manual reboot to apply the first-time configurations correctly.
  2. Enable the following settings (for enabling the floating windows) from the developer options and perform a manual reboot.
  • Force activities to be resizable
  • Enable freeform windows
  • Enable non-resizable in multi-window
  1. Once you flash a duo-de version using the above steps, subsequent updates will be received using OTA. You can check updates using settings -> system -> system updates.

    If prompted to select the default updater, select PHH treble updater for always.

  2. Enable the ideal Treble Settings as outlined here.
  3. If you wish to see future updates and feature improvements, consider starring (★) the project—it motivates the development of new releases!

Migrating back to 12L

Ethanol10: I’ve tested this on a Duo 2, seems to work fairly consistently. You will LOSE all your data when doing this so please backup if you can!

  1. Retrieve your Surface recovery image: https://support.microsoft.com/en-us/surface-recovery-image
  2. Follow the script below
# Boot to fastboot 
adb reboot fastboot

# Delete all partitions that DUO-DE resides on
fastboot delete-logical-partition system_ext_a
fastboot delete-logical-partition system_ext_b
fastboot delete-logical-partition product_a
fastboot delete-logical-partition product_b
fastboot delete-logical-partition system_b
fastboot delete-logical-partition system_a

# Move to Recovery
fastboot reboot recovery
  1. Navigate using Vol Up/Down to “Apply update from ADB”
  2. Run the following commands
# replace <surface recovery image location> with file location, e.g windows would be C:/platform-tools/
# surface_recovery.zip
adb sideload <surface recovery image location>
  1. Wipe Data
  2. Reboot

Usually, one time isn’t enough and you’ll end up with a bootloop, follow the steps to get back into recovery to repeat from step 2.

  1. Hold Power and as soon as the device vibrates, hold Volume down
  2. Use volume buttons to select Recovery Mode and press Power to confirm
  3. When the Android logo shows up with No command underneath it, press and hold the power button, then press volume up, and release the power button. It can be a bit finnicky so experiment a little bit (try not to hold the power button for a long time you’ll hard reset.)
  4. You should be back in recovery, continue earlier steps from step 2.

Issues

Any issues, please open an issue with a detailed description. Please use the discussion section for any questions regarding flashing and similar stuff.

Credits

These people have helped this project in some way or another, so they should be the ones who receive all the credit:

phhusson AndyYan eremitein kdrag0n Peter Cai haridhayal11 sooti Iceows ChonDoit ponces thai-ng farmerbb Ethanol10 mkostersitz

Disclaimer

THIS REPOSITORY CONTAINS A CUSTOM ANDROID GENERIC SYSTEM IMAGE (GSI) ROM PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND. USE, DOWNLOAD, OR INSTALLATION OF THIS SOFTWARE IS AT YOUR OWN RISK. THE AUTHORS ARE NOT LIABLE FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO DEVICE DAMAGE, DATA LOSS, OR OTHER ISSUES RESULTING FROM THE USE OR INSTALLATION OF THIS ROM. INSTALLING CUSTOM ROMS MAY VOID YOUR DEVICE’S WARRANTY AND COULD BRICK YOUR DEVICE, RENDERING IT UNUSABLE. VERIFY COMPATIBILITY WITH YOUR DEVICE BEFORE INSTALLATION. NO GUARANTEE OF UPDATES, FIXES, OR SUPPORT IS PROVIDED. THIRD-PARTY SOFTWARE INCLUDED IS SUBJECT TO ITS OWN TERMS. MODIFICATION AND REDISTRIBUTION ARE PERMITTED UNDER THE PROVIDED LICENSE, BUT AUTHORS DISCLAIM LIABILITY FOR ISSUES ARISING FROM SUCH ACTIONS. BY PROCEEDING, YOU ACCEPT THESE TERMS. IF YOU DO NOT AGREE, DO NOT USE THIS FIRMWARE IMAGE.

评论

暂无评论