yashsingh1/xdaforums huggingface dataset:
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
TL;DR: Try to restore "Persist"

When i had trouble with sensors not working (under Resurrection Remix though), restoring an old TWRP backup of "Persist" did the trick for me.

If you have one, you can try this.

If you don't, you can try flashing the "persist.img" which can be found in the fastboot update packages provided by Xiaomi.

They can be found here: https://c.mi.com/oc/miuidownload/detail?guide=2

Note that to flash you'll need to use the shell, either directly in TWRP on your phone (or a comparable Recovery), or by hooking up your phone in Recovery mode to a PC and opening a shell to the phone via "adb shell".

Then you can use the command line tool "dd" to backup/restore any partition. Do a little googling if you don't know what this is and how to use it and how directories and block devices work in Linux. The device internal partitions can be found under "/dev/block/bootdevice/by-name/"

Whatever you do, be prepared to breaking your persist partition entirely so before you flash or restore anything do back up the current version of it even if it is not working perfectly.

X

No worries, this is still the support thread for the official LineageOS 16.0 builds, the title just wasn't updated when the Redmi 4X got upgraded from LineageOS 15.1
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] ghines:
What is everyone using now that LOS16 has no further updates? Would like something that is similar to LOS and with regular updates.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
Flash TWRP from twrp.me and see if it also asks for a password

On the OrangeFox recovery home page they state that password protection is one of their features.

I'd recommend flashing TWRP, as it definitely does not have this feature.

If TWRP does not ask for a password, the OrageFox recovery Password option might have been accidentaly enabled.

If TWRP does ask for a password, your phone is definitely encrypted.

Where does it say that? In your recovery or when booted to LineageOS unter Settings>Security>Encryption?

---------- Post added at 01:45 AM ---------- Previous post was at 01:44 AM ----------

Where'd you get that from? Yes, the latest build for the Redmi 4X has been a while back but that's true for all devices and the Redmi 4X was not marked as unmaintained in the wiki.

If you missed it, there is a total outage of the LineageOS build server for multiple weeks now due to a security incident. See also:

https://status.lineageos.org/

https://www.reddit.com/r/LineageOS/comments/gcp8uc/lineageos_infrastructure_compromised/

https://www.reddit.com/r/LineageOS/comments/gfudkv/build_status/

https://www.reddit.com/r/LineageOS/comments/gn4kw7/lineageos_automated_builder_relaunched/

Or basically https://www.reddit.com/r/LineageOS/top/?t=month
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] ghines:
Sorry, I had missed this and thanks for letting me know.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Chadpapy:
Thanks. i'll try. So if I understand correctly, this is the steps to do :

(Put the img on the phone)

1. Boot to TWRP

(2. Make a rom backup)

3. Go to advanced, then terminal

4. To backup, type: dd if=/dev/block/bootdevice/by-name/persist

of=/sdcard/persist.backup.img

5. To restore, type: dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist

5. After its finished reboot to the system, finished

+

6. If the phone is broken, restore the original img, type: dd if=/sdcard/persist.backup.img of=/dev/block/bootdevice/by-name/persist

did I understand right ?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Xiaomi Warrior:
We are use to long delays with updates. ;)
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
Yes, precisely. :)

These are the steps i'd try as well, Good luck!
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Chadpapy:
I did it and bootloop. Maybe someone can give me his lineage OS persist.img to try ? Is it possible ?

My backup is 32 Mo and the one I try to inject is 4 Mo. Also, there is an option "persist" in the backup and restore options. I'll try to put the persist.img to inject it this way but idk the folder to put it in.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
The persist partition is 32MB in size, fixed. If the persist.img is just 4MB in size this means that only 4MB of these 32MB are in use.

The persist partition contains a filesystem that holds various files. What TWRP does when backing up Persist is to create a tape archive (.tar file) of all files inside the persist partition. That's why it is not too simple to take the persist.img extracted from the update package.

