• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][OFFICIAL][R] LineageOS 18.1 for Xiaomi Redmi Note 5 Pro [whyred]

Search This thread

PrinceVince

Member
Apr 20, 2016
26
0

No to "flash firmware via CLI" or to both that and "flash firmware TWRP"?

If no to both, what approach do you recommend instead?

My phone is not rooted btw (never found it necessary for daily use). I can't really find clear guides online, everyone seems to have different convictions on the matter, and that's not reassuring.

Update: I'm on TWRP 3.3.1-0 now, which is the latest version willing to boot on my device. Unless a higher version should work, I guess we can leave it at that. This leaves the Firmware question.
 
Last edited:

PrinceVince

Member
Apr 20, 2016
26
0
I would suggest you to do a clean flash. Keep in mind that once you upgrade, it might be hard to go back to 8.1 Oreo roms. Sim might not work in those old roms.

Right, a clean flash (starting over) is my intent. I have my essential data backed up already.

So here's the process i followed to ensure 0 issues -
Flash the last Miui 11 fastboot rom using Mi Flash. (Miui 12 fastboot roms for whyred doesn't boot. Avoid them)
Flashing the last version of Miui 11 fastboot rom will bring you on the latest firmware.

I should have mentioned that I don't have access to MS Windows. Since the LOS guides don't mention the Xiaomi tools, I assumed they wouldn't enter the picture again.

So the MIUI 11 OS ships with the V12 stable firmware? I can certainly see the appeal of just getting one's firmware properly updated this way. Someone in this thread say “Just flash the [V12] firmware via TWRP”. If the latter is viable for my use case, I'd much prefer that!

Btw, does "MIUI 11 fastboot ROM" simply mean that the ROM is built in a fastboot-compatible way? Are there other versions that aren't?

While flashing be careful [...]

Thanks a lot for the detailed pointers.

I personally recommend you to use official LineageOs 18.1. I'm using it since June and it is working really. Zero bugs. Super smooth. Although it had less customization features but I like it compared to feature filled heavy roms.

Yup, that's my plan, I'm not a heavy phone user anyway, the conservative LOS design served me well.

And remember, 99% of the time, a bootloop can be fixed by formatting data. But it will wipe your internal storage totally. So before installing a new rom or updating old rom, backup important files and apps, just in case you are forced to format data.

Yes, I'm totally ready to lose all data, just wanna avoid bricking the phone.
 

SunilSuni

Senior Member
Jul 5, 2017
1,616
957
Bengaluru
Hello guys, sorry if this isn't on-topic enough – I'll make a separate post and delete this one if this doesn't belong here!

I currently use my Redmi Note 5 Pro (Global) with an unofficial LOS 15.1 (Android 8.1.0). I now want to upgrade to this official LOS 18.1 build without bricking the phone.

My TWRP is 3.2.3-2 an I never upgraded the Firmware since buying the phone. MIUI version was 9.5.19 at the time btw. My questions:

1. Should I upgrade to latest TWRP before flashing LOS?
2. Should I upgrade the Firmware to V12.0.2.0?

I have the adb tools (fastboot) installed, and my phone shows up ready when I run fastboot devices. Should I try to flash via these CLI tools, or should I try to flash from within my current TWRP? My lack of experience makes me concerned about doing the wrong thing with these upgrades.

Thanks!
Yes upgrade to latest twrp version 3.5.2

You dont have to upgrade your firmware because LineageOS relies on firmware version 9.5.19 which you are already using

If you want you can flash latest MIUI 12 firmware

Upgrading process
1. Flash twrp 3.5 and boot to twrp
2. Wipe data cache system and data
3. Flash LineageOS 18.1
4. Flash opengapps android 11 pico package or any other package
5. Wipe cache and reboot to system.

If you want to do CLI method then follow official installation guide
 

1emrys1

Senior Member
May 29, 2013
765
566
Thats not correct. V12.0.2.0.PEIMIXM fastboot rom boots up normally.
Oh. I don't know what went wrong on my end then. I tried flashing 12.0.2 using mi flash and it succeeded but it didnt boot on my whyred. So i flashed the last MIui 11 build which booted and then i continued with orangefox and lineage installation.
If miui 12 is working for others then they should flash that.
 

1emrys1

Senior Member
May 29, 2013
765
566
Right, a clean flash (starting over) is my intent. I have my essential data backed up already.



I should have mentioned that I don't have access to MS Windows. Since the LOS guides don't mention the Xiaomi tools, I assumed they wouldn't enter the picture again.

So the MIUI 11 OS ships with the V12 stable firmware? I can certainly see the appeal of just getting one's firmware properly updated this way. Someone in this thread say “Just flash the [V12] firmware via TWRP”. If the latter is viable for my use case, I'd much prefer that!

Btw, does "MIUI 11 fastboot ROM" simply mean that the ROM is built in a fastboot-compatible way? Are there other versions that aren't?



Thanks a lot for the detailed pointers.



Yup, that's my plan, I'm not a heavy phone user anyway, the conservative LOS design served me well.



Yes, I'm totally ready to lose all data, just wanna avoid bricking the phone.
Every miui rom has two versions - fastboot and recovery. Recovery roms are smaller and they're the ones that can be flashed using recovery.
Fastboot roms are bigger and have all the partitions and data that is needed to completely reset the phone. When the phone is bricked or messed up tto much by random zips, flashing the fastboot rom using PC resets it totally. Its like a clean slate.

If you want a totally clean slate - flash fastboot rom. But needs a large file to be downloaded and needs pc
If you want an easier method - flash recovery rom using latest orangefox. Still more than 1 gb file
Even more easy method - flash firmware. This firmware was taken out from the recovery rom and turned into a small zip. Generally 50-70mb

But you are coming from 8.1 Oreo like me. Flashing the fastboot rom will guarantee a complete clean slate. Since you don't have pc, try the method of updating orangefox, flashing firmware and then flashing los. Remember to format data before flashing los.
If you get any errors or problems in your los rom - like sim error, or location error etc then the only method might be to find a pc and flash fastboot rom and then go to lineage again.

If you don't get any errors then congrats, updated recovery and firmware was enough.
 
  • Like
Reactions: PrinceVince

PrinceVince

Member
Apr 20, 2016
26
0
Yes upgrade to latest twrp version 3.5.2

Unfortunately 3.3.1 (from 2019) is the latest release my phone is willing to boot. From 3.4 upwards I get an eternal MI logo. I don't assume there's anything I can do about that? From what I read one needs a more recent version to accommodate Android 11 (LOS 18.1).

Should I try the discontinued Orange Fox which 1emrys1 alluded to? Maybe that gives me a better shot at having a more recent bootloader?

You dont have to upgrade your firmware because LineageOS relies on firmware version 9.5.19 which you are already using

If you want you can flash latest MIUI 12 firmware

I see, that's good to hear.

Upgrading process
[ ... ]

Thanks a lot, this gives me confidence to go ahead. The various "help, I bricked my phone" threads in the Redmi section made me cautious, as I don't have another phone to fall back onto.
 

PrinceVince

Member
Apr 20, 2016
26
0
Every miui rom has two versions - fastboot and recovery. Recovery roms are [...]

That makes sense now, thanks.

If you want a totally clean slate - flash fastboot rom. But needs a large file to be downloaded and needs pc
If you want an easier method - flash recovery rom using latest orangefox. Still more than 1 gb file
Even more easy method - flash firmware. This firmware was taken out from the recovery rom and turned into a small zip. Generally 50-70mb

But you are coming from 8.1 Oreo like me. Flashing the fastboot rom will guarantee a complete clean slate. Since you don't have pc, try the method of updating orangefox, flashing firmware and then flashing los. Remember to format data before flashing los.
If you get any errors or problems in your los rom - like sim error, or location error etc then the only method might be to find a pc and flash fastboot rom and then go to lineage again.

OK, I'll give that a shot and Windows method as last resort (setting up a VM might work).

If you don't get any errors then congrats, updated recovery and firmware was enough.

Let's hope, thanks again!
 

PrinceVince

Member
Apr 20, 2016
26
0
Hello guys. With the help of someone in chat I was able to regain functionality (I had messed things up after post #949) and install LOS 18.1. I just erased my earlier posts so you don't waste your team sifting through my trials and tribulations.

I will report back later with how I did it (in case someone runs into similar issues). Thanks again for your help!
 
Last edited:

1emrys1

Senior Member
May 29, 2013
765
566
Hello guys. With the help of someone in chat I was able to regain functionality (I had messed things up after post #949) and install LOS 18.1. I just erased my earlier posts so you don't waste your team sifting through my trials and tribulations.

I will report back later with how I did it (in case someone runs into similar issues). Thanks again for your help!
I just saw this message. Glad that you managed to flash LOS. Enjoy your new rom.
How's your battery holding up? Accubattery says that mine is at 71% capacity. I am planning to get a new one.
 

PrinceVince

Member
Apr 20, 2016
26
0
The trouble

  • Since neither recent TWRP nor Orangefox releases would boot, I decided to try flashing the firmware first using my old TWRP, as the TWRP site suggests old firmware might cause the incompatibility. This flash appeared to finish without error, but when I rebooted LOS didn't boot (OK) and neither did fastboot mode (bad).
  • My old TWRP kept working fine, so it was my last leg to stand on. I then decided to just try flashing LOS 18.1, even though Android 11 based ROMs should use newer TWRPs. I put the LOS ZIP on my external SD card and flashed it from within TWRP.
  • This worked! Alas, TWRP always flashed into the directory where the ZIP file is, so it flashed the whole OS onto my SD card, not the phone root! I could actually boot into LOS from the SD card though, wicked!
  • With fastboot broken, and no response to adb in TWRP, I was once again out of ideas on how to get LOS installed properly.

The solution

Someone in a chatroom was able to guide me through. He said it's unlikely fastboot is actually broken, so I booted back into it and though the screen stayed blank, it turns out the device still responded to abd, I hadn't even tried again!

I then tried a LineageOS recovery (right column) and that booted! It's very basic but allows sideloading packages/scripts and isn't outdated like my TWRP, so I had what I needed for the LOS flash.

Code:
# Boot recovery (enable sideloading once in recovery menu)
$ fastboot boot lineage-18.1-20210920-recovery-whyred.img

# LOS 18.1
$ adb sideload lineage-18.1-20210920-nightly-whyred-signed.zip

# GApps
$ adb sideload MindTheGapps-11.0.0-arm64-20210920_084011.zip

To my delight, all commands finished without error and I could reboot into a fresh LOS, which I'm running now. I think I did my best to wipe prior in TWRP, so that part should hopefully be fine as well.

I still don't know if my firmware update actually worked. Baseband reads 660_GEN_PACK-1.336736.1.337834.1. I compared that to others on the web, and assuming this numbers counts up, it looks fairly new?

TL;DR

LineageOS recovery image to the rescue.
 
Last edited:

PrinceVince

Member
Apr 20, 2016
26
0
I just saw this message. Glad that you managed to flash LOS. Enjoy your new rom.
How's your battery holding up? Accubattery says that mine is at 71% capacity. I am planning to get a new one.

I haven't looked into it yet. I think mine is still OK, I recharge about every ~3 days I think. I'm a light user, mostly messaging, music/audiobooks/podcasts (from device, never streaming), simple browsing, no videos. So that's not very representative.
 

bojack_horseman

Senior Member
Jun 23, 2017
58
16
Hello. I've flashed this ROM a couple of weeks ago with mindthegapps and magisk. Now I'd like to update the ROM. Is it enough to flash the new ROM file or should I also reflash gapps or magisk? Thanks
 

mik101

Senior Member
Jul 13, 2010
667
128
Hello. I've flashed this ROM a couple of weeks ago with mindthegapps and magisk. Now I'd like to update the ROM. Is it enough to flash the new ROM file or should I also reflash gapps or magisk? Thanks
You can just flash the ROM. If your magisk manager isn't hidden it will recover itself automatically after you flash the ROM. Do not flash gapps again. Works for me every week using TWRP 3.5.2. I found if I leave magisk manager hidden the magisk recovery script doesn't always run and then I have to manually install magisk from the magisk manager again after rebooting.
 

djfron

New member
Sep 30, 2021
1
0
Hello,

I have always read you but I have never written until today. I have gone from MIUI to this version of Lineage OS and I have these questions:

1. Can call recording be activated by default? Without having to activate it on every call? If not, what apk do you use?

2. I have tried to send the screen to TV of different brands (although they are not of the latest model) and although it finds them and I give it to connect, it does not finish doing it. If it is a recognized bug, is there an apk that works for this?

3. I want to remove apks that come by default with the ROM, what way is there to uninstall them or is there an apk for it. If I uninstall them, will they re-install when I upgrade to a new version of nightly?

I am root.

Thanks.
Regards.
 

1emrys1

Senior Member
May 29, 2013
765
566
Hello,

I have always read you but I have never written until today. I have gone from MIUI to this version of Lineage OS and I have these questions:

1. Can call recording be activated by default? Without having to activate it on every call? If not, what apk do you use?

2. I have tried to send the screen to TV of different brands (although they are not of the latest model) and although it finds them and I give it to connect, it does not finish doing it. If it is a recognized bug, is there an apk that works for this?

3. I want to remove apks that come by default with the ROM, what way is there to uninstall them or is there an apk for it. If I uninstall them, will they re-install when I upgrade to a new version of nightly?

I am root.

Thanks.
Regards.
1. No call recording by default. I don't know any all that allows it by default but you can try apps from play store and see if any of them work.

2. Chromecast works well on the rom but miracast probably does not. You should search the specific tv brand name and how the casting works on it. I don't use this feature much. But if miracast doesn't work in lineage , you can't do much to add the feature.

3. You can use a root app like titanium backup or ice box or SD maid etc to remove them. Or just search system app remover. I would suggest you to freeze the app and let it. Don't remove it. Freezing it makes sure that it can't use any ram or battery. And since it is in the system partition, removing it won't give you any extra space either. You can't use the system partition for your user apps anyway. So just feeze it and leave it. It will disappear from launcher. There's will be less chance of any errors or problems. If you choose to remove them then updates will bring them back. If you freeze them then they should stay frozen after updates
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I don't have a PC right now... So that means it's not possible to install Gapps? It actually doesn't work without sideload adb? mmmmhhh. that's bad.
    Step 7 mentioned in my post, normally include that you have ever install custom recovery.
    As I'know and as you don't brick your phone, after installing custom recovery PC will not be really required.
    If you want use Lineageos with Gapps. Make a clean install and never boot in before installing Gapps.
    Gapps must be installed and as I know can only be installed by custom recovery :Orange Fox, TWRP (...???; I appreciate mention of any others)
    I copied the file before update and this fixed the problem.
    Thanks for your help.
    So, do i need to do something (wipe ?) before each update or from now on
    in order to update i need only to use the updater ?
    If you use Orange Fox like i mentioned:
    Normally, nothings to do on stock update.
    You can just think to delete second to last, and older if needed: directory /data/magisk_backup_************* who are not automatically cleaned for now.
    I'm happy if I've helped you, and I hope your device, will have a long way.
    1
    Thanks for your help! Okay, I have installed LOS many times with Gapps an ever since it's clear to me :
    1. put LOS and Gapps zips onto external sdcard (md5 of both checked)
    2. Format Data (complete including internal SD). Wipe /system and /cache
    3. install LOS and Gapps right after
    4. reboot
    Now it won't work with LOS18.1 as I run back into TWRP/OrangeFox (whatever recovery I try), if I install Gapps (nano or pico). If I install LOS alone it's booting normal.
    So I don't get the sideload thing... should I do that without a PC? Doesn't make sense to me.

    First, backup your vendor partition.
    Wipe or format vendor partition.
    Install and cross the fingers.
    Sorry but I will go to bed...
    1
    This rom is amazing, I have tried many and for me this is the best by far, thank you very much for sharing it :D
    I have a little question, does this rom use EAS or HMP?
    HMP
  • 72
    2okPze5.png


    LineageOS is a free, community built, aftermarket firmware distribution of Android 11, which is designed to increase performance and reliability over stock Android for your device.

    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

    Mantainers

    - srfarias
    - SebaUbuntu

    Installation instructions
    Here

    Device info
    Here

    Download
    Here

    Sources
    LineageOS
    Kernel sources

    How to report a bug
    - Please head over to LineageOS issues page in GitLab and create a report here
    18
    To clarify:
    It was not a device-side issue, nor a ROM side issue, it's actually a build server isssue
    If someone want an accurate explanation, ask me
    If you don't, just wait the next build
    16
    Updated thread for 18.1 🎉
    9
    Re: SoterService & Qualcomm Location

    1. SoterService

    SoterService [...] helps chinese users with secure payments (e.g. WeChat)
    So for starters it certainly isn't useful to anybody outside China. As for users in China (not Chinese users, there's a difference), official LOS isn't really suitable for them anyway without further patching (at least fallback DNS, SUPL, captive portal and connectivity test URLs should be changed, Chinese-specific fonts and IME also aren't included). In practice not many people there are going to install a custom ROM on a device like this and if they do, it's most likely going to be something locally-brewed like Moqu. Thus, "helping users in China" (not "Chinese," since Chinese people all over the world by and large don't and in fact usually can't use Weixin either unless they happen to be in China) is not a realistic consideration. And as you can see it's also not as if not having this preinstalled would be an extra burden to any user in China.

    This APK was not included in official LOS 15.1. I don't even recall it being a part of MIUI Global ROM for this device. Those lucky few who have the use for it (if anybody at all) will know how to install it, just like everybody else installs all kinds of other stuff on top of LOS. However, Lineage OS defines itself as a "free [as in 'libre'] and open-source operating system," and incorporating proprietary, third-party blobs of dubious benefit to the user is hardly in line with the project's objectives.

    https://www.github.com/Tencent/soter/wiki [link edited to remove Google Translate]
    Please read this and check why we need it.
    I read it, again (I first did when I was looking up this APK before even writing anything in this thread) and all the more I don't see any reason why it should be included. On the contrary, it's specific to China and only compatible with some of the devices launched in that market. Why would it be so indispensable that it just has to be part of the official LOS build for this device? (If you were referring to some specific statement in what's written there, feel free to quote it, and I will look at it again.)

    For the record, I never said it was spyware, just a leftover that serves no purpose. But device security can be compromised in a number ways, for example through an exploitable bug in the APK. We all know the whole vendor blob for this device is completely outdated. The less is kept of it in its original form, the better. If something can be safely removed without impact, this should be the default action to take.

    This blobs and apps are in stock ROMs, so, to not break something, we leave them in place.
    The whole point of having a custom ROM is to be able to critically pick and choose what should be in it from the usability perspective. Obviously this involves informed experimentation and something can occasionally break, so what? Reading something like this here makes me want to scroll back to the top of the page to check if this is still "XDA Developers."

    Vendor blobs are not sacred. Xiaomi's in particular are usually rather bad. For instance, previous vendor blobs for this device enabled Wi-Fi diagnostics by default, needlessly spamming the logs and draining battery. Should this have been kept too?

    2. Qualcomm Location

    Again, this is a system component
    What is that even supposed to mean? By definition it's a user-space application, so it's a "system component" as much as Candy Crush is in Windows.

    as you said, can help in specific scenarios
    I wanted to save everybody the boring details. In practice I doubt it makes any difference. It's supposed to work by querying the location from nearby Wi-Fi access points but only those with supported SoCs in them (so QCA-only I believe), and then again only those that were configured to provide it.

    The benefit is supposedly better location indoors, so it could be life-saving if you get lost in a shopping mall but 99.9% of the time when you need precise location is when you are outside and not near any particular Wi-Fi access points.

    The idea behind it is not unsound and it could indeed save battery life if GPS doesn't have to run in such situations (and if it really is indoors then it wouldn't work anyway) but the bigger point is that Google (and others) have already been doing the same for years and are better at it. So if you install Google Apps you are already getting all of this functionality anyway.

    You can't blame Qualcomm for trying even though they're late to the game but essentially it's about duplicating what already works just was "not invented here." Your location won't get any more precise than what Google already provides, all it accomplishes is Qualcomm being able to use your battery time and data allowance to seed their own database so as to compete with the incumbent.

    with MIUI you can't disable this stuff so that's an improvement
    Actually, here you can't disable it either: given how it's set up, there is no setting for it anywhere in the UI, it just runs all the time in the background. I think it'll also interfere if you wanted to use mock location.

    So even if Qualcomm location were to stay by default, there should be a toggle for it, or at the very least the framework overlay settings should be restored to their defaults because now it's effectively impossible to use any other location provider: it's either Qualcomm or nothing.

    Since LOS does not include a complete location solution (people will install Google Apps, MicroG, or perhaps something else), arguably it shouldn't force a partial one on the user either. To be brutally honest, I thought these settings were left like that by mistake, couldn't imagine anyone defending them but here we are. (Feel free to also check out the discussion I linked to in my previous post, and the commit where it was removed for beryllium - Xiaomi Pocophone F1.)

    ***

    I appreciate your effort in building this ROM and making it official. I understand the way you responded must be due to the impression that I attacked or criticized your work. This was not my intention.

    I'm not saying anybody should do anything, I'm just sharing what I did. Hopefully it can help others one way or another. And if I'm wrong about something I'll be the first to admit it, after all I'm here to learn.

    In the end it's your work and your decisions, you'll do as you wish. But there is a valid argument for the majority of the users and readers of this thread not to have these included in the official LOS build, which is why I wrote about it.

    Agree or disagree, either way it's really not necessary to make any of this personal.
    go completely offline and buy a Nokia 3310
    Don't be racist and don't apply stereotypes, not all chinese app spy on you