yashsingh1/xdaforums huggingface dataset:
[Google Pixel 6] tensux:
same result:

PS C:\users\jim\desktop> fastboot devices

1A091FDF6008BN fastboot

PS C:\users\jim\desktop> fastboot flash boot_a magisk_patched-25201_tEdrJ.img

target reported max download size of 261095424 bytes

sending 'boot_a' (98304 KB)...

OKAY [ 0.834s]

writing 'boot_a'...

(bootloader) unable to update boot image: use unmerged...

FAILED (remote: failed to flash partition (boot_a))

finished. total time: 0.854s
[Google Pixel 6] phaino00:
Do you have platform tools from Google installed? If not, you need to install them.
[Google Pixel 6] tensux:
I do. I will try again on my pc at home after work.
[Google Pixel 6] tom1807:
Simple question, is your bootloader unlocked? Didn't see anything of this in your post.

Cheers

Tom
[Google Pixel 6] tensux:
yes unlocked bootloader warning while booting, and oem unlock grayed out with the message your bootloader is already unlocked in development options
[Google Pixel 6] tensux:
FIXED - i was patching the wrong boot.img lol, i have too many devices and should have waited until i was home
[Google Pixel 6] rpr69:
Hello all,

I've been a longtime XDA member, but I haven't posted in awhile, I've recently purchased a Pixel 6 and I am trying to root it, and I am having difficulty. I unlocked the boot loader successfully, I have USB debugging enabled, I am using the latest Magisk app from Github. I installed the app, copied the stock boot.img file from the firmware image, did the 'Install' step and it successfully created the patched img. I copied it back to my laptop via ADB, and using the latest platform tools and ADB drivers I am able to flash it to both boot_a and boot_b slots, but when I try to fastboot reboot it fails to boot. If I then reflash the stock boot.img to boot_a and boot_b it will startup, but obviously not rooted. I see some pages mention vbmeta, but I did not do those steps as I believe it's not required for the Pixel 6.

Anyone have any thoughts on what is happening? I've tried twice to Install via the app and neither image will boot. I also verified that the System version matches the firmware image I downloaded, so I'm not sure what I've missed.

Thanks

Tom
[Google Pixel 6] V0latyle:
Disabling vbmeta verfication and dm-verity have not been necessary since Magisk 23016.

I assume you're doing this with the August update?
[Google Pixel 6] rpr69:
Not sure which August update you mean, I am on the latest A13 non beta, and using the latest 23016 version of Magisk.
[Google Pixel 6] V0latyle:
23016 is not the latest. Current stable is 25.2, current Canary is 25201.
[Google Pixel 6] rpr69:
Ah sh*t. Thanks, it works now...I glossed over the huge 'Update' button in Magisk.
[Google Pixel 6] kornball:
Pretty sure I have the process correct for upgrading from 12.1 to 13 while retaining root. I patched the boot.img using latest Magisk canary - 25203. I only use systemless hosts and USNF 2.3.1 and have never had to disable them before updating. Can someone who has successfully updated let me know if below looks correct?

adb reboot to fastboot
fastboot flash bootloader --slot=all <bootloader image>
fastboot reboot bootloader
fastboot flash radio <radio image>
fastboot reboot bootloader
fastboot --skip-reboot update <update image>
fastboot flash boot <magisk patched boot image>
boot into A13 OS
[Google Pixel 6] phaino00:
All looks good.
[Google Pixel 6] Homeboy76:
I think the fastboot reboot should be fastboot reboot bootloader unless you want to adb reboot bootloader after each one.
[Google Pixel 6] kornball:
Good catch - thank you! I 100% meant fastboot reboot bootloader
[Google Pixel 6] V0latyle:
This should be

adb reboot bootloader
[Google Pixel 6] kornball:
Thank you, appreciate you pointing that out and correcting. I merely meant boot back into the bootloader. Since I put it in the code section, though, I should have used the correct command adb reboot bootloader
[Google Pixel 6] engloa:
Thread cleaned

Guys lets try and respect the OPs request and try to stay on topic

