[Google Pixel 2 XL Guides, News, & Discussion] CPngN:
You don't have to put any instructions in any file, honestly.

Copy the relevant instructions and paste them to your command line. Hit enter. Do it ONE by ONE in case there's an error.

Save the stack of these, what, 3 instructions (waits/pauses/delays don't really count) and the others after it in a file or just use your history command monthly to see what you did last time. Repeat, noting where you did things on the phone itself (such as manually patching boot.img and using adb to copy it back to the computer).

Since I'm doing this now, I'll put my list of commands for my monthly Pixel 2 XL taimen updates (on a MacBook Pro). These commands should work on a Mac or Linux box IF you have set up your PATH variable to include the adb and fastboot executable files. (Don't dump your Pixel files into the adb folder!) Also note that hash/pound # begins a comment on any line that isn't inside of "quotes". Anything after a # is for YOU TO READ AND UNDERSTAND.

cd /Users/myusername/Android/Pixel2XL/taimen-pq3a.190705.001

# Connect the phone via usb-2 cable now

echo "::: Before rebooting, disable all modules in Magisk Manager app. Take a screenshot (power + volDown) if you have lots of modules to remember. :::"

adb reboot-bootloader

# Your phone should reboot into recovery within a few seconds. "dead" robot and a big green Start on a black screen.

cat flash-all.sh

# copy similar lines from flash-all but which match this month's naming convention (such as the radio file).

fastboot flash bootloader bootloader-taimen-tmz20r.img

fastboot reboot-bootloader

# wait for it to come back into bootloader mode

fastboot flash radio radio-taimen-g8998-00008-1902121845.img

# it flashes radio here...

fastboot reboot-bootloader # important to do this after every flash before doing more flashing or rebooting to OS

# wait for it to come back into bootloader mode

fastboot update image-taimen-pq3a.190705.001.zip

# this one takes a while longer (minutes) and reboots on its own when done

echo "::: Phone reboots here :::"

echo "::: Let the phone FULLY boot up - give it several minutes after logging in with your code :::"

# Below assumes you have adb working and can push or pull files from your computer using adb.

adb shell rm /sdcard/Download/boot.img # just in case. Don't want old ones getting in the way.

# Unzip cd image-taimen-pq3a.190705.001.zip with the unzip command or via Finder or other file explorer. Then go into it:

cd image-taimen-pq3a.190705.001

adb shell rm /sdcard/Download/magisk_patched.img # remove previous file in case Magisk has issues overwriting it

adb push boot.img /sdcard/Download/

# ::: For July, I am already on Magisk Manager app 7.3.2. Magisk 19.3 is pending (re)install via patch method as usual... :::

# ::: Click install in the app next to Magisk line. Select Install in the popup, then Select and Patch a File. Find your Download folder and select boot.img Note the date may be 2008 not current year, so it may sort to the bottom.

# Note the output path, which should now be similar to: /storage/emulated/0/Download/magisk_patched.img

# Back on the computer command line, do this. Make sure nothing is syncing, this will reboot you instantly:

adb pull -a /sdcard/Download/magisk_patched.img

adb reboot-bootloader

# Push that modified image you just copied from the phone back to the phone via flashing:

fastboot flash boot magisk_patched.img

fastboot reboot-bootloader # important to do this after every flash before doing more flashing or rebooting to OS

fastboot reboot # finally, reboot back to the OS and hopefully enjoy as normal

# Follow up: let it boot fully and settle down, then run Magisk again to re-add any downloadable modules and do a SafetyNet check.

# For my pixel 2 xl I only have these installed, mostly so I can popup a notification volume slider when I squeeze the phone:

# Active Edge Mod for Pixel 2/XL and Pixel 3/XL

# Busybox for Android NDK

# MagiskHide Props

# Enable and reboot - again. If you get a stuck "finishing system update", wait a few minutes and reboot again. Sometimes this happens, often not.

# Recently my Google Pay stopped working (at stores or when trying to add a card) and has not been "auto-fixed" by Magisk. There are some hacks which edit a database to set that back, or other more complicated maneuvers, to get GPay working again. That is the topic of other threads, though.. :)

- CPngN