yashsingh1/xdaforums huggingface dataset:
[Google Pixel 3 XL Guides, News, & Discussion] Goay:
No, you must go back to pie as the 0 bytes file are not getting fixed on 10.

This is the real bug, on 9 the sensors where still working even when the partition was full and the files where 0 bytes.

and on 10 not only they don't work it doesn't even try to write them back during boot.

So if those files need to be written during boot and 10 doesn't do it then this is something google need to fix even if most people doesn't notice and everything is working.
[Google Pixel 3 XL Guides, News, & Discussion] imna357:
Coz currently my sensors are working on 10 due to I patched my persist.img using someone else's persist.img, when the first solution came out last Saturday
[Google Pixel 3 XL Guides, News, & Discussion] UltraPower31:
As I said it's always better to use your own persist partition since device specific informations, like your serial number or calibration data, are stored on it.

I don't think anything bad will happen if you keep using the persist partition of someone else, anyway it's a dirty fix. Restoring your own persist partition and fixing it with Android 9 is the way to go.

Yes, I used TWRP to dd the partition back to my own and deleted the cache folder using TWRP, too.
[Google Pixel 3 XL Guides, News, & Discussion] CAR1977:
Thank you. This worked great.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Two Updates

Hey all -

Sharing two updates: one is an official response from Google (good news!) and the other is an update about my phone after the fix we shared on this thread.

1. My phone: I am sharing this for folks who, like me, did not backup their persist partition. I have been using my device for close to a week now and everything seems to be working perfectly, even though I am using someone else's persist partition. What I did, however, was replace most of the files in /mnt/vendor/persist manually with some files of my original device which I did backup. I replaced everything except for the "sensors" folder using a root explorer. Not saying this is necessary, but perhaps something you could do to "stay as original as possible."

2. Update from Google: Here is the email we received (posting it verbatim after redacting any personal or confidential information).

That's all for now! Enjoy your weekends. ;)
[Google Pixel 3 XL Guides, News, & Discussion] shiuhsung:
For some reason I did not encounter any sensor problems after taking the OTA coming from a magisk rooted pixel XL (no twrp installed) running Android Pie, I had the FDE and Viper mods installed thru magisk. My Android 10 build number after the update is showing QP1A.190711.019.
[Google Pixel 3 XL Guides, News, & Discussion] Surge1223:
Thanks, I just wanted to let people know, I had this issue and I flashed a persist I received from someone on stock and now my sensors are confirmed working. Thanks for the tip
[Google Pixel 3 XL Guides, News, & Discussion] mao1987:
Hello , I have the same issue , all the sensors of my pixel 3 are broken , and I need the step by step instructions to get back the sensors of my pixel 3 blueline , can you help me please ? My phone is rooted but can't install the twrp recovery ... I really need help about the step
[Google Pixel 3 XL Guides, News, & Discussion] Fuzzy13:
Not sure if it's the same for Blueline but There's a couple different methods in this post for fixing Crosshatch. The correct way is to this method....

1. Backup broken persist partition using adb root shell and dd if=/dev/block/sdf2 of=/sdcard/persist_backup.img

2. Delete the folder /cache and the file .twrps in /mnt/vendor/persist

3. Boot to bootloader and install the latest Android Pie full factory image using flash-all without wiping as described here

4. Let Android Pie bootloop for a few minutes

5. Reboot in bootloader and flash the latest Android 10 full factory image using flash-all without wiping

6. Reboot with working sensors

Doing this method you don't lose any data and you use your persist info.
[Google Pixel 3 XL Guides, News, & Discussion] Chrizl577:
If you got to copy and paste someone else's work without credit, at least make sure to do it correctly and copy the link as well.

This is the original post including the link: https://xdaforums.com/showpost.php?p=80222069&postcount=331

