yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mandayugana:
IT IS WORKING. :-D It is the only custom ROM on Mi 5 that is able to successfully update e-money balance. At last I found non-stock ROM with fully working NFC. Thanks, Man.

I got sensor issue with LOS 21. Usually, deleting /persist/sensors from recovery fixes the issue, but unfortunately it is not working at the moment.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
RIL blobs are completely different compared to official LOS, also i switched to QCRIL, this could explain the different behaviour

On A14 I was forced to move to full IWLAN or RIL partially won't work

I updated Dolby impl to Moto Dolby 3, should be fixed, try latest build in my GDrive LOS folder

That's weird, I never had a single issue with sensors on both los/pe, and last time I updated them it was 5 months ago, never touched them and everything is the same as PE14. What issues are you experience exactly?

Just in case it was something related to LOS you can try latest build in my GDrive LOS folder, but be aware that it's based on latest QPR2 sources so something may be still broken
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] MI FOR 2:
Sir, your LOS 21 ROM is very well made，but when I install lsposed, it cannot load normally. This seems to be a rom problem. Can you fix this problem? Thanks for your reply.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] PavelPerm:
Hello, thnx for your rom. in lineage-21.0-20240323-UNOFFICIAL-gemini dont working USB modem mode, Pls fix. thnak you.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] pokiposi:
this rom support ethernet tethering?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] MI FOR 2:
I downloaded your kernel source code and recompiled the kernel, but it reports many errors, is there a problem with the kernel source code? Looking forward to hearing from you.

errors:

CC drivers/mmc/host/sdhci-msm.o

CC lib/zstd/compress/zstd_double_fast.o

../drivers/mmc/host/sdhci-msm.c:3916:16: warning: incompatible pointer types passing 'atomic_t *' to parameter of type 'struct cpumask *' [-Wincompatible-pointer-types]

3916 | cpumask_copy(&msm_host->pm_qos_irq.req.cpus_affine,

| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../include/linux/cpumask.h:547:49: note: passing argument to parameter 'dstp' here

547 | static inline void cpumask_copy(struct cpumask *dstp,

| ^

../drivers/mmc/host/sdhci-msm.c:3970:30: error: no member named 'bits' in 'atomic_t'

3970 | i, group->req.cpus_affine.bits[0],

| ~~~~~~~~~~~~~~~~~~~~~~ ^

CC net/ipv4/sysfs_net_ipv4.o

../drivers/mmc/host/sdhci-msm.c:4128:16: warning: incompatible pointer types passing 'atomic_t *' to parameter of type 'struct cpumask *' [-Wincompatible-pointer-types]

4128 | cpumask_copy(&group->req.cpus_affine,

| ^~~~~~~~~~~~~~~~~~~~~~~

../include/linux/cpumask.h:547:49: note: passing argument to parameter 'dstp' here

547 | static inline void cpumask_copy(struct cpumask *dstp,

| ^

../drivers/mmc/host/sdhci-msm.c:4136:27: error: no member named 'bits' in 'atomic_t'

4136 | group->req.cpus_affine.bits[0],

| ~~~~~~~~~~~~~~~~~~~~~~ ^

../include/linux/printk.h:259:34: note: expanded from macro 'pr_info'

259 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)

| ^~~~~~~~~~~

../drivers/mmc/host/sdhci-msm.c:4859:38: warning: shift count >= width of type [-Wshift-count-overflow]

4859 | (dma_supported(mmc_dev(host->mmc), DMA_BIT_MASK(64)))) {

| ^~~~~~~~~~~~~~~~

../include/linux/dma-mapping.h:74:54: note: expanded from macro 'DMA_BIT_MASK'

74 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))

| ^ ~~~

../drivers/mmc/host/sdhci-msm.c:4860:20: warning: shift count >= width of type [-Wshift-count-overflow]

4860 | host->dma_mask = DMA_BIT_MASK(64);

| ^~~~~~~~~~~~~~~~

../include/linux/dma-mapping.h:74:54: note: expanded from macro 'DMA_BIT_MASK'

74 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))

| ^ ~~~

4 warnings and 2 errors generated.