Also i just took a look at the particular "persist.img" file and it appears to be in a special format. "file" identifies as an "Android sparse image" and blkid does not return anything for the file, whereas it would find ext4 ids on my physical persist partition.

Using a quick DuckDuckGo search i was able to find https://github.com/anestisb/android-simg2img

Using this tool i was able to convert a persist.img extracted from a Xiaomi fastboot update archive into an image file that is recognized as a valid ext4 filesystem. This looks quite promising imo, even though i have not flashed this file to my device to try it.

Once you get your device up and running again, i'd recommend to check for device IDs under Settings > Device Info. Make sure that things like MAC addresses and IMEI are still intact. This is just to make sure to notice this right away, even though i think that this information might be stored in the EFS partition instead.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Chadpapy:
I can't use this tool. I don't know how it works :( what if I :

- flash the official miui rom

- make a persist backup with twrp

- restore my lineage backup with twrp

- restore the official persist

Is this fine ? Can I just restore the lineage backup over the official rom without flashing the lineage rom again ?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
Are you running windows on your Desktop Computer?

Compiling & using simg2img was fairly easy here on my Linux machine.

Flashing the regular MIUI update package from Xiaomi in TWRP is something you can try, though i very much doubt that it even touches the persist partition. (Based on looking at the files included in the zip file and the instructions withing "META-INF/com/google/android/updater-script"

I actually wanted to avoid that you have to trust an additional party apart from Xiaomi, but if you can't find any way to convert your image file, find a readily converted persist.img in the zipfile attached.

I converted it using simg2img.

I have used the "persist.img" file extracted from "santoni_global_images_V11.0.2.0.NAMMIXM_20191107.0000.00_7.1_global_99c087db02.tgz" that i downloaded from https://c.mi.com/oc/miuidownload/detail?guide=2

The zip file contains a readily flashable/mountable persist.raw.img along with a verbatim copy of the persist.img i have used, so you might check for any mismatches.

These are the md5sums of all firmware files involved:

99c087db0295135d3f8230ee9093ecbd santoni_global_images_V11.0.2.0.NAMMIXM_20191107.0000.00_7.1_global_99c087db02.tgz
ba56c25628253dec5f24de6504e38903 persist.img
9e65c98bffb0716b4d69ed52c6921c4a persist.raw.img
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Chadpapy:
First of all, thank you for helping me so much, it's really nice.

This time, it booted properly but nothing has changed. The gyro still doesn't work. :(

I'll try to flash the official rom and re-flash lineage to do some tests.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Chadpapy:
Oh boy! It finally worked !!!! Thank you very much !
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] INTRODRUCTOR:
Nice rom

I loved the stability of these rom it's very smooth
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] art_17:
Fingerprint (goodix) don't work

Lineage is is the first custom ROM I try on my santoni.. Apart from the fingerprint issue I'm completely satisfied...

I clean flashed the latest linage os 16.0 (lineage-16.0-20200422-nightly-santoni-signed.zip) and pico opengapps.. I don't root or flash anything else..

I have backups of all partitions apart from system... Can I fix the issue by restoring any particular partitions?

I know the simplest solution is to flash another version of Los, flash other custom Roms or flash stock MIUI. But if possible, I don't want to reflash the rom cuz I passed safetynet test with this version of Los

Edit: nvm I fixed the problem... Great rom... Clean, light, quick and excellent sot
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] davidsurya:
How much size for system in this rom?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
Workaround for clock issue

For anyone facing the issue with the time not being preserved across reboots:

I found out that the issue is that a directory is not writable (or even exists).

The directory is used by the program "QC-time-services" to store a delta to the system clock, in order to keep the current time.

This approach is needed because the Qualcomm RTC driver (for the system clock) is Read Only. (like, WTF?)

As it appears on other ROMs or devices which also depend on "QC-time-services" to keep their clocks straight, the affected directory should be created on every boot if it does not exist - this LineageOS build however does not do this.

