FIXED - Android 10 - Sensors Bug

nikhilnangia

Senior Member
Sep 22, 2016
122
114
53
Paris, France
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://forum.xda-developers.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://forum.xda-developers.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).

We now have a root cause for this issue and a fix will rollout in October.
The short summary is that in Q qualcomm added some checks that prevented sensors from starting when it found corrupted calibration files. In Pi it was more forgiving and continue to function even though the calibration files may have been corrupted. The fix will revert back similar to what Pi was doing. The upside is sensors will continue to work. The downside is, some of the sensors may not function as effectively if the calibration files are corrupted due to external reasons. Regular users who do not touch persist partition would not hit this issue.

Thanks all for your support. Please do let us know if you are seeing any other issues post Android 10 rollout that need attention. We will start ramping up the rollouts next week.
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://forum.xda-developers.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:

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
 
Last edited:

BigOkie

Member
Mar 21, 2011
46
8
0
Tulsa
So the 3A and 3A XL aren't affected? I have 10 on mine now after sideloading the OTA last night and aside from the 20 minute reboot cycle, I've seen no problems as of yet.
 

nikhilnangia

Senior Member
Sep 22, 2016
122
114
53
Paris, France
So the 3A and 3A XL aren't affected? I have 10 on mine now after sideloading the OTA last night and aside from the 20 minute reboot cycle, I've seen no problems as of yet.
No idea about the other models. I've just posted the ones that I could find on forums, including mind (3XL).

There is something in common here for everyone that we seem to be missing. In the interest of getting to the root of it, I am posting my pre-android 10 update configuration:
Pixel 3XL, hardware model MP1.0
Rooted with magisk 19.3
Recovery: TWRP
Kernel: Kirisakura Kernel v3.4.5
Magisk modules installed: youtube vanced, busybox, energized, systemless hosts, zRAM/ SWAP manager to enable zram
Apart from this, I had naptime installed working in root mode
And tweaked a few kernel settings: color settings, changed scheduler for graphics, zram compression algorithm and I/O scheduler.

Anyone else facing this problem see something in common?
 

alpinista82

Senior Member
Sep 22, 2012
173
69
0
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.
I would rather say this is related to the bootloader that after flashing beta 6 doesn't get downgraded when returning to an older beta version or even Pie. Since only a part of the users is affected I would guess that a specific hardware revision doesn't play nice with Android 10. As I am not affected I can't do further testing and you should take what I wrote above as an educated guess ;).
 

nikhilnangia

Senior Member
Sep 22, 2016
122
114
53
Paris, France
I would rather say this is related to the bootloader that after flashing beta 6 doesn't get downgraded when returning to an older beta version or even Pie. Since only a part of the users is affected I would guess that a specific hardware revision doesn't play nice with Android 10. As I am not affected I can't do further testing and you should take what I wrote above as an educated guess ;).
Thanks for the ideas! I can confirm that the hardware version is not the problem since some others with the same hardware version as myself (MP1.0 - which can be checked on About Phone->Hardware) do NOT face this issue.

As far as the bootloader goes, that's certainly plausible. @ultimatepichu and @FcukBloat has any of you tried this? i.e change the bootloader version to an older version and flash 10?
 

ultimatepichu

Senior Member
Mar 5, 2009
1,001
175
93
Hsinchu City
As far as the bootloader goes, that's certainly plausible. @ultimatepichu and @FcukBloat has any of you tried this? i.e change the bootloader version to an older version and flash 10?
the first thing in flash-all is to send the bootloader to the phone . But even if the bootloader is not downgraded, then I should get sensor problem in Pie as well right?

But no, I didn't try what you said.
 
Last edited:
  • Like
Reactions: imna357

David B.

Senior Member
Mar 25, 2016
301
62
28
After majorly screwing up my first attempt to jump from Pie to 10, I finally made it, and sure enough, I am a victim of this bug as well.

On an unrelated note, for the Magisk users out there, attached is the patched boot.img across 4 RAR archives for the Pixel 3 XL 10.0.0 (QP1A.190711.020, Sep 2019) image to save you some time making one yourself.

The SHA-256 hash for the image contained across the archives is:
Code:
dbdc828777fd8b734986998d0732c1c4e3e565fc66499c310f3a23c85abe383b
 

Attachments

Last edited:
  • Like
Reactions: raphtmnt

imna357

