yashsingh1/xdaforums huggingface dataset:
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
Redmi K20 Pro persist backup required

I have tried steps you suggested and works everything except Gyroscope. As before. I have made testing using Sensors Multitool. Rotation vector Z is swinging from -1 to 1 all the time even if phone is still. Gyroscope info shows Z axis always -7 or more. Gravity reacts to movement, but unnatural. On Q everything worked until downgraded back to P.

I have found useful topic about this problem - https://xdaforums.com/pixel-3-xl/how-to/android-10-sensors-bug-t3964904 . Reading through maybe will find something useful for my phone. I have never rooted my phone. Used Magisk few times. Persist.img I used was from Android 9 Chinese ROM 10.3.16 (As my phone is Chinese version). Persist.img was installed only with TWRP, it showed no problem when processed it.

Maybe someone can share backed up persist partition of Redmi K20 Chinese version? Hardware version in "All specs" page shows "Hardware version: V1". I got instruction to retrieve it. The following should put an image of the persist partition on the phone's internal storage. It should be executed on TWRP from Advanced > Terminal window.

dd if=/dev/block/by-name/persist of=/sdcard/persist_backup.img

I have made md5 checksums of all persist.img I have in each firmware. Despite file size is same, content each time is different.

7d75bd5108cf8407431033a96c9da195 *d:\temp\Xiaomi\raphael_global_images_V10.3.2.0.PFKMIXM_20190911.0000.00_9.0_global\images\persist.img
35c6ae0b8ddfffaa2f77525f7d4dc57b *d:\temp\Xiaomi\raphaels_images_V10.4.1.0.PFKCNXM_20190827.0000.00_9.0_cn\images\persist.img
80115db34f9af4b8a4a105dc675f7fa0 *d:\temp\Xiaomi\raphael_images_V10.3.17.0.PFKCNXM_20190816.0000.00_9.0_cn\images\persist.img
a7fb2b49e181096e3345b64b1982b990 *d:\temp\Xiaomi\raphael_global_images_V10.3.1.0.PFKMIXM_20190805.0000.00_9.0_global\images\persist.img
3283790361d575e355929f995c904d23 *d:\temp\Xiaomi\raphael_eea_global_images_V10.3.1.0.PFKEUXM_20190723.0000.00_9.0_eea\images\persist.img
2ceeb38f7ca1c32afe6d842d2e9f0ed4 *d:\temp\Xiaomi\raphael_images_V10.3.16.0.PFKCNXM_20190718.0000.00_9.0_cn\images\persist.img
a9e78a1299431e19de73a847c22bc7cc *d:\temp\Xiaomi\raphaelin_in_global_images_V10.3.3.0.PFKINXM_20190711.0000.00_9.0_in\images\persist.img
b979fadaae21f397f4f1f46282305248 *d:\temp\Xiaomi\raphael_images_V10.3.15.0.PFKCNXM_20190709.0000.00_9.0_cn\images\persist.img
dad5c8526ae0c598b31a6c58184bb81b *d:\temp\Xiaomi\raphael_images_V10.3.11.0.PFKCNXM_20190619.0000.00_9.0_cn\images\persist.img
40ddaa6840e63bdf6d04bfb84352bf56 *d:\temp\Xiaomi\raphael_images_V10.3.8.0.PFKCNXM_20190601.0000.00_9.0_cn\images\persist.img
fff3410c7cf4c3cb5f5490b1dc252c3f *d:\temp\Xiaomi\raphael_images_V10.3.7.0.PFKCNXM_20190528.0000.00_9.0_cn\images\persist.img
03a89f80aa1f3804c03403aa9bdace29 *d:\temp\Xiaomi\raphael_images_V10.3.6.0.PFKCNXM_20190516.0000.00_9.0_cn\images\persist.img

User which requires sensors fix should do following:

