nyuuzyou/wikis huggingface dataset:
Microsoft Lumia 950 XL (microsoft-cityman)

== Contributors ==
* SunshineBiscuit
* Konrad Dybcio
== Maintainer(s) ==
* SunshineBiscuit
== Users owning this device ==
== How to enter flash mode ==
Windows Phone flash mode can be entered using WPInternals, thor2 or Windows Device Recovery Tool.
Most WoA images have USB mass storage mode available with Power + VolDown key sequence on boot. Alternatively, enter USB mass storage mode via WPInternals.
Because Lumia 950 XL uses standardized UEFI firmware, it is not necessary to flash the device once it is unlocked. Simply install boot-shim and the UEFI firmware similar to the way installing Windows 10 ARM on Lumia 950 XL, partition (Do not delete any partitions before and including EFIESP) and copy files to the device and it will boot.
Warning: Do not touch anything inside DPP partition or it will cause permanent damage to the device
== Progress ==
A slightly patched kernel is available at https://dev.azure.com/imbushuo-personal/_git/Kernel.
A more patched and more functional kernel is available at https://github.com/WOA-Project/linux.
Although Lumia 950 XL supports ACPI, the arm64 ACPI support for Qualcomm platforms is limited to Windows-only. Hence a device tree is necessary for successful bring-up. The current device tree is available at 
here (old) or right there.
The progress is generic for all Linux distros.
* Processor bring-up and reset using PSCI (EL1) or spin-table (EL2, WIP!)
* I2C, GPIO, UART and a few more simple low-speed I/O
* GCC clocks
* Synaptics Touchscreen via I2C
* FrameBuffer via UEFI GOP @ 1080x1920
* Bluetooth via UART. Need rampatch and TLV firmware blobs similar to other QCA6174 chipsets.
* PCIe Root Port, the QCA6174 Wi-Fi NIC is visible, ath10k driver starts but currently stalls the system. Need rampatch and TLV firmware blobs similar to other QCA6174 chipsets.
== Booting ==
* Unlock the device using WPInternals
* Install boot-shim and UEFI firmware
* Partition the device, create a new ESP partition for aarch64 (keep the ARM32 one) and a partition for the root filesystem
* Unpack root filesystem, install GRUB ARM64, kernel and device tree into the new ESP partition
A reference boot entry:
linux /vmlinuz-4.18.6-lumia-950xl-uefi nomodeset acpi=off video=efifb boot_delay=200 root=UUID=<Root Partition UUID>
initrd /initrd.img-4.18.6-lumia-950xl-uefi
devicetree /msm8994-microsoft-lumia-950xl.dtb
== See also ==
Microsoft Surface 2 (microsoft-surface-2)

== How to boot from USB ==
Power on the device with button pressed.
== Preparation ==
=== Disable secure boot ===
Enable test signing and install yahallo to disable secure boot.
See the instruction on OpenRT GitBook.
=== Find out board revision ===
== Installation ==
=== Installation on external storage ===
=== Installation on eMMC ===
Install pmOS on external storage firstly. Boot into it, connect to internet and perform:
$ sudo apk add pmbootstrap
$ pmbootstrap init # select "microsoft" vendor and "surface-2" codename, it will also ask for board revision
$ pmbootstrap install --disk /dev/mmcblk0 --no-sshd # add --fde if you want FUll Disk Encryption
== Installation ==
See Microsoft_Surface_RT_(microsoft-surface-rt)#Installation.
== Users owning this device ==
Microsoft Surface Duo (microsoft-duo)

==Build Steps==
Use the Mainlining Guide if building postmarketOS for the duo.
==Build Notes==
ERROR: postmarketos-mkinitfs-1.5.1-r3.trigger: script exited with error 1 means the build failed to append the dtb.
 Open deviceinfo in the device-microsoft-epsilon folder.
 Verify the value in deviceinfo_dtb' has the value "qcom/sm8150-microsoft-surface-duo"
