@rseiler
I cannot see that image because the host tracks the viewers browser and sells that information and my server blocks that kind of behavior.
The modem firmware would not at all affect this. Copy partitions does nothing with it.
I fixed the typo in the post about what to flash. The fsg should've been fsg.mbn, not fsg.bin. Regardless, if you've flashed before this shouldn't affect it.
I opened up the script, here is what it's doing
Code:
if [ "$1" != "lanchon-magic" ]; then
export FLASHIZE_VERSION='2016-04-06'
log=''
if [ -f /tmp/flashize-log ]; then
log="$(cat /tmp/flashize-log)"
if [ -z "$log" ]; then
log=/tmp/flashize.log
fi
fi
if [ "$log" == "-" ]; then
log=""
fi
out="/proc/self/fd/$2"
zip="$3"
if [ -n "$log" ]; then
if [ "${log::1}" != "/" ]; then
logzip="$zip"
if [ "$logzip" == "/tmp/update.zip" ] || [ "$logzip" == "/sideload/package.zip" ]; then
# if sideloading, for relative logfile naming purposes pretend that the zip is:
logzip=/tmp/flashize.zip
fi
if [ "$log" == ":" ]; then
log="$(basename "$logzip" .zip).log"
fi
log="$(dirname "$logzip")/$log"
fi
mkdir -p "$(dirname "$log")"
fi
print() {
local s="$1"
if [ -n "$log" ]; then
>>"$log" echo "$s"
fi
if [ -z "$s" ]; then s=" "; fi
>$out echo "ui_print $s"
>$out echo "ui_print"
}
print
if [ -n "$log" ]; then
>"$log"
fi
set -o pipefail
/sbin/sh "$0" "lanchon-magic" "$zip" 2>&1 | (
IFS=""
while read -r line; do print "$line"; done
)
code=$?
print
if [ "$code" -eq "0" ]; then
print "[OK]";
else
print "[ERROR $code]";
fi
log=""
print
exit $code
fi
shift
[ ! -f /tmp/flashize-debug ] || set -x
#####################################################
# Partitions ignored
IGNORED=" dtbo_a dtbo_b system_a system_b boot_a boot_b vbmeta_a vbmeta_b "
suffix_active=$(getprop ro.boot.slot_suffix)
if [[ "$suffix_active" == "_a" ]]; then
suffix_swap="_b"
else
suffix_swap="_a"
fi
for active in /dev/block/bootdevice/by-name/*$suffix_active; do
partition=$(basename $active)
if [[ "${IGNORED/$partition}" = "$IGNORED" ]]; then
echo "Partition $partition"
inactive=$(echo $active | sed "s/${suffix_active}\$/${suffix_swap}/");
part_active=$(readlink -fn $active);
part_inactive=$(readlink -fn $inactive);
if [[ -n "$part_active" && -n "$part_active" && "$active" != "$part_active" && "$inactive" != "$part_inactive" ]]; then
blockdev --setrw $part_inactive
dd if=$part_active of=$part_inactive bs=4k
fi
fi
done
The actual script starts below the
#####################################################
Everything above it is just logs and such.
What the script is doing is going through all the partitions below that match the current slot
dtbo_a dtbo_b system_a system_b boot_a boot_b vbmeta_a vbmeta_b
and copying it to the inactive slot. The if [[ "${IGNORED/$partition}" = "IGNORED" ]]; seems wrong though. I could be wrong, but I would've put that in a for loop. The readlink just stores the actual device path from a symlink. The script is very simple to read, just figure out what those are doing and you can get an idea of whats going on and maybe fix it. The blockdev --setrw is setting the inactive partition to RW (read/write) and then dd has the active partition as if (input file) and the inactive partition as of (output file). Everything looks fine but that if statement looks wrong to me. The = operator is typically for assignment, not comparisons. I would think it should be == but I also don't know what the / in a bash array variable does. I also cannot find documentation on the -n inside the statement. I have no idea what that does. The closest I found was -N which checks if it was modified, but capitalization should matter so that's not it.
This really has me thinking that lineageos is loading files from the inactive slot and the actualy update file they provide has bad firmware files mixed in it, seemingly from an AT&T or TMobile build.
I can't seem to get payload dumper working to check what is included in lineage, but if all those commands above are correct, then the problem is with what lineage is packing with its files. That could explain why if lineage's files aren't copied to the inactive partition it's works fine, but breaks OTA.
I don't know, I'm not too interested in this phone and I'm downgrading back to 18 anyways due to privacy and security concerns with Android 12, but I should've shared enough information to trace where this problem is coming from.