我正在通过 Cydia 制作一个可安装的包,它将 com.intelliborn.intelliscreenx 写入:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Hidden</key>
<array>
<string>libactivator</string>
<string>com.aaronash.BarrelSettings</string>
<string>com.iptm.bigboss.sbsettings</string>
</array>
</dict>
</plist>
但我不知道如何将 postinst 脚本写入正确添加的位置,并将 postrmv 脚本写入正确删除的位置。
安装此包后 hidden.plist 应如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Hidden</key>
<array>
<string>libactivator</string>
<string>com.aaronash.BarrelSettings</string>
<string>com.iptm.bigboss.sbsettings</string>
<string>com.intelliborn.intelliscreenx</string>
</array>
</dict>
这是我的 postinst 和 postrmv 脚本的外观:
后勤
#!/bin/bash
declare -a cydia
cydia=($CYDIA)
if [[ $1 == install ]]; then
if [[ ${CYDIA+@} ]]; then
eval "echo 'finish:restart' >&${cydia[0]}"
fi
fi
echo -e "\n\<string>com.intelliborn.intelliscreenx</string>\n" >> /var/mobile/Library/LibHide/hidden.plist
exit 0
后rmv
#!/bin/bash
echo " " >> /var/mobile/Library/LibHide/
sed -i 's/<string>com.intelliborn.intelliscreenx</string>\n" >> /var/mobile/Library/LibHide/hidden.plist
declare -a cydia
cydia=($CYDIA)
if [[ $1 == install ]]; then
if [[ ${CYDIA+@} ]]; then
eval "echo 'finish:restart' >&${cydia[0]}"
fi
fi
exit 0