Senior Member
Mar 31, 2010
885
156
73
washington, DC
Just listening... can't figure this one out too...in the GSI build I found a Qualcomm driver for sensors for Crosshatch, but I don't know how to flash it, downloaded the bin and Qualcomm installer but afraid to go thru it might kill my phone. I do an average a day of flashing, my phone might get crazy???

---------- Post added at 01:14 AM ---------- Previous post was at 01:10 AM ----------

Me and FCUCKBloat has been discussing this since beta 6 came out. All my sensors used to work on beta 5, with kernels and TWRP installed, but after I tried flashing custom ROM and eventually beta6 came out flashed it thru fastboot, regular update and so on, sensors won't worked anymore. So, I decided to go back to beta 5 but sadly sensors don't worked anymore, when it used to worked before.:crying:
 
  • Like
Reactions: David B.

imna357

Senior Member
Mar 31, 2010
885
156
73
washington, DC
installed the GSI BUILD 10 from google and all sensors are working, flash it came from Bootleggers ROM. The only thing I can't find is the gesture Nav, maybe someone can help me activate it, so far all the sensors, dark mode are working.
 

FcukBloat

Senior Member
Jun 18, 2012
6,266
3,004
243
installed the GSI BUILD 10 from google and all sensors are working, flash it came from Bootleggers ROM. The only thing I can't find is the gesture Nav, maybe someone can help me activate it, so far all the sensors, dark mode are working.
please can you provide a step by step guide to flash GSI and fix this problem so other guys can also try this and eventually report the results in the bug tracker site to inform Google specialists? please!



tia :eek:
 

imna357

Senior Member
Mar 31, 2010
885
156
73
washington, DC
please can you provide a step by step guide to flash GSI and fix this problem so other guys can also try this and eventually report the results in the bug tracker site to inform Google specialists? please!



I just downloaded it from the android 10 from here: https://developer.android.com/topic/generic-system-image/releases
then downloaded this version ARM64+GMS, problem only is the gesture navigation and phone apk, gestures is not present, while phone I can't here anything, I can call but nothing on the earpiece, and no voice output from the other side

---------- Post added at 01:20 AM ---------- Previous post was at 01:12 AM ----------

this thing is smooth, but I am not sure is a daily driver, good thing is sensors are working, maybe will just have to wait for a custom 10 ROM or I will try the TREBLE ROM : https://t.me/androidqgsi
 

FcukBloat

Senior Member
Jun 18, 2012
6,266
3,004
243
please can you provide a step by step guide to flash GSI and fix this problem so other guys can also try this and eventually report the results in the bug tracker site to inform Google specialists? please!



I just downloaded it from the android 10 from here: https://developer.android.com/topic/generic-system-image/releases
then downloaded this version ARM64+GMS, problem only is the gesture navigation and phone apk, gestures is not present, while phone I can't here anything, I can call but nothing on the earpiece, and no voice output from the other side

---------- Post added at 01:20 AM ---------- Previous post was at 01:12 AM ----------

this thing is smooth, but I am not sure is a daily driver, good thing is sensors are working, maybe will just have to wait for a custom 10 ROM or I will try the TREBLE ROM : https://t.me/androidqgsi
thanks my friend, but how flashed system.img and vbmeta.img? i mean all steps coming from bootleggers please. so I can replicate and also inform google people so they maybe understand what is wrong in the official Q image.

about phone, in the google site I see:
Phone Audio - When using the integrated dialer, you may not hear any audio on the phone. This is due to a change in the telephony service installation location in Android 10.

did you try any other dialer? maybe that will fix the phone voice issue?
 

imna357

Senior Member
Mar 31, 2010
885
156
73
washington, DC
thanks my friend, but how flashed system.img and vbmeta.img? i mean all steps coming from bootleggers please. so I can replicate and also inform google people so they maybe understand what is wrong in the official Q image.

about phone, in the google site I see:
Phone Audio - When using the integrated dialer, you may not hear any audio on the phone. This is due to a change in the telephony service installation location in Android 10.

did you try any other dialer? maybe that will fix the phone voice issue?
I am trying it right now, looking for dialer that will work.

I flashed it this way, from Bootleggers ROM did not wipe anything just boot to fastboot then:

fastboot --disable-verification flash vbmeta vbmeta.img

fastboot erase system

fastboot flash system system.img

fastboot -w

fastboot reboot

---------- Post added at 01:52 AM ---------- Previous post was at 01:43 AM ----------