It would be nice to update the OP with this info to avoid others flashing their persist partition when it is not necessary.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Done. Thanks!
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
That is so true - this definitely would not have been possible without [MENTION=1331268]santod040[/MENTION] 's tip. It was a stroke of genius and heuristics mixed. ;)
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Another good news! TWRP devs have confirmed they are working on fixing this permanently. :)

You can check more here: https://xdaforums.com/showpost.php?p=80248406&postcount=1218
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
New TWRP

Hey all, here's an update from [MENTION=2638973]bigbiff[/MENTION]:
[Google Pixel 3 XL Guides, News, & Discussion] Donric13:
Sorry for noob question. In kirsikura kernel thread (3 xl) i have read, that there is a simple way to check if my device is affected by the sensor bug. In persyst directory there shouldnt be any file with zero bits... Here is a Screenshot of my directory. I didnt realize any problem until now. Does anybody can tell me if my device is affected? (only 1 file with 0)
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
You seem fine. Do your sensors work?
[Google Pixel 3 XL Guides, News, & Discussion] Donric13:
Yes no problem occured. Only one file with 0 bites... Was just a bit unsecure. Thanks for reply.
[Google Pixel 3 XL Guides, News, & Discussion] bilbo524:
Just wanted to add my experience that the method of deleting the /persist/cache directory and installing Pie from fastboot and letting it bootloop for a few minutes worked perfectly for me. Now on Q and all sensors seem to work just fine.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Update 5

A new build was released today for all the Pixel 3s (3, 3 XL, 3a, 3a XL) with build number: QP1A.190711.020.C3. This update is only 5,5MB in size and I strongly suspect it's a fix for the sensors issue. I will not be trying it since I am rooted, but just putting it out there ;)
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
Probably someone who is still with broken sensor should try it lol.
[Google Pixel 3 XL Guides, News, & Discussion] Ajoli:
This update is 1334.6MB for me. I've seen others give similar numbers. Not sure what's going on here.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Same for me. The exciting thing about this update for me is that the Magisk OTA install trick worked for me. Every time I tried it with Pie it didn't. I didn't even have to restore the original boot image for it to work. Hopefully this continues to work. It's so much more convenient than doing the OTA sideload followed by a boot image patch.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
can you better explain what does that mean? what are the steps to follow? Tia!
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Here are the steps: https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md

;)
[Google Pixel 3 XL Guides, News, & Discussion] smoki3:
Short update:

With the new .C3 build the sensors are still not working.
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
Only 2.4mb bump on my end...
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Maybe it's just an A/B test they're doing?
[Google Pixel 3 XL Guides, News, & Discussion] rspkt:
9to5google reports that, "Some Pixel 3 and 3a users already on the Android 10 September security patch are receiving an over 1GB update with the full OS release notes attached. Others are just seeing a 2.4MB OTA that 'fixes critical bugs.'" with regards to the C3 release but doesn't provide much more information than that or make any mention of a sensor issue existing or being addressed.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Yeah all of the articles that I have seen about the update are a waste. As for the "full OS release notes attached" statement, has that been true for anyone on here that got the full release? I ask because I did get the full release, but I did not get any attached release notes. All I got was the same generic "Introducing Android 10" message that I saw when the initial 10 build was released.
[Google Pixel 3 XL Guides, News, & Discussion] Surge1223:
I know for a fact this is a persist partition issue, no real way for a Google fix.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
They could fix it. They probably won't though since it's self-inflicted.
[Google Pixel 3 XL Guides, News, & Discussion] Goay:
First of all also users that never unlocked/root had this issue.

Second they can easily fix it by asking Qualcomm to revert the change in the driver that they did for android 10 that block the sensors if fail to read all sensors data files (as it was till android 9)
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
I've still not seen any actual proof of that and I don't believe that to be the case.
[Google Pixel 3 XL Guides, News, & Discussion] FrayAdjacent:
I have not unlocked bootloader or done anything else except use my Pixel 3 in stock form.

I have issues with the sensors since the Android 10 update. The biggest is the screen turning off when I make or receive a call, and not coming back on until the other party hangs up. HUGE issues.