CC lib/syscall.o
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mrinfinity0007:
so next update will be PE Officials??
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] StarVase:
no this is only unofficial version and the official one has no longer supported it.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] StarVase:
is it possible for me to directly update it from previous pe12.1 without formatting data and sdcard via twrp? I've tried but the twrp returned an error code...
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] StarVase:
to perform an entirely backup is really too hard for me... too much previous data and memoriable chatting history in qq and WeChat makes me exhausted...
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] StarVase:
yeah as the attached screenshot
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
I'm sorry I explained myself badly, I meant that i will release the updates monthly when PE devs merge the updated security patches, that's why i don't consider that ROM an official release, it's still with january patch, but there are huge changes on device tree side, even if i've tried everything for a week and it's 100% stable for me i prefer an extensive test before ship the february update with EAS

The ROM and the sources are compliant to PE standards, unfortunately i have no time to mantain officially a ROM, but if someone wants to use my branches for an official PE version that's fine for me, just let me know :) i will still continue to update the sources at least until Android 14 comes out

I think that there's a little bit of confusion about crypto, i will try to explain again:

All gemini ROM except this ROM, los 19.1/20 (and other ROMs that use as base los 19.1/20 device tree sources) use Full Disk Encryption for internal storage. Starting with Android 13 FDE support has been completely removed from AOSP sources, and everyone is forced to move to File-Based Encryption (FBE). If you are using FDE (if you are on my 12.1 PE it's your case) and want to move to Android 13 no matter what you try to do, you must format your internal storage. I'm trying to help people that wants to build TWRP with FBE support because they cannot switch between FBE ROMs without a full wipe, but for people that are using FDE there's nothing to do, a full wipe is needed

PS: maybe you can try to completely remove cryptography from your internal storage and then try to upgrade without a full wipe, but TWRP must be able to flash the zip file

Please post the logs of the error not the screenshot, even if I don't support TWRP i'm curious about why flashing is broken on TWRP (at least with logs maybe i will be able to tell you why it doesn't work)

PS: please don't spam the thread, use the edit button
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] İST1907:
I think it makes more sense to stay at 12.1.

Thankyou
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
That's your choice, but you won't be able to update your phone.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mrinfinity0007:
-+BB+- The front camera of gcam is top down and bottom up..and when i click for photo its having greenish effect...but back camera seems ok...

there was a prebuilt gcam it was used to be on pixel gemini https://github.com/PixelExperience-..._xiaomi_gemini/raw/ten/GCam/prebuilt/gcam.apk this one...it works pretty fine in android 12.1(both front and back cam) though its a old one but pretty good for both cam...but its not working in android 13...same as before after click 1 or 2 its froze and not works anymore
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mandayugana:
Which GCam build are you using?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mrinfinity0007:
this prebuilt version MGC_8.1.101_A9_GV2b_ENG
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mandayugana:
The greenish photo in Mi 5 usually comes from incorrect black level. Change front camera's black level to 16 and see how it goes.

Some GCams have an option to flip front camera upside down. If you are lucky, BSG GCam might provide it in its settings.

PS: I haven't tried this ROM yet, but I have played a lot with GCam in Mi 5.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
That's my fault, i tried my modded old version from Arnova but i used the BSG version i use on my Courbet (working on different devices sometimes is confusing :) ).

Regarding other GCAM versions not working it's the expected behaviour in that build, SELinux allow to use Hexagon only for system apps, in next public release will work even for GCAM installed as user app, it's already fixed in my internal build. But thanks to mandayugana suggestion the shipped version is usable, only bug is the reversed preview, i can probably fix in some way on ROM side but i'm afraid that the fix will break preview in 3rd party apps, as i'm forced to ship the next public release with GCAM (Aperture is broken on PE at the moment) i prefer to let the user decide if live with this small bug or use another app for this month, but when Aperture will be fixed i will bring it back because even if photo quality is not the same it's 100% working. If you are interested you can try to contact BSG on Telegram on his support channel, an option for front camera rotation would make his GCAM version fully functional for our device, in that case i can include GCAM in all future releases :)

Thanks, great tip! :)
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 暗夜很无语:
When should we support the f2fs file system? Ext4 is too slow and the encryption should be eliminated
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mandayugana:
The upside down front camera is probably GCam issue, not the ROM itself. If it's not fixable, may be we can switch to another GCam. I would recommend these GCams as alternatives.