I went on flashing the official 10, not sure what will happen=)

---------- Post added at 01:53 AM ---------- Previous post was at 01:52 AM ----------

will update in a few
 
  • Like
Reactions: FcukBloat

FcukBloat

Senior Member
Jun 18, 2012
6,266
3,004
243
I am trying it right now, looking for dialer that will work.

I flashed it this way, from Bootleggers ROM did not wipe anything just boot to fastboot then:

fastboot --disable-verification flash vbmeta vbmeta.img

fastboot erase system

fastboot flash system system.img

fastboot -w

fastboot reboot

---------- Post added at 01:52 AM ---------- Previous post was at 01:43 AM ----------

I went on flashing the official 10, not sure what will happen=)
thanks sir! let us know! I am doing some tests here too soon.

ps. fastboot -w erase all user data btw, correct? also internal storage I think
 

imna357

Senior Member
Mar 31, 2010
885
156
73
washington, DC
yup

---------- Post added at 01:55 AM ---------- Previous post was at 01:54 AM ----------

copy your storage first on a computer

---------- Post added at 02:07 AM ---------- Previous post was at 01:55 AM ----------

well flashing to official 10, sensors stop working again...what the, i will try to factory reset
 

FcukBloat

Senior Member
Jun 18, 2012
6,266
3,004
243
would like to try to replace the system and vbmeta images in stock Q with the ones in the
GSI package, but in GSI we have a single system.img file while in stock Q there are two (system.img and system_other.img) so don't know how I could do :(

alternatively I could try just fastboot flashing system and vbmeta images from stock Q, but again I wouldn't know how to manage the two system images... :silly:

---------- Post added at 08:30 AM ---------- Previous post was at 08:11 AM ----------

@imna357 I can't erase system and install GSI system image, I go in bootloader (fastboot mode) and i can flash vbmeta image, but when I try to erase or flash system image, it says this must be done in fastbootD...

>fastboot flash system system.img
Invalid sparse file format at header magic
Sending sparse 'system_a' 1/9 (261528 KB) OKAY [ 6.370s]
Writing 'system_a' FAILED (remote: 'Partition should be flashed in fastbootd')
fastboot: error: Command failed

:silly::confused:
 

imna357

Senior Member
Mar 31, 2010
885
156
73
washington, DC
would like to try to replace the system and vbmeta images in stock Q with the ones in the
GSI package, but in GSI we have a single system.img file while in stock Q there are two (system.img and system_other.img) so don't know how I could do :(

alternatively I could try just fastboot flashing system and vbmeta images from stock Q, but again I wouldn't know how to manage the two system images... :silly:

---------- Post added at 08:30 AM ---------- Previous post was at 08:11 AM ----------

@imna357 I can't erase system and install GSI system image, I go in bootloader (fastboot mode) and i can flash vbmeta image, but when I try to erase or flash system image, it says this must be done in fastbootD...

>fastboot flash system system.img
Invalid sparse file format at header magic
Sending sparse 'system_a' 1/9 (261528 KB) OKAY [ 6.370s]
Writing 'system_a' FAILED (remote: 'Partition should be flashed in fastbootd')
fastboot: error: Command failed

:silly::confused:
this thing happened to me last night, if you can't erase the system it will not go thru, but after flashing bootleggers then let it settle with magisk, reboot to bootloader, it worked

---------- Post added at 02:55 AM ---------- Previous post was at 02:51 AM ----------

were you on pie rooted?

---------- Post added at 02:58 AM ---------- Previous post was at 02:55 AM ----------

ok, your on Q, will not work, last night I was on Q it did not work, need to be on PIE...sorry busy flashing my phone back to bootleggers, will try the TREBLE ROM tomorrow
 
  • Like
Reactions: FcukBloat

billyt1

Senior Member
Jul 29, 2016
150
55
38
Sevierville,TN
I came from pie rooted avb and encryption disabled an took the ota when booting it said it was corrupted had to factory reset booted and worked fine all sensors any way except the mobile data sucks worse but I'm on Google Fi in East Tennessee. Also there's 2 builds for Android 10 on the dev site maybe try both builds and worst case scenario go back to pie and disable avb and encryption then set phone up then try taking the ota.

To disable avb and encryption boot to twrp then advance wipe,format data then sideload this zip and flash then reboot.

https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389/amp/
 
Last edited: