yashsingh1/xdaforums huggingface dataset:
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] theBoatman:
Yes, this is exactly my situation. I used Waveup on my last phone (MotoG) and it worked there without using any aditional energy. And then I got my 4x and the first thing I did was installing Waveup and I was very surprised how much energy that used on this device.

I, too, thought it was a hardware issue or at least somewhere inside the firmware blobs, but just a month ago a user here confirmed to me that not all users have this problem. (At least not on all roms). That was here:

https://xdaforums.com/showpost.php?p=82928867&postcount=186

So it seems that there are people who can query the proximity sensor on a santoni device without causing wakelocks, and I would love to get a copy of persist of such a device :)

That sounds quite interesting. Do you have a script for that?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
Whoah that would be quite amazing!

The basic concept is to create a full image of the internal storage via "dd" to your PC and then shrink it using the sparse file feature and packing that into a tape archive. I'm using a GNU/Linux OS on my PC and a File system that supports sparse files so the whole thing can be done pretty easily there. If you're on windows chances are you can get this to run via WSL.

It's not automated but i roughly do the following:

(of course, know what you do before simply copy-pasting any of the following)

(i do it this way to prevent most possible errors like miscalculations or carelessness; the whole thing can be done much more efficiently)

(boot your device to TWRP first and unmount all partitions)

adb shell dd bs=64k if=/dev/block/bootdevice/mmcblk0 | dd status=progress conv=sparse bs=64k of=santoni.img
# checking backup integrity because the transfer is very long and can produce errors
adb shell sha256sum /dev/block/bootdevice/mmcblk0
sha256sum santoni.img
# if all went well i mount the image file so that my OS will take care of partitions & stuff
losetup -P -f santoni.img
# read the names of partitions and their numbers
gdisk -l /dev/loop0
# it should be fine to discard userdata, system, cust & cache
# zero out all undesired partitions, put the according number as <n>
dd bs=64k if=/dev/zero of=/dev/loop0p<n>
losetup -d /dev/loop0
# "dig sparse holes" into your image file
fallocate -vd santoni.img
# tell tar to create an archive named santoni.img.tgz, compressed with gzip and efficient handling of sparse files
tar -czSf santoni.img.tgz santoni.img

(update 2022-09-21) if you can't use loop mounts or want to avoid reading the whole userdata partition only to discard it right away you can also run this script. it'll use a minimum of time & storage space but you'll have to back up the partition table separately, preferrably cd into a new directory for this because it'll create a bunch of files in the current directory:

#!/bin/bash
# Dump all system partitions of an android device through adb.
# Skips common partition names that are usually empty or where backing up doesn't make any sense in most cases.
exclude=( userdata system cache boot recovery grow cust )

declare -A exclude_map
for name in "${exclude[@]}"; do
exclude_map["$name"]=1
done
for p in $(adb shell ls /dev/block/bootdevice/by-name); do
[[ ${exclude_map["$p"]} ]] && continue
[ -f "$p" ] && continue
echo "----- $p -----"
adb exec-out cat /dev/block/bootdevice/by-name/$p | dd status=progress conv=sparse of=$p || break
adb shell "cd /dev/block/bootdevice/by-name/ && sha256sum $p" >> checksums.sha2 || break
done
sha256sum -c checksums.sha2

after running this script you can produce a compact archive like this:

tar Scaf ../android_dump_$(adb shell getprop ro.serialno).tar.xz *
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] theBoatman:
It is at least not doable in WSL1, because loop-mounts are not supported there. I have done it on my raspberry pi now and it looks like a really nice way to backup, and I was surprised how many partitions there are that I was not aware of.

About the sensor wakelock problem: I definitly have to experiment with the files in persist. I already gave up on that problem a long time ago, but now I see new hope. It would drastically improve my battery backup, which is now ok on my device (about 3 or 4 days with average use I think.) but it could be really awesome, because according to the statistics of BetterBatteryStats by far the most energy usage belongs to sensor_ind wakelock (multiple hours a day), although I do my best to avoid proximity sensor usage. (The only access to proximity should be during calls.)