1. SGCam 8.4 V43 (https://www.celsoazevedo.com/files/android/google-camera/dev-shamim/f/dl28/).

2. SGCam 8.4 V35 (https://www.celsoazevedo.com/files/android/google-camera/dev-shamim/f/dl23/). This is probably the last version of SGCam that allow user to set maximum exposure time for astro mode. We all know that custom ROMs in Mi 5 don't allow exposure more than 4 seconds, or else GCam will crash.

3. MTSL 8.3 V7.2 (https://www.celsoazevedo.com/files/android/google-camera/dev-mtsl/f/dl8/).
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
New release is out, here's the changelog, from first public release:

ROM

- Merged feb security patches

- Misc fixes

Kernel

- Ported EAS and set it as default scheduler

- Ported Stune Boost and use it as default

- Partially fixed compiling warns

- Ported misc optimisations from infinity kernel

- Fixed a bug that could cause the boot to fail (Mi logo --> Black screen --> Mi logo again)

- Misc fixes from upstream

- Ported ARM optimized routines

Recovery

- Fixed a bug that could cause the boot to fail (Mi logo --> Black screen --> Mi logo again)

Device Tree

- Ported EAS

- Move to EAS compatible power HAL

- QCOM audio HAL: added missing audio power hints support

- Fixed phone crash when Google Camera try to use Hexagon for HDR processing (both preinstalled version and user installed versions)

- Camera: fixed Google Camera Enhanced HDR+ not working

- Camera: move to Gcam Version SGCAM_8.4.400.42.XXX_STABLE_V35 big thanks to Shamim.

- SELinux: fixed all denials

- Ported various improvements from my old 12.1 ROM

- Tuned ZRAM size for 3Gb devices

- Camera: improved camera HAL + misc fixes

- Configure SQLite to operate in MEMORY mode

- Set CFQ as default scheduler

- Added pixel animated wallpapers to build

- Audio: merge some changes from latest available Miui for MI5 and bring back fast output

For more detailed changes take a look at my repos

Here's the Direct Link

About Camera App: default camera app is GCAM version SGCAM_8.4.400.42.XXX_STABLE_V35 by Shamim. Everything works fine, but front camera require some changes in settings:

- Reduce front camera noise: GCAM Settings --> Additional Settings --> Noise Modelers --> Front Lens: 77

- Front camera photos with green tint --> GCAM Settings --> Additional Settings --> Black Level --> Front Lens --> Black Level --> 16

Big thanks to mandayugana for his precious infos and tips for Google Camera

NOTE: i highly encourage everyone to update the recovery too, the new version fixes the bug that can cause the boot to fail. If you already updated the recovery when i released the EAS preview then no need to flash again.

@mandayugana : thanks for your suggestion, SGCAM V35 works pretty fine, only thing that should be tuned is the Noise Modeler, the app completely lacks a specific conf for our HW and we should tweak manually the configuration, but the result is really good! Thanks :)

@暗夜很无语 I can consider f2fs, but i haven't found a stable and working implementation for 4.4 kernels, are there legacy devices that really use it without crashes and reboots? Regarding the crypto removal that's not possible, even if FBE in legacy devices is a pain. BTW i'm merging all the improvements from infinity kernel, but will require time
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 暗夜很无语:
嗯，Thank you. Can you optimize the ROM? After all, PixelExperience12.1 is still very fast. It may be due to the support of f2fs. PixelExperience13 is very slow. I can say that 12.1 is in the sky, and 13 is on the ground. I still recommend you to remove the FBE encryption. After all, PixelExperience13 of LGV30 does not have FBE encryption, and I can give you a few BUGs. Fingerprint wake-up is not closed, The phone will turn on when it is turned off and restarted, and for our mobile phone card in China, LTE is displayed instead of 4G. There is also a Chinese WIFI with an exclamation mark, which can only be eliminated by using ADB. Also, can build an overclocking core? The 2.15GHZ of 820 is still a bit difficult, and it is still possible to overclock. Sorry, I am from China. Because I am a junior high school student and my vocabulary is poor, I use a translator, There may be some mistakes. Sorry, I like PixelExperience very much
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
As i previously wrote, FBE removal is not an option. According to official Android FDE web page:

I'm shipping a ROM in secure mode, allowing users to natively use GPay and Bank apps, and i prefer to stay with AOSP guidelines as much as possible. Also, you must take in consideration that move to FDE or f2fs means an internal memory format for everyone, there are a lot of things to do but this require some time, because I'm working alone and I don't want to bring back the random reboot bug in a public release and start again that story. And I already experienced it in my internal builds, hopefully after a year I understood the root cause of the reboot, but even if I'm right do no expect a full merge from my old kernel in a few days, this time i will do things slowly, at least for public builds. But if you cannot wait this is my internal kernel build, it's my test branch without LZ4 backport from 4.19, it doesn't have big changes compared to public build but battery life and performance are slightly better.

I'm sorry i did not understand the fp bug... But proprietary blob and custom HAL are the same used in 12.1, I have the exact same behaviour i had in 12.1

Regarding the other bugs i will take a look, what' s the carrier name?

Honestly i don't think that overclock is a proper solution on our device, in particular way for battery life and heating
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 暗夜很无语:
中国电信，China Telecom，I'm not sure if the other three operators have the same problem, because I only have one China Telecom
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
I decided to share my latest internal build, there are a lot of changes, and now performance are similar to my old Android 12 ROM. IMPORTANT: if you flash this update do not roll back to a previous version, due to the huge changes a clean flash is required if you want to roll back. There are some small things to fix and improve but it's stable and fast

Here's the changelog

ROM

- Updated sources to latest PE

Proprietary blobs

- Update Adreno, SDM and postproc blobs to LA.UM.9.6.2.r1-04100-89xx.0

- Update media blobs to LA.UM.9.6.2.r1-04100-89xx.0

- Update graphics firmware from LA.UM.9.6.2.r1-04100-89xx.0

Device tree

- Set UI rendering Skiagl with skiaglthreaded

- Clean up useless log spams

- wifi: smarter decisions on whether to use a 2- or 5Ghz AP

- camera: mix fixes and improvements for memory, stability and timeout logic (long exposure now should work, or at least doesn't crash camera app)

- props: add missing ro.vendor.extension_library prop

- Updated conf and props for R media and display HALs

- QCOM HALs: migrate to display and media R HALs

- props:disable iorapd

- Reworked and updated pixel dance service

- fstab: enable discard option on /data partition

Kernel

- backport speculative page fault

- backport ashmem and binder from 4.19

- mbcache: misc updates and fixes

- random: misc updates and fixes

- fix LD_DEAD_CODE_DATA_ELIMINATION, add support for our arch and enable it

- kbuild: misc updates/improvements

- improve thin archives

- crypto: port specific accelerated libs and enable them

- port LTO fixes and enable CLANG LTO

- Optimizations: compile with O3 flag

- disable frame pointers

- port and enable flatmem

- ported missing cutoff and capacity approximation changes from Xiaomi

- take a look at my repo for all other updates, changes are really huge

Here's the download link

@暗夜很无语 that's probably a PE bug, does it happen on other ROMs or in my old PE 12.1?

EDIT:

@mrinfinity0007 for the vibration icon not appearing : Settings --> Sound and vibration --> take a look at the last option :)

@mandayugana this commit should fix the GCAM exposure crash you mentioned :)
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 暗夜很无语:
Yes, Fingerprint Wake cannot be turned off, China's WIFI will have an exclamation mark, and the LTE displayed on the Chinese card is not 4G, and I plan to replace Xiaomi 5. If you can build the PE13 of Xiaomi note2, it will be very grateful, because the maximum of note2 is only 11
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] vladiu:
Good afternoon!