You can fix the clock by manually creating the directory as follows:

(run this as root or via TWRP. You can "adb shell" into your device from a PC while running TWRP, or you can enable developer settings, enable ADB and rooted ADB, then run "adb root" and "adb shell" on your PC )

mkdir /data/vendor/time/
chown -R system:system /data/vendor/time/
chcon u:object_r:vendor_time_data_file:s0 /data/vendor/time/

The issue for this bug on GitLab: https://gitlab.com/LineageOS/issues/android/-/issues/1411
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] ghines:
Thanks for the fix, it fixed the date/time in TWRP which was very annoying.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] 3x()7c15t:
Cant tell if im in a boot loop?

Tried updating my phone to the 10th of June build and its just showing the lineage logo for the past 10-15 minutes. Hasn't turned off just continuously loading the lineage logo without showing the lineage logo with 3 dots (so the only logo showing is the one where the circle goes across the screen). If my phone continues to do this for another hour will probably get into recovery and flash the 22nd of April build. If anyone is online could they confirm if this is a boot loop as I haven't experienced a boot loop where the phone doesn't turn off then vibrate then turn back on again to show the boot sequence. Also as the boot sequence hasn't actually completed im just a bit confused as to whether this is a boot loop or not. If anyone is online right now or for the next 25 minutes to confirm this for me or I will just reflash everything tomorrow?

- I will keep you updated if within the next 25 minutes the phone doesn't stop the boot sequence
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] underskyzx:
Try rebooting, hold power button until phone restarts.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] 3x()7c15t:
To install the latest version i wiped phone completely, used twrp to install the latest build (10th of june) then installed pico gapps. Booted but took a while to get from boot sequence to setup (showed black screen after boot sequence for a couple of minutes). Now its working fine. I havent enabled secure boot but in settings the device says the phone is encrypted. Will that effect future ota updates as i kind of remember my phone saying it wasnt encrypted before flashing the latest build (might be remembering this wrong)?

Idk why but when i flashed 22 of april to update to 10th of june through los OTA update it wouldnt work so i had to flash the 10th of June manually
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] customromfr:
15.1 still supported? any problem as of today with apps or phone functions?

Hello,

I read the last 10 pages, i'm totally new to custom roms, flashing phones.

My phone is getting slower and slower, no space available even with only .. then etc, a good lighter rom would be usefull.

I use whatsapp, google map, other apps, everyday. Also use bluetooth calls and wifi.

I wonder if I install the last 15.1 version, will I have a totally perfectly working phone like before, meaning for whatsapp, videocalls, google map, bluetooth, sceen rotation, etc, ?

I don't want to make mistakes, as everybody i guess my phone is utterly necessary, i can't play with it. But if 15.1 is completely ok, both for security and for apps and full working of the phone, i'm tempted to give it a try because my redmi is really ding (low battery, no space, slow..).

I understood 16.0 is even better for the battery drain, but i see some problems with whatsapp, fingerprint, etc, and it's a no-go to me.

Thanks for the help
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] ankutsa:
Guys I cannot install the any of the Lineage 16 nightly ZIP files, I get updater process ended with ERROR: 7
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jokergermany:
Yeah not using whatsapp is a good decision!
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] Artifaqtorr:
I have detected two fatal errors

Hi Sir.

Everything seems to be working fine except for a fatal error that prevents the deletion of the fingerprints stored on the device.

I have also noticed that there are problems using the "OpenGApps-nano" package because by omitting the configuration of the "Ok Google" voice command the installer creates a loop that prevents skipping that configuration. This problem does not occur if you use the "MindTheGapps" package instead, although it is already deprecated.

So far I have only detected these two errors, I hope you can please fix them as soon as possible.

Tested in the following compilations:

- lineage-16.0-20200624-nightly-santoni-signed.zip

- open_gapps-arm64-9.0-nano-20200624

- MindTheGapps-9.0.0-arm64-20190615_031441

