Files
doubao-clone/scripts/adb-accept-final.sh

31 lines
1.3 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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