Very nice build, I use it daily, it works stably. The only problem: when the slow-mo mode is turned on or when the video recording is finished, the gcam crashes. When restart app, gcam crashes. Only a reboot helps.

Logs in zip.

Have a nice day!
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
I've tried right now and i can successfully disable fp wake, it's working fine for me. What command are you using on adb for fix the exclamation mark? Regarding the different icon I've took a look at dt conf, it' s a bit outdated but anything related the icon bug, i'm afraid that' s an AOSP/PE bug.. Do you know if other devices running PE in China has the same bug?

Thanks for the report, are you using video stabilisation? In that case disable it until the next public release, I've just realised that it's buggy. If you confirm that video stabilisation is the root cause of the crash we can consider it fixed
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] vladiu:
Yes.

Video without stabilization works fine. Timelaps also work well.

Slow-mo 1/4 works, and mode 1/8 crashes, but at the same time restarting the application allows you to continue working normally in any mode. Slow-mo 1/4 does not slow-mo video: it seems that the frame rate is not increased during the slow-motion segment.

I don't belong to an audience that uses slow-mo or timelapse, but I may accidentally turn on this mode :)

Crash log (when used 1/8 mode).
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
My bad, i forgot to add the istructions in the OP, 1/4 works fine, just open GCAM Settings --> Additional Settings --> Stream Config ---> Enable "Open stream configuration" --> Main Cam --> Slow motion ---> select 262144 or 32888

