yashsingh1/xdaforums huggingface dataset:
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Introduction

A spinoff thread from the previously-supported-official thread by Atman.

This thread will contain my unofficial builds for violet. On the 16.0 version, the only real fix (so far...) have been the fingerprint scanner sepolicy denials. I aim to do monthly/bimonthly builds to keep up to date with security patches, as so far I haven't encountered any other issues (let me know).

On the 17.1 version, I have slowly figured out how to make it work, but it is highly experimental.

The 16.0 ROM is stable (I use it as my daily driver).

If you find any bugs, please do take screenshots, give a way for me to replicate it on my device, and send a logcat. If you're super smart, use a logcat and filter for the keyword so I don't have to do even more digging :)

Please don't tell me to use PE/Mokee commits.

Yet another update. I've got 17.1 builds working without having to resort to cheap tricks and commits (sort of).

Flash instructions

Same as usual:

Reboot to fastboot and flash recovery with fastboot (You have to use the TWRP linked below. Other versions likely won't boot.)

Reboot to recovery TWRP

Wipe to format data, wipe again to wipe system and cache (not necessary if you're updating, only if you're switching ROMs)

Flash firmware (ADB sideload) (this step is dated. The newer builds have a higher target firmware so you should try to flash without the firmware first, then flash the firmware if the ROM doesn't work.)

Flash the ROM (sideload)

Flash GApps, Magisk, etc. as necessary

Done

Downloads (16.0) (STABLE)

Firmware (Dated firwmare)

Recovery (TWRP)

11-Jun-2021 build (with 05-May-2021 security patch), and MD5 Digest

For previous builds see below

Downloads (17.1)

Here's the 17.1 ROM. Here's the md5 hash. It has the March security patch.

It currently does not boot. If you would like to try and help with development, flash the ROM, and then flash the Chinese Q firmware on top of it (this can be downloaded from xiaomifirmwareupdater). Be warned that there is a risk that the newest android keymaster may re-encrypt your device, which in the worst case may require you to format data and/or reflash recovery and/or flash a fastboot MIUI rom. So, it's a bit risky, but likely won't be an issue.

Credits, Sources, etc.

Too many to mention. Atman Shah for getting this device supported earlier last year. ThE_MarD (Marc Bougoin) for other help. Various other names I've seen - Bruno Martins, Weikai Kong, Wang Han... all of the Lineage dev team. I'm sure I'm missing many people who have been involved in the project. I am new, and very much a latecomer to all of this.

Device Tree: https://gitlab.com/mzha/android_device_xiaomi_violet

Kernel Tree: https://gitlab.com/mzha/android_kernel_xiaomi_violet

Other things see my gitlab: https://gitlab.com/mzha

A telegram group to discuss development for 16.0/17.1: t.me/lineageos_violet

Previous builds

07-Nov-2020 (incl. Oct-2020 security patch), with 07-Nov-2020 MD5 Hash

13-Jul-2020 (incl. Jul-2020 security patch), with 13-Jul-2020 MD5 Hash

11-May-2020 (incl. May-2020 security patch), with 11-May-2020 MD5 Hash
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] e2vinay:
Good to see some devs showing interest on this os

will you be adding any customisation? or does it continue as pure lineage os?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Pure LineageOS. There's more than enough customised ROMs for violet already in my opinion... and I also don't have that much time :p
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] e2vinay:
That's great

by any chance will you consider adding signature spoofing support? that would be really great. it would help many users go for microG instead of gapps

I completely understand you're starter.

great work. good luck.

Thank you
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
No, but there are a few alternatives:

Merge the changes from this RFC and build it

Download the spoofer from https://download.lineage.microg.org/violet/, or get the (ed)Xposed module, or other possibilities...
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] RupeshRN:
Will be official Lineage Os?

:)
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] himanshu fulmali:
Can we expect los 17 soon?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
As per OP: I'm waiting on both Android 10 firmware blobs + kernel to be released by Xiaomi... I'm not sure how the other ROM devs get around this, if it's easy to forward-port or not. But for now, only LOS 16.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] ThE_MarD:
Heyyo [MENTION=8098310]hcnulma[/MENTION] good to see you got your thread up and going! :)

As for 17.1? You can work with your current kernel and cherry-pick the fixes that other maintainers of violet are using and same for the device tree and vendor blobs.

As an example, LeEco msm8996 devives are using kernel source code from Marshmallow just rebased on a CAF Q Tag for our kernel since we never got anything newer...

Even once Xiaomi release their kernel source code for Android 10? It would probably take quite a bit of work to shave it down to what you specifically need and then importing it on top of a fresh CAF tag for the kernel or even more work to try and inplement it into uour current kernel.

To get official builds of LOS 16.0 going again for violet you would need to show that you are capable of fixing any major bugs that arise as well.

https://wiki.lineageos.org/submitting_device.html

