Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add recovery flash method and widevine l1 warning #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions wiki/Fix_sensor_issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,33 @@

## Fix sensor issues

On Xiaomi devices, sensor data is stored in a partition called *persist*. This partition is flashable and an image of it is included with all fastboot ROMs but devices made after 2016 don't allow you to modify it in fastboot mode, regardless of the status of the bootloader. Unfortunately, software issues may cause the sensors in the device to misbehave or stop working completely, but usually reflashing this partition solves these problems. If the partition is write protected in fastboot mode, you'll have to use Qualcomm's EDL mode to flash it. The EDL flashing script originally skips the persist partition but you can modify it to flash that as well when you are flashing with MiFlash.
On Xiaomi devices, sensor data is stored in a partition called *persist*. This partition is flashable and an image of it is included with all Fastboot ROMs but devices made after 2016 don't allow you to modify it in Fastboot mode, regardless of the status of the bootloader. Unfortunately, software issues may cause the sensors in the device to misbehave or stop working completely, but usually reflashing this partition solves these problems. If the partition is write protected in Fastboot mode, you'll have to use Qualcomm's EDL mode or a custom recovery to flash it. The EDL flashing script originally skips the persist partition but you can modify it to flash that as well when you are flashing with MiFlash.

### Instructions
**Warning:** Reflashing `persist` might cause your device to lose the Widevine L1 DRM certification which is used to stream DRM protected content in HD on services such as Netflix or Amazon Prime Video.

## Instructions

### Instructions using TWRP

**Requirements:** An [unlocked bootloader](Unlock_the_bootloader.md) and [TWRP](Flash_TWRP_and_custom_ROMs.md) or a TWRP-based custom recovery (OrangeFox, PBRP, etc.)

1. Download the Fastboot ROM you want to flash from [here](https://xiaomifirmwareupdater.com/miui/) and unzip it.

**Note:** You might get a single .tar file after unzipping which has to be unzipped again in order to get the necessary files.

2. Extract `persist.img` from the `images` folder inside the unzipped Fastboot ROM archive.

3. Enter TWRP.

**If the device asks for decryption password**, input the PIN/password you use on your lock screen.

4. Connect the device to your PC and transfer `persist.img` to the device's internal or external storage.

5. Navigate to the `Install` menu, tap `Select image`, browse for the file that you just transferred and flash it to the `Persist` partition.

6. Once the flashing process has completed, reboot to `System`.

### Instructions using MiFlash in EDL mode

**Requirements:** Qualcomm Snapdragon chipset

Expand All @@ -30,4 +54,4 @@ On Xiaomi devices, sensor data is stored in a partition called *persist*. This p

9. Disconnect the device and hold the Power button until the device turns on.

The first boot may take up to 15 minutes.
The first boot may take up to 15 minutes.