There are a few postings for other devices with similar problems, so it may not be a special thing of santoni devices. And I found an interesting commit by [MENTION=5786839]karthick mostwanted[/MENTION], which seems to work around this problem by disabling the sensor when the device is idle.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
I mean you can also just crunch the numbers and pass "bs=", "seek=" & "count=" to dd. Using losetup is just the safe & lazy way. :D

And if you don't have a filesystem that supports sparse files you can also just skip that part and compress using "xz" or actually whatever you like. Storage wise, you should end up just as good as with the tape archive method, it'll just take a while longer since all the zeroes are actually being read & passed into the compression algorithm whereas tar is able to just write down which file sections are just zeroes so you end up with much less data that's going to be compressed.

I'm very happy that it worked for you :good:

I also wonder why Qualcomm needs that many partitions to run their SoC...

I wonder: In what state is your "Settings" > "Display" > "Prevent accidental wake-up" switch in?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] theBoatman:
off.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] honeycakehorse02:
Hello, my Bluetooth connection with codec aptX doesn't work with my Dockin D Fine+ Loudspeakers. It switches every time to codec SBC.

Does anyone have similar problems?

Update:

On my second receiver also doesn't work aptX HD.

With HavovOS3 it works all fine.

With my old Xperia Z1 compact and Lineageos 16 (unofficial) too.

lineage-16.0-20200826
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] theBoatman:
It seems my sensor_ind problem was triggered by the ambient display. Allthough I already disabled all features there (Pick up, Hand wave, pocket) it still seems to access the proximity sensor despite doing nothing with it. Now I disabled the whole ambient display (which is sad because I like it), and now I do not have any unexpected sensor_ind wakelocks anymore. (Only during calls, where it needs to check the proximity sensor).

My battery life is much better now. With mild usage I need less than 1% per hour, so I can go easily 3 days without charging.

I still seem to have problems with my GPS fix, which is somehow related to the proximity sensor: In infrequent situations I need up to three minutes till I have a gps fix. And this problem starts to get very frequent if something reads the proximity sensor in parallel. (That happens when I use the app SatStat, which shows GPS statistics and reads the proximity sensor in the background.) Not a big problem, but still not nice in some situations.

But currently I am happy that I can work around most of my problems.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Y@shMankar:
works for redmi 4?

Will this rom works in redmi 4 ?

Plz Plz tell me.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jadephyre:
Redmi 4X only
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] cbendot:
sorry sir, what is android version in this rom linage 16
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] ghines:
Android 9
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Y@shMankar:
rom flashing on redmi 4

In TWRP , I Wipe data , delvic ,cache ,and system in advanced wipe

then install zip santoni it showing "error 7" in my redmi 4

plz tell me how can i install this rom?

---------- Post added at 08:20 AM ---------- Previous post was at 08:13 AM ----------

why every where it is written that this rom is for redmi 4/4x.?

why there is no name of redmi 4 device in search box??
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] imrufbd:
Redmi 4/4X are the same phone code named santoni. For error 7, edit updater script (search YouTube) or use another recovery such as orangefox or pitchblack.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] ACC18:
After wipe all of those, reboot to recovery first. Then install normally
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] schnoeselmeier:
I just tried to update to the latest build (14.10.) and ended up with error code 7. Up to 07.10. everything was working fine. What could be the reason? Thanks in advance for any answers.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] luismmv9411:
I have installed this rom, and it is one of the best, very stable; I just have an error, sometimes the fingerprint sensor stops working and other times it works fine, this is very annoying, how to solve this?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] schnoeselmeier:
Strange! My problem has been solved but I don't know why. I moved the 14.10. build from the internal storage to a USB stick and updating from there worked fine.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] MTK6589:
Hi,

how can i safely update lineage os nightly build rooted with Magisk ?

Thanks.

