[Google Pixel 5 Guides, News, & Discussion] ipdev:
I flashed my Pixel 5 back and forth many times Sunday morning. :whistle:

I did not find a way to keep data while rooted. :(

One odd thing I ran into.

Starting from Android 11, I used the uninstall option in the Magisk app.

Magisk rebooted my device after the uninstall.

I reinstalled the Magisk app and checked that Magisk was not installed.

Since I was not rooted, I could not verify that Magisk was fully removed from /data/

Updated to 12.

I think this was the configuration I tried that time. :unsure:

fastboot --skip-reboot update image-redfin-sp1a.210812.015.zip
fastboot reboot bootloader
fastboot --disable-verity --disable-verification flash --slot=all vbmeta image-files/vbmeta.img
fastboot reboot bootloader

With the --skip-reboot option, the update finishes in fastboot_d.

The reason I add the reboot bootloader.

Still no go.

So even uninstalling Magisk first in Android 11 and then updating to 12 give the corruption error.

Since this time I was dumped into Recovery, I just used the Factory Reset option to wipe and then reboot.

I tried installing the Magisk canary app and was refused.

Signature mismatch with previously installed version.

So apparently Factory Reset does not clear Package Manager's data. :unsure:

[ip@lost ip]$ adb uninstall -k com.topjohnwu.magisk
The -k option uninstalls the application while retaining the data/cache.
At the moment, there is no way to remove the remaining data.
You will have to reinstall the application with the same signature, and fully uninstall it.
If you truly wish to continue, execute 'adb shell cmd package uninstall -k'.
[ip@lost ip]$ adb shell cmd package uninstall -k com.topjohnwu.magisk
Success
[ip@lost ip]$ adb install -r magisk/20211024/app-debug.apk
Performing Streamed Install
adb: failed to install magisk/20211024/app-debug.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.topjohnwu.magisk signatures do not match previously installed version; ignoring!]
[ip@lost ip]$ adb shell cmd package uninstall com.topjohnwu.magisk
Success
[ip@lost ip]$ adb install -r magisk/20211024/app-debug.apk
Performing Streamed Install
Success

I have been running personal Magisk builds using the official repo for the last month or two.

Since canary 23010 was officially released, I switched to the official canary release.

The the reason the packages were signed by different keys. ;)

Hope this helps with you testing. 🙃

Cheers. :cowboy:

PS.

I use the full factory image files to update/downgrade.

I unzip the image zip into a directory named image-files.

I use a modified flash-all script.

Attached my current modified redfin a12 update script.

EDIT:

Not sure why the script in not attaching.

So here it is.

#!/bin/sh

# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if ! [ $($(which fastboot) --version | grep "version" | cut -c18-23 | sed 's/\.//g' ) -ge 3103 ]; then
echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html"
exit 1
fi
fastboot flash bootloader bootloader-redfin-r3-0.4-7617468.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-redfin-g7250-00147-210811-b-7631450.img
fastboot reboot-bootloader
sleep 5
# fastboot -w update image-redfin-sp1a.210812.015.zip
# fastboot -w --skip-reboot update image-redfin-sp1a.210812.015.zip
fastboot --skip-reboot update image-redfin-sp1a.210812.015.zip
fastboot reboot bootloader
fastboot --disable-verity --disable-verification flash --slot=all vbmeta image-files/vbmeta.img
# fastboot --disable-verity --disable-verification flash --slot=all vbmeta_system image-files/vbmeta_system.img
fastboot reboot bootloader