Xiaomi Mi Note 2 (xiaomi-scorpio)

Contributors

 * Tooniis

Maintainer(s)

 * Tooniis

How to enter flash mode
Hold Power + Volume Down while the phone is turned off. This will make the phone boot into fastboot mode

Installation
You will need to unlock the bootloader in order to be able to flash anything onto the phone.

Installing TWRP before doing anything else is recommended, as it makes dealing with the phone easier later on, and allows for quick restoration by taking backups of  and , then flashing them back in order to restore the device to its original state. Note that this method has only been tested with LineageOS, and running its installation ZIP in TWRP after restoring the backup was necessary to get it to boot, otherwise it would just keep loading forever.

Pre-built Images
Follow the installation article to download image files.

Once downloaded, decompress the images with : $ xz -d -xiaomi-scorpio.img.xz $ xz -d -xiaomi-scorpio-boot.img.xz Once decompressed, you may flash the main image to either: $ fastboot flash system -xiaomi-scorpio.img $ fastboot flash userdata -xiaomi-scorpio.img Then you may either flash the boot image: $ fastboot flash boot -xiaomi-scorpio-boot.img or boot it directly without flashing: $ fastboot boot -xiaomi-scorpio-boot.img
 * : ~3.2 GB. Will allow you to keep the main part of your existing Android installation as well as your data.
 * : Extends close to the remaining size of your storage. Will wipe your Android installation along with your data.

Manual Build
To build your own image, follow the pmbootstrap article.

Once you reach the flashing step: $ pmbootstrap flasher flash_rootfs
 * Flash the rootfs:

$ pmbootstrap flasher flash_kernel You can also avoid flashing them and instead, boot the kernel directly: $ pmbootstrap flasher boot
 * Flash the kernel and initramfs to the boot partition:

Mainline
MSM8996 common mainline kernel fork 1: Internal component

2: Driver of component

Known issues:

 * The display comes up blue after initialization sometimes. Rebooting makes it work usually. This issue has not appeared since MSM DRM was set to be compiled as a module. Should be completely resolved with the addition of an interconnect driver.
 * System locks up when accessing memory intensively. This might be caused by writing to a protected area of memory. Adding this reserved memory region fixed it.
 * System crashes when modem and ADSP get powered up at the same time. Fixed temporarily through.
 * USB VBUS turns off instantly when a USB device is plugged into an already plugged in OTG adapter. For now the OTG adapter must be plugged into the phone with the USB device plugged into it already. Fixed.
 * WiFi range is bad. This is due to lack of board firmware. Supplying board firmware made from the vendor firmware for the downstream QCA_CLD driver makes it lose all APs in a scan as soon as an attempt is made to connect to one of them, which means it is impossible to connect. Fixed in.