Files
MeowOS-For-R3P2/patch_v2/meow_launcherd/run_ab.sh
T
MeowOS Dev 245bee2946 MeowOS for HiBy R3 Pro II — 公共发布版本(历史已重置)
• 全新单提交:清除含敏感信息的旧历史(sudo 口令、内网 IP、SSH 密钥路径、热点 SSID、设备 MAC)
• 本地开发文档/测试记录/构建脚本全部移入 gitignored 的 devdocs/ 与 scripts/build/(不入库)
• 保留:MeowOS 源码(launcher/watchdog/bootmenu/meow_svcd/SDK)、项目规范文档、mips-repo
增补组件:SDK 统一日志+通知 API、meow_svcd 服务管理器、mips-repo 软件仓库
2026-08-30 01:12:34 +08:00

43 lines
1.7 KiB
Bash

#!/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