If the default location is changed in pmbootstrap init, there may be an issue with locating python package dependencies. Change back to the default location for building or use the edge version of postmarketOS when building.
*These notes are from attempting to build by following the porting guide.*
Check to make sure USB Ethernet is configured correctly. It is not enabled by default.
Use pmbootstrap kconfig edit to load the kernel configuration menu, then follow the steps on Kernel Configuration: CONFIG_USB_ETH and include RNDIS support.
== Contributors ==
* JengaMasterG 
== Users owning this device ==
== How to enter flash mode ==
 Shut down the device.
 Hold the Vol Down button and plug the device into the computer.
 The device is booted into the bootloader.
== Installation ==
Select "Recovery" in the menu options by navigating with the Vol buttons and selecting with the Power button.
Once in Recovery mode, select "Enter fastboot".
On the computer, run "pmbootstrap flasher flash_rootfs"
On the device, select "Reboot to bootloader"
On the computer, run "pmbootstrap flasher boot"
This will not replace the boot image currently on the device. Repeat "How to enter flash mode" and step 5 of "Installation" to boot into pmOS.
== See also ==
Microsoft Surface Pro 4 (microsoft-surface-pro4)

This port allows PostmarketOS to run normally on Microsoft Surface Pro 4 x86_64 hardware, as the device uses UEFI x64.
Currently, tests are being carried out using the kernel linux-surface branch v5.10-surface, as well as the Kernel Mainline 5.10.57 LTS applying the respective linux-surface patches.
Working: WiFi, Sound, Bluetooth, Buttons, 3D Acceleration, Accelerometer.
Not working: Touch Screen.
Not tested: TypeCover, Pencil, since I do not own them. 
== Contributors ==
* robante15
== Users owning this device ==
== Installation ==
The manufacturer is currently named microsoft in pmbootstrap. To install, do a normal SD card installation, and point it to the storage medium you need for the device (hard disk, USB thumbdrive, or SD card).
pmbootstrap install --sdcard=/dev/sdX 
To run it, it is necessary to disable Secure Boot, and preferably set the USB memory as the default device.
== Notes ==
===Bluetooth===
In some desktop environments when trying to turn on the Bluetooth it will freeze, and will not perform any action, if that is the case run the following command in the terminal:
sudo service bluetooth start
It works without problems in Phosh, but in Gnome you have to execute that command, I assume that in some other environments the same.
===Touch Screen===
To make the touch screen work it is necessary to compile and install iptsd which according to its own definition is:
"This is the userspace part of IPTS (Intel Precise Touch & Stylus) for Linux."
The following dependencies must be installed in order to compile: 
$ sudo apk add git build-base linux-headers meson inih inih-dev openrc-dev
Run the uinput module:
$ sudo modprobe uinput
Use meson and ninja to build iptsd, and then run it with sudo.
$ git clone https://github.com/linux-surface/iptsd
$ cd iptsd
$ nano meson_options.txt
Here change value: ['systemd'] to value: ['openrc'] and save the file
$ meson build
$ ninja -C build
$ sudo ./build/iptsd
With this the touch screen should already work, if the LTS Kernel is used with the respective linux-surface patches
If you want to install it and have it run automatically as a service when the device starts up you need to run: 
$ sudo ninja -C build install
$ sudo rc-update add iptsd
$ sudo nano /etc/modules.load.d/uinput-module.conf
Inside that file put the following: 
# Load uinput at boot
uinput
Save it with Ctrl + X and restart the device, it should load the touch at each boot
== See also ==
* Collection of linux-surface patches required for the kernel
* Kernel modified specifically for Microsoft Surface
* This is the userspace part of IPTS (Intel Precise Touch & Stylus) for Linux.
Microsoft Surface Pro 5 (Project Cobalt)

== Users owning this device ==
== Maintainer ==
MelvinSGjr (Maintainer soon)
== How to enter flash mode == 
Power down the Surface device. Subsequently, the USB stick should be inserted into the appropriate port. While holding the volume-down button, the power button should be pressed.
== Installation == 
Installation the same as Generic x86_64 UEFI
== How to disable touchscreen ==
check/update all packages:
 sudo pkg update && sudo pkg upgrade