Again, no hacking, no unlocked bootloader, no nothing other than a normie would use a phone. Everything I need to do with the phone (I use Tasker quite a lot) works fine without rooting, so I don't bother doing that.

The issue is apparently present in un-hacked unmolested Pixels.
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
That's an entirely different/unrelated issue, although "some" sensors are also effected intermittently by your issue.

I'm aware of this, but it's different, as in your persist isn't corrupted and not all of your sensors stopped working. Different symptoms, different cause.
[Google Pixel 3 XL Guides, News, & Discussion] FrayAdjacent:
Eh, point being, stock unmolested still has problems.

Some/all sensors not working... still sensors not working issue. I'd suspect the cause/fix would at least be similar.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Hello, as [MENTION=1331268]santod040[/MENTION] pointed out, your issue is completely different and is likely a hardware failure or an overly sensitive proximity sensor or some sort of interference (eg. A screen guard).

The issue this thread talks about is ALL sensors not working due to corrupt calibration files in the persist partition. The fix for your issue is not the same at all. Here's a test for you: turn on auto rotation and rotate your device in any app supporting rotation. Does it rotate? If yes, you do not have our issue.

I still stand by the theory that unmodified devices cannot have corrupt persist partitions and hence, the sensors will not stop working unless TWRP is installed.
[Google Pixel 3 XL Guides, News, & Discussion] FrayAdjacent:
No screen protector, and it worked fine before android 10 update.

The "face down to SHH" actually worked ONCE after the second update came out a couple weeks ago, now it does not.

It would be an absolutely astoundingly amazing coincidence if several sensors just died physically right when I updated to Android 10. I'm gentle on my gear, since the original iPhone I've only ever suffered one screen cracked. My Pixel 3 is in immaculate condition almost a year on and it's been in a case since day 0.

So this either is something related (maybe not exactly the same), or a coincidence, and I'm talking like, got struck by lightning and a meteor at the same time coincidence. Well, maybe not that rare, but there was nothing wrong with the phone before Android 10. And I'm not the only one who has reported some yet not all sensors having issues. I came back to XDA to see if a full reset would help before I go through the bother of doing so, but from the sounds of it, not likely. I have not tried rolling back to 9 either. I'd wager if I did, **** would magically start working again.

The position that it's all or nothing also has to assume that ALL of the calibration files are corrupted or NONE of them are. That would be a huge coincidence in itself.
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
unless TWRP is used. I never installed TWRP, only booted it on recovery every time I update. Not like it makes much difference to your statement, just want to imply that if custom recovery is used (especially for backups), this issue could happen.