anywho, hope this information helps bud!
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] WallyWest:
I am pretty sure you can use the pixel experience device tree and kernel to compile the ROM just like every other rom
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Zjh0094:
Thank you. If he is stable enough I will use it to build RR PIE
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
It's definitely stable...

From what I understand, using their kernel tree will mean I'll have to change a lot of references in my own device tree, and using their device tree on top of that is essentially just building PE, not Lineage.

In any case, I did find the Snapdragon 675 (ie sm6150) kernel trees for Q in several places, https://github.com/sm6150-dev/android_kernel_xiaomi_sm6150 and https://github.com/PixelExperience-Devices/kernel_xiaomi_sm6150. I'll take a closer look into this...

I did find the most recent CAF kernel under sm6150 here, but there seems to be an issue of this not showing up in /quic/la... Something will be resolved. Hopefully.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] RupeshRN:
Request to create group for discussion in Telegram

:)
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] WallyWest:
you won't have to make any changes in the kernel as far as I know and as for the device tree you just have to make some changes according to the ROM

as every ROM uses the same device tree

and you won't be making pe instead of lineage as the same device tree and kernel are used in every Q ROM except EvoX which uses crimson kernel
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Zjh0094:
Thanks. I will use it as my benchmark to build RR pie.

---------- Post added 15th February 2020 at 12:03 AM ---------- Previous post was 14th February 2020 at 11:57 PM ----------

/quick/la/msm-4.14
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
It is precisely the device tree that I'm worried about. From experience, PE has a lot of platform-specific stuff that Lineage doesn't (and the same the other way), and also from trying to figure out the fix to 16.0 I realised there's a lot of context/definition differences between the two device trees. I'd still give it a look, but I suspect it might be easier to just modify the current 16.0 device tree.

https://t.me/lineageos_violet.

Yeah I already figured it was msm-4.14. Have already cloned it but am also considering cherrypicking changes that other devs have done to their kernel trees from 16.0 -> 17.1 as opposed to starting with the CAF kernel. A work in progress.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] himanshu fulmali:
Sir I'm noob but mokee dev released android 10 and i think mokee and los are pretty same, will he not help you if you contact him?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
An update on where I am:

I'm not sure whether to use the PE or Mokee vendor trees. Neither of them have much resemblance to 16.0 tree I have so cherry picking changes will be a nightmare.

The PE vendor tree has a lot of device-tree-specific commits, which will make it a headache to untangle later on. The Mokee vendor tree also has a lot of differing firmware files, though is a bit more similar to the LOS tree.

I'm doing a bit of experimentation to figure out which one will last better in the long run, since I can't seem to get my hands on any MIUI Android Q firmware blobs.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Yet another update. I've got 17.1 builds working without having to resort to cheap tricks and commits (sort of).

Here's the 17.1 ROM. Here's the md5 hash. Needless to say, it's very experimental, not stable in the least (expect to get past boot maybe 70% of the time) - I'm getting very mixed results when experimenting myself. Nevertheless, try it out, see what you get. Install it the same way as usual. Keen to get as many eyes on this as possible :)
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Yet another another update on 17.1 progress (stop asking me to use PE trees kthx), a ROM built on a modified/stripped down version of another xiaomi device. Cheers ThE_MarD.

Here's the ROM

Here's the md5 hash

Flash it with the recoveries in the following order: TWRP (Pie) > TWRP ('official') > TWRP (test).

Instructions to flash are in the main post. Send pstore/ramoops/dmesg/recovery/logcat logs. cheers
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] vedanta02:
Will you be working on official lineageos 17.1 as it is released now?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Updates for 7-Apr-2020:

New 16.0 build is up with latest security patch, OP has been updated.

Work on 17.1 is slow, still trying to figure out all the kinks. No such thing as 'official 17.1 released therefore can work on it now'.

Also for the love of all that is good and nice stop asking me to use PE trees kthx
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Aditya@123:
I was trying to flash your lineage os 16 build. But it shows error
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Which TWRP are you using? Have you verified it with the hash? Why were you flashing two different zips anyway?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Aditya@123:
Official latest twrp,and yes i verified it with hash
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Read the instructions then, you need to flash using the TWRP linked in the OP. Anything else and I'm not able to support that.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] DarthJabba9:
I am glad to see that you are sticking to your guns on this issue. I really don't get the requests to use PE trees to build LOS. I am sure that anyone who is so much in love with PE trees can use PE or any of the "all other ROMs" that use PE trees ...
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Pumpino:
I tried flashing 17.1 with OrangeFox recovery and without GApps. It wouldn't boot. Is this because I didn't use the TWRP versions that you recommended, or because I didn't flash GApps?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Likely because of keymaster issues. More in a separate post.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Update, 8-Apr-2020 (this is more to summarise for myself so when I come back in a few weeks/months I'll remember what happened):

