post_install() {
echo "Installing dependencies for frida-python through pip..."
LD_PRELOAD='' LDFLAGS="-lpython3.12" MATHLIB="m" "/data/data/com.termux/files/usr/bin/pip3" install --upgrade 'prompt-toolkit>=2.0.0,<4.0.0' 'colorama>=0.2.7,<1.0.0' 'pygments>=2.0.2,<3.0.0' 'websockets>=13.0.0,<14.0.0'
if [ -f "/data/data/com.termux/files/usr/bin/py3compile" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3compile" -p "frida-python" "/data/data/com.termux/files/usr/lib/python3.12/"
fi
exit 0
}
post_upgrade() {
post_install
}
pre_remove() {
if [ -f "/data/data/com.termux/files/usr/bin/py3clean" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3clean" -p "frida-python"
fi
exit 0
}
