[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
EDIT 5

In addition to the two methods highlighted below, I'm sharing a third method which was brought up in the thread. This one is much easier, however, root is required. This method works for many, however, it is not confirmed by me. Again, no one takes responsibility for this or the previous method.

Ask someone with working sensors to share the following folder with you: root/mnt/vendor/persist/sensors. Please ensure the device they have is the same as yours (Pixel 3 (blueline) and Pixel 3 XL (crosshatch) are NOT the same devices). They should, ideally, share it as a *.tar file to keep the permissions of subfiles intact.

Instructions to generate this tar file are here: https://xdaforums.com/pixel-3-xl/how-to/android-10-sensors-bug-t3964904/post80833171

On your rooted phone running Android 10, navigate to: root/mnt/vendor/persist/ and first of all, backup your /sensors/ folder. Then, paste the contents of the tar file in there so you have the sensors folder from the working device that was shared with you.

Reboot and report. You should have working sensors now.

EDIT 4

TWRP Developers are working on fixing the root cause of this issue. More details here: https://xdaforums.com/showpost.php?p=80248406&postcount=1218

EDIT 3

We now have an update from Google: Here is the email we received (posting it verbatim after redacting any personal or confidential information).

EDIT 2

Thanks to many members of this thread, I am sharing a second method which does not involve flashing a new /persist/ partition that was shared before. This method works for many, however, it is not confirmed by me. Again, no one takes responsibility for this or the previous method.

Steps below (not my work; thanks to others on this thread):

We assume you are on Android 10 for these steps.

Backup your current persist partition since you will be changing it. On a rooted adb shell, run dd if=/dev/block/by-name/persist of=/sdcard/persist.img (this will backup your persist to your sdcard)

Navigate to root/mnt/vendor/persist and delete the cache folder completely. This stores TWRP's cache and log files and is the root cause of the problem in the first place.

Flash Android 9 (PIE) from bootloader. YOU DO NOT NEED TO WIPE your data so you can remove the "-w" flag

Let the phone boot (it will bootloop; that is normal) for 2-3 minutes. This step will "fix your broken persist files" according to users

Reboot to bootloader and flash Android 10. Again, YOU DO NOT NEED TO WIPE your data, so you may remove the "-w" flag.

Reboot and report if this works.

EDIT 1

This issue was fixed. The problem is with the persist partition getting corrupted on some devices. The reasons are not clear, but we have strong reasons to believe this is due to TWRP's implementation of leaving logs and cache files on the /persist partition, which is limited in size. The log files often exceed 20MB in size and cause the sensor config and calibration files to become corrupted on that partition.

Steps to get this fixed:

Obtain a working persist.img from someone (it is device specific. You can find the ones for crosshatch and blueline on this thread, but will have to ask someone else for other devices)

Replace your persist partition with the persist.img you obtained. This needs to be done using an advanced command (dd) and you need to be on Android 9 in TWRP (rooted) to do this. Read the thread (around page 19) for more details.

Flash Android 10 (does not need to be a clean install, but clean install is always recommended).

WARNING: replacing your persist partition with someone else's (even the same device) WILL replace your original, unique factory calibration data with someone else's. This includes audio config files, camera calibration files, sensor calibration files. Backup your original /partition image before doing this and only do this if it is absolutely necessary. You have been warned!

No one on this thread assumes responsibility for anything bad happening to your device. It worked for all of us, but is not guaranteed to work for you. Still no news from Google, who are still investigating.

ORIGINAL THREAD

Starting a new thread here from the old one: https://xdaforums.com/pixel-3-xl/how-to/android-10-final-version-release-t3963794/page7

What is the problem?

Many users of Pixel 3 XL, Pixel 3, Pixel 2 XL and even the OG Pixel are reporting a major bug after upgrading to Android 10. All the sensors seem to be disabled.

This includes Active Edge, Proximity Sensor, Ambient Light Sensor, Auto-brightness, Accelerometer (Auto-rotation, flip to shhh, double tap to wake and lift to wake). All of these are dead on Android 10.

What we know:

Whether we upgrade directly from Android Pie or do a clean install using the factory images does not seem to matter. The issue only affects a certain set of users and only goes away if we revert to Pie. The phone works perfectly then.

Manually erasing all partitions and installing from the image does not work either.

Installing Android 10 individually on partitions A and B does not help either.

Re-locking the bootloader and returning completely to stock does not work either.

The only thing in common for all of us is that we were all rooted and/ or using a custom kernel in the past. However, some others who had been rooted and using custom kernels/ ROMs report they do not face this issue.

Interestingly, for users on the beta program, they started noticing this issue around Beta 6. Post-that, even if they reverted to an older Beta 3,4 or 5 which did not have this problem, they would face this problem after Beta 6. And this is continues with the public version now.

Some users suspect this could be happening due to "something left-over somewhere hidden on the phone." (not verified, but makes sense, in theory)

Coverage

This issue is widely covered now:

https://bgr.com/2019/09/05/android-10-update-for-pixel-phones-sensors-bug-explained/

https://www.androidauthority.com/pixel-sensors-android-10-1026027/

https://9to5google.com/2019/09/05/pixel-active-edge-sensors-android-10/

https://mobilesyrup.com/2019/09/05/pixel-users-experience-dead-sensors-post-android-10-update/

... and many more

Next steps:

If you face this issue, please add your comments and what you have tried here and update the bug on Google's issue tracker that we have filed here:

https://issuetracker.google.com/issues/140476661​

There is also a help center article on Google's support forum that you can upvote here: https://support.google.com/pixelphone/thread/13511202?hl=en