yashsingh1/xdaforums huggingface dataset:
[Google Pixel 3 XL Guides, News, & Discussion] Joe237:
I fixed reading reading all the pages on this post trying everything the only thing works for me is this

But first you have to be on android 10, install magisk 19.4, patch the image, fastboot boot magisk_patched. Img , go to app store and get root shell, open it

Get the persist img, I think in in post #210

Do #1-2

You will substrate persist_backup img,

Put the downloaded persist. Img from post #210 on same place you got the persist_backup. Img

than do #4

Reboot device thats it!!!

1) Open root shell

2) dd if=/dev/block/sdf2 of=/sdcard/persist_backup.img

3) Download image from post #110 in this thread

4) dd if=/sdcard/persist.img of=/dev/block/sdf2

5) Reboot device
[Google Pixel 3 XL Guides, News, & Discussion] motrych:
What to do with phones that have Verizon bootloader locked?
[Google Pixel 3 XL Guides, News, & Discussion] td00:
Hey Joe - Thanks for the additional help but this didn't work either I'm afraid. There's nothing wrong with this phone other than Google's ****ty non QA'd Android 10 image I should RMA it out of spite. Like what would happen if XDA Developers didn't exist? People would be screwed. I guess I'll keep on plugging away.

---------- Post added at 01:07 AM ---------- Previous post was at 12:34 AM ----------

***UPDATE TO MY CRANKY-NESS***

This actually fixed it for me!
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Hello David, everything you'd need is summarised on the front page.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Oh alright. Sorry. I was not aware that the initial post had been edited.
[Google Pixel 3 XL Guides, News, & Discussion] td00:
***Update #2 ***

The auto rotate doesn't work... Sigh.
[Google Pixel 3 XL Guides, News, & Discussion] td00:
So I've managed to do a factory reset. I did the rest on 9, managed to get my stuff working again. Then, I went up to 10 and had to use the persist.img thing. This got it working so I was actually happy. Today though, all sensors work except the one on the phone. When I make a call, the screen goes black and I can't do anything else other than restart phone or wait until other caller hangs up - in which I am then able to turn the screen back on again.
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
cannot get them to work :(

I have tried all methods but am failing miserably can someone please provide me with a blueline persist img ? just for one last shot? also can someone confirm if the file: \persist\sensors\tmd2725_als_factory.txt contains the Phone's serial number or the Ambient Light Sensor serial number. thanks

Serial Number: XXXXXXXXX

PROX_POFFSET: 0.0

PROX_MEAN_FAR: 19.3

PROX_MEAN_5: 60.6

PROX_MEAN_3: 117.7

also I noticed that AndroSensor brings up most of the sensors, except the AmbientLight and Squeeze. but after reboots all others like gyroscope, etc... will disappear :-s
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
You may get a faster response if you ask in the blueline subforum.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
https://drive.google.com/file/d/1SwDr0yIKP84AlZfgKoyv4ZDpADzPqQ2a/view?usp=sharing

courtesy of sliding Billy, this is what i used on my blueline and worked fine ;)
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
forgive me for being dumb

Should I restore this persist instead of mine while on Android 9 or on Android 10 please?

thanks in advance for your help!
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
fort pie no need to touch anything, if you go back to pie sensors will restart working automatically.

for Q you need to use the persist image and reboot to get sensors to work. backup your persist image before.

actually, there is another suggested method for fixing sensors using your persist iirc, look all pages of the thread
[Google Pixel 3 XL Guides, News, & Discussion] td00:
Every time I try to go back down to 9 I get stuck at the G logo. I will try again tonight maybe with the -w kept on.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
of course you need to wipe when downgrading or it won't work
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
You're not alone my friend. I am still without sensors and I swear I have tried everything I could also ended with the device bootlooping to fastboot constantly but I managed to bring it back to life:

Also I went back to the first official Pie which was shipped with the device! still not all sensors work.