download evtest via pkg:
 sudo pkg add evtest
run evtest:
 sudo evtest
Find the touchscreen. 
Here you will see the number of your touchscreen, for example my number is 8, so this is /dev/input/event8, and when you find your touchscreen, press CTRL+C.
Disable our touchscreen (temporarily, you can't turn off the terminal, also there is no solution how to do it permanently):
 sudo evtest --grab /dev/input/event8
Press CTRL+C to stop.
== Key Considerations == 
*Image Requirements: Use GPT-partitioned FAT32 USB 
*Community Status: Marked as "testing" due to partial hardware support 
*Cross-Device References: Similar installation process to Microsoft Surface Pro 4, Microsoft Surface Pro 6 (Carmel) and Asus Transformer T100Ta
Microsoft Surface Pro 6 (Carmel)

== Users owning this device ==
== Maintainer ==
MelvinSGjr (Not maintainer, page creator, but if you want to replace MelvinSGjr and be maintainer, change this)
== How to enter flash mode == 
Power down the Surface device. Subsequently, the USB stick should be inserted into the appropriate port. While holding the volume-down button, the power button should be pressed.
== Installation == 
Installation the same as Generic x86_64 UEFI
== How to disable touchscreen ==
check/update all packages:
 sudo pkg update && sudo pkg upgrade
download evtest via pkg:
 sudo pkg add evtest
run evtest:
 sudo evtest
Find the touchscreen. 
Here you will see the number of your touchscreen, for example my number is 8, so this is /dev/input/event8, and when you find your touchscreen, press CTRL+C.
Disable our touchscreen (temporarily, you can't turn off the terminal, also there is no solution how to do it permanently):
 sudo evtest --grab /dev/input/event8
Press CTRL+C to stop.
== Key Considerations == 
*Image Requirements: Use GPT-partitioned FAT32 USB 
*Community Status: Marked as "testing" due to partial hardware support 
*Cross-Device References: Similar installation process to Microsoft Surface Pro 4 and Asus Transformer T100Ta
Microsoft Surfaces with x64 CPU (microsoft-x64surface)

== Contributors ==
* JustSoup
== Users owning this device ==
== How to enter flash mode ==
This device doesn't have a flash mode, but you do have to go into the BIOS and change the boot order to boot from external drive first before installation. Make sure that you change this back afterwards as this can be a security risk. (e.g. somebody could take your computer and bypass your password using another USB stick with Linux.)
== Installation ==
# pmbootstrap init
# Select `microsoft` as manufacturer and `x64surface` as device.
# Plug in USB or MicroSD drive
# pmbootstrap install --disk=[name of drive, check using fdisk -l (usually /dev/sdb)]
# Reboot into newly flashed drive
# Repeat steps 1 through 4, but replace the name of your drive with the name of your SSD (usually /dev/sda)
== WiFI ==
TODO!
== Suspend ==
TODO!
== See also ==
Microsoft Windows Devkit 2023 (microsoft-volterra)

== Contributors ==
* jja2000
== Users owning this device ==
== How to boot into UEFI ==
Press and hold the circle button that's recessed into the device. Then press the power button (pill form button that sticks out).
While you are there, make sure UEFI Secureboot is disabled. pmOS will not be able to boot without it being disabled.
== How to boot from USB ==
Press and hold the pill form button that's recessed into the device. Then press the power button (pill form button that sticks out).
== See also ==
Close to mainline fork of the kernel for the Thinkpad X13s with a Device Tree for the device
Mirrors

Mirrors for binary packages of postmarketOS and Alpine Linux are listed here:
* https://mirrors.postmarketos.org/
* https://mirrors.alpinelinux.org/
=== Configuring pmbootstrap ===
Run pmbootstrap with the --mirror-alpine and --mirror-pmOS arguments to make it use other mirrors than the default mirrors. Right now, you will need to add these arguments to every pmbootstrap command:
$ pmbootstrap --mirror-pmOS=... --mirror-alpine=... init
$ pmbootstrap --mirror-pmOS=... --mirror-alpine=... install
It is desired to make this more comfortable (i.e. to ask for the mirrors in pmbootstrap init): 
=== Configuring postmarketOS (after installation) ===
After installation, the mirrors can be changed in /etc/apk/repositories. Login via SSH and edit the file with your favorite editor. By default it looks like this (for the edge channel):
http://mirror.postmarketos.org/postmarketos/master
http://dl-cdn.alpinelinux.org/alpine/edge/main
http://dl-cdn.alpinelinux.org/alpine/edge/community
http://dl-cdn.alpinelinux.org/alpine/edge/testing
Mobvoi Ticwatch E3 (mobvoi-ricefish)

== Maintainer(s) ==
== Users owning this device ==
== ADB and Fastboot Over USB ==
While a bluetooth connection can be used for ADB debugging while booted into Android, a wired connection is necessary for doing anything in Fastboot.
Unlike some Wear OS smartwatches, the TicWatch E3 has a 4-pin connection on the back, which can be used for a USB connection.
However, the included charging cable only has 2 pins, which do not carry data. 
Some people have found that the old charger from the TicWatch Pro 4G (which had 4 pins and allowed data transfer) can be modified to fit the TicWatch Pro 3. The TicWatch Pro 3 and E3 should be similar enough that this method will still work. See this Reddit comment from someone that got it to work.
TODO: try modding a USB cable for this and report back.
== See also ==
* Downstream kernel source
Mobvoi Ticwatch Pro (mobvoi-catfish)

== Contributors ==
* TipzTeam
== Maintainer(s) ==
* TipzTeam
== Users owning this device ==
== How to enter flash mode ==
Hold down + while booting to enter Flash Mode.
== Installation ==
== Current status ==
When the image created with the downstream kernel is flashed onto the device works, connects to USB networking fine but no display (yet).
== See also ==
* Downstream Kernel
Moment

Moment is a glossy Qt Matrix client with reasonable convergence support, forked from Mirage. End-to-end encryption is supported.
== Installation ==
Moment is available in Alpine's community repository and can as such be installed on postmarketOS Edge via the following:
 # apk add moment
On postmarketOS v21.12 and earlier, you can install Mirage instead as Moment is unavilable:
 # apk add mirage
Category:Apps
Motorola Milestone (motorola-milestone)

== Contributors ==
* Choc
== Users owning this device ==
== Research ==
* bootloader is locked https://en.wikipedia.org/wiki/Motorola_Droid#Locked_bootloader
* can boot custom kernel with https://github.com/nadlabak/2ndboot
* openrecovery: https://code.google.com/archive/p/cyanogenmod4milestone/downloads
* cyanogenmod custom rom install instructions from 2012: http://web.archive.org/web/20130719015125/http://www.mrmuh.com/2012/01/update-a-motorola-milestone-from-motorola-firmware-to-cyanogenmod-7/
== How to enter flash mode ==
== Installation ==
== See also ==
Motorola Milestone 2 (motorola-milestone2)

== Contributors ==
* jn
== Users owning this device ==
== How to enter flash mode ==
* Hold the UP key on the keyboard, press the power button
== Installation ==
=== Using pmbootstrap ===
Follow Installation/Using pmbootstrap. When asked for the device's vendor/codename, select FIXME as the vendor and FIXME as the codename. 
To flash the image to the device:
* Enter flashing mode (see #How to enter flash mode)
* Run pmbootstrap flasher flash_kernel to flash the kernel
* Run pmbootstrap flasher flash_rootfs
== Details ==
=== Partition layout ===
Device Boot Start End Sectors Size Id Type
mmcblk1p1 * 256 511 256 128K 83 Linux
mmcblk1p2 1024 2047 1024 512K 83 Linux
mmcblk1p3 2048 3071 1024 512K 83 Linux
mmcblk1p4 3072 31358975 31355904 15G 5 Extended
mmcblk1p5 4096 5119 1024 512K 83 Linux
mmcblk1p6 5120 6143 1024 512K 83 Linux
mmcblk1p7 6144 14335 8192 4M 83 Linux
mmcblk1p8 14336 15359 1024 512K 83 Linux
mmcblk1p9 15360 16383 1024 512K 83 Linux
mmcblk1p10 16384 18431 2048 1M 83 Linux
mmcblk1p11 18432 22527 4096 2M 83 Linux
mmcblk1p12 22528 23551 1024 512K 83 Linux
mmcblk1p13 23552 24575 1024 512K 83 Linux
mmcblk1p14 24576 34815 10240 5M 83 Linux
mmcblk1p15 34816 51199 16384 8M 83 Linux
mmcblk1p16 51200 67583 16384 8M 83 Linux
mmcblk1p17 67584 96255 28672 14M 83 Linux
mmcblk1p18 96256 97279 1024 512K 83 Linux
mmcblk1p19 97280 98303 1024 512K 83 Linux
mmcblk1p20 98304 106495 8192 4M 83 Linux
mmcblk1p21 106496 776191 669696 327M 83 Linux
mmcblk1p22 776192 777215 1024 512K 83 Linux
mmcblk1p23 777216 778239 1024 512K 83 Linux
mmcblk1p24 778240 1187839 409600 200M 83 Linux
mmcblk1p25 1187840 1712127 524288 256M 83 Linux
mmcblk1p26 1712128 31358975 29646848 14.1G 83 Linux
=== Notable partitions ===
* p1: First stage bootloader
* p2: Second stage bootloader, handles USB flash mod
* p3: "OMAP34 Bootloader", loads Linux
* p7: ext3 filesystem, /pds
* p15: Android bootimg
* p17: ISO9660 filesystem with some Windows tools
* p21: ext3 filesystem, /system
* p24: ext3 filesystem, /cache
* p26: ext3 filesystem, /data
=== SBF files ===
Updates that are installed through USB flashing, are stored in SBF files, called P2K Superfile by their file header. A notable example is vulnerable_recovery_only_RAMDLD90_78.sbf, which is mentioned in several tutorials for having incorrect signature validation.
There are a few tools to send SBF files to the bootloader:
* sbf_flash - simple commandline client for Linux/MacOS, but no source code
* RSD Lite - Graphical tool for windows; again, no source code
=== Research questions ===
* How does the boot flow work?
* How are SBF files structured?
* What is the vulnerability in vulnerable_recovery_only_RAMDLD90_78.sbf and how is it exploited?
== See also ==
* Rooting guide
* How to install CyanogenMod
* Wikipedia: Droid 2
* Upstream work for the Milestone/Droid 4 (Tony Lindgren)
* Droid Developers wiki (archive.org)
Motorola Moto C Plus (motorola-panelli)

== Contributors ==
* rajing2402
== Users owning this device ==
== How to enter flash mode ==
As Moto C Plus doesn't support unlocking bootloader , One has to follow the guide to install TWRP in the link provided
https://forum.xda-developers.com/t/twrp-3-2-1-moto-c-plus-with-locked-bootloader-with-guide.3727007/
== Installation ==
Install TWRP from the link given
https://forum.xda-developers.com/t/twrp-3-2-1-moto-c-plus-with-locked-bootloader-with-guide.3727007/
Flash the boot.img and system.img to boot and system partition.
Then make a clean wipe or format data from TWRP. 
Then reboot and enjoy....
== See also ==
* Device Kernel Tree
* 
*
Motorola Moto E4 (motorola-perry)

== Contributors ==
*lastramses
== Maintainer(s) ==
== Users owning this device ==
== How to enter flash mode ==
hold Power On and Volume Down buttons while device is powered off.
The device has to be unlocked before images can be replaced. It is strongly suggested to use TWRP recovery (twrp-perry-3.2.1-r1.img verified to work) if debugging is necessary. 
If the device does not boot it is possible to access log from last attempt at sys/fs/pstore/console-ramoops via TWRP.
== Installation ==
This port has been done on the SKU: XT1766 of the Motorola E4 (Perry) version
This port has been tested on the SKU: XT1765 of the Motorola E4 (Perry)
$ pmbootstrap install
plug the device to computer and switch it to the fastboot mode 
$ pmbootstrap flasher flash_kernel
$ pmbootstrap flasher flash_rootfs
finally run $ pmbootstrap flasher boot or reset the device
Device should boot with display and be accessible via ssh @172.16.42.1 
== Additional information ==
Normally display should work without any modification but at the time of writing there was a compatibility issue with Xorg packages (particularly Xorg-server) in the EDGE repository.
To resolve the issue after flashing the phone postmarketos-ui-xfce4 and Xorg-server packages have been removed and installed from 3.11/main repository.
== Hardware / sensors detail ==
For reference, sensor information from sensors sandbox (f-droid) on SKU xt1766; note that in addition to hardware-based sensors, it presumably includes software-based / derived sensors:
sensor details (sensorssandbox)
name 	vendor 	version	type
3-axis accelerometer 	Bosch 	1 	1
Compass 	Vendor 	1 	2
Orientation 	Vendor 	1 	3
Ambient light sensor 	Elan 	1 	5
Proximity sensor 	Elan 	1 	8
Flat up 	Motorola	1 	65537
Flat down 	Motorola	1 	65538
Stowed 	Motorola	1 	65539
Moto glance gesture 	Motorola	1 	65548
sx9310-cap 	 	 	
Geomag rotation vector sensor	AOSP 	3 	20
== See also ==
* Initial merge request
Motorola Moto E5 Play (motorola-james)

== Contributors ==
* e5playjames
== Users owning this device ==
== How to enter flash mode ==
volume down + power
== Installation ==
motorola-james 
Recovery Image at: 
Install with recovery ZIP file on SD card inserted into device:
$ pmbootstrap install --android-recovery-zip
$ pmboostrap export
$ cp /tmp/postmarketOS-export/pmos-motorola-james.zip $SD
$ fastboot boot twrp-james-bootonly.img
Unmount system, data, cache. Install the ZIP.
$ ip a # May display an IP with a .2
$ ssh user@172.16.42.1 # Replace with .1
$ sudo nmcli device wifi list ifname wlan0
$ sudo nmcli device wifi connect "$SSID" password "$PASSWORD" ifname "wlan0"
$ sudo apk add wget
$ sudo apk add git
$ echo "merge configs from james_defconfig and get the rest of the kernel working!"
== See also ==
Motorola Moto E5 Plus (motorola-hannah)

== Contributors ==
* Operachi
== Users owning this device ==
== Note ==
WiFi is connecting to wifi but isn't working e.g can't download packages from apk.
== Installation ==
Follow the Installation guide from 
Generic MSM89x7
== LK2nd ==
== UART ==
UART Cable: 
UART Schematics:
UART Localization:
Ground Cable:
Ground Localization:
== Photos ==
Booting:
[ OUTDATED ] Waking up from idle mode error:
Category:Devices with known UART pinout
== See also == 
*MSM89x7 Kernel
*Lk2nd
*UART Output
Motorola Moto E6 (motorola-surfna)

The Moto E6 uses A/B arm32-binder64 GSI builds.
Mobile NixOS has a working build using the downstream kernel. 
== Users owning this device ==
== How to enter flash mode ==
* + buttons or use TWRP reboot bootloader, or adb reboot bootloader
== 32bit or 64bit ==
The situation with the Moto E6 is similar to that of the Moto G6 (motorola-ali).
For whatever reason, Motorola decided to ship a 32bit build of Android with the Moto E6, despite the SoC (sdm435/msm8940) being 64bit.
A way to circumvent this problem is by using the mainline kernel or the downstream VoidKramel sources, available below.
== The Mainline Kernel ==
The mainline Linux kernel should be usable with the Moto E6. The Xiaomi Redmi 4X, which has the same chipset, already boots mainline. The Moto G5 also has a very similar chipset, and boots mainline, too. The msm8937 (Moto G5's chipset) and msm8940 (Moto E6's chipset) are pin and software compatible, according to Wikipedia.
== See also ==
* Downstream kernel source
* Downstream AARCH64 kernel source