---------- Post added at 05:59 PM ---------- Previous post was at 05:59 PM ----------

Hi,

how can i safely update lineage os nightly build rooted with Magisk ?

Thanks.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] schnoeselmeier:
Maybe someone can help me? I was on this Rom (Official LOS16) before but suddenly things went wrong and I ended up on stock (Miui 11 global) again. I routed the phone again, Open Gapps, Magisk 20.4 and tried with both the latest TWRP and Orange Fox to reinstall official LOS16 again. The rom booted but I could never proceed with any Setup because Wifi didn't work. I must have tried 10 times. Absolutely no Wifi! Wifi worked fine in stock rom. Any ideas, please?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] imrufbd:
May be this is because persist partition got damaged. Try flashing default rom of redmi 4x, i,e. fastboot rom of earlier version of miui ( e.g miui.8.2.10 ). Then install los16.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Papichoolo:
Is there any good kernel I can flash with Lineage OS 16.0?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] 3x()7c15t:
Has anyone tested shelter or insular on this rom?

When shelter is installed it gives a warning not to use the app on xiaomi devices as it can cause issues but it also says that it should work on custom roms.

Does anyone know if the app is safe to use on the latest version of LOS?

For those that arent sure what I mean by shelter and insular, they are apps that isolate applications on your phone into a work profile.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] huddabang:
i am on latest nightly facing 2 issues

wifi not connected if hidden.

finger senser not work after deep sleep.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] huddabang:
same issue if network hidden it will not connect.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jokergermany:
My mother used in the past this one for this case:

Island - Apps on Google Play

Discover the secret Island inside Android, release its mysterious power!

play.google.com

No issues until she got another phone.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] 3x()7c15t:
Cheers, I tried using insular from f-droid and it wouldn't work but when I installed island from the playstore it worked even though they are basically the same app.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jokergermany:
Perhaps open a issue for this?

Issues · Secure System / Insular · GitLab

Isolate your big brother apps https://secure-system.gitlab.io/Insular/

gitlab.com

Would prefer f-droid Apps over playstore apps, too...
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] huddabang:
@TingyiChen

i just updated to latest nightly build 2021-01-13 ...

unfortunetly hidden wifi issue still not connect and fingeprint scanner deep sleep issue... not solved for me.

i am using this ROM only from 2 days only missing featue for me inbuilt app lock/

santoni is end of life device . do you have any plan to port into 17 or 18 verson ?

https://www.reddit.com/r/LineageOS/comments/kv7bgi
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] mayur.3.92:
Hi all,

I'm not a able to boot OS (stuck at MI logo) post installing latest Magisk.zip

Anyone facing the same? Or what I'm i doing wrong
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jokergermany:
Bootloader relocked? Look at the bottem, is there still "unlocked"? If there isn't you need to unlock the bootloader again. If you can't because you didn't can login in the right mi account, you are doomed.

(Had this once, when i bought it unlocked -__- )
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] mayur.3.92:
Nope, that's not the case. BL is unlocked, can flash recovery via Fastboot. It's just that the rom doesn't boot Post installing magisk zip.

It gets stuck at MI logo, the only way to recover it is boot to fastboot, flash n boot to recovery n reflash rom+gaaps only
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] McJohn.br:
Look, I recommend this apk.

I use it I think for 5-6 years.

I looked it up in the marker now, but it was withdrawn.

With this apk you can freeze, or delete an apk from your phone.

Great attention, with the phone apk ! I hope you know what you're doing?

I give you the apk, from me, from the cloud.

Uninstall Expert .
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
In the past i succesfully used shelter from F-Droid on this ROM.

I think the warning about MIUI phones is that the MIUI Stock ROM from Xiaomi that comes with this device already includes a feature that uses the work profile. It is called dual apps and can be set up in the device settings of the MIUI ROM. So Shelter would run into trouble if it were to try and set up the work profile again. Since LineageOS does not include such a feature using shelter there should totally be fine regardless of the device.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] mayur.3.92:
Anyone facing the same?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
Since official LineageOS builds stopped for santoni i tried to summarize all official checksums that are saven on the Internet Archive (always for the last build(s) of each version). If you need to download an old build you found somewhere, there is hopefully a checksum for it in that collection.