The situation, my goals: No I haven't given up. As far as I can tell (confirmations from [MENTION=5850987]DarthJabba9[/MENTION]), to get the Q rom through the boot phase (regardless of which version of TWRP/recovery) I'll need proper Q firmware for violet, which as of writing does not exist (sort of, see below). So, until it is released, I won't be doing any more work on 17.1 (again, sort of, see below). Given the current situation with covid, I wouldn't hold my breath, and I wouldn't be surprised if xiaomifirmwareupdater doesn't have global Q firmware for violet in May (as was previously apparently their target).

I _could_ use cobbled together firmware from other devices like davinci and co, similar to how the other roms do. But, I suspect this might not be sufficient for official approval. So, I'll start working on 17.1 again whenever the Q firmware is released - again, I haven't given up, but there's a pretty big roadblock at the moment that I'm not smart enough to figure out.

What you should do: Use my 16.0 build, test it for bugs, see how it goes. I may be able to get official approval for that, in lieu of 17.1 for now.

In saying that: There does exist Chinese Q firmware on xiaomifirmwareupdater. When I have the spare time, I might look at using that to build my vendor images and see if my 17.1 can boot.

How you can help: If you're feeling especially adventurous, flash my 17.1 roms with your recovery of choice (OrangeFox, TWRP, etc.) and try and flash the Chinese Q firmware on top of the rom. Be warned that there is a risk that the newest android keymaster may re-encrypt your device, which in the worst case may require you to format data and/or reflash recovery and/or flash a fastboot MIUI rom. So, it's a bit risky, but likely won't be an issue. This is only if you'd like to help.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
Well done, keep up your good work!

In order to try anything suggested please provide links.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
In my most recent update post, I literally said that the Chinese Q firmware can be downloaded from xiaomifirmwareupdater. In the interests of futureproofing, I'm not linking externally, but it can be reached from google/choice of search engine.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] himanshu fulmali:
Thanks sir for your work, hope you'll back soon. ?❤️
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
I tried to flash latest Chinese nightly, then this LOS 17.1 build, then data format and vendor and dtbo from that Chinese nightly. It does not boot, hangs on Redmi by Xiaomi logo.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Sorry, I don't understand what you've done - you flashed the Chinese nightly (I'm assuming nightly ROM? There's no nightly firmware, only weekly), then flashed my LOS build, then you... format data, vendor, dtbo from the Chinese nightly? I'm not sure exactly what you've done, if you can explain clearly what you did then that would be helpful, or maybe I'm just real **** at reading comprehension :(

Other updates:

It looks like merothh is doing official work for 17.1 so I wouldn't be surprised if this falls flat soon.

Otherwise, 16.0 build with May security patch is done. ROM link, Hash link.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
You are right, I used latest weekly build.

Never mind, too much time passed since that post.

Simply read this as 'I did everything I could to boot your LOS 17.1 and could not succeed'.

So I gave up on LOS for violet.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] aadityaraj1:
Well you shouldn't ?. Merothh doing the magic ✌?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] pritzzy:
Links?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
https://drive.google.com/open?id=1-CsbM9mBUIz7bBDu6EkVXWIPrtMlJWqM

Changelog:

• Kernel Upstream to 4.14.179

• Fixed netflix playback on L1

• Use separate /product partition

• Switch to userspace lmkd

• Updated novatek touchscreen firmware from miui 20.4.1 (Better Touch)

• Add dynamic thermal profile implementation from miui (Settings > Battery > Thermal Profiles)

• Might wanna use that pubg/camera configs

• Switch persist mount back to fstab

• Misc updates

Note:

• Use 20.4.1 Or Above Firmware

• Don't Flash Kernels

Warning:

1. You can only flash using meme TWRP (needs product partition mounts)

2. Only openGApps is supported from now on (if on anything else clean flash with OpenGApps)
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sunfire:
Any chance to build a new 16.0 version with the latest security fixes and with fixed sound ?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Hey, I've been pretty busy with life and have my own personal builds just not uploaded. I'm currently building 16.0 with the latest July patch.