Edit: or maybe that's what you meant :D
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
thanks for your help, I succeeded in installing Q GSI and I confirm this way adaptive brightness/autorotation/dt2w work. so I expect also proximity (can't quickly test as phone calls are not working as you mentioned).

phone can't be really used this way though, it is more like aosp rather than a pixel phone. there is no gcam, and all other apps are aosp ones. maybe you can get gcam and others from the store, I didn't investigate too much as without phone calls I can't use the phone so I am going back to pie.

GSI installation worked also from stock pie though, if someone is interested in trying. I just went back to stock pie august, flashed in both slots, then entered fastboot and followed the instructions given by [MENTION=2468018]imna357[/MENTION] (fastboot --disable-verification flash vbmeta vbmeta.img / fastboot erase system / fastboot flash system system.img / fastboot -w / fastboot reboot )

i tried fastboot flashing product.img and vendor.img from stock Q (i think these images may contain all google apps) but while vendor.img flashes fine, product.img starts and then hangs at step 2, so can't be flashed properly it seems and then phone doesn't boot anymore.

i will now go back to pie and inform in bugtracker about this thing, then will wait for any news from google people or a custom Q rom to try...
[Google Pixel 3 XL Guides, News, & Discussion] imna357:
proximity will work, try dialing and put your ears, or turn on ambient display and cover it
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
If this was happening to you since Pie, then it's probably a hardware problem with your phone. To my knowledge, this problem is only widespread on Pixels that have been upgraded to 10.

Hopefully Google makes use of their new ability to push OS updates via the Play Store and doesn't hold out on us with a fix for a month with a fix.
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
The problem is no one knows what or why the sensors break.

Another random encounter today: I flash-all (with -w) Android 10 again, then I installed GPS Status and Toolbox. I noticed the sensor "pressure" is working. However after I rebooted my phone it appeared as "sensor not present". To be honest I'm getting confused with what's going on, and to survive my days to come, I just wanna have a functioning Pie. I can sacrifice Systemwide dark mode for now.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Thank you for reporting! I guess moving back to Pie is the best option for you, man - considering it's your main phone.

Have you, by the way, had a chance to downgrade your bootloader and then install Q? (ie. not use the bootloader from Beta 6 onwards, but an older one - say Beta 3)? Someone suggested it could help (I have not tried this)
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
I have not tried this. Has the person suggested this because it may work or because they had success with doing this themselves?

By the way, is anyone who upgraded having issues with e-mail notifications not showing up for Gmail?
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
you know you're just tricking me to flash that don't you :laugh: It's like telling a beer-fan to try new beer.

I'll go beta3 and go android 10, just for you.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Good luck! Please let us know how it goes.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
LOL! No mind games, I swear. In fact, I wish you the best of luck and think you should move to Pie since it's your daily driver - that's what I did (it's my work phone!)

In case you do try this, remember: you need to manually flash all components so that the bootloader does not get updated. Or at least edit flash-all script to remove bootloader being flashed.
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
does anyone has a beta3 file?
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Nope. I can't find it either. :(
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
Found the file from here

Sorry google, you can hide the page, but you didn't know to hide your file :D
[Google Pixel 3 XL Guides, News, & Discussion] steal25:
Is there a way to fully erase everything before flashing factory image?im new to the 2 slot thing, my last rooted device was an HTC 10. But I'm willing to try things. Seems like maybe something from 9 is not getting flashed over by 10. Before flashing 10 I was stock rooted with magisk had just a few modules installed at one point I flashed ABC rom but didn't like it and went back to stock with elemental kernel. Would it benefit us to try flashing and older pie build to both slots and then try upgrading to 10? If so can I go straight from the older build to 10 or do I have to step up through the builds?
[Google Pixel 3 XL Guides, News, & Discussion] imna357:
I am going to test this one too, if ever you did it first, update here please. Thanks
[Google Pixel 3 XL Guides, News, & Discussion] UltraPower31:
Wait, why do you think it's a bootloader problem when it's confirmed that the sensors work again with GSI.

Did someone try to flash only the GSI or beta3 vbmeta?

Otherwise is should be a problem on the system partition.
[Google Pixel 3 XL Guides, News, & Discussion] imna357:
I tried the GSI all sensors worked, except for the dialer in which there's a warning on the page that it will not work:D
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Allow me to clarify: as is mentioned in the OP, we've tried a lot of things to no avail. The standing theory is that some "thing" is being left behind that is not playing well with some hardware models.

Someone posited that the bootloader was changed since Beta 5 (Beta 6 had a new bootloader) and they mentioned this could be it. We're just trying this to eliminate that avenue.
[Google Pixel 3 XL Guides, News, & Discussion] UltraPower31:
Yeah but my idea is that the sensors might work again if you flash the vbmeta from beta3 or GSI over the regular rom. I'm at work, so I cannot try it myself.
[Google Pixel 3 XL Guides, News, & Discussion] imna357:
I am trying to figure it out how to erase or delete system partition but it would not allow me, maybe on PIE then TWRP reparation?
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
What I did:

1. August Pie -> Sensor working

2. Q beta3 -> sensor dead

3. Android 10 -> Sensor dead.

All were done with flash-all with -w.

As I expected myself, nothing special happened, because when you flash-all, you flash bootloader as well.
[Google Pixel 3 XL Guides, News, & Discussion] canada2005:
Just found this thread and have read about 15 pages worth. Just checking to see if my problem is actually with my sensors.

I will be sitting on my home screen and my phone will either pull down my notification bar like I swiped it down or it will somehow open the calendar. Another thing I've noticed is sitting in a txt message it will somehow click on contact info.

Its like im getting random screen swipes/clicks. It was doing this with a whitestone dome screen protector and I've now taken it off and it's still doing this behaviour.
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
Sounds like a different issue.

Possibly a faulty/damaged digitizer.(screens touch layer)
[Google Pixel 3 XL Guides, News, & Discussion] canada2005:
Thanks I thought so just wanted to make sure. I'm going to go and warranty this phone. Coming up to 1 year since I got it.
[Google Pixel 3 XL Guides, News, & Discussion] Joe237:
I tried to do the same but it has this error

dd: /dev/block/sdf2: write error: No space left on device
[Google Pixel 3 XL Guides, News, & Discussion] Joe237:
It's works for me too, thank you!!!
[Google Pixel 3 XL Guides, News, & Discussion] HamsterHam:
Can you upload the file please? That gdrive link isn't working for me. Cheers.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
https://xdaforums.com/showpost.php?p=80201265&postcount=210
[Google Pixel 3 XL Guides, News, & Discussion] Joe237:
It's on post #210 same file
[Google Pixel 3 XL Guides, News, & Discussion] HamsterHam:
Cheers.

Didn't fix my magisk issue which is to do with the persist issue. Can't flash modules via Magisk Manager.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Perhaps you have Magisk Manager installed but not Magisk?
[Google Pixel 3 XL Guides, News, & Discussion] HamsterHam:
Lol. No.

https://xdaforums.com/showpost.php?p=80429151&postcount=2262

Read from that onwards. ??
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
I will try to look at this more later, but reading through it quickly does not reveal much to me unfortunately.
[Google Pixel 3 XL Guides, News, & Discussion] smoki3:
Sensors are still not working with the October patch
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
Any "Fix" from Google isn't going to make the sensors work again, once they're already "broken", at least that's how I see it..

It's only going to lessen the chances of them "breaking" moving forward, for those that still currently do work.

Hence the reason I looked into helping get them fixed in a quicker way that would work for those already effected.

A corrupted persist partition, will remain just that after an update....as neither OTA or Factory image touch it.
[Google Pixel 3 XL Guides, News, & Discussion] smoki3:
As I understood the feedback from the service team I thought that they will fix it with the update
[Google Pixel 3 XL Guides, News, & Discussion] TommyB322:
The new update fixed my sensor issues. I never tried the fix that was posted here don't know if that affected it or not.
[Google Pixel 3 XL Guides, News, & Discussion] smoki3:
How to get the rooted ADB shell on android 10?

I dont get permissions in TWRP to do the ADB shell.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
use terminal emulator from the store write su and give it root permissions. i do everything from terminal from inside the phone, very rarely i use adb
[Google Pixel 3 XL Guides, News, & Discussion] smoki3:
But how to get rooted without working twrp?
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
with magisk canary. download the app, patch the stock boot.img, and flash patched boot.img via fastboot.
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
magisk 19.4 (beta) works too. :)
[Google Pixel 3 XL Guides, News, & Discussion] smoki3:
thanks!

But it seems that my pixels sensors are broken. still noch working with the persits.img
[Google Pixel 3 XL Guides, News, & Discussion] td00:
I can confirm that this is NOT fixed with the October update as well. I have tried some of the corrections on the front page of this thread and still experience broken sensors. All I think I can do now is a factory reset and hope but I'm still in the process of backing up my photos and documents.

I swear this is such bull**** I can't believe Google dropped such a **** update and then just shrugged when it broke people's phones.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
I believe the solution that worked was not on the front page of this thread. Have you read several pages in? :)