yashsingh1/xdaforums huggingface dataset:
[Google Pixel 3 XL Guides, News, & Discussion] zaacc:
what to do if I have blueline?
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
This same approach will probably work, but you will need to get a persist.img file from a blueline user who is not having the problem.
[Google Pixel 3 XL Guides, News, & Discussion] zaacc:
how do you pull the persist.IMG?
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
The following should put an image of the persist partition on the phone's internal storage.

dd if=/dev/block/bootdevice/by-name/persist of=sdcard/persist.img
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
this should be done by a blueline user running P correct? rooted and from terminal app in root mode?
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
No the user that does it should be on 10. Because of how the persist partition apparently works, it may not matter, but to be on the safe side, I would ask of it from someone using 10.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
and rooted from a su terminal session correct?
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Yes
[Google Pixel 3 XL Guides, News, & Discussion] imna357:
Damn...thank you so much guys, who ever did this where's your PayPal account, maybe can contribute for a bottle of whiskey
[Google Pixel 3 XL Guides, News, & Discussion] alpinista82:
Just please everybody who dd's the image to his/hers phone make sure the md5sums match. You will find it in my original post, just next to the link to the persist.img: https://xdaforums.com/showpost.php?p=80194778&postcount=10

Not long ago one of my servers was crashing randomly just because I was to lazy to compare checksums for a blob...took me ages to find out what was causing the crashes.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Definitely. I also have experience with having problems because I was dumb and did not verify a checksum.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
hi, I'm asking around for a blueline user that could share his good persist partition for us p3 users, running:

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

from a root terminal session.

how can they generate the md5 file of the partition also? tia
[Google Pixel 3 XL Guides, News, & Discussion] Fuzzy13:
So this is confirmed working?,
[Google Pixel 3 XL Guides, News, & Discussion] bggold:
So far the original fix is and apparently this one. Just have to try.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
The command to get an md5 of a file is

md5sum persist.img
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
ok so just generate the persist.img file and then md5sum it. sorry i thought the md5 file needed to be of the original partition just to be sure
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
It's all good. The purpose of the md5 string is for whoever creates the image to post so that when others download it, then can hash the file and compare the strings to ensure that their copy is not corrupted.
[Google Pixel 3 XL Guides, News, & Discussion] Fuzzy13:
Can confirm this works. Thank you so much.

On 10, rooted. Didn't have to go back to 9. A dummy proof write up of how to do this wouldn't hurt.

Quote:

Originally Posted by apag96

Here's what worked for me. I was on Android 10 (Pixel 3 XL) with broken sensors

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

I didn't have to flash back to 9 get this to work
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
The original post of the persist.img file for the Pixel 3XL is hosted on Google Drive. To prevent it from getting lost, here is a re-upload of it directly on XDA. Because of attachment size limitations, it compressed in a RAR file. Download it and use WinRAR to extract the file. As with the original upload, the image file has an MD5 hash of after being decompressed:

1c95bddfeaad12b0a18841bc439ed752
[Google Pixel 3 XL Guides, News, & Discussion] Golf c:
Now the question is how did it get corrupted in the first place?
[Google Pixel 3 XL Guides, News, & Discussion] bggold:
Good news guys I can confirm this fix is permanent even after a dirty or clean flash of 10. No need to do it over if you ever have to flash 10 again. We will have to see what Oct brings.
[Google Pixel 3 XL Guides, News, & Discussion] UltraPower31:
I checked the backup of my own persist.img and I noticed that it contained a 20MB log file. Compared to the partition size of 40MB this is quite huge.

Can anyone with sensor problems confirm that they have a huge file at /cache/recovery/log on their persist partition?