Sensors I have working (both 9 & 10)

Accelerometer

Gyroscope

all others are unknown... :(

to get the device bootlooping I copied the file sns_reg_config from /mnt/vendor/persist/sensors/registry/registry to /mnt/vendor/persist/sensors/registry and rebooted ended up with bootlooping into fastboot mode repeatedly. DO NOT TRY IT.
[Google Pixel 3 XL Guides, News, & Discussion] td00:
So the good news is that going back to 9 restores all my sensors. The bad news is that following the instructions with the persist file doesn't work for me. I wonder if I should go back to 9 and try to get my own persist.img file and try that.
[Google Pixel 3 XL Guides, News, & Discussion] td00:
And with that, I can confirm that none of these methods work for me. All sensors work except the one proximity sensor which blacks out the screen on my phone. I've got not choice but to go back to 9 - maybe I'll try again next release in the hopes Google finally gets its **** together. After this dreadful experience this will be my last Google phone.
[Google Pixel 3 XL Guides, News, & Discussion] potato654123:
did it fix the proximity sensor too? I mean when you are making a phone call, can you touch the button on the screen?
[Google Pixel 3 XL Guides, News, & Discussion] potato654123:
Guys... if you really wanna enjoy Android Q with a broken proximity sensor. just go to Setting →Accessibility → Power button ends call.

Then you can get your phone back to life anytime during phone calls.
[Google Pixel 3 XL Guides, News, & Discussion] jcmm11:
One way to definitely get your sensors back.

Backup, to your computer, everything you want to save.

Download the latest factory image.

Do a factory reset.

Install the factory image without removing -w.

Setup your phone again and restore what you backed up. Your phone should now be fully functional.

To those people who are blaming Google for this. Why? You're the one who's been running custom stuff on your phone and that's what caused things to break. That risk comes with the territory. If you can't handle that stick to total stock.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
not true, some people reports same problem on completely stock untouched systems, even unlockable (Verizon etc)... of course we don't have proofs, but i don't see why some people should lie about that...
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Can someone share a backup of their /persist partition from Android 10 pixel 3 with all sensors working please? I had no success with the one already in this thread I'm begging at this point sorry :( last resort before I disassemble and sell for parts.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Hey, you're much much better off asking in the Pixel 3 forum. Those folks don't come on here!
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
I did but tried my luck here as well since there was persist from blueline already here :( that didn't work out for me
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
strange i used it and worked. you rebooted after replacing persist of course?
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
I did man :( maybe it didn't work because I replaced it through android via terminal emulator rather than through adb in twrp?
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
i did the same and worked, via root terminal emulator directly from within the phone ;)
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Damn :( I tried all the below to no avail

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

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

dd if=/sdcard/persist.img of=/dev/block/sdf2

None want to work :( only 2 sensors come up which are the gyroscope and the accelerometer. Light and proximity (which I need the most) are not detected.

Also what is funny is that after reboot even the accelerometer and the gyroscope disappear, but if I reboot for another 3 times they come back to life just to be lost again after next reboot :-/

As far as rom goes I'm running stock with magisk core only mode.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
are you using the persist.img i posted earlier?

i just placed it on the sdcard, opened terminal emulator, typed su, then executed

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

and rebooted
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Yes man used the one shared by sliding Billy :(
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Possibly. Why not try doing it through TWRP?
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Just tried it using - twrp-3.3.1-0-blueline

No luck I guess I'm just the black sheep :P
[Google Pixel 3 XL Guides, News, & Discussion] photolarry:
Worked for me on October build of Android 10. I was like what in the hell is going on....I have a new phone and the sensors don't work? I thought it was Google Fit at first. Thanks the guy that posted image. I did dd and rebooted and works.
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Is it a pixel 3? Would you be able to dump your persist

now after you got it to work in an image as backup please so I can try yours :(
[Google Pixel 3 XL Guides, News, & Discussion] photolarry:
Pixel 3 XL cross hatch and it's the same one downloaded from his drive. I simply installed it by unzipping and the dd command. I can't attach because this xda app sux
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Oh nevermind then mine is blueline and I'm desperately looking for an alternative persist other than the one already posted here.
[Google Pixel 3 XL Guides, News, & Discussion] photolarry:
This forum is for XL bro. You might check the other forum. Not sure why you're in this one of your don't have XL
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
because initially the thread about this bug was created in this section even though the problem happens on both p3 and p3xl. there is no other threads about this same problem in the p3 section
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Then someone should make one. Why not you? :)
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
no point now, everything needed to fix the problem on both phones is in here already :p
[Google Pixel 3 XL Guides, News, & Discussion] jimbolicious:
Hi everyone, Pixel 3 owner here, bought used from a direct owner on the 24th Oct. Phone works brilliantly, apart from the sensors. Having the same issue as majority of everyone else here. The phone was already updated to Android 10 when I got it. Active slot A. I have never done any device flashing/rooting in my whole life, but in the span of 24 hours I've done the following:

- Flashed Pie (PQ3A.190801.002 - Aug 2019) into slot A --> sensors still dead

- Flashed Pie (PD1A.180720.030 - Sept 2018) into slot A --> sensors still dead

- Flashed Pie (PD1A.180720.030 - Sept 2018) into slot A and B --> sensors still dead

- Flashed 10 (QP1A.191005.007 - Oct 2019) into slot A (slot B still has Pie Sept 2018) --> sensors still dead

I stopped short of performing the fixes outlined in the front page, because I haven't done any rooting/extensive device flashing before, and haven't got the guts to YOLO today. I know this might be a bit too much to ask, but if there's a detailed step-by-step guide for dummies to perform this fix, I'd appreciate that very much. Thanks in advance...
[Google Pixel 3 XL Guides, News, & Discussion] jcmm11:
If you just bought the phone and don't have anything critical on it yet just do a factory reset followed by a full install of the latest factory image (don't remove -w).
[Google Pixel 3 XL Guides, News, & Discussion] jimbolicious:
Thanks for the suggestion. I believe I have done that already, but no harm doing it again. I'll keep you posted!

I do understand that there are at least 2 ways to factory reset the device: 1) via Android 10 settings itself; 2) factory reset directly from recovery mode. Are there any differences between these 2?
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
I'm in the same boat as you are pal :( I did all the steps you took even deleted the persist partition and restored it from an image in this thread, soft-bricked the phone and recovered it and tried almost everything I could to no avail... I'm still hoping someone in the Pixel 3 Forum provides me with a fresh dump of the persist partition from an actual Pixel 3. I got shouted at when I requested a fresh one in here :p so I opened my own thread if you want to follow: help-persist-partition-dump
[Google Pixel 3 XL Guides, News, & Discussion] jcmm11:
Pretty sure they're the same, but only about 95+% certain. Don't remember which I did - think it was via settings, easier to get to.
[Google Pixel 3 XL Guides, News, & Discussion] _Ra1n_:
I've been following this since the beginning and, from what I've gathered reading through this thread, TWRP saving it's logs to the persist partition caused corruption to the sensor calibration data. Also, the original Android 10 OTA doesn't actually touch the persist partition, but the updates blocks the sensors from running without valid calibration data. Finally, the newest Android 10 update "fixes" the issue by reverting the valid calibration data check, thus allowing the sensors to function (albeit uncalibrated).

Here is where I'm lost: TWRP logs filled up the TWRP partition, but how were the calibration files actually damaged from this? Once the log file filled up the partition, how was data further written over the calibration files? Did anyone, prior to updating to Android 10, manually check if their calibration files were damaged (even though the sensors were still "working")?

The only reason I'm in this boat is because I booted into TWRP to make a complete backup prior to upgrading to Android 10 to make reverting easy if needed (I updated day-one, prior to anything was reported on this issue). That was my first doing anything in TWRP on this device; one backup did the damage. Currently only the proximity and light sensors are functional. I haven't had time to try any of the various fixes in this thread yet, though.

tl;dr: How exactly did writing to one file damage other files on the persist partition? Would a

dd if=/dev/zero > /mnt/persist/zero.000

have done the same thing?
[Google Pixel 3 XL Guides, News, & Discussion] photolarry:
Idea.... If I do full adb backup then install factory 10 October with wipe included. Then do adb restore with system and shared and all options, do you think that would work and prevent having to redo app data? I think it backed up evening including external (shared option) and the file is about a gig.
[Google Pixel 3 XL Guides, News, & Discussion] jimbolicious:
Thanks buddy, I'll definitely check it out. From what I understand in the front page, EDIT 2 does not involve replacing the persist partition. Have you tried going that route?

Thanks for the confirmation!

I have another question -- are there any other causes of corrupted calibration files besides installing TWRP? The reason I'm asking is because my Pixel 3 has not been rooted before; it's been stock all its life. At present all sensors are not working on both 9 and 10.
[Google Pixel 3 XL Guides, News, & Discussion] jcmm11:
I just remembered the other thing I did just before the factory reset was to delete all the contents of /persist
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
I'm not sure what you have done, but here's a couple things I do know:

Neither a factory reset, a fresh flash, or deleting all of /persist are going to fix the problem.

All of these have already been confirmed not to work, earlier in this thread.

The persist partition is loaded at the factory and does not repopulate itself by any method of flashing factory images or resets.

If a simple factory reset was the solution, this thread probably wouldn't have been created in the first place.

I'm all for folks trying to help one another, but I hate seeing people chasing their tail for no reason.

Viable solutions have been posted throughout the thread and are "mostly" outlined in the updated OP.

Although I feel that the method mentioned in the thread somewhere about swapping just the sensors folder from a working device/persist should also be included/outlined in the OP as well.
[Google Pixel 3 XL Guides, News, & Discussion] jimbolicious:
Was just about to ask regarding the repopulation of persist partition. I guess I'll have to quickly learn on how to root the device and execute dd commands.
[Google Pixel 3 XL Guides, News, & Discussion] jimbolicious:
Update -- brought back some sensors. Here's what I did:

- I was on Q latest build (QP1A.191005.007)

- Rooted the device via Magisk v20.0 without TWRP

- Checked persist partition -- no cache folder nor TWRP files found

- Downloaded sliding_Billy's persist.img (post #414), backed up current persist, then copied the other persist into the device

- Reboot device -- no go

- Then I flash-all latest Pie build (PQ3A.190801.002) WITHOUT wiping. Bootloop for 5 minutes.

- Booted back into bootloader, flash-all Q latest build (QP1A.191005.007) WITHOUT wiping.

- Accelerometer (auto-rotate) and gyroscope now works. Able to rotate screen, and camera app no longer crashes when I select photosphere or panorama.

- The rest still not working (active edge, proximity, ambient)

Sensor lab confirms both "light meter" and "proximity meter" showing "not supported". The rest are showing some actual data.

From here, I then tried the following:

- Factory reset -- no go

- Flash-all WITH wiping back to latest Pie build -- this actually made things worse; all sensors died again

- OTA to Q -- brought back the same set of sensors mentioned above.

I'm considering replacing the persist partition with another one (probably from post #110) and start over. I'll keep you guys updated.
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
The persist.img from sliding_Billy was for Blueline (Pixel 3) not the Pixel 3XL.

Using the persist.img from the wrong device is only going to fix sensors that are the same across both phones and shouldn't be applied.

You MUST use a persist.img/sensor files from the correct device....

[emoji2957]
[Google Pixel 3 XL Guides, News, & Discussion] jimbolicious:
Mine's actually blueline. Apologies if I didn't state earlier..
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
Ah ok. [emoji106]

You might have.
[Google Pixel 3 XL Guides, News, & Discussion] jimbolicious:
I'm still baffled as to why my original persist partition failed so miserably. I think I'll try putting it back and repeat the same steps.
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Did all that like you man and ended up with the sensors you have working.

other things I noted are when you open disk info the persist partition shows unknown size

also I noticed that when the sensors (accelerometer & gyroscope) are loaded the battery status changes to last charged 37 days ago!! so it's getting that from somewhere and no matter how many times I plugged and un-pluged the charging cable that value didn't change... even overnight.

also I noticed that the file in /persist/sensors tmd2725_als_factory.txt contains the original device serial number (I checked this on Google US Repair site and was able to confirm it's a device which is not mine) I also tried editing that file and putting my serial number instead but it didn't make any difference.

I just wish this phone was recoverable with the QComm Loader tool but I can only ponder...

In the end I bought another phone and put this in a shelf just hoping one day there will be a solution. I cannot properly use it without the proximity sensor in my case.

Peace out!
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Thanks for holding me accountable, [MENTION=1331268]santod040[/MENTION]. :) I just updated the OP.
[Google Pixel 3 XL Guides, News, & Discussion] td00:
Can someone here with working sensors to share the following folder with me: root/mnt/vendor/persist/sensors - for Pixel 3 XL (crosshatch)? Maybe tarball it for me? I don't want to sound overly confident but this might actually work for me.
[Google Pixel 3 XL Guides, News, & Discussion] smoki3:
Same here... Ambient, proximity and edge sensors are not working. Even with the persist.img from post 110
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Here we go. Others, please note: this is for Pixel 3XL (crosshatch)

For others who want to share such a file in the future, sharing the steps to generate a tar 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
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Can someone be kind enough to carry out the above on a rooted Pixel 3 (blueline) I know it's not the correct forum but this post covers both models.

TIA!
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
blueline:

edit: the file is a .tar.gz
[Google Pixel 3 XL Guides, News, & Discussion] stizolo:
Thank you very much for your swift action mate really appreciated. However no luck for me :( sensors apart from Accelerometer and Gyroscope are non-functional.

What I noticed this time round is:

When I replaced the sensors folder with the one provided I rebooted, after the reboot opening sensor test showed 15 Sensors all marked Google but the actual sensors were all in a failed state that includes the Accelerometer and Gyroscope.

I rebooted 4 times then I got back to 8 detected sensors and only Accelerometer and Gyroscope work :(

Thanks again nonetheless I'll just keep hoping :)
[Google Pixel 3 XL Guides, News, & Discussion] jimbolicious:
Hey all -- sorry for the MIA. I still couldn't get the sensors to work... So I reset everything back to factory, replaced back the original persist partition, and decided to send the device for repairs. They swapped out the entire logic board and now sensors are back in working order.

Could have persisted with other methods posted in this forum but being a total novice, I decided not to take the risk. Still, thanks everyone for helping out!
[Google Pixel 3 XL Guides, News, & Discussion] smoki3:
how to push this to my crosshatch?
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
Ermm. I hope you don't need this answer by now. If you still do, the instruction is in first post of the thread.
[Google Pixel 3 XL Guides, News, & Discussion] afiqq:
this file does not seem to work. can somebody please upload a proper generated tar file? the file should be around 5mb..

also, what are the appropriate permissions of the files?
[Google Pixel 3 XL Guides, News, & Discussion] Fif_:
Does anyone has the sensor data (.tar or .Img) for a Pixel 3a XL (bonito)?

I've just hit this persist partition corruption and my sensors are off.
[Google Pixel 3 XL Guides, News, & Discussion] mokijoki:
Same for me... Also Pixel 3a XL. After being forced to hard reset while running on Android 10 without any issues by ibreakyoufix (bottom speaker repair job) all sensors stopped working. Folder from a working phone would be nice...