- TWRP latest official version for santoni
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] LogaN Kat:
Hey dev, will we get los 17.1 ??
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] sambhavnahata:
There is a problem with "Microsoft Your Phone" app. I have synced everything with windows app but whenever I place a call from my Laptop it doesn't make the call. There is an issue with the dialer app I guess. So please Fix this issue.

---------- Post added at 04:10 PM ---------- Previous post was at 04:07 PM ----------

After flashing this ROM my MAC address changed to 02:00:00:00:00:00. I am not able to use wifi and Bluetooth at all. I made a fresh install btw. Please if anyone have a solution share it.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] aaaa12345:
The main reson for this error is that you are trying to flash incorrect ROM. (Let me to assume that this isn't the case).

Another reason could be that TWRP is causing this issue so try an earlier TWRP version.

Best regards.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jokergermany:
I experienced this in two cases:

1. Rom is not for your device

2. Bootloader is defective (had this case a few minutes ago...)

Case1:

Choose a rom for your device

Case2:

Update/reflash the bootloader

For Xiaomi devices for example, download the latest update from here:

https://xiaomifirmwareupdater.com/

and flash it with your recovery.

My Problem was:

Sometimes lineageOS didn't mount the internal storage and sometimes i had a loop when i try to unlock the display lock. (After unlocking, black screen and i had to unlock the display lock again)

I made a backup deleted and formated everything, tried to reinstall lineageOS and had the Error7 then.

I reflashed the update for the bootloader and then i could reinstall lineageOS.

But after this i made a recovery. My hope is, that my problems are gone, too...
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] swissalpine:
I am looking for a download of the latest version of Lineage 15.1 (Oreo). I need it to use Android Auto ...

I would be very happy about a download URL!

Thanks a lot!
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] jokergermany:
You can use AA with LOS 16,too.

To get AA running, you have to:

1. flash magisk

2. flash SafetyPatch v3:

https://magiskroot.net/md/SafetyPatch-v3.zip

3. Activate MagiskHide Probs Config
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] swissalpine:
[MENTION=2774876]jokergermany[/MENTION]

Thanks a lot! This works perfect!
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] theBoatman:
I changed to this rom from Havoc using the latest nightly (lineage-16.0-20200722-nightly-santoni-signed.zip), and now several sensors are not working. As far I can see I miss Accelerometer/Gyroscope (no screen rotation for example) and compass. Several other sensors (Proximity, Light, Fingerprint) are working. I also get a GPS fix.

I reinstalled and whiped data several times, and I updated to the latest firmware, all without success. Can anyone give me a hint what I could try to get my sensors working again?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
When Acceleration, Rotation and Orientation sensing do not work, this can be ralated to the "/persist/sensors/sns.reg" file. Two pages ago someone else had the same problem and we figured that out:

https://xdaforums.com/showpost.php?p=82688671&postcount=2614

You can take a look at your "/persist/sensors/sns.reg" file and others and try to find issues like permissions or SELinux context. On my device, the "sns.reg" file has owner and group set to "system" and is in the "u:object_r:sensors_persist_file:s0" SELinux context. You can compare your files to the content from the TWRP backup i shared attached to the linked post. "persist.ext4.win" really is just a tape archive - a ".tar" file, possibly compressed - as is almost any other TWRP backup.

If you don't know how to access files from a tape archive i have attached the "sns.reg" file whithin a zip archive to this post.

To mount your "Persist" partition you can use the "Mount" menu in TWRP.

If all else fails you can also go and replace the "/persist/sensors/sns.reg" file with the one from my backup. I suspect that the "sns.reg" file contains sensor calibration data so i'd expect the sensor to behave weirdly (of course it doesn't have to).

Of course, if you happen to have lying around a Persist TWRP Backup of your own, you can also just restore that one.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] theBoatman:
Great - that fixed it!

