[Recovery][2020-03-06] LineageOS Recovery 17.1 for Redmi K30 5G (picasso)

PeterCxy

Senior Member
Jul 15, 2013
278
810
133
Introduction

This is a LineageOS Recovery compiled from the source tree of LineageOS 17.1 for Redmi K30 5G. This is part of my ongoing work to port LineageOS 17.1 to this device. Work on the actual LineageOS 17.1 ROM is still under way (but it should be available very soon), while the recovery has been usable for quite some time now. Since it is not possible for TWRP to support any device launched with Android 10 for now, I figured that this might be useful even before I release the LineageOS custom ROM (e.g. people may want to flash Magisk on official ROMs).

I am aware that there is a TWRP port for this device, but since the source code is not accessible (as for as I can tell, maybe I just did not look hard enough for the source code), I can only advice against using it. The official TWRP open-sourced under GPLv3 does not even support devices launched with Android 10 yet, so there's clearly something going on here. I do not fix compatibility issues between my ROM and that TWRP port.

Instructions (Installing Recovery)

This recovery ONLY works on MIUI firmware version v11.0.11.0 (stable firmware before May 2020). Xiaomi hasn't released kernel source update for later firmware versions and you may experience blank screen and similar issues if you are on a newer firmware.

1. Download vbmeta.img, recovery-XXXX.zip (extract to get recovery.img)
2. Reboot to bootloader (`adb reboot bootloader`)
3. Run `fastboot --disable-verification --disable-verity flash vbmeta vbmeta.img`
4. Run `fastboot flash recovery recovery.img`
5. Run `fastboot reboot recovery` to enter LineageOS Recovery

Instructions (Installing Magisk)

You have to use the official Magisk, version 20.4 or later. Installing an older Magisk will make the system unbootable.

1. Download Magisk >= 20.4, put onto computer
2. Reboot to LineageOS recovery, select `Mount /system` (you may see some errors, but they can be safely ignored)
3. Select `Apply update from ADB`
4. Run `adb sideload Magisk-xxx.zip`
5. You will see a signature verification error, select `Yes` to bypass the check
6. Reboot to system to enjoy your Magisk installation.

Caveats

1. Since it's not TWRP, you cannot decrypt your /data in recovery for now, which means no data backup or recovery, and you cannot install on-device flashable zips through this recovery.
2. Since it's not TWRP, it cannot prevent your OS from overwriting recovery automatically. If you use official ROM, you may need to manually re-flash the recovery every time. I'm not sure whether this can be bypassed with some Magisk module.
3. Don't expect to be able to flash anything into /system (e.g. OpenGAPPS) on stock ROMs; you might be able to do so once my LineageOS ROM is released
4. When trying to install OpenGAPPS on LineageOS 17.1 (not released yet as of 2020-03-06), it will get stuck at the end of the flashing process. This does not affect the functionality of the installed system and gapps, and a force-reboot into system will work just fine. Use my patched OpenGAPPS in the LineageOS thread.
5. You need to always click "Mount /system" before flashing any mods into the system (i.e. Magisk, OpenGapps, etc., ROMs themselves are not affected), otherwise they will fail to install. (Clicking the option does not actually mount /system; it just sets up necessary mappings from the super partition to each of the dynamic partitions so that the installation scripts will work)

Downloads

LineageOS Recovery (17.1, 2020-03-06): https://mega.nz/#!PZRCBaiA!L-c3Tn6E295xcAIZCSt9ribpGsutX3QJRt04uyQGg_k
Changelog: Improved compatibility with OpenGAPPS (won't work with MIUI; this change is solely for the soon-to-be-released LineageOS 17.1 port)
LineageOS Recovery (17.1, 2020-03-01): https://mega.nz/#!XI4BGDQS!CPH2kIUdqaTtU_Zdzx8bUiL7FcU-G51RwmdH0MGbSRk
vbmeta.img: https://mega.nz/#!vQohmJgJ!IWAjbxGIxxxQ4OScQH8YT8oKJMx8Q-2pV83zqxbItD4

Source Code

Device Tree (including LineageOS 17.1 port): https://github.com/PeterCxy/android_device_xiaomi_picasso
Kernel: https://github.com/PeterCxy/android_kernel_xiaomi_sm7250
 
Last edited:

DyXen

Senior Member
Nov 20, 2014
66
20
28
Hello,

Thanks for the custom recovery and Magisk. Would that recovery work on K30 (not 5G) or Poco X2?

Good work and keep it up!
 

PeterCxy

Senior Member
Jul 15, 2013
278
810
133
Hello,

Thanks for the custom recovery and Magisk. Would that recovery work on K30 (not 5G) or Poco X2?

Good work and keep it up!
Probably won't. Those two phones are totally different from the 5G version, despite their similar name / non-SoC specs. They are closer to K20 than K30 5G.
 
  • Like
Reactions: DyXen

Pycoo

Member
Jun 24, 2020
11
1
0
Hello!

I am trying to follow the instructions to install the Lineage Recovery on my K30 5G (Speed edition), which is also codenamed "picasso" and shares the same MIUI ROM with normal K30 5G.

No luck with a mostly blank screen after booting into recovery:
imgur.com/a/cmpDedZ (sorry for the bad quality because I shot it with a webcam). As in the picture, only one and a half lines of yellow text are visible near the top, which reads "Lineage Recovery" and "Redmi/picasso/picasso". The other part is just in grey without anything except a dotted vertical blue line (almostly invisible in the picture; not the thick white lines which is just reflection) in the middle of the screen. Besides, it seems to respond to the power/volume key.

I notice that you mentioned in the other thread that your ROM requires a specific MIUI firmware version. Then does the Recovery also require so? (I didn't have a chance to try that because my phone got fully bricked immediately after downgrading to V11.0.11.0 (now fixed).) Or do you kindly have any advice?

Thanks.
 
Last edited:

PeterCxy

Senior Member
Jul 15, 2013
278
810
133
Hello!

I am trying to follow the instructions to install the Lineage Recovery on my K30 5G (Speed edition), which is also codenamed "picasso" and shares the same MIUI ROM with normal K30 5G.

No luck with a mostly blank screen after booting into recovery:
imgur.com/a/cmpDedZ (sorry for the bad quality because I shot it with a webcam). As in the picture, only one and a half lines of yellow text are visible near the top, which reads "Lineage Recovery" and "Redmi/picasso/picasso". The other part is just in grey without anything except a dotted vertical blue line (almostly invisible in the picture; not the thick white lines which is just reflection) in the middle of the screen. Besides, it seems to respond to the power/volume key.

I notice that you mentioned in the other thread that your ROM requires a specific MIUI firmware version. Then does the Recovery also require so? (I didn't have a chance to try that because my phone got fully bricked immediately after downgrading to V11.0.11.0 (now fixed).) Or do you kindly have any advice?

Thanks.
The recovery may not work on newer MIUI firmware versions because Xiaomi didn't release corresponding kernel source updates for those newer versions. This is unfortunate, but I can do nothing about it. Ask Xiaomi to release their source code.
 

leninsaccountant

New member
Nov 6, 2018
2
0
0
Hi Peter,

Thanks very much for porting Lineage OS onto the Redmi K30 5G Pro. Mine arrived today, and I'm planning on installing your port ASAP.

However, I have run into a problem: The device shipped with MIUI version 11.0.12.0. Your post in the Lineage OS Recovery thread says that I can only install it on MIUI 11.0.11.0.

Do you know how I can downgrade my MIUI software so that I can install Lineage OS Recovery?

Thanks!