Thanks
[Google Pixel 6] gazdajezda:
Guys, does your phones works flawlessly or is there something wrong in P6 land, since all quiet here? 😭
[Google Pixel 6] V0latyle:
Do you have a specific question about updating and rooting?
[Google Pixel 6] gazdajezda:
In fact, no. Was just curious why is so quiet here. All good.
[Google Pixel 6] V0latyle:
Please refer to Rule 15 of the Forum Rules.
[Google Pixel 6] Toronadian:
@V0latyle New month, new update. Thanks for the help on the August update where I had to flash the bootloader for both slots when moving to Android 13. Is that still needed when going from August to September update, or can we go back to just deleting the "-w" flag?
[Google Pixel 6] V0latyle:
As long as you have the August bootloader on both slots, you should be able to update however you want.
[Google Pixel 6] NCVol:
I started getting the error "This phone can't be set up to tap to pay" in the last week after I had to clear the data from play services. Anyone else getting this and find a workaround? I've followed all the steps to pass safetynet and it was working fine before this.
[Google Pixel 6] badabing2003:
Have you followed OP's Pass Safetynet section?

If you had followed that a while back, you need to download the modded module.
[Google Pixel 6] V0latyle:
It's because GPay/Wallet use the Play Integrity API, if available, which cannot be spoofed like SafetyNet.

This. The modded USNF module forces legacy SafetyNet attestation.
[Google Pixel 6] GrandAdmiral:
So I used PixelFlasher to update to Android 13. Does it do this by default (or is this more a question for that thread)?
[Google Pixel 6] tom1807:
There are 2 possibilities.

1. You just tick "Flash on both slots", then A13 is installed to both slots

2. You select "Custom Flash", select bootloader and select the bootloader image and flash to both slots.

Cheers
[Google Pixel 6] badabing2003:
I'm not sure what exactly "this" refers to in your question, if it is about flashing to both slots, then it is a choice in PixelFlasher, you choose what you want.

The default is unselected, however the application remembers your last choices even after restarting.

If "this" refers to whether you need to flash to both slots every month, the answer is not crispy clear, most often you don't, however if a bootloader bug is discovered that Google's does not want that specific version of bootloader to be downgradeable to, then it would be best to flash to both slots to make sure your older slot sides not inadvertently attempt to boot to it and cause a brick.

