文档:记下 v2.0.34 修的四处(PYTHONPATH / pip shebang / tmp / 镜像)+ 验收脚本

This commit is contained in:
doubao
2026-10-14 14:56:08 +08:00
parent 2601e9ae43
commit cead531983
2 changed files with 145 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#!/system/bin/sh
# 最终验收:模拟 App 给子进程的环境(childEnvMap 的效果)
PKG=com.doubao.lynxclone
P=/data/data/$PKG/files/usr
export PREFIX=$P HOME=/data/data/$PKG/files/home TMPDIR=$P/tmp
export PATH=$P/bin:$P/bin/applets:/system/bin
export LD_LIBRARY_PATH=$P/lib LD_PRELOAD=$P/lib/libtermux-exec.so
echo "===== 1. python + pip(问题 1、3)====="
$P/bin/python3 -V 2>&1 | head -1
$P/bin/python3 -c 'import encodings,json,sqlite3,ssl; print(" import 正常")' 2>&1 | head -2
$P/bin/pip3 --version 2>&1 | head -1
$P/bin/python3 -c 'import six; print(" six", six.__version__)' 2>&1 | head -2
echo
echo "===== 2. 临时目录(问题 2)====="
$P/bin/python3 -c 'import tempfile; print(" tempfile =", tempfile.gettempdir())' 2>&1 | head -2
$P/bin/mktemp 2>&1 | head -1
echo
echo "===== 3. 环境健康 ====="
echo " 未配置 = $($P/bin/dpkg -l 2>/dev/null | grep -c '^i[^i]')"
echo " 半装 = $($P/bin/dpkg -l 2>/dev/null | grep -c '^i[UFH]')"
echo " 架构 = $($P/bin/dpkg --print-architecture)"
echo " dpkg = $($P/bin/dpkg --version 2>&1 | head -1 | cut -d' ' -f6)"
echo " 源 = $(grep -m1 '^deb' $P/etc/apt/sources.list | cut -d/ -f3)"
echo
echo "===== 4. 真 Termux 仍共存 ====="
ls -ld /data/data/com.termux 2>&1 | awk '{print " " $1, $3}'