Regarding 1/8 i will take a look at it but even if snapdragon 820 according to QCOM supports 720p 240fps slow-mo i don't remember a single camera app working for our device. :)

EDIT: i forgot to mention, actually our media profiles completely miss profiles for 240 fps slow motion, if you want to play with GCAM settings you must add a custom profile for slomo 1/8 recording
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mandayugana:
The weird thing is if we use long exposure, let's say 4 second, the camera takes 4 second to take the photo then there will be 4 second delay doing nothing. If we use 8 second exposure, there will be 8 second delay. And so on.

But, this could be a fix to long exposure issue in Mi 5.

I'm probably going to try PE13 this weekend.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mrinfinity0007:
yeah found it......

using your internal build from couple of days...some issue i found

1. usb tethering not working ( not sure it was working before this build)

2. after applying ur camera setting front cam photo became much blurry ( please share your config file..that will help me a lot)

3. phone got hot easily and things got choppy sometimes...

4. if my phone was hot (not very hot)...and that time if i got call from someone then calling screen was not shown ....its kinda annoying...( happened 4-5 times)

5. battary consuming more power than previous build... i know its a old device but i'm sharing my experience or feedback whatever u say
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 暗夜很无语:
As long as it is China's WIFI, WIFI will have an exclamation point. The class is a native common disease. The adb instruction is adb shell settings put global Captive_ portal_ https_ url https://connect.rom.miui.com/generate_204
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 暗夜很无语:
So can you make a look at the pe13 of Xiaomi note2？
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
Glad you give it a try! Just remember to disable EIS until next public build or GCAM will crash! I didn't know of the long exposure bug (i'm not a big camera user) but this doesn't surprise me... All the code that made GCAM works on our device has been dirty ported and adapted from msm8998 camera HAL, and in some parts camera HAL code is old and outdated, some weird bugs unfortunately are expected :)

I have none of the issue you mentioned in my internal builds, also USB Tethering is working, i'm using it right now. Did you check what's causing an higher power consumption? If you are experiencing similar issues then you may have some apps running in background, the only way i found for trigger thermal throttling is flashing, reboot and execute some heavy operation like camera, for my usage never goes in throttling. But yes, at high temperature if you receive a call the call screen appear after several seconds, that's a limit of a legacy device. An higher power consumption is expected (performance have a cost), but i consider it acceptable. I must say that in my internal builds i'm using LZ4 for compression (which is faster than LZO) and i've debloated and removed all possible debug, in latest public build under some circumstances debug use 10-15% of CPU, this increase battery usage and decrease device performance, that's probably why i did not notice the higher battery usage

Regarding front camera as i already wrote the noise modeler for the front camera is for a different sensor, values must be tuned manually, and i had not time yet to do it

Thanks, now I understand. You need to change the captive portal page because the Google page is backlisted in China. But according to code in NetworkStack there's an overlay for users with a Chinese Sim, are these links broken in China?

http://connectivitycheck.gstatic.cn/generate_204

https://connectivitycheck.gstatic.cn/generate_204

I'm sorry but i don't havea note2, i cannot work on a device that i don't have
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 暗夜很无语:
I haven't tried
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 暗夜很无语:
If I can, I can try, or go to the coolapk to find someone to test, I can also find someone to test, Chinese coolapk and xda feel not much different