新增加载binder免密

This commit is contained in:
gfdgd_xi 2023-05-02 13:38:06 +08:00
parent 27817c824e
commit 6bdfd5a9ef
4 changed files with 27 additions and 1 deletions

View File

@ -45,7 +45,8 @@ if [[ $? != 0 ]]; then
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "未安装 UEngine结束" -a uengine-runner
exit
fi
if [[ -f /usr/bin/uengine-loading-binder ]]; then
uname -r | grep 5.17.3
if [[ -f /usr/bin/uengine-loading-binder ]] && [[ $? != 0 ]]; then
echo 加载 binder
pkexec /usr/bin/uengine-loading-binder
fi

View File

@ -56,6 +56,7 @@ build:
cp -rv Icon new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv CompareVersion.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv uengine-remove.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv pkexec new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
rm -rfv new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Help/information
python3 UpdateTime.py
python3 RemovePycacheFile.py #new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/uengine-runner/</vendor_url>
<action id="com.deepin.pkexec.binder.loader">
<message>Authentication is required to Loading Binder Module</message>
<message xml:lang="zh_CN">加载 binder 模块需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/uengine-loading-binder</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@ -126,6 +126,9 @@ if [[ $? != 0 ]]; then
zenity --error --no-wrap '--text=抱歉UEngine 安装失败,已移除安装时进行的修改'
exit
fi
# 拷贝 binder loader
cp "${programPath}/Help/shell/run_daemon.sh" /usr/bin/uengine-loading-binder -v
cp "${programPath}/pkexec/com.deepin.pkexec.binder.loader.policy" /usr/share/polkit-1/actions/ -v
# echo "重启后在$HOME/uengine-launch执行launch_uengine.sh即可打开uengine守护进程。随后即可安装和使用安卓应用"
# 这里直接运行 run_daemon.sh运行 launch_uengine.sh 好像不行
echo "重启后在$HOME/uengine-launch执行run_daemon.sh或在启动器手动运行或执行命令uengine-loading-ubuntu即可打开uengine守护进程。随后即可安装和使用安卓应用"