What do you mean by fixed sound? If you could provide a proper bug report - either symptoms, replication, logcat - that would be perfect. I personally haven't seen any issues but "sound" is a very broad category of possible faults.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Original post has been updated with July build. Not sure what the sound issue is, but welcome further comment. In future also, you can open up an issue on the gitlab page (any of them), or send an XDA pm, or message on telegram.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sunfire:
Sorry for not giving more details in my previous post. The in call volume is overly loud and is not controllable. In the settings menu (while not in a call) the sound which is played through the speaker does indeed change volume when the slider for the call volume is changed, however during call the sound volume doesn't change when the physical volume buttons are pressed, it stays unchanged regardless if the volume is at minimum or maximum.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Got it. Will be working on it over the next few days/weeks.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Can you double check that this _isn't_ working on the latest July build too?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Here's a link to a new build with audio and volume configs updated. Let me know how it works for you.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sunfire:
This last one behaves the same (in call volume uncontrollable) but there is a difference though : the sound volume is considerably lower when I change the slider in the settings menu (while not in a call). However, the in call sound volume is still uncontrollable, it always sits at the same level regardless if i use the physical volume buttons or the slider in the sound menu which pops up when i press the physical side buttons.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Noted, back to the drawing board. Just to double check, when you say "sound volume considerably lower", do you mean across the board sounds (notification, music, alarm, etc.), or just ringer? And even if you lower these levels to the lowest, the in-call volume is still the same right?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sunfire:
The volume of the sound which gets played while the call volume slider is changed in the settings menu is lower now when I change its slider in the settings menu (while not in a call), the slider needs to be pretty close to max to have a volume which previously was somewhere in the middle of the range for the slider (I hope it's not a placebo effect or my ears may be playing tricks on me). I haven't checked the other sounds except the call volume (since it's the only one which is not working as expected, I haven't paid attention to the other sounds). I checked the phone now and I have the alarm and call volumes set to minimum (just not muted), the ringer volume is at the first notch (not set to vibrate) and the media volume is muted completely. I haven't been able to find any dependency or correlation between the call volume and the other sounds' volumes. The call volume is always at the same level while in call, regardless of what the slider for it is set in the settings menu. The call volume is also uncontrollable while in call, but the volume of the sound played while the call volume slider is changed in the settings menu does change as expected (but while not in a call).

Weird. Please let me know if i can help troubleshoot this further
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
I haven't managed to fix the volume problem, I'm not as good as I thought I was :( It seems it's still just not as easy as setting a `policy_volumes.xml` setting in /audio...

In other news though, I have resumed builds with new security patches (original post will be updated with gdrive link). There's been a release of the 10.0 firmware on xiaomifirmwareupdater, so I'm going to go digging through those blobs and see if I can get a 17.1 build running ish.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] RiYaNRaHMaN:
Good to see you are back.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
In terms of a rough ETA/planned timeline, my exams finish around mid December so I'm hoping to sit down and properly fix the bug in the 16.0 build where the in-call volume can't be changed, and hopefully figure it out by the end of the year. After that I want to try and figure out the 17.1 blobs for a working 17.1 build, but if I remember right there's a lot of problems with the encryption and recovery (and maybe merothh's 17.1 build is already better in this regard). In the meantime, I think it's reasonable to open up any issues/bugs on the gitlab page's device tree itself - that'd be easier to organise than XDA threads.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] amuppet:
Hi @hcnulma, I'm using your LineageOS 16 port on my phone and it works like a charm. I'm now trying to study the source code, and I would like to ask you which branches I should be looking at: I see that the default branch in your projects is called "bringup", but there are also branches "lineage-16.0" and "lineage-17.1". Am I right to pick the "lineage-16.0" branches if I want to stay on the most stable version?

I also see that you are doing some nice work to split out the generic sm6150 parts into their own repo. But I do not need this repo if I stay on the 16.0 version, right?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hcnulma:
Yes, the `lineage-16.0` branch is the current branch for the 9.0 builds - as you can see, other than fixing fingerprints, not much has been added to the old official build. If you'd like, I am still in the process of trying to fix a bug with changing the volume in-call, mentioned by @sunfire earlier in this thread.

And yes, you don't need the commonised device tree.
[Touch Diamond, MDA Compact IV General] luminouche:
Hi !!!

My French Diamond (stock, no supercid, brand new unlocked), freezed earlier tonight :

In stand by mode (screen switched off), i pulled the top button to switch on device, but screen remained black

I pull battery out, restarted, same problem, restarting with black screen, blind Diamond ?

Soft reset, 2 times, 3 times, still black screen of death... F U C K

Finally, restarted with black screen, when i sync' it to my computer, screen woke up WITHOUT BACK LIGHTING, but it was possible to read an error in a window :

"Please update to latest Microp" with "OK" in the top right corner : when i tap on "OK", screen light finally started... pff, back to life !!!

I pulled battery out, and then Diamond restarted as usual...

Firmware problem (former firmware, no flash)

Hardware problem ?

Warranty return needed ?

Thx
[Touch Diamond, MDA Compact IV General] garychlau:
I got exactly the same problem with my diamond as you do. I've tried flashing my diamond successfully with different roms but the same problem still exist. I can hear the sounds when the phone boots up but the screen remains black. Once in a while, I was able to turn on the screen but it's very dim even if I change the brightness to max. Also on the screen there is a pop-up window which says:

MicropERROR

Microp Version Mismatch 0

Please update latest Microp firmware

When I tried going into the device information, the Protocol Version shows "None", and the "IMEI" shows "NONE" as well????

Please HELP!