Maybe it wasn't possible to move the new sensor files onto the persist partition because it was full.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
I don't know, but what I find interesting is that after completely wiping out the persist partition, I couldn't get sensors working either with a fresh Pie install or by flashing my TWRP Pie backup. In fact, not only were my sensors not working, but neither was WiFi or cell service. My point to mentioning this is that I do not know where the persist partition comes from, but it seems that if gets wiped out, the only way to get it back is to get a copy of someone else's and dd it into place.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
got it fixed on my blueline too! Many thanks to all guys who contributed in fixing this problem and for this last step special thanks to [MENTION=4609886]sliding_billy[/MENTION] who provided me with a good persist.img for blueline! ;) :)
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Glad to hear that, man. You and I were the first ones to report and face this issue along with [MENTION=1615926]ultimatepichu[/MENTION]. I hope he gets it fixed, too. I am so glad we all came together and got this fixed. Special thanks to [MENTION=1331268]santod040[/MENTION], [MENTION=4860777]alpinista82[/MENTION] and [MENTION=5437072]bggold[/MENTION] for their guidance and testing and for sharing the correct persist images. This is a prime example of why XDA is so awesome. Fcukbloat, I hope we get that beer we were talking about, soon!

[MENTION=4695495]FcukBloat[/MENTION]: could you share the persist image for blueline on this thread, too, so others who need it can take it?
[Google Pixel 3 XL Guides, News, & Discussion] boe323:
Just a thought, as anyone toggled the plugun setting in systemui, its. sensor management
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
To my knowledge, this was one of the first things that was tried as a fix to the problem and it did not work. Of course, now that we know what caused the problem, this is not really surprising.
[Google Pixel 3 XL Guides, News, & Discussion] Golf c:
I just find this to be a scary little problem. Interesting that when you guys went back to Pie, your sensors worked again
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Yeah for everyone except me apparently. But in my case it was because I'd wiped out the folder.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
Yes we were among the first unlucky guys reporting this, initially people thought i was crazy or didn't know how to clean flash things :p

I finished my daily thanks that's why you guys won't see my thanks in your posts, sorry :)

I thank again all people you mentioned along with [MENTION=4609886]sliding_billy[/MENTION] who provided the persist image i'm attaching to this post, so again all credits to him.
[MENTION=1615926]ultimatepichu[/MENTION] let us know if you got sensors to work too!

You all made my weekend!

MD5 of the attached file:

855d9e0760df89ef121a7cca2ade5107
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
You forgot me. I helped! :(

In all seriousness, I wonder if Google is going to acknowledge our fix in any way.
[Google Pixel 3 XL Guides, News, & Discussion] raphtmnt:
Ok. I'm running into something weird. I have dirty flashed to 10 and followed [MENTION=4588522]apag96[/MENTION] instructions. I'm unable to get root with Magisk to open an su terminal. I have flashed the magisk_patched.img to both boot partitions and after reboot, it hangs on boot and then reboots to fastboot with an invalid boot slot. I have tried the provided patvced boot as well as making my own via the canary channel. Not sure what I am doing wrong.
[Google Pixel 3 XL Guides, News, & Discussion] bggold:
Does mm open? You might have to install or reinstall the app. Had similar issue after flashing just the boot.img
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
yes thanks you helped too a lot! :o i had a very stressing day and night and also wanted to immediately try the fix so I'm stoned and I'm surely forgetting someone else sorry!

good night all!
[Google Pixel 3 XL Guides, News, & Discussion] raphtmnt:
Yes, MM opens. I have uninstalled/reinstalled the app and patched new img. Same result. The only thing I can think of is I didn't do a complete uninstall of Magisk prior to flashing 10. I only restored images.
[Google Pixel 3 XL Guides, News, & Discussion] zaacc:
Flashed this on my blueline but active edge still isn't working. I think I'm getting an RMA next week
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
only active edge sensor isn't working? when i tested it quickly before, It was working fine. so yeah maybe you got it broken
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Thanks!

:D

How did you upgrade from Pie to 10? You shouldn't need to uninstall Magisk before upgrading unless you did it through the updater app.

Was active edge working on Pie? It's unlikely to be a hardware problem if it was.
[Google Pixel 3 XL Guides, News, & Discussion] raphtmnt:
Here's what I did:

1. magisk_patched.img on pie and did a restore images in MM.

2. flash-all.bat without -w to upgrade to 10

3. attempted to magisk_patched.img on 10. Couldn't get through this step to root terminal the persist.img
[Google Pixel 3 XL Guides, News, & Discussion] i42o:
Good job everyone! This is what XDA is supposed to be about! I love this community!!
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
I'm sorry but I do not understand what your problem is. You cannot make a patched image for 10? If you are using a Pixel 3 XL, you can use the patched image that I posted on the first page of this thread without making your own.
[Google Pixel 3 XL Guides, News, & Discussion] raphtmnt:
I can make a patched.img for 10. I tried yours and did one of my own using MM canary. After flashing patched.img to both boot partitions, it doesn't boot. It stays on the G logo and then reboots to fastboot with an error of invalid boot slot.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Oh I had that same problem and know how to fix it! Just flash the OTA (not the factory image) - https://developers.google.com/android/ota#crosshatch

Then boot to recovery and use "adb sideload"

I should note that after you do this, you are going to have to reflash the patched boot image.
[Google Pixel 3 XL Guides, News, & Discussion] raphtmnt:
Thanks! Downloading the OTA now. May I ask why I would need the OTA vs. Factory? Also, to be clear, I ADB sideload in TWRP? TWRP would still see sdcard even though it's not encrypted?
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
You're welcome! And I do not know what using the OTA is important, but I think it has to do with swapping the active boot partition. When you use the full factory image, I believe you are not swapping the boot partition. Someone else would have to confirm this, as I do not know for sure, but given that using the OTA was the only thing that worked for me, it makes sense.

As for sideloading, I used the stock recovery. Just boot in to your bootloader, scroll to the recovery option, select it, push the power and vol up buttons, release them, and on the menu that appears, choose Sideload via ADB. You can try to use TWRP if you want. I think it should work, but with the encryption issue, I am not confident about that.
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
Good morning!

WTF guys! It's like waking up to first snow in winter! Just tried mine, and it worked! Thanks!

Thanks [MENTION=7750470]nikhilnangia[/MENTION], [MENTION=4695495]FcukBloat[/MENTION], [MENTION=1331268]santod040[/MENTION] and of course [MENTION=7367477]David B.[/MENTION] , and many others that help!
[Google Pixel 3 XL Guides, News, & Discussion] raphtmnt:
I apologize. Usually I am pretty good at understanding. But, I am having trouble wrapping my head around it. May I get some step by step instructions?
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
It's alright. Unless you're used to doing this sort of thing regularly, it is a little confusing. Here's a great guide for how to handle sideloading an OTA on the 3 XL.

https://9to5google.com/2019/09/03/android-10-google-pixel-sideload-ota/

---------- Post added at 09:48 PM ---------- Previous post was at 09:10 PM ----------

I encourage all of you to spread the word about this. Mainstream tech media is still pushing the story that there is no fix to this problem.
[Google Pixel 3 XL Guides, News, & Discussion] wangdaning:
It is funny people rip on Apple about only one device, but Google cannot even release a working build on their own device. Hopefully some real dev happens where android is rebuilt (sans google) or a new system. This is not a promo for apple, never owned any of their devices. It is just sad google sucks so much.
[Google Pixel 3 XL Guides, News, & Discussion] steal25:
Thank you everyone for all the work and quick fix! The XDA community is amazing! I used the above quoted method and it worked flawlessly! Thanks again.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
The zip file that is being referred to is the one linked to here: https://xdaforums.com/showpost.php?p=80200137&postcount=152

Although all of the variations of the fix, mine included, state that you should flash that file, I think it may not actually be necessary since the later dd command would overwrite the files that this zip file is intended to remove.
[Google Pixel 3 XL Guides, News, & Discussion] UltraPower31:
Well it's not really Googles fault because as we know this issue only affects root users. Of course you can say it's bad design if an OS can only communicate with its sensors when there are some files on a small partition, anyway the problem is self made.

At some point of the update it seems like the new files are copied to persist but that's not possible because TWRP filled up the partition with its log files.

As I said the partition's size is only 40 MB and my log file was 20 MB. So no space left.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Indeed, it is not necessary to flash that file. Just dd the new persist.
[Google Pixel 3 XL Guides, News, & Discussion] FcukBloat:
someone reported this problem on a Verizon pixel 3 though, so with non unlockable bl, no root etc...?
[Google Pixel 3 XL Guides, News, & Discussion] Goay:
I'm not sure its a good practice to copy the persist.img

the persist contain the device unique ID and the serials of some hardware and unique calibration date like battery cycles.

We might need to find whats in the persist is causing the issues.
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
No news coverage of the fix? haha.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
I thought there were people having this issue that were not rooted as well though.

Great! Eliminate an unnecessary extra step and make the process a little easier.

I thought someone had.

If that is true, I am surprised that dd-ing an image of the partition from someone else's phone on to ours has not caused other problems. Are you sure that this is true?

I posted on Twitter about the fix and tagged a bunch of mainstream tech sites but have heard nothing back. I don't know if it is because it is the weekend or if they just don't care.
[Google Pixel 3 XL Guides, News, & Discussion] Goay:
I haven't flash it yet, but i was comparing the img to my Android 9 img and i saw the device id in one of the files and all kind of calibration data with different values between mine and the good img provided on post 110.

I also notice most my files are from Oct 10-11 2018 while the other img most files was from Nov 6 2018

And that some of my sensors data files were 0 bytes while the other img has data in them.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Interesting. I thought everything in there was just a sensor driver. I also had some files that had data and others that did not but I did not notice anything else.
[Google Pixel 3 XL Guides, News, & Discussion] jkent900:
I've searched around for this problem for my OnePlus 7 pro. What type of information is retained in the persist.img and would a flash of someones with a pixel 3 work for my device?

Thanks in advance just want to get the sensors up and running again
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
It is a device specific partition, with configurations for hardware components.

You definitely DO NOT want to flash one from a different device than the one you're flashing it to.

You'd need a working persist.img from someone with the same device and preferably the same OS version.

Check your device specific forum for potential files and/or users who can supply you with one.

No files from here are going to help you.
[Google Pixel 3 XL Guides, News, & Discussion] jkent900:
Appreciate it! I made a post on the op7 forum.
[Google Pixel 3 XL Guides, News, & Discussion] Chrizl577:
So as someone with a Pixel 3 XL and the sensor problem, I'm wondering if I should actually flash the persist.img or if it is possible to alter my existing persist.img and flash it back. Of course, this requires us to know where the problem is exactly.

Comparing a persist.img provided in this thread to my own, I found several differences.

- There are serial numbers and these are obviously different.

- My own image does not have several files (e. g. "max_cycle_counts_bins" in the battery folder)

Most interestingly though, my image does have a ".twrps" file and a folder calles "cache". In the folder is another folder called "cache" containing several files which seem to belong to TWRP as well. Does TWRP mess with the persist partition and this causes problems?
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
Yes, Twrp made changes recently, to support devices with A/B partitions and no /cache partition.

They now use a part of /persist, as cache.

Which is appearing to maybe not be such a great idea...and possible cause of corruption.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
They should just use a hidden folder on the sdcard. That's the safest option.
[Google Pixel 3 XL Guides, News, & Discussion] UltraPower31:
I guess the idea was to have a partition that is always available. To access sdcard you need to decrypt it first which is not possible atm on Android Q.
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Yeah, good point. In that case I have no good ideas. What exactly is TWRP supposed to be caching? I know that TWRP has various settings that you can change, but in practice, they have never been retained for me when I have changed them anyway. Perhaps it was because I live boot TWRP on my 3 XL? Although I had TWRP installed on my previous phone for real (Nexus 6) and this problem was still occurring.
[Google Pixel 3 XL Guides, News, & Discussion] i42o:
ive flashed every single twrp for this device and i think it that was the case it would happen to anyone who had flashed any version of twrp....
[Google Pixel 3 XL Guides, News, & Discussion] David B.:
Well, if TWRP was logging there, perhaps it could have something to do with how much data TWRP had logged?
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
Deleted
[Google Pixel 3 XL Guides, News, & Discussion] UltraPower31:
I think so too. As I wrote a few post back my log file was 20MB, so the partition was full because it only has the size of 40MB.
[Google Pixel 3 XL Guides, News, & Discussion] Chrizl577:
Mine is 20Mb as well.

If we take a working persist.img, is it possible to paste all values from our own broken persist.img and flash it?
[Google Pixel 3 XL Guides, News, & Discussion] devsk:
So, removing that file and flashing Android 10 should solve the problem then. No need for this crazy 'dd' business! Can someone try 'rm -rf /persist/cache/recovery/log' using rooted adb shell?

I personally did not suffer from this because I always livebooted TWRP. So, I can't try this but this is very likely why the drivers work in Pie 9 and don't in 10.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Deleted.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
Solid hypothesis. I confirm my non-working Persist image contains a huge recovery file, too.
[Google Pixel 3 XL Guides, News, & Discussion] Golf c:
I permanently installed Twrp from the time it came out in 2018 till June 2019. Don't have recovery logs or sensor problems.
[Google Pixel 3 XL Guides, News, & Discussion] bggold:
Check the size of your persist folder. It is starting to make sense. I checked with someone that didn't have the issue his folder size is 16mb.
[Google Pixel 3 XL Guides, News, & Discussion] Golf c:
Capacity=35mb

Used=16mb

Available =19mb
[Google Pixel 3 XL Guides, News, & Discussion] bggold:
That's why. You had room for the upgrade. It seems that those that failed had large twrp logs possibly. Will try my other pixel 3 tomorrow and actually get the log file larger before upgrading. If it fails I will just delete the log and try again.
[Google Pixel 3 XL Guides, News, & Discussion] Golf c:
Screenshot
[Google Pixel 3 XL Guides, News, & Discussion] Golf c:
Twrp was pretty unreliable for backups. I rarely did that. But I flashed a lot of roms and kernel zips.
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
Already had a user wipe the persist partition completely clean, then do a full clean install of 10 and it still did not rewrite/flash any new files/data to that partition.

If that saves you some time...

Unless I'm somehow misunderstanding how that would yield a different result.
[Google Pixel 3 XL Guides, News, & Discussion] bggold:
I just thinking of freeing up some space. Get ride of the twrp log and see if it is the true issue. In that case Google may not even fix it.
[Google Pixel 3 XL Guides, News, & Discussion] raphtmnt:
Updated on my deal:

The only thing that has work for me is a clean install of 10. Dirty install of 10 failed to root with magisk. Here is what I did.

- Clean install of 10

- Root w/ Magisk

- SU terminal to copy over persist.img

I am unable to mount data in TWRP to restore my Pie data backup, so am working on re-installing apps now. Confirmed that sensors are working.
[Google Pixel 3 XL Guides, News, & Discussion] UltraPower31:
TWRP is writing on persist even if you live boot.
[Google Pixel 3 XL Guides, News, & Discussion] santod040:
Interesting.....!? Maybe

https://github.com/LineageOS/androi.../blob/lineage-16.0/crosshatch/AndroidBoard.mk

I don't have time right now to dig any deeper.

Just found it curious, as I've built Aosp based roms in the past and prior to all this Treble business, we didn't touch /persist, that I recall.
[Google Pixel 3 XL Guides, News, & Discussion] Golf c:
I think your on to something there
[Google Pixel 3 XL Guides, News, & Discussion] SacredDeviL666:
Every Single one of you are AWESOME !!!!

Glad to see the community fixing something on their own as volunteers equally participating.

Thread stickied!!!

Keep em coming :highfive:
[Google Pixel 3 XL Guides, News, & Discussion] ultimatepichu:
Oh ya, can someone send me the non-working persist.img? just interested to keep a copy.
[Google Pixel 3 XL Guides, News, & Discussion] nikhilnangia:
I had shared a zip file a while back. That includes the persist partition on my phone as it was when it was not working.

Can someone tell me how to make an img out of that and i will post it?