From 6bdfd5a9eff2615eb4b6e340218ef7115a6324d9 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 2 May 2023 13:38:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A0=E8=BD=BDbinder?= =?UTF-8?q?=E5=85=8D=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Help/shell/run_daemon.sh | 3 ++- Makefile | 1 + pkexec/com.deepin.pkexec.binder.loader.policy | 21 +++++++++++++++++++ uengine-installer | 3 +++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 pkexec/com.deepin.pkexec.binder.loader.policy diff --git a/Help/shell/run_daemon.sh b/Help/shell/run_daemon.sh index 4085c44..6a6fb65 100644 --- a/Help/shell/run_daemon.sh +++ b/Help/shell/run_daemon.sh @@ -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 diff --git a/Makefile b/Makefile index 9b9ab79..24a4d1f 100755 --- a/Makefile +++ b/Makefile @@ -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/ diff --git a/pkexec/com.deepin.pkexec.binder.loader.policy b/pkexec/com.deepin.pkexec.binder.loader.policy new file mode 100755 index 0000000..1212857 --- /dev/null +++ b/pkexec/com.deepin.pkexec.binder.loader.policy @@ -0,0 +1,21 @@ + + + + gfdgd xi + https://gitee.com/gfdgd-xi/uengine-runner/ + + Authentication is required to Loading Binder Module + 加载 binder 模块需要输入密码 + preferences-system + + yes + yes + yes + + /usr/bin/uengine-loading-binder + true + + + \ No newline at end of file diff --git a/uengine-installer b/uengine-installer index 9b8a45d..ce1adb7 100755 --- a/uengine-installer +++ b/uengine-installer @@ -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守护进程。随后即可安装和使用安卓应用"