So, maybe someone with K20 Pro CN version can share their persist.img file with me and others?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] KingMinePlay:
Hey, I have the same problem and this is getting me crazy. Have you solved the problem?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
No, I got tired trying and now use phone with this problem. I get to much effort live without my new phone as I need on my daily life. Lineage os is not interesting to me too use for working sensors but without miui.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] KingMinePlay:
Oh, sad to hear that. Don't worry, I'm going to get a new persist.img from a friend of mine's Redmi K20 Pro next weekend. Hope it fixes the issue. I don't really know why this is happening to our phone :crying:
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
Ok, please returns here after your try and let us know you got sensor fixed ;)
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aimara:
hmmm i am seeing a pattern , where many had problems after flashing roms , odd , anyway how to tell needle on the app is really facing north ?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] mykel_s:
It occurs also on my Mi 9T Pro with official global ROM... Compass spins constantly over Z-axis. It is especially visible for instance in Google Maps and annoys a lot. I think I will wait till MIUI 11 release and then maybe return this phone unless it will recover.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
Yes, looks like it occurs with officials ROM too if ROM was uploaded by FASTBOOT mode. Stock sensor settings gets rewritten with universal settings which do not work as desired.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] mykel_s:
Yes it seems so. The worst thing is that, it was working just fine at the very beginning, compass was lost just few weeks after I bought the phone :(

In the meantime maybe there were two official OTA updates, nevertheless I cannot recall what could cause loss of this functionality.

Thanks for your comment anyway.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
Hi, weekend had passed. Did you tried to fix your K20 pro with your friends phone`s help? :confused: It is very interesting how it gone :o
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] keshow:
maybe someone with K20 Pro CN version can share their persist.img file with me and others?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] vichucoolics:
Even mine was screwed up..I taught I'll have to take it to service centre ....I had formatted system ...and when I installed fastbiit ROM..the gyroscope and accelerometer was not working.. unfortunately I had relocked my bootloader and had to wait for 30 days to flash persist file....so I just gave factory reset from settings a try..and it worked
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
You did factory reset from ROM version you have uploaded via FASTBOOT earlier and that worked? What persist file you have used? And how compass functionality - works? Fastboot ROM version accelerometer works fine, but compass fails.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] vichucoolics:
At first my gyroscope also wasn't working....I didn't flash any persist file but now I can see that the compass is buggy... And also the video recording is buggy.... Hope after flashing miui 11 upcoming update it fixes things
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
I have the same issue. Don't know how to fix it. Am already using miui 11
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] David_#27:
You are good to go: https://xdaforums.com/k20-pro/help/auto-rotation-issue-custom-roms-t3983169/page2

Let me know if I helped you...
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] sornxx:
K20pro sensor not working acc gyro on rom eu 10.3.17
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] David_#27:
You are good to go: https://xdaforums.com/k20...t3983169/page2

Let me know if I helped you...
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] sornxx:
How to video !

---------- Post added at 12:28 AM ---------- Previous post was at 12:26 AM ----------

How to video compress acc gyro not working k20pro
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] David_#27:
Just do as I say in the OP section of the thread:

https://xdaforums.com/k20-pro/help/auto-rotation-issue-custom-roms-t3983169
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] ntmalol:
This is why I don't want to risk unlocking new phones.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] KingMinePlay:
Didn't work, I'm waiting for MIUI 11 and see if it helps.

---------- Post added at 09:04 AM ---------- Previous post was at 08:59 AM ----------

Ok, but I like to unlock my phones and these kind of things can happen. We are here for helping each other to solve this problem.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] David_#27:
Just follow my instructions! I've had the same problem before but now it's fixed! Here you go: https://xdaforums.com/k20-pro/help/auto-rotation-issue-custom-roms-t3983169
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
Hi I have followed instructions and gyroscope + compass still not work correctly. What I have tried to do:

Installed Stock Chinesse ROM 10.3.17 using fastboot ("flash all" was selected). Started and set up phone. Installed TWRP and started it up. Flashed system.img + vendor.img + persist.img in this sequence to same named partitions one by (files were taken from 10.3.17 image folder). Booted Android and made camera calibration. Compass works same as before - not correctly.. Did I missed something or I should continue with cdDroid etc? Otherwise looks like this method not fixes this problem.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] David_#27:
You have to do nothing more than flash stock Chinese ROM(MUST BE MIUI 10 IF YOU WISH TO FLASH ANDROID PIE CUSTOM ROM AFTERWARDS) and boot normally + do the setup without installing TWRP... Calibrate again the front camera and check the compass... Then install TWRP... Afterwards, if you want to flash an AOSP based custom ROM, wipe dalvik + cache + data and install normally the ROM you like with gapps! Then reboot to recovery and flash magisk! After that you are good to go... Just reboot your phone!
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
I made everything you wrote. I flashed stock Chinese ROM, booted, did setup. Compass was malfunctioning. Then installed TWRP + system.img + vendor.img + persist.img (same version as ROM). Booted up again. Did camera calibration. Compass was still malfunctioning. Did nothing more. As this did not helper I wiped everything out and flashed xiaomi.eu ROM as before and restore data from backup with TWRP. Maybe will try other methods later.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
Did exactly the same and it isnt't working for me either
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] revengeson2:
I googled for few days and finally I found here. I followed below steps for my K20 Pro bought in China and it works!

Below is my case:

1. Flash stock Chinese ROM(raphael_images_V10.3.17.0.PFKCNXM_20190816.0000.00_9.0_cn) using MiFlash 2018.5.28.0 and boot normally

2. The compass, gyroscope and accelerometer are not working (checked by entering *#*#64663#*#* in the dialer and using sensor box app)

3. Install TWRP, copy the persist.img from the stock rom from my computer at the folder (raphael_images_V10.3.17.0.PFKCNXM_20190816.0000.00_9.0_cn_708bc652c7\raphael_images_V10.3.17.0.PFKCNXM_20190816.0000.00_9.0_cn\images) to my phone /sdcard

4. Go to TWRP, Advanced > Terminal window., then type in below to flash the persist.img:

dd if=/sdcard/persist.img of=/dev/block/by-name/persist

5. Reboot, at the fist start, I heard some noise sounded like the front camera was stuck, I tried to open camera app and pull up the front camera for few times then it warned me and ask to calibrate, just followed the instruction.

6. I checked the compass, gyroscope and accelerometer again, they were all there and worked normally!

Then you can go to flash other custom rom you like.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
It unfortunately didn't fix it for me
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
It didn't worked for me neither.. Only difference I made I used newer version of Mi Flash as noted because older version showed errors on Windows 10.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
I quote my own post from the other thread hoping someone can do that:

Is someome with flawlessly working sensors kind enough to share their sensor files? For doing so just follow this instruction and share the generated file:

1. You need root

2. adb shell into your device and obtain root using 'su'

3. Run the following:

tar czf /sdcard/destinationfile.tar.gz /mnt/vendor/persist/sensors

This will generate and save the tar file on your sdcard

4. Run the following to pull the file and save it to your desktop

adb pull /sdcard/destinationfile.tar.gz ~/Desktop
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
Hi, that is my Mi 9t pro global sensors. sensors of K20 Pro remains to be same. Sharing link to file, please test and let me know it is possible to restore sensors data, and how you succeed.

https://www.dropbox.com/s/kq02wglptdnvvvx/mysensorsmi9tpro.tar.gz?dl=0
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
Thank you for sharing your sensors files.

Now I've found the solution for the rotating compass.

I need to adjust the file "icm4x6xx_0_platform.gyro.fac_cal.bias" with my own calibration data. In my case I had an offset of about 1.2 on z axis compared to the sensors files you provided. I adapted this file by the mentioned value and now the compass is pack to normal.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
I see I am able to "calibrate" it also, but it do not get desired result. My compass is not showing magnetic north, not reacting smoothly when I turn phones direction on table. It rotates a little all the time :)

According to that editing you have made - in CIT window you can click three dots in corner and select "Additional tools". There you can make calibration automatically. For example "Acc Calibration Tool" - inside you can see offset values for all XYZ axis, ant press "Calibrate" to set calibration. But in "gyro Calibration Tool" button "Calibrate" return "Calibration Failed". I have tried to set all permissions of file "icm4x6xx_0_platform.gyro.fac_cal.bias" writable, but it don't help. Later on I have tried to edit all directory "/mnt/vendor/persist/sensors/registry/registry" giving permission "a+rw" to all dir files. Calibration failed again. Have no clue now how to pass calibration of gyro.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
CIT window under addiotional tools is the right way to start at. The calibration function of gyro sensor is not working for me, too. But there you can see the actual values (and also the calibration values). The ones interresting for us are the actual values. They should be arround 0 on a properly calibrated device. If not you need to calibrate. In my case the z-axis was showing a value of arround +1.2xxx (average of the flickering values). That is the value you need to add up to the currently stored calibration value.

You can find the calibration values in the file "icm4x6xx_0_platform.gyro.fac_cal.bias". You cannot change that file by just trying to open and edit it from your persist partition. Make a copy of that file to your sdcard instead and make the changes. After you can copy the file to you persist partition and overwrite the existing file.

Reboot and open the compass app. Most likely it wants you to calibrate the compass and then you're done.

Some devices have bigger offsets nedded to be calibrated away. Thats's why some devices have spinning compass as soon as the factory calibration values are missing. The higher the offset, the faster is that spinning. On devices with tiny offset this effect is not noticable and they can just flash a persist.img without the need of doing something else than that.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Sukhi:
How does one restore this backup incase needed?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
you can extract the files and copy them to the designated path to your phone using twrp i.e.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] BATISTAH12:
Estou com o mesmo problema , não consigo calibrar bússola nem giroscópio , minha versão Global MIUI 10.3.3.0, não encontro solução, por favor alguém pode me ajudar?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Sukhi:
Can twrp mount mnt? I tried it today, but the /mnt/vendor folder was empty
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
in TWRP you have to mount persist and then you will find a folder "persist" in the root of your phone
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Sukhi:
Oh I see ! Every time we mount persist through twrp, it leaves it’s stamp (.twrp) inside the folder. Not sure if that’s a good idea? Is that stamp harmless or effects system integrity in any way?The only way to clean it is to remove the entire persist folder and let the rom recreate it on boot
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
I want to add some clarification to topic from my perspective. My phone is not fixed yet.

How this problem appear? it appear when you changing ROM version from Android 10 to Android 9. Changing between different ROMs but same Android version do not affect it.

What gets broken? Persist partition gets broken. That mean files in /mnt/vendor/persist. And partition is at /dev/block/by-name/persist. To fix it you need to flash stock ROM via bootloader and after install TWRP flash persist.img from same ROM.

In my case that gets not very easy to fix. I updated calibrated GYRO values in /mnt/vendor/persist/sensors/registry/registry/icm4x6xx_0_platform.gyro.fac_cal.bias manually. My Gyro sensor Z is -7,4, that is big value and when i "calibrate it" manually over the file it jumps up-down very sensitive - compass keep spining a little. When i shake phone it returns to north and starts spinning over again. I have also found some gyro info in other files. Maybe some of them sets sensitivity of gyro but i have no luck with it yet. I edit files in my PC, upload to SDCARD and copy them using adb shell. Command example:

<will add it later here>

Prevention. Once you buy new phone and install TWRP make persist backup as instructed in post #5.

Acc calibration works in CIT anvironment, but GYRO calibration return "calibration error" and i could not find out why. That is maybe biggest question which answering may solve this problem for me and others. I tried to play with persmissions and other attributes, that didn't helped.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Guido83:
Did you calibrate your compass via the compass app after changing your factory calibration values?

-7.4 is indeed a massive offset
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
Yes, i always need to calibrate comnpass in compass app after file with new values upload and reboot. By the way - ball in circle rotates more natural than before file upload (if you set correct values).
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
Sending shell commands to update gyro calibration file. At first please make copy of your current persist files to your PC, modify file "icm4x6xx_0_platform.gyro.fac_cal.bias" and upload to your SD card. XYZ offset is only place need changing. That is instruction how to upload this file and set correct permissions. Run "adb shell" and run these commands one by one, each command in new line.

su
rm /mnt/vendor/persist/sensors/registry/registry/icm4x6xx_0_platform.gyro.fac_cal.bias
cp /sdcard/icm4x6xx_0_platform.gyro.fac_cal.bias /mnt/vendor/persist/sensors/registry/registry/icm4x6xx_0_platform.gyro.fac_cal.bias
chown system /mnt/vendor/persist/sensors/registry/registry/icm4x6xx_0_platform.gyro.fac_cal.bias
chgrp system /mnt/vendor/persist/sensors/registry/registry/icm4x6xx_0_platform.gyro.fac_cal.bias
reboot

That did not solved my problem 100%, but most of functions required gyro now works.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] devoker:
I have a similar problem

Never downgraded to miui10 one of the 2 compasses always uncalibrated

https://xdaforums.com/k20-pro/help
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] KRISHNA JEYA KUMAR:
any improvement??
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Danny94:
Did it keept working for you ?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] Aliosa007:
I haven't tried this method long ago. But that worked in time I tried. I have calibrated manually compass as much as I can in several tries and left it. It was not accurate any more, but pointed right direction at open. Then begun to spin around very very slowly. It was best I achieved. I have sold this phone and bought EU version Mi 9T Pro and never went to this upgrade/downgrade cycle any more not to get into this problem again.
[Tilt, TyTN II, MDA Vario III Themes and Apps] undac:
http://mobile.divx.com/divx (Registration required)

Not sure if it has been posted before, personally I just found it.

Compared to the 0.89 revision I can't see anything new in the UI. On the current official 6.1 ROM from HTC performance is on par with the older releases on older ROMs or just slightly worse. (I'd say about 70-80 % speed on a "release" quality XviD file while it was closer to 90 % for me using .089 and WM6.0 ROMs)

Quality seems to be worse as well (posterization) though users on the DivX forum seem to think the opposite.

No official word on changes.

CAB of the WM6 Pro version is attached below. Just copy to your device and run in order to install. (No need to register.)
[LG G Stylo Questions & Answers] teknogrunt38id:
Since they share drivers think we could soon bring lineage 15 to the stylo?
[Galaxy Note 4 Q&A, Help & Troubleshooting] yeahman45:
Stock based rom has become painfully slow and unresponsive. I installed resurrection remix pie but camera is buggy (slow or crash).

Any reliable custom rom with stable camera? Even older android versions as long as there are security updates
[Galaxy Note 4 Q&A, Help & Troubleshooting] Mirsaneli:
It depends on user preferences. If you have Exynos variant, I would go for Nemesis Refined Rom 3.x.x. if you have Snapdragon, I recommend Norma N7 Port v26 or Nemesis Note 7 port v3. But choose N4 camera in Aroma installer if you want stable camera.
[Galaxy Note 4 Q&A, Help & Troubleshooting] yeahman45:
I have snapdragon thx but stock based roms don't have security updates anymore right?
[Galaxy Note 4 Q&A, Help & Troubleshooting] Mirsaneli:
Norma has security update from 1st September 2017. It's UI that matters. You are getting Dream UX for free, which actually works better and smoother than stock Marshmallow ROM. To be honest, I have never seen Android phone being hacked or something, I don't know why people pay so much attention to security updates.
[Galaxy Note 4 Q&A, Help & Troubleshooting] fahoood:
there is erobot rom

it is the best not 4 rom ever:good:

last update and stable.
[Galaxy Note 4 Q&A, Help & Troubleshooting] yeahman45:
it does not get slow over time?
[Galaxy Note 4 Q&A, Help & Troubleshooting] AoMine:
try havoc os is very stable , camera and latest security updates september 2019
[Huawei P30 Pro Questions & Answers] Kirin9801991:
Hi experts,

I got 1 china p30 pro VOG AL00 currently locked as i forgotten my Huawei ID. While following some steps in YouTube, i had successfully upgrade to 9.1.0.193 through eRecovery. Asked China suppliers to unlock my phone as on the progress to unlocking my phone. They remove the whole setup at starting (Language Selection). Now everytime I boot my phone, it will directly move to eRecovery page. And shows Download Latest and Recovery, but the wipe data button was grey out. May i know any steps to downgrade the phone? I tried the USB with OTG cable method and it just shows Software Install Failed.
[Huawei P30 Pro Questions & Answers] *Detection*:
Tried HiSuite?

https://consumer.huawei.com/en/support/hisuite/
[MX Player] maz200x:
Hi,

Please add a feature to mxplayer for playing only a specified subrange of multiple videos for bypassing repeated subranges in videos...

Thanks a lot...
[Xiaomi Mi 8 Questions & Answers] Metallijim:
Hello. Just thought I'd post this. I have the latest update with Digital Well-being. When I press on Do Not Disturb, it force closes. I posted on the Mi Community. See picture.......

If anyone has any other ideas, I'm open to suggestions. I'm not overly concerned, but the way they say "Just wait for next update", concerns me.