EDIT: As of 2021-04-06 at least Lineage4microg and /e/ OS are still publishing builds for the Redmi 4X.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] flekkelek:
End of an era. :(
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Modotta:
Farewell, you'll be missed...
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] dantrolene:
Hi,

I am using the latest build for this device. I am having issues with Android Auto. It keeps asking permission for Display over other apps but even when it is enabled it does not proceed further and I am stuck.

Please help.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] grogosa:
I tried to flash both 16th version of lineage on my santoni 4x first got error 7 then I tried the gapps one and got error 7 after I turned my phone off and restarted it , mi logo flashes only for a second and Im unable to get into recovery or do anything, phone was 96% battery, and the mi logo was flashing around 15 seconds until it booted to recovery previously. Can you please tell me what could happened and how can I fix this ? 32gb global version santoni I think it have 3gb of ram. Previous custom rom functioned well flashed via micro sd and via usb otg

thank you
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] CMiRedmi4:
Which recovery do you use?

I had problems with TWRP + GAPPS.

Try TWRP without GAPPS or OrangeFox.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] grogosa:
Dont install lineage 16 latest versions it will brick your phone
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] grogosa:
orange fox I tried without g apps first ( lineage 16 version mentioned above) I was fortunately able to boot twrp and reflash to working rom which does not showed error 7, my device was so hardbricked that the mi logo stayed on for split second, then phone off. It was impossible to get into the recovery, only via fastboot I was possible to boot twrp and reflash working rom.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
I also get an error 7 with twrp version 3.4.0-0-santoni but when i downgrade twrp to version 3.3.1-0-santoni i can flash the official lineage-16.0-20210210-nightly-santoni-signed.zip and boot it without any errors and without bricking anything. The first boot takes a long time (allow up to 5-10 minutes) especially if the internal storage is not yet encrypted as LineageOS 16.0 ships with forceencrypt.

EDIT: Weirdly now after the first succesful install i can also install the lineage-16.0-20210210-nightly-santoni-signed.zip with twrp version 3.4.0-0-santoni and 3.5.0_9-0-santoni and also the latest 3.5.2_9-0-santoni. idk, maybe the crucial part might have been to format the internal storage.

EDIT2: I tried reproducing the error 7 again but no success. I have no clue why but now i definitely am able to flash and boot lineage-16.0-20210210-nightly-santoni-signed.zip. Things i have done are:

- Flash twrp version 3.2.3-1-santoni This version was unable to decrypt the encrypted internal storage so i did

- Format internal storage

- Flash twrp version 3.3.1-0-santoni. Able to install lineage-16.0

- Flash twrp version 3.4.0-0-santoni. Able to install lineage-16.0

- Flash twrp version 3.5.0_9-0-santoni. Able to install lineage-16.0

- Flash twrp version 3.5.2_9-0-santoni. Able to install lineage-16.0
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jccaguisa:
hi, can you pls give me link of twrp version 3.3.1-0-santoni? I still cannot find it. thanks.

edit: and one more thing, lineage 16.0 is still android 8.x right? or it is already 9.x? thanks for your help guys
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
You can just visit the official twrp download page: https://dl.twrp.me/santoni/

LineageOS 15.1 is based on AOSP 8.1, LineageOS 16.0 is based on AOSP 9, LineageOS 17.1 is based on AOSP 10 and LineageOS 18.1 is based on AOSP 11.

In their blog the folks from LineageOS sometimes explain how the specific version numbers came to be, for example in the latest blog post about LineageOS 18.1: https://lineageos.org/Changelog-25/
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jccaguisa:
thanks alot. would you suggest flashing 15.1 instead of 16.0? why & why not? thanks.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
If you are interested in a secure & up-to-date ROM then Lineage4microg and /e/ OS are still being built for the Redmi 4X:

