#!/bin/sh # run_ab.sh — A/B launcher v6.5 (bug) vs v6.6 (fix) with the display panned to # buffer1 (yoffset=720). Reproduces the reported bug: launcher draws the menu # to buffer0 while the panel shows buffer1 -> menu invisible. HPID=976 st(){ awk '{print $3}' "/proc/$HPID/stat" 2>/dev/null; } yoff(){ /data/fbprobe 2>/dev/null | grep -oE "yoffset = [0-9]+"; } seed(){ /data/fbtool blank 0 >/dev/null 2>&1 # unblank so pan is not EBUSY /data/fbtool pan 720 >/dev/null 2>&1 # display -> buffer1 (yoffset=720) echo " seeded yoffset=$(yoff)" } run_one(){ BIN=$1; TAG=$2 seed echo "=== $TAG ($BIN) ===" rm -f /usr/data/meow_launcherd.pid "$BIN" --sim-hotkey 1200 --sim-exit 9000 >/tmp/m_$TAG.log 2>&1 & LPID=$! sleep 4 echo " DURING t=4s: player_stat=$(st) yoffset=$(yoff)" dd if=/dev/fb0 of=/tmp/${TAG}_menu_b0.raw bs=960 count=720 status=none 2>/dev/null echo " menu_b0=$(md5sum /tmp/${TAG}_menu_b0.raw 2>/dev/null | awk '{print $1}')" echo " log: $(grep -E 'fb:|fb backup|fb pan|menu open' /tmp/m_$TAG.log | tr '\n' ' | ')" sleep 6 echo " AFTER t=10s: player_stat=$(st) yoffset=$(yoff)" echo " log2: $(grep -E 'fb restore|menu close|restore:|SIGCONT' /tmp/m_$TAG.log | tr '\n' ' | ')" kill "$LPID" 2>/dev/null; sleep 1; killall meow_launcherd 2>/dev/null echo " killed; player_stat=$(st)" } echo "player pid=$HPID" run_one /data/meow_launcherd.v65 OLD run_one /data/meow_launcherd.v66 NEW echo "=== cleanup: restore player's natural screen-off (brightness 0 + blank) ===" /data/fbtool blank 0 >/dev/null 2>&1 /data/fbtool pan 0 >/dev/null 2>&1 echo "brightness now: $(cat /sys/class/backlight/backlight_pwm0/brightness)" echo "final yoffset=$(yoff) player_stat=$(st)" echo DONE