Before trying your file (because I do not like tempering with single files), I downloaded the official firmware, extracted the persist.img file and dumped it over my existing persist partition, but after that my phone didn't boot. (Restored my faulty version afterward.) After that I checked the permissions of the sns.reg file and it looked fine to me, so I copied your file (made a diff before copying to make sure it actually changes something) and after rebooting everything seems to work fine now.

I now wonder whether my file got damaged at some point, or it was incompatible to the rom...

I did not backup persist as I was not familiar with this partition until now, and in TWRP it was shown as size:0mb, which I interpreted as "empty", but obviously it is just "really small" :D

Thanks a lot for your help!
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
The last official LineageOS 15.1 build from 2019-07-26

Upload of the latest official build i had lying around, namely lineage-15.1-20190726-nightly-santoni-signed.zip:

https://mega.nz/file/IyQUTSSR#f7Dimam-K7nKQjTw5BgKrQiFWRn_eY5YLq414y0Xne0

Checksum can be found here:

https://web.archive.org/web/20190917214524/https://download.lineageos.org/santoni

https://web.archive.org/web/2019091....1-20190726-nightly-santoni-signed.zip?sha256
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] swissalpine:
[MENTION=7904654]SebiderSushi[/MENTION] Thanks for the file. I saved it in case I got in trouble again.

The tip from [MENTION=2774876]jokergermany[/MENTION] made it work: Right now, Android Auto is running!
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] ekonik3:
Anyone have gcam that work with this Lineage OS 16?
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
I'm glad it worked :)
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] theBoatman:
What I am currently thinking about: Since the beginning I had strange problems on all roms I tried with the proximity sensor (As soon as anything is reading it I have a sensor_ind wakelock, which causes massive energy usage.) And since I had it on all roms (multiple variants of RR, Havoc and now on Lineage) I thought It would be a generell problem of santoni devices. Now I am wondering about whether my persist patition got perhaps damaged at the very beginning and although replacing sns.reg fixed parts of it, it maybe still have problems. Possible?

And the more I read about persit the more I think: ALL rom install/update instructions should include the advice to backup the persist partition, because although it shouldn't get touched, it is important to have a backup of it.
[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] SebiderSushi:
I'm not sure i know what exactly you're referring to, but: Whenever i have been using WaveUp, an app that lets you wake up your device by waving over the proximity sensor, i observed a higher battery drain. When checking with the CPU frequency table (i.e. what CPU Spy and Kernel Adiutor display about how much time the CPU spent at each clock speed) it showed that the CPU was never entering the "Deep Sleep" state while WaveUp was querying the proximity sensor.

I also had this situation on an off-brand tablet from 2015 running KitKat and my OnePlus X (i guess on all ROMs i've ever tried using WaveUp).

From what i've read, observed and catched up i always thought that it was hardware dependent whether the proximity sensor could be used without disrupting the CPU deep sleep feature. Other than that, i've simply never had any device where this has worked.

Oh yes definitely. If i come to think of it, i might have done my first backups of EFS & Persist only due to my OCD after seeing them on the TWRP backup screen. First thing i did with my phone was taking a full backup of the stock setup just in case :D

Beyond TWRP backups i recently discovered a much more waterproof and holistic backup method! I started taking images of the whole (yes!) internal storage of my android devices because the more i tinkered with them the more i noticed that the standard backup procedures do not cover some very important partitions. You can actually make an image of your entire internal storage using dd and pipe it through an adb shell to your PC. Then you can overwrite irrelevant partitions like userdata, system, cust & cache with zeroes, convert your image into a sparse file and then pack it up inside a tape archive. The result is a backup of around 100MB which contains a verbatim copy of all genuine data from your internal storage. Then in the future, whenever you notice that you've destroyed any partition you didn't even know about you can go back to that backup and extract whatever you need.

Of course you can do the dd part much smarter by only transferring relevant data to begin with, but as long as your storage isn't too big i don't think it's worth the headache to look up wich storage sections need to be transferred and maybe **** up in the process.