https://download.lineage.microg.org/santoni/

https://doc.e.foundation/devices/santoni/

If you can vibe with the UI of /e/ and the preinstalled applications. Both ROMs are otherwise based on the LineageOS 16.0 source for the Redmi 4X.

Also keep in mind that both of these ROMs can't be used with Google Apps since they ship the Google Play Services replacement microg.

If proper signing is not so important to you (i'm not an expert but as far as i can see as long as you don't install APKs from the internet you should be fine) then any other well maintained and updated custom rom should do. Just don't use an SELinux permissive ROM with any personal data.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jccaguisa:
So this microg is like replacement of google right? So if I'm to flash rom with microg, I'm good not to flash gaaps anymore right? Thanks
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
Yes, flashing GApps on a ROM with microG like Lineage4microg or /e/ is not necessary. Also, it won't even work :)

As can be read on their homepage, the microG project aims at reimplementing core Google Play Services features. Keep in mind though that not all GApps features are intended to be replicated and those that are intended might be only partially implemented or not at all.

But you should be able to use Network location, Firebase Cloud Messaging (formerly Google Cloud Messaging) i.e. push notifications & the MapsApi with apps that rely on Google Play Services for these features.

Also the Covid tracing framework is reimplemented in microG and works.

I am using a microG ROM as a daily driver and i am happy with it. Not every app will work with. Test all apps you rely on. Aurora Store displays whether an app "Requires GSF" (Google Services Framework). Some banking apps and games might require your device to pass SafetyNet attestation, but as of January 2022 support for SafetyNet in microG is finally functional and should work as long as your ROM passes SafetyNet on its own.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jccaguisa:
thank you so much for the advice, indeed i am having fun and excited with my new microg rom. but i just have one problem, it seems that gps/location is loading slow/not functioning well. do you have the same problem? and can you share the solution? thanks alot, BTW, f-droid apps are amazing. just what i need. thanks!
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
If Network based location does not work you can checkout the installation guide to make sure everything falls into place as intended. As far as i've seen /e/ comes preconfigured on first boot and on lineage4microg you will have to open MicroG Settings and manually enable all Location providers under "Location Modules".

The preinstalled module uses the Mozilla database. If that is not perfect for you you can search F-Droid for the term "NLP" and you can choose to install additional Network Location Providers like the Apple Wi-Fi Module for example.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] dantrolene:
After the support for Santoni has been stopped for Lineage 16 I have been building the ROM for my personal use using the source from lineage git and default kernel and device blobs. It is stable and working alright. I use santoni as my secondary device. I am here by sharing the file.

It has SeLinux Enforcing and signed and most banking apps I tried are working alright. I am not a developer and I am not sure how to generate/share change log.

The ROM has June 21 security update. Please don't expect me to be fixing bugs or making customizations. I do not know about it. I am just doing this to keep my device running for a couple more years.

PS: The credit for the ROM goes to the original developers, not me. All I have done was run some codes and cook the ROM.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Xiaomi Warrior:
Needed quote.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Xiaomi Warrior:
Would you mind to provide some details on how you went about to create your own build or if there is a good guide that you followed?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] dantrolene:
Hi, you can follow the guide on lineage wiki, or guide on https://lineageosroms.com/santoni/#build-lineageos-and-lineageos-recovery.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] xdduser:
When I go to https://download.lineageos.org/santoni

It says page does not exist. How do I download the ROM?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Julien Faure:
@xdduser this is because official support for santoni has been stopped. So you have to either find an unofficial build or build by yourself or find a backup of the latest official build made by someone (I think there's a post in this thread where you can find that). You may also switch to crdroid: it's a great ROM, based on LOS and still maintained for santoni. Just make sure to activate encryption (it is not activated by default on crdroid) and you will have more or less an up-to-date LOS equivalent.