Jump to content

Windows Mobile

From postmarketOS Wiki
Revision as of 07:00, 5 November 2021 by FieryFlames (talk | contribs) (initial guides for windows phones (mildly rough, could do with improving))

This page collects some useful resources for working with Windows Phones.

Devices

On the different device pages is described how porting was done for the specific device. This can be used to get further information on how to port your device

Error: No field named "StatusXwayland" found for any of the specified database tables.

Tools

WindowsPhoneInternals[1]

Supported models

WPInternals by an XDA-User allows you to perform tasks like unlocking bootloaders, enabling root access and flash or backup firmware. Some fixes have been made in the GitHub repository, but no new release has been made yet. The list of supported models on the official site is outdated. See the image on the right for a more up to date list.


Windows Device Recovery Tool[2]

The Windows Device Recovery Tool by Microsoft let you recover firmware of Windows devices.

Projects

Android4Lumia[3]

Android4Lumia is a project which aims to built android based custom roms for Lumia phones.

Mainline4Lumia[4]

Mainline4Lumia is a project which aims to bring Linux mainline to Lumia phones.

Mainline4Lumia Telegram chat

File Collections

LumiaFirmware.com[5]

On LumiaFirmware.com you can find firmware for Lumia Phones.

EDK-II

EDK-II has been ported to various Windows Phones. A porting guide is available here.

Guides

Enabling Boot Menu

  • Make sure your phone is in mass storage mode and that EFIESP is mounted.
  • Find where EFIESP was mounted, Windows will either mount it in MainOS/EFIESP or with a letter (J:, L:, etc)
  • Anything inside <> needs to be filled in by you, for example: <EFIESP> becomes K:\EFIESP if K: was MainOS and EFIESP was mounted at MainOS/EFIESP
  • Open cmd as Administrator and run the following commands:
  • Turn on displaybootmenu: bcdedit /store <EFIESP>/efi/Microsoft/Boot/BCD /set {bootmgr} displaybootmenu on
  • Set boot menu timeout to 10s: bcdedit /store <EFIESP>/efi/Microsoft/Boot/BCD /set {bootmgr} timeout 10
  • Set displayorder: bcdedit /store <EFIESP>/efi/Microsoft/Boot/BCD /displayorder {default}

Extra steps for phones with a camera button:

  • Devices with a camera button, you can make it so you can choose the boot option using volume keys and camera to select.
  • Unfortunately there is no known way to make power button be select, so phones without a camera button can't use this.
  • bcdedit /store <EFIESP>/efi/Microsoft/Boot/BCD /deletevalue {bootmgr} customactions
  • bcdedit /store <EFIESP>/efi/Microsoft/Boot/BCD /deletevalue {bootmgr} custom:54000001
  • bcdedit /store <EFIESP>/efi/Microsoft/Boot/BCD /deletevalue {bootmgr} custom:54000002


Adding a new BCD entry

  • Make sure your phone is in mass storage mode and that EFIESP is mounted.
  • Find where EFIESP was mounted, Windows will either mount it in MainOS/EFIESP or with a letter (J:, L:, etc)
  • Anything inside <> needs to be filled in by you, for example: <EFIESP> becomes K:\EFIESP if K: was MainOS and EFIESP was mounted at MainOS/EFIESP
  • Open cmd as Administrator and run the following commands:
  • Creating a new entry: bcdedit /store .\BCD /create /d "<NAME>" /application BOOTAPP
  • Copy the GUID (the squiggly brackets and the stuff inside)
  • Set the efi path: bcdedit /store .\BCD /set <GUID> path <EFIFILE>
  • Set the partition the efi file is in: bcdedit /store .\BCD /set <GUID> device partition=<EFIPART>
  • Turn on test signing: bcdedit /store .\BCD /set <GUID> testsigning on
  • Turn off integrity checks: bcdedit /store .\BCD /set <GUID> nointegritychecks on

Extra steps for phones with a camera button

  • Add BCD entry to display order: bcdedit /store .\BCD /displayorder <GUID> /addlast

Extra steps for phones without a camera button

  • We need to set a volume key to boot our new BCD entry
  • custom:54000001 is for volume up, custom:54000002 is for volume down
  • Set the volkey to boot our bcd entry: bcdedit /store BCD /set {bootmgr} <VOLKEY> <GUID>