This was the first we had seen from Google.
[Google Pixel 6] nettech_gt:
I have a Pixel 6 rooted/unlocked bootloader (purchased from Google) I use Verizon for service. Back in July I was on the June build (12.1.0 (SQ3A.220605.009.B1, Jun 2022) as I decided to skip installing the July build. Then in August even though I have "Automatic system updates" disabled in "Developer Options" I got a notification that there was security updates available. I clicked on restart on the notification and after rebooting I was on build (12.1.0 (SQ3A.220705.003.A3, Jul 2022, Verizon, Verizon MVNOs). I no longer had root. I side loaded build (12.1.0 (SQ3A.220705.004, Jul 2022) and re rooted. Now in September I'm not ready to install Adroid 13 yet but all month long I kept getting the same notification as before. I finaly clicked on restart and again after rebooting I'm back at build (12.1.0 (SQ3A.220705.003.A3, Jul 2022, Verizon, Verizon MVNOs) Why is it forcing me to build (12.1.0 (SQ3A.220705.003.A3, Jul 2022, Verizon, Verizon MVNOs)? How can I get root back and stay on 12 and not have keep re-rooting? Help! Thanks!
[Google Pixel 6] V0latyle:
I'm afraid I don't have an answer for you; I think other users have noticed the same thing, and I haven't seen there to be any fix.
[Google Pixel 6] nettech_gt:
Ok. Thanks. Any major issues with Android 13 that have heard of yet?
[Google Pixel 6] ardiesel:
I'm on Pixel 6 Pro. Rooted and latest magisk. OTA update came thru. I haven't installed. When in magisk I pressed restore images and got a warning "no stock backup". Won't complete restoration so I can download the update. Any ideas on what I can do?
[Google Pixel 6] tutuco:
Hey I face the same problem last month.

In this Github I found a way to fix this error.

Remember you should have the stock boot.img that you are running on your device.

fix-magisk-stock-backup-does-not-exist.md

GitHub Gist: instantly share code, notes, and snippets.

gist.github.com
[Google Pixel 6] V0latyle:
I don't have a Pixel 6; I suggest you explore some of the other Pixel 6 threads.

This happens because you flashed the patched boot image, so Magisk didn't have a backup. To fix this, you'd need to reflash the unpatched boot image, then live boot the patched image. At this point since the boot image has been "restored" you don't need to do that in Magisk; just download the update and install Magisk to inactive slot.

If you manually update in the future, don't flash the patched image - just live boot it and perform Direct Install in Magisk which will create a backup of the original.
[Google Pixel 6] badabing2003:
I haven't done direct install for a long time, yet when I check the backups that I have, I see

drwxr-xr-x 2 root root 3452 2022-10-03 14:21 magisk_backup_7f04123661284ff8d554f01060b00eb6f188a07b

The timestamp matches the date/time I updated my phone with PF.

but the SHA1 is incorrect, 7f04123661284ff8d554f01060b00eb6f188a07b is the September release's boot.img SHA1

Yet the config file has the correct SHA1 for October

KEEPVERITY=true
KEEPFORCEENCRYPT=true
PATCHVBMETAFLAG=false
RECOVERYMODE=false
SHA1=2bde725117d3bd0990437faf06d37baa9adeb818

Who's making this backup? what process? It can't be direct install which I have not done for a while.

I just tried to create a patch file both in Magisk Manager UI and also using boot_patch.sh and I did not get a new backup.

Something must be creating them, but what ?

I can add into PF a feature to create these, but I'd like to understand the mechanics first, if there is a process that creates it, I don't want to stand in the way of it.
[Google Pixel 6] V0latyle:
Are you sure Magisk isn't creating these? I don't know exactly how this works, I just know that flashing the patched image instead of using Direct Install prevents restoring the original image because there's no "clean" backup.
[Google Pixel 6] badabing2003:
Yes that's exactly my point,

I don't know how Magisk is creating these, at what point?

and why does it have the wrong backup?

It's a perfect question for the Magisk thread seniors.

I'll post it there later.
[Google Pixel 6] capntrips:
Magisk's run_migrations, which is called at various times, creates them. The stock_boot.img file is created in boot_patch.sh.

Without digging into the code, my best guess is boot_patch is getting called on the old stock image at the end of the flashing process and leaving the stock_boot.img file behind to later get backed up in run_migrations.

Edit: Or maybe the file is getting left behind by the previous run and run_migrations isn't called until sometime during the current flash. A simple way to test that would be to clear the backup, boot_patch the latest image. source util_functions.sh, call run_migrations, and see if the correct backup gets created (or maybe flash the stock image twice).
[Google Pixel 6] badabing2003:
Thanks, it helps

I'm still trying to figure out the exact flow, at what point run_migration is triggered, and by whom.

I can see that it is triggered at the end of direct install but I haven't done direct install for a long time.

there must be some other trigger to run the migration script..

The thing is, in my case there was never stock_boot.img file being left behind in the /data/adb/magisk directory because the script did not run from there (it ran from /), and anytime I checked the contents of /data/adb/magisk directory, I never saw it.

Regardless that creation is a copy of the passed Boot image and it is created at patch_boot.sh runtime

I appreciate your feedback, as you lead me to the code that tackles this, I'm still trying to figure out all the details.

Thanks again.
[Google Pixel 6] capntrips:
I ran a few quick tests, and the stock_boot.img was created in /data/adb/magisk once by the Patch command in PixelFlasher. The file disappeared without a backup being created on reboot, so that likely eliminates the old one hanging around from the previous month. The file was not created by subsequent patches from within PixelFlasher. I have no idea why it was created the first time but not later.

Also, simply opening the Magisk app runs run_migrations.

Edit: I deleted the ramdisk.cpio and kernel files from the /data/adb/magisk folder, and PixelFlasher created the stock_boot.img file during the patch process again. I then opened the Magisk app and the backup was created. Also, I wanted to note that the backup image is gzipped, so it would need to be decompressed before the SHA1 sum would match:

# gunzip -c /data/magisk_backup_7f04123661284ff8d554f01060b00eb6f188a07b/boot.img.gz | sha1sum
7f04123661284ff8d554f01060b00eb6f188a07b -
[Google Pixel 6] Octagon8008:
Hi, I just today purchased a Pixel 6 Pro that came with the TP1A.221005.002 build.

Bootloader is locked and greyed out. Seems that this is the intended experience.

I was planning on unlocking the bootloader, but it seems Google stopped allowing OEM unlocking in Android 13.

Is there any hope for google to go back on this ? OEM unlocking was the reason for most people to purchase Pixels, so it would seem kinda stupid to take away their only actual feature... Do correct me if I'm wrong...

Thanks for all the ressources you make available, just frustrated that this doesn't work :(
[Google Pixel 6] V0latyle:
FYI, your post was moved from the sticky thread, because that wasn't the appropriate place to ask your question.

Not true.

This has not been removed or disabled in any way from Google non-carrier devices. The device does need to be connected to the Internet before OEM unlocking will become available; if it remains unavailable, it must be a carrier locked variant. I assume you did not buy this device direct from Google?
[Google Pixel 6] Octagon8008:
Ah cheers, apologies,

I did not realize I was replying to the sticky

Ah, understood.

I bought it second hand, but in Hong Kong - didn't think it would be carrier locked to Verizon as my imei check seems to indicate, since I could connect my HK SIM card.

Nuance between vendor and bootloader unlock it would seem!

> IMEI.info: Pixel 6 Pro (128GB, Stormy Black, US VZW)

Should have done my research!

My understanding is that I'm sol?

Ah well, picked it up for 300 bucks so I might just try and sell it and buy one where I have checked the imei beforehand.

Thanks for your patience, been a long afternoon trying to get this resolved.
[Google Pixel 6] V0latyle:
Quite alright, we just moved your post and all is good.

Yes, unfortunately. There is no way to unlock the bootloader on a VZW device. The only way this might be possible is through an IMEI change, but AFAIK that requires specialized tools and software, and is illegal in some countries.

That's what XDA is here for.
[Google Pixel 6] ukgblazem:
You have saved my life lol
[Google Pixel 6] V0latyle:
Probably not, but thanks!
[Google Pixel 6] jant90:
I think something is wrong with my Pixel 6A because I can only ever boot from one slot, the other slot is always corrupted or gives bootloop (returns to bootloader). Even after flashing both slots with stock FW using PixelFlasher 4.4.0.0 and adb 33.0.3.

I've been out of the root game for a few years now, so before using my brand new Pixel 6A I first want to learn how to root, upgrade or apply OTA's (and keep root), recover from bad flash/root, etc. So I've played around with it for the past few days flashing, reflashing, rooting and upgrading my device so I can't tell you what I did exactly.

Therefore I decided to start fresh and I performed the following steps:

Fully restored my Pixel 6A to stock with Android Flash Tool, FW version TP1A.220905.004.A2 (slightly older FW so I can test upgrading/OTA's). I used options "Wipe Device", "Lock Bootloader", "Force Flash all Partitions".

Enabled adb debugging and unlocked the bootloader.

Enabled adb debugging after the wipe again.

At this point my Pixel 6A boots fine from slot A.

I changed the active slot to B and tried to boot, but it fails and returns to the bootloader. How is this possible? Other than the unlocked bootloader my device is flashed with clean, stock firmware.

In an attempt to fix this I used PixelFlasher to flash the same factory FW version to slot B. Now it boots fine from slot B but slot A won't boot: I can see the Google logo on a black background for a few seconds but then the phone goes to Fastboot Mode (with "Enter reason: reboot bootloader").

I repeated the previous step but now for slot A: so I activated slot A again, flashed it with the same factory image as I did for slot B. Now slot A is bootable but slot B isn't anymore.

Next, I put my phone in Recovery Mode and chose option "Apply update from ADB" and I sideloaded the same version OTA FW file by running adb sideload ota.zip. Now slot B is bootable again but slot A gives an error screen with a red exclamation and "Your device is corrupt" message (this is different from before when it would go straight to the bootloader).

Lastly, I tried to flash the stock factory FW with PixelFlasher with the "Flash both slots" option, but still only one slot is bootable.

How on earth do I get a fully working firmware in both slots so I can boot from either slot? That should be possible right?
[Google Pixel 6] V0latyle:
From what I understand, this is normal - manually switching slots doesn't work, because of how the system marks the slots as "current", "bootable", and "successful". I would just leave it alone; the only time you should need to switch slots will be done automatically, like when updating via OTA.

You can use Magisk to switch slots by using "Install to Inactive Slot". After patching the alternate slot boot image, it then calls a reboot to that slot.

Trying to manually switch slots from bootloader "confuses" the system. You can use bootctl via an elevated shell. Context:

Commands:
hal-info - Show info about boot_control HAL used.
get-number-slots - Prints number of slots.
get-current-slot - Prints currently running SLOT.
mark-boot-successful - Mark current slot as GOOD.
get-active-boot-slot - Prints the SLOT to load on next boot.
set-active-boot-slot SLOT - On next boot, load and execute SLOT.
set-slot-as-unbootable SLOT - Mark SLOT as invalid.
is-slot-bootable SLOT - Returns 0 only if SLOT is bootable.
is-slot-marked-successful SLOT - Returns 0 only if SLOT is marked GOOD.
get-suffix SLOT - Prints suffix for SLOT.
set-snapshot-merge-status STAT - Sets whether a snapshot-merge of any dynamic
partition is in progress. Valid STAT values
are: none, unknown, snapshotted, merging,
or cancelled.
get-snapshot-merge-status - Prints the current snapshot-merge status.

SLOT parameter is the zero-based slot-number.

Here is a Magisk module that can be used to mount the bootctl utility
[Google Pixel 6] Lughnasadh:
Whenever you manually switch slots as you were doing in Steps 5-7, you have to re-flash (can dirty flash) the firmware after you've switched slots to get it to boot on that slot (as you found out).

However, both slots are still likely "bootable". That is, if you got into a bootloop on one slot and it reverted to the other slot it should still boot on the other slot.
[Google Pixel 6] phaino00:
You can't. It's not designed for the dual boot functionality. It's not possible without dual boot functionality.
[Google Pixel 6] V0latyle:
Not quite true...you just have to use bootctl to tell it to boot to the other slot. Simply setting the other slot active in bootloader short circuits the process.
[Google Pixel 6] Lughnasadh:
I was answering in the way that person was trying to do it without getting into more in depth details. I saw your earlier post.

.........................
[Google Pixel 6] jant90:
Thanks for easing my mind about this guys! So just a misunderstanding on my side. :)

I was having some issues with applying an OTA update and keeping root through Magisk Manager and I thought that maybe for that to work both slots should have up-to-date, working firmware (and to test that I tried booting from them).

Luckily I learned a lot from all this flashing, rooting, updating with adb, fastboot and PixelFlasher and I think that should I ever screw up a future update I should be able to recover without data loss pretty easy and quick now.
[Google Pixel 6] badabing2003:
@V0latyle I don't doubt your wealth of knowledge, bootctl github page is saying

> Switch My Slot is an Android app that helps you switch between android A & B slots easily without having to enter commands in adb or fastboot shell.

I think it is designed to be easy or another medium to be able to switch, I don't see any mention of adb / fastboot based switching being non-functional.

It's the first I hear, which only reflects on my ignorance of the issue, but if there are any discussions threads about this, I would like to catch up, I personally never had issues with slot switching.

@jant90

Are you sure that it is booting to the slot you just flashed?, just making sure, because if it fails to boot to one of the slots, it would switch to the other and perhaps that would seem that it is booting fine.

You can provide a support.zip file and I can peruse the logs and see if anything stands out, you probably want to do that in PF support thread to keep this free of unnecessary chatter.

Update: I just missed @jant90 post while posting this.

I'm still interested to learn about the slot related issues.
[Google Pixel 6] V0latyle:
I could be wrong but I believe the bootctl binary isn't already installed and enabled by default, necessitating the module. I'm not all that familiar with Android shell but I imagine anything that can be done in shell can be done in an app.
[Google Pixel 6] badabing2003:
Thank you, I will look into this and try to understand how it is working.
[Google Pixel 6] gazdajezda:
V0latyle, I think I need your opinion badly. Today I notice that home screen widget which shows calendar (my and shared events, ppl birthdays...) begins to shows birthdays of people I know I never enter their birthday date. Also, I know that this could be because of my phone's uptime was approx 2550 hours so I just restart it. After restart it never came alive, but enter into some mode where only three options are available after long press on power button:

- Lockdown

- Power off

- Restart

Screen is black, it seems that nothing non Google is started (I use Nova launcher) so only response from phone is on long press to Power button.

Phone is still on Android 12 or 12.1 don't remember honestly, with unlocked bootloader & rooted with Magisk with addons for SN pass.

Do I need to flash it totally (from scratch) or can I restore current system with flash boot image or similar action? It's enough if I can restore to that version (I still have images on home comp, I will get there in 4-5 hours), I was fully happy with it. So I can skip A13 upgrade path for now, will do that later, when there will be more time to play with it. Any hint, PLEASE?
[Google Pixel 6] V0latyle:
Lockdown? I haven't seen that option on the boot menus of previous Pixels

Does the device even begin to boot? As in, do you get the Google logo after the bootloader warning screen?

It's hard to say how to fix it without knowing what's going on. I suggest flashing the stock boot image (unpatched) for your build and see if the device boots.

Also, if it begins to boot on the patched image, but bootloops, you can disable Magisk modules with this command: adb wait-for-device shell magisk --remove-modules

If restoring the boot image doesn't fix it, you could try dirty flashing the factory image. And if that doesn't solve the problem, you probably need to wipe data.