diff --git a/Language.json b/Language.json index 60aa763..16129a4 100644 --- a/Language.json +++ b/Language.json @@ -96,7 +96,15 @@ "UEngine 键盘映射", "UEngine 检测 CPU 是否支持运行", "删除 UEngine 运行检查", - "重新安装 UEngine" + "重新安装 UEngine", + { + "Name": "获取 UEngine 最高权限", + "Menu": [ + "安装已经制作好的 UEngine 带最高权限的镜像", + "构建 UEngine 带最高权限的镜像到用户主目录", + "安装默认的 UEngine 镜像" + ] + } ] }, { @@ -222,7 +230,15 @@ "UEngine Keyboard", "UEngine Check CPU Can Or Can't Run", "Delete UEngine Runing Checking", - "Reinstall UEngine" + "Reinstall UEngine", + { + "Name": "Get UEngine Root User", + "Menu": [ + "Install UEngine Image With Root User", + "Build An UEngine Image With Root User In Your Home Path", + "Install Defult UEngine Image" + ] + } ] }, { diff --git a/README.md b/README.md index 91c29a0..823f179 100755 --- a/README.md +++ b/README.md @@ -2,11 +2,16 @@ ### 介绍         新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。 -![1.5.1](https://storage.deepin.org/thread/202109111635389828_截图_选择区域_20210911163449.png) +![1.5.2](https://storage.deepin.org/thread/202111281607295590_截图_选择区域_20211128160706.png) (测试平台:UOS 家庭版,deepin 20.2.2,UOS 专业版 1040) (自己美术功底太差,图标直接用 anbox 的了) ### 更新内容 +#### V1.5.2(2021-11-28): +**※1、支持安装和构建带 Root 的 UEngine 的镜像** +2、更新了反馈链接 +![](https://storage.deepin.org/thread/202111281607295590_截图_选择区域_20211128160706.png) + #### V1.5.1(2021-10-05,国庆节版): **※1、精简用户界面,合并安装和卸载输入框和浏览按钮等** **※2、修复安装以其的程序图标无法点击进入的问题(deepin 社区版不存在此问题)** diff --git a/__pycache__/getxmlimg.cpython-37.pyc b/__pycache__/getxmlimg.cpython-37.pyc index 3b6c41d..aec1ea2 100644 Binary files a/__pycache__/getxmlimg.cpython-37.pyc and b/__pycache__/getxmlimg.cpython-37.pyc differ diff --git a/build/DEBIAN/control b/build/DEBIAN/control index ec358a4..d70f6b7 100644 --- a/build/DEBIAN/control +++ b/build/DEBIAN/control @@ -1,5 +1,5 @@ Package: spark-uengine-runner -Version: 1.5.1 +Version: 1.5.2 Maintainer: gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com> Homepage: [https://gitee.com/gfdgd-xi/uengine-runner, https://github.com/gfdgd-xi/uengine-runner] Architecture: all diff --git a/build/DEBIAN/postinst b/build/DEBIAN/postinst index ceea762..6d7e816 100755 --- a/build/DEBIAN/postinst +++ b/build/DEBIAN/postinst @@ -7,4 +7,4 @@ python3 -m pip install --upgrade requests -i http://mirrors.aliyun.com/pypi/si # 刷新图标缓存 gtk-update-icon-cache /usr/share/icons/bloom # 向服务器返回安装数加1(不显示内容且忽略错误) -curl http://gfdgdxi.qicp.vip/uengine/Install.php -s > /dev/null | true \ No newline at end of file +curl http://120.25.153.144/uengine-runner/Install.php?Version=1.5.2 -s > /dev/null | true \ No newline at end of file diff --git a/build/opt/apps/uengine-runner/Language.json b/build/opt/apps/uengine-runner/Language.json index 60aa763..16129a4 100644 --- a/build/opt/apps/uengine-runner/Language.json +++ b/build/opt/apps/uengine-runner/Language.json @@ -96,7 +96,15 @@ "UEngine 键盘映射", "UEngine 检测 CPU 是否支持运行", "删除 UEngine 运行检查", - "重新安装 UEngine" + "重新安装 UEngine", + { + "Name": "获取 UEngine 最高权限", + "Menu": [ + "安装已经制作好的 UEngine 带最高权限的镜像", + "构建 UEngine 带最高权限的镜像到用户主目录", + "安装默认的 UEngine 镜像" + ] + } ] }, { @@ -222,7 +230,15 @@ "UEngine Keyboard", "UEngine Check CPU Can Or Can't Run", "Delete UEngine Runing Checking", - "Reinstall UEngine" + "Reinstall UEngine", + { + "Name": "Get UEngine Root User", + "Menu": [ + "Install UEngine Image With Root User", + "Build An UEngine Image With Root User In Your Home Path", + "Install Defult UEngine Image" + ] + } ] }, { diff --git a/build/opt/apps/uengine-runner/UengineAndroidProgramList.desktop b/build/opt/apps/uengine-runner/UengineAndroidProgramList.desktop index 110309e..8ff8e7a 100755 --- a/build/opt/apps/uengine-runner/UengineAndroidProgramList.desktop +++ b/build/opt/apps/uengine-runner/UengineAndroidProgramList.desktop @@ -2,7 +2,7 @@ Categories=System; Comment=UEngine 程序菜单 Encoding=UTF-8 -Exec=/usr/bin/uengine launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity +Exec=/usr/bin/uengine launch.sh --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity Icon=/opt/apps/uengine-runner/icon.png MimeType= Name=UEngine 程序菜单 diff --git a/build/opt/apps/uengine-runner/information.json b/build/opt/apps/uengine-runner/information.json index 19a922a..b79fa29 100755 --- a/build/opt/apps/uengine-runner/information.json +++ b/build/opt/apps/uengine-runner/information.json @@ -3,7 +3,7 @@ "https://gitee.com/gfdgd-xi/uengine-runner", "https://github.com/gfdgd-xi/uengine-runner" ], - "Version": "1.5.1", + "Version": "1.5.2", "System": "Linux(deepin/UOS)", "Tips": [ "更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis", @@ -26,6 +26,10 @@ "4、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)" ], "Update": [ + "V1.5.2:", + "※1、支持安装和构建带 Root 的 UEngine 的镜像", + "2、更新了反馈链接", + "", "V1.5.1:", "※1、精简用户界面,合并安装和卸载输入框和浏览按钮等", "※2、修复安装以其的程序图标无法点击进入的问题(deepin 社区版不存在此问题)", diff --git a/build/opt/apps/uengine-runner/root-uengine.sh b/build/opt/apps/uengine-runner/root-uengine.sh new file mode 100755 index 0000000..896b42d --- /dev/null +++ b/build/opt/apps/uengine-runner/root-uengine.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +#sudo apt install squashfs-tools + +mkdir -p ~/temp +cd ~/temp +echo "正在下载supersu" +wget -P ~/temp http://supersuroot.org/downloads/SuperSU-v2.82-201705271822.zip +cd .. +mkdir -p ~/temp/work/dabao/extract/DEBIAN +echo "正在解压supersu" +unzip ~/temp/SuperSU-v2.82-201705271822.zip -d ~/temp/work/su +WORKDIR=~/temp/work +cd "$WORKDIR" +echo "正在下载uengine-android-image" +apt download uengine-android-image +echo "正在解压uengine-android-image" +cd dabao +dpkg-deb -x $WORKDIR/uengine-android-image*.deb extract/ +dpkg-deb -e $WORKDIR/uengine-android-image*.deb extract/DEBIAN +cd .. +cp dabao/extract/usr/share/uengine/android.img android.img + +echo "正在解压android镜像" +sudo unsquashfs android.img + +sudo mkdir -p ./squashfs-root/system/app/SuperSU +sudo mkdir -p ./squashfs-root/system/bin/.ext/ + +echo "正在将supersu安装到android镜像" +sudo cp ./su/common/Superuser.apk ./squashfs-root/system/app/SuperSU/SuperSU.apk +sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/etc/install-recovery.sh +sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/bin/install-recovery.sh +sudo cp ./su/x64/su ./squashfs-root/system/xbin/su +sudo cp ./su/x64/su ./squashfs-root/system/bin/.ext/.su +sudo cp ./su/x64/su ./squashfs-root/system/xbin/daemonsu +sudo cp ./su/x64/supolicy ./squashfs-root/system/xbin/supolicy +sudo cp ./su/x64/libsupol.so ./squashfs-root/system/lib64/libsupol.so +sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process_init +sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process64_original +sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process +sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process64 + +sudo chmod +x ./squashfs-root/system/app/SuperSU/SuperSU.apk +sudo chmod +x ./squashfs-root/system/etc/install-recovery.sh +sudo chmod +x ./squashfs-root/system/bin/install-recovery.sh +sudo chmod +x ./squashfs-root/system/xbin/su +sudo chmod +x ./squashfs-root/system/bin/.ext/.su +sudo chmod +x ./squashfs-root/system/xbin/daemonsu +sudo chmod +x ./squashfs-root/system/xbin/supolicy +sudo chmod +x ./squashfs-root/system/lib64/libsupol.so +sudo chmod +x ./squashfs-root/system/bin/app_process_init +sudo chmod +x ./squashfs-root/system/bin/app_process64_original +sudo chmod +x ./squashfs-root/system/bin/app_process +sudo chmod +x ./squashfs-root/system/bin/app_process64 + +echo "正在打包android镜像" +sudo rm android.img +sudo mksquashfs squashfs-root android.img -b 131072 -comp xz -Xbcj ia64 + + +cp android.img dabao/extract/usr/share/uengine/android.img + +echo "正在打包uengine-android-image" +cd dabao/extract +find usr -type f -print0 |xargs -0 md5sum >md5sums +cd .. +mkdir build +dpkg-deb -b extract/ build/ + +cp build/*.deb ~/ + +echo "正在清理垃圾" +sudo rm -rf ~/temp + +echo "已在用户主目录生成新的安装包,安装后重启即可生效" \ No newline at end of file diff --git a/build/opt/apps/uengine-runner/uengine-apk-builder b/build/opt/apps/uengine-runner/uengine-apk-builder index fbbf991..c8a0a87 100755 --- a/build/opt/apps/uengine-runner/uengine-apk-builder +++ b/build/opt/apps/uengine-runner/uengine-apk-builder @@ -2,8 +2,8 @@ # 使用系统默认的 python3 运行 ########################################################################################### # 作者:gfdgd xi -# 版本:1.4.2 -# 更新时间:2021年8月30日 +# 版本:1.5.1 +# 更新时间:2021年10月06日 # 感谢:anbox、deepin 和 统信 # 基于 Python3 的 tkinter 构建 ########################################################################################### @@ -435,7 +435,7 @@ if len(sys.argv) > 1: # 设置窗口 style = ttkthemes.ThemedStyle(win) style.set_theme("breeze") -win.attributes('-alpha', 0.5) +#win.attributes('-alpha', 0.5) win.title(title) win.resizable(0, 0) win.iconphoto(False, tk.PhotoImage(file=iconPath)) diff --git a/build/opt/apps/uengine-runner/uengine-runner b/build/opt/apps/uengine-runner/uengine-runner index 9e5dc55..3b5bc03 100755 --- a/build/opt/apps/uengine-runner/uengine-runner +++ b/build/opt/apps/uengine-runner/uengine-runner @@ -75,7 +75,6 @@ def ButtonClick8(): threading.Thread(target=UninstallProgram, args=[path]).start() # 浏览窗口 -# temp strs temppath="" def FindApk()->"浏览窗口": path = filedialog.askopenfilename(title="选择 Apk", filetypes=[("APK 文件", "*.apk"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApk.json"))["path"]) @@ -170,26 +169,6 @@ def Button5Click(): def OpenUengineProgramList()->"打开“uengine 所有程序列表”": os.system("uengine launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity") -# 显示“关于这个程序”窗口 -#def about_this_program()->"显示“关于这个程序”窗口": -# global about -# global title -# global iconPath -# mess = tk.Toplevel() -# message = ttk.Frame(mess) -# mess.resizable(0, 0) -# mess.title("关于 {}".format(title)) -# #mess.iconphoto(False, tk.PhotoImage(file=iconPath)) -# img = ImageTk.PhotoImage(Image.open(iconPath)) -# LabApkPath = ttk.Label(message, image=img) -# label2 = ttk.Label(message, text=about) -# button1 = ttk.Button(message, text="确定", command=mess.withdraw) -# LabApkPath.pack() -# label2.pack() -# button1.pack(side="bottom") -# message.pack() -# mess.mainloop() - # 显示“提示”窗口 def helps()->"显示“提示”窗口": global tips @@ -330,6 +309,18 @@ def GetApkPackageName(apkFilePath: "apk 所在路径")->"获取 apk 包名": line = line.replace(" ", "") return line +def InstallRootUengineImage(): + if not os.path.exists: + os.mkdir("/tmp/uengine-runner") + write_txt("/tmp/uengine-runner/install.sh", "sudo dpkg -i /tmp/uengine-runner/u*.deb\nsudo apt install -f") + threading.Thread(target=os.system, args=["deepin-terminal -C \"wget -P '/tmp/uengine-runner' 'https://hub.fastgit.org/gfdgd-xi/uengine-runner/releases/download/U1.1.14/uengine-android-image_1.1.14_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'\""]).start() + +def BuildRootUengineImage(): + threading.Thread(target=os.system, args=["deepin-terminal -C \"bash '{}'\"".format(programPath + "/root-uengine.sh")]).start() + +def ReinstallUengineImage(): + threading.Thread(target=os.system, args=["deepin-terminal -e ''pkexec apt reinstall uengine-android-image"]).start() + # 生成 uengine 启动文件到桌面 def BuildUengineDesktop(packageName: "软件包名", activityName: "activity", showName: "显示名称", iconPath: "程序图标所在目录", savePath:".desktop 文件保存路径")->"生成 uengine 启动文件到桌面": things = '''[Desktop Entry] @@ -520,10 +511,6 @@ def SaveInstallUengineApp(): def UengineCheckCpu(): english = GetCommandReturn("uengine check-features") - #chinese = GetCommandReturn("trans -b \"{}\"".format(english)) # 获取中文翻译 - #for i in chinese.split("\n"): # 删除提示 - # if "Did you mean:" in i: - # chinese = chinese.replace(i, "").replace("\n", "") messagebox.showinfo(title="提示", message="{}".format(english)) # 获取用户主目录 @@ -1161,6 +1148,7 @@ uengineInternet = tk.Menu(uengine, tearoff=0, background="white") uengineIcon = tk.Menu(uengine, tearoff=0, background="white") uengineUseAdb = tk.Menu(uengine, tearoff=0, background="white") uengineData = tk.Menu(uengine, tearoff=0, background="white") +uengineRoot = tk.Menu(uengine, tearoff=0, background="white") menu.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Name"], menu=programmenu) menu.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Name"], menu=adb) @@ -1199,6 +1187,7 @@ uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu" uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Name"], menu=uengineData) uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9], command=DelUengineCheck) uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][10], command=ReinstallUengine) +uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"], menu=uengineRoot) help.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][0], command=OpenProgramURL) # 设置“程序官网”项 help.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][2], command=UengineRunnerBugUpload) # 设置“程序官网”项 @@ -1231,6 +1220,11 @@ uengineData.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["M uengineData.add_separator() uengineData.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][2], command=BackUengineClean) +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][0], command=InstallRootUengineImage) +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][1], command=BuildRootUengineImage) +uengineRoot.add_separator() +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][2], command=ReinstallUengineImage) + menu.configure(activebackground="dodgerblue") help.configure(activebackground="dodgerblue") adb.configure(activebackground="dodgerblue") @@ -1270,11 +1264,6 @@ FrmInstall.grid(row=0, column=1,padx=3, rowspan=3) BtnFindApk.grid(row=0, column=0) BtnInstall.grid(row=0, column=1) -#LabUninstallPath.grid(row=4, column=0,sticky= tk.W,padx=3) -#ComboUninstallPath.grid(row=5, column=0,padx=3) - -#FrmUninstall.grid(row=5, column=1,padx=3) -#BtnUninstallApkBrowser.grid(row=0, column=0) BtnUninstall.grid(row=1, column=0) BtnShowUengineApp.grid(row=2, column=0,sticky= tk.W,padx=3,pady=2) diff --git a/build/opt/apps/uengine-runner/uengine-runner-update-bug b/build/opt/apps/uengine-runner/uengine-runner-update-bug index 9c6b1af..cf73314 100755 --- a/build/opt/apps/uengine-runner/uengine-runner-update-bug +++ b/build/opt/apps/uengine-runner/uengine-runner-update-bug @@ -28,7 +28,7 @@ def Update(name, stars, contact, things, version): "Version": version } try: - messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vZ2ZkZ2R4aS5xaWNwLnZpcC91ZW5naW5lL2J1Zy91cGxvYWQucGhw").decode("utf-8")), data=data).text) + messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vMTIwLjI1LjE1My4xNDQvdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text) except: traceback.print_exc() messagebox.showerror(title="错误", message="服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{}".format(traceback.format_exc())) diff --git a/build/usr/bin/uengine-root.sh b/build/usr/bin/uengine-root.sh new file mode 120000 index 0000000..bd3e7ab --- /dev/null +++ b/build/usr/bin/uengine-root.sh @@ -0,0 +1 @@ +/opt/apps/uengine-runner/root-uengine.sh \ No newline at end of file diff --git a/build/usr/share/polkit-1/actions/com.deepin.pkexec.bash.policy b/build/usr/share/polkit-1/actions/com.deepin.pkexec.bash.policy new file mode 100644 index 0000000..963366d --- /dev/null +++ b/build/usr/share/polkit-1/actions/com.deepin.pkexec.bash.policy @@ -0,0 +1,21 @@ + + + + gfdgd xi + https://gitee.com/gfdgd-xi/uengine-runner/ + + Authentication is required to Run Shell + 运行脚本需要输入密码 + preferences-system + + no + no + auth_admin_keep + + /usr/bin/bash + true + + + \ No newline at end of file diff --git a/build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-bridge.policy b/build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-bridge.policy index b5ff17a..7c0ca86 100644 --- a/build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-bridge.policy +++ b/build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-bridge.policy @@ -8,7 +8,7 @@ Authentication is required to Setting UEngine Internet Bridge 设置 UEngine 桥接需要输入密码 - uengine + kbox no no diff --git a/build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-session-launch-helper.policy b/build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-session-launch-helper.policy index 9f61433..70d8f15 100644 --- a/build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-session-launch-helper.policy +++ b/build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-session-launch-helper.policy @@ -8,7 +8,7 @@ Authentication is required to Change UEngine 设置 UEngine 需要输入密码 - uengine + kbox no no diff --git a/com.gitee.uengine.runner.spark.deb b/com.gitee.uengine.runner.spark.deb index f1d6287..5aa2337 100755 Binary files a/com.gitee.uengine.runner.spark.deb and b/com.gitee.uengine.runner.spark.deb differ diff --git a/information.json b/information.json index 19a922a..b79fa29 100755 --- a/information.json +++ b/information.json @@ -3,7 +3,7 @@ "https://gitee.com/gfdgd-xi/uengine-runner", "https://github.com/gfdgd-xi/uengine-runner" ], - "Version": "1.5.1", + "Version": "1.5.2", "System": "Linux(deepin/UOS)", "Tips": [ "更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis", @@ -26,6 +26,10 @@ "4、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)" ], "Update": [ + "V1.5.2:", + "※1、支持安装和构建带 Root 的 UEngine 的镜像", + "2、更新了反馈链接", + "", "V1.5.1:", "※1、精简用户界面,合并安装和卸载输入框和浏览按钮等", "※2、修复安装以其的程序图标无法点击进入的问题(deepin 社区版不存在此问题)", diff --git a/main.py b/main.py index 71d5bc1..3b5bc03 100755 --- a/main.py +++ b/main.py @@ -309,6 +309,18 @@ def GetApkPackageName(apkFilePath: "apk 所在路径")->"获取 apk 包名": line = line.replace(" ", "") return line +def InstallRootUengineImage(): + if not os.path.exists: + os.mkdir("/tmp/uengine-runner") + write_txt("/tmp/uengine-runner/install.sh", "sudo dpkg -i /tmp/uengine-runner/u*.deb\nsudo apt install -f") + threading.Thread(target=os.system, args=["deepin-terminal -C \"wget -P '/tmp/uengine-runner' 'https://hub.fastgit.org/gfdgd-xi/uengine-runner/releases/download/U1.1.14/uengine-android-image_1.1.14_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'\""]).start() + +def BuildRootUengineImage(): + threading.Thread(target=os.system, args=["deepin-terminal -C \"bash '{}'\"".format(programPath + "/root-uengine.sh")]).start() + +def ReinstallUengineImage(): + threading.Thread(target=os.system, args=["deepin-terminal -e ''pkexec apt reinstall uengine-android-image"]).start() + # 生成 uengine 启动文件到桌面 def BuildUengineDesktop(packageName: "软件包名", activityName: "activity", showName: "显示名称", iconPath: "程序图标所在目录", savePath:".desktop 文件保存路径")->"生成 uengine 启动文件到桌面": things = '''[Desktop Entry] @@ -1136,6 +1148,7 @@ uengineInternet = tk.Menu(uengine, tearoff=0, background="white") uengineIcon = tk.Menu(uengine, tearoff=0, background="white") uengineUseAdb = tk.Menu(uengine, tearoff=0, background="white") uengineData = tk.Menu(uengine, tearoff=0, background="white") +uengineRoot = tk.Menu(uengine, tearoff=0, background="white") menu.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Name"], menu=programmenu) menu.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Name"], menu=adb) @@ -1174,6 +1187,7 @@ uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu" uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Name"], menu=uengineData) uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9], command=DelUengineCheck) uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][10], command=ReinstallUengine) +uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"], menu=uengineRoot) help.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][0], command=OpenProgramURL) # 设置“程序官网”项 help.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][2], command=UengineRunnerBugUpload) # 设置“程序官网”项 @@ -1206,6 +1220,11 @@ uengineData.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["M uengineData.add_separator() uengineData.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][2], command=BackUengineClean) +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][0], command=InstallRootUengineImage) +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][1], command=BuildRootUengineImage) +uengineRoot.add_separator() +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][2], command=ReinstallUengineImage) + menu.configure(activebackground="dodgerblue") help.configure(activebackground="dodgerblue") adb.configure(activebackground="dodgerblue") diff --git a/new-deb-build/DEBIAN/control b/new-deb-build/DEBIAN/control index 17d11ff..16fb3ec 100644 --- a/new-deb-build/DEBIAN/control +++ b/new-deb-build/DEBIAN/control @@ -1,6 +1,6 @@ Package: com.gitee.uengine.runner.spark Source: com.gitee.uengine.runner.spark -Version: 1.5.1 +Version: 1.5.2 Architecture: all Maintainer: gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com> Depends: deepin-elf-verify (>= 0.0.16.7-1), python3, python3-tk, python3-pip, aapt, uengine, python3-setuptools, deepin-terminal, curl, python3-pil, python3-pil.imagetk, python3-requests, adb, translate-shell, python3-xlib diff --git a/new-deb-build/DEBIAN/postinst b/new-deb-build/DEBIAN/postinst index 73c67df..87a9f1f 100755 --- a/new-deb-build/DEBIAN/postinst +++ b/new-deb-build/DEBIAN/postinst @@ -15,7 +15,8 @@ ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-keyboard ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-useadb /usr/bin/uengine-useadb ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-launch.sh /usr/bin/uengine-runner-launch.sh ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-update-bug /usr/bin/uengine-runner-update-bug +ln -s /opt/apps/com.gitee.uengine.runner.spark/files/root-uengine /usr/bin/uengine-root # 刷新图标缓存 #gtk-update-icon-cache /usr/share/icons/bloom # 向服务器返回安装数加1(不显示内容且忽略错误) -curl http://gfdgdxi.qicp.vip/uengine/Install.php -s > /dev/null | true \ No newline at end of file +curl http://120.25.153.144/uengine-runner/Install.php?Version=1.5.2 -s > /dev/null | true \ No newline at end of file diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Language.json b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Language.json index 60aa763..16129a4 100644 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Language.json +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Language.json @@ -96,7 +96,15 @@ "UEngine 键盘映射", "UEngine 检测 CPU 是否支持运行", "删除 UEngine 运行检查", - "重新安装 UEngine" + "重新安装 UEngine", + { + "Name": "获取 UEngine 最高权限", + "Menu": [ + "安装已经制作好的 UEngine 带最高权限的镜像", + "构建 UEngine 带最高权限的镜像到用户主目录", + "安装默认的 UEngine 镜像" + ] + } ] }, { @@ -222,7 +230,15 @@ "UEngine Keyboard", "UEngine Check CPU Can Or Can't Run", "Delete UEngine Runing Checking", - "Reinstall UEngine" + "Reinstall UEngine", + { + "Name": "Get UEngine Root User", + "Menu": [ + "Install UEngine Image With Root User", + "Build An UEngine Image With Root User In Your Home Path", + "Install Defult UEngine Image" + ] + } ] }, { diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/UengineAndroidProgramList.desktop b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/UengineAndroidProgramList.desktop index 110309e..8ff8e7a 100755 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/UengineAndroidProgramList.desktop +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/UengineAndroidProgramList.desktop @@ -2,7 +2,7 @@ Categories=System; Comment=UEngine 程序菜单 Encoding=UTF-8 -Exec=/usr/bin/uengine launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity +Exec=/usr/bin/uengine launch.sh --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity Icon=/opt/apps/uengine-runner/icon.png MimeType= Name=UEngine 程序菜单 diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json index 19a922a..b79fa29 100755 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json @@ -3,7 +3,7 @@ "https://gitee.com/gfdgd-xi/uengine-runner", "https://github.com/gfdgd-xi/uengine-runner" ], - "Version": "1.5.1", + "Version": "1.5.2", "System": "Linux(deepin/UOS)", "Tips": [ "更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis", @@ -26,6 +26,10 @@ "4、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)" ], "Update": [ + "V1.5.2:", + "※1、支持安装和构建带 Root 的 UEngine 的镜像", + "2、更新了反馈链接", + "", "V1.5.1:", "※1、精简用户界面,合并安装和卸载输入框和浏览按钮等", "※2、修复安装以其的程序图标无法点击进入的问题(deepin 社区版不存在此问题)", diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/root-uengine.sh b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/root-uengine.sh new file mode 100755 index 0000000..896b42d --- /dev/null +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/root-uengine.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +#sudo apt install squashfs-tools + +mkdir -p ~/temp +cd ~/temp +echo "正在下载supersu" +wget -P ~/temp http://supersuroot.org/downloads/SuperSU-v2.82-201705271822.zip +cd .. +mkdir -p ~/temp/work/dabao/extract/DEBIAN +echo "正在解压supersu" +unzip ~/temp/SuperSU-v2.82-201705271822.zip -d ~/temp/work/su +WORKDIR=~/temp/work +cd "$WORKDIR" +echo "正在下载uengine-android-image" +apt download uengine-android-image +echo "正在解压uengine-android-image" +cd dabao +dpkg-deb -x $WORKDIR/uengine-android-image*.deb extract/ +dpkg-deb -e $WORKDIR/uengine-android-image*.deb extract/DEBIAN +cd .. +cp dabao/extract/usr/share/uengine/android.img android.img + +echo "正在解压android镜像" +sudo unsquashfs android.img + +sudo mkdir -p ./squashfs-root/system/app/SuperSU +sudo mkdir -p ./squashfs-root/system/bin/.ext/ + +echo "正在将supersu安装到android镜像" +sudo cp ./su/common/Superuser.apk ./squashfs-root/system/app/SuperSU/SuperSU.apk +sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/etc/install-recovery.sh +sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/bin/install-recovery.sh +sudo cp ./su/x64/su ./squashfs-root/system/xbin/su +sudo cp ./su/x64/su ./squashfs-root/system/bin/.ext/.su +sudo cp ./su/x64/su ./squashfs-root/system/xbin/daemonsu +sudo cp ./su/x64/supolicy ./squashfs-root/system/xbin/supolicy +sudo cp ./su/x64/libsupol.so ./squashfs-root/system/lib64/libsupol.so +sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process_init +sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process64_original +sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process +sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process64 + +sudo chmod +x ./squashfs-root/system/app/SuperSU/SuperSU.apk +sudo chmod +x ./squashfs-root/system/etc/install-recovery.sh +sudo chmod +x ./squashfs-root/system/bin/install-recovery.sh +sudo chmod +x ./squashfs-root/system/xbin/su +sudo chmod +x ./squashfs-root/system/bin/.ext/.su +sudo chmod +x ./squashfs-root/system/xbin/daemonsu +sudo chmod +x ./squashfs-root/system/xbin/supolicy +sudo chmod +x ./squashfs-root/system/lib64/libsupol.so +sudo chmod +x ./squashfs-root/system/bin/app_process_init +sudo chmod +x ./squashfs-root/system/bin/app_process64_original +sudo chmod +x ./squashfs-root/system/bin/app_process +sudo chmod +x ./squashfs-root/system/bin/app_process64 + +echo "正在打包android镜像" +sudo rm android.img +sudo mksquashfs squashfs-root android.img -b 131072 -comp xz -Xbcj ia64 + + +cp android.img dabao/extract/usr/share/uengine/android.img + +echo "正在打包uengine-android-image" +cd dabao/extract +find usr -type f -print0 |xargs -0 md5sum >md5sums +cd .. +mkdir build +dpkg-deb -b extract/ build/ + +cp build/*.deb ~/ + +echo "正在清理垃圾" +sudo rm -rf ~/temp + +echo "已在用户主目录生成新的安装包,安装后重启即可生效" \ No newline at end of file diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder index fbbf991..c8a0a87 100755 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder @@ -2,8 +2,8 @@ # 使用系统默认的 python3 运行 ########################################################################################### # 作者:gfdgd xi -# 版本:1.4.2 -# 更新时间:2021年8月30日 +# 版本:1.5.1 +# 更新时间:2021年10月06日 # 感谢:anbox、deepin 和 统信 # 基于 Python3 的 tkinter 构建 ########################################################################################### @@ -435,7 +435,7 @@ if len(sys.argv) > 1: # 设置窗口 style = ttkthemes.ThemedStyle(win) style.set_theme("breeze") -win.attributes('-alpha', 0.5) +#win.attributes('-alpha', 0.5) win.title(title) win.resizable(0, 0) win.iconphoto(False, tk.PhotoImage(file=iconPath)) diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner index 9e5dc55..3b5bc03 100755 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner @@ -75,7 +75,6 @@ def ButtonClick8(): threading.Thread(target=UninstallProgram, args=[path]).start() # 浏览窗口 -# temp strs temppath="" def FindApk()->"浏览窗口": path = filedialog.askopenfilename(title="选择 Apk", filetypes=[("APK 文件", "*.apk"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApk.json"))["path"]) @@ -170,26 +169,6 @@ def Button5Click(): def OpenUengineProgramList()->"打开“uengine 所有程序列表”": os.system("uengine launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity") -# 显示“关于这个程序”窗口 -#def about_this_program()->"显示“关于这个程序”窗口": -# global about -# global title -# global iconPath -# mess = tk.Toplevel() -# message = ttk.Frame(mess) -# mess.resizable(0, 0) -# mess.title("关于 {}".format(title)) -# #mess.iconphoto(False, tk.PhotoImage(file=iconPath)) -# img = ImageTk.PhotoImage(Image.open(iconPath)) -# LabApkPath = ttk.Label(message, image=img) -# label2 = ttk.Label(message, text=about) -# button1 = ttk.Button(message, text="确定", command=mess.withdraw) -# LabApkPath.pack() -# label2.pack() -# button1.pack(side="bottom") -# message.pack() -# mess.mainloop() - # 显示“提示”窗口 def helps()->"显示“提示”窗口": global tips @@ -330,6 +309,18 @@ def GetApkPackageName(apkFilePath: "apk 所在路径")->"获取 apk 包名": line = line.replace(" ", "") return line +def InstallRootUengineImage(): + if not os.path.exists: + os.mkdir("/tmp/uengine-runner") + write_txt("/tmp/uengine-runner/install.sh", "sudo dpkg -i /tmp/uengine-runner/u*.deb\nsudo apt install -f") + threading.Thread(target=os.system, args=["deepin-terminal -C \"wget -P '/tmp/uengine-runner' 'https://hub.fastgit.org/gfdgd-xi/uengine-runner/releases/download/U1.1.14/uengine-android-image_1.1.14_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'\""]).start() + +def BuildRootUengineImage(): + threading.Thread(target=os.system, args=["deepin-terminal -C \"bash '{}'\"".format(programPath + "/root-uengine.sh")]).start() + +def ReinstallUengineImage(): + threading.Thread(target=os.system, args=["deepin-terminal -e ''pkexec apt reinstall uengine-android-image"]).start() + # 生成 uengine 启动文件到桌面 def BuildUengineDesktop(packageName: "软件包名", activityName: "activity", showName: "显示名称", iconPath: "程序图标所在目录", savePath:".desktop 文件保存路径")->"生成 uengine 启动文件到桌面": things = '''[Desktop Entry] @@ -520,10 +511,6 @@ def SaveInstallUengineApp(): def UengineCheckCpu(): english = GetCommandReturn("uengine check-features") - #chinese = GetCommandReturn("trans -b \"{}\"".format(english)) # 获取中文翻译 - #for i in chinese.split("\n"): # 删除提示 - # if "Did you mean:" in i: - # chinese = chinese.replace(i, "").replace("\n", "") messagebox.showinfo(title="提示", message="{}".format(english)) # 获取用户主目录 @@ -1161,6 +1148,7 @@ uengineInternet = tk.Menu(uengine, tearoff=0, background="white") uengineIcon = tk.Menu(uengine, tearoff=0, background="white") uengineUseAdb = tk.Menu(uengine, tearoff=0, background="white") uengineData = tk.Menu(uengine, tearoff=0, background="white") +uengineRoot = tk.Menu(uengine, tearoff=0, background="white") menu.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Name"], menu=programmenu) menu.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Name"], menu=adb) @@ -1199,6 +1187,7 @@ uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu" uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Name"], menu=uengineData) uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9], command=DelUengineCheck) uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][10], command=ReinstallUengine) +uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"], menu=uengineRoot) help.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][0], command=OpenProgramURL) # 设置“程序官网”项 help.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][2], command=UengineRunnerBugUpload) # 设置“程序官网”项 @@ -1231,6 +1220,11 @@ uengineData.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["M uengineData.add_separator() uengineData.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][2], command=BackUengineClean) +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][0], command=InstallRootUengineImage) +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][1], command=BuildRootUengineImage) +uengineRoot.add_separator() +uengineRoot.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Menu"][2], command=ReinstallUengineImage) + menu.configure(activebackground="dodgerblue") help.configure(activebackground="dodgerblue") adb.configure(activebackground="dodgerblue") @@ -1270,11 +1264,6 @@ FrmInstall.grid(row=0, column=1,padx=3, rowspan=3) BtnFindApk.grid(row=0, column=0) BtnInstall.grid(row=0, column=1) -#LabUninstallPath.grid(row=4, column=0,sticky= tk.W,padx=3) -#ComboUninstallPath.grid(row=5, column=0,padx=3) - -#FrmUninstall.grid(row=5, column=1,padx=3) -#BtnUninstallApkBrowser.grid(row=0, column=0) BtnUninstall.grid(row=1, column=0) BtnShowUengineApp.grid(row=2, column=0,sticky= tk.W,padx=3,pady=2) diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-update-bug b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-update-bug index 9c6b1af..cf73314 100755 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-update-bug +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-update-bug @@ -28,7 +28,7 @@ def Update(name, stars, contact, things, version): "Version": version } try: - messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vZ2ZkZ2R4aS5xaWNwLnZpcC91ZW5naW5lL2J1Zy91cGxvYWQucGhw").decode("utf-8")), data=data).text) + messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vMTIwLjI1LjE1My4xNDQvdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text) except: traceback.print_exc() messagebox.showerror(title="错误", message="服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{}".format(traceback.format_exc())) diff --git a/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.bash.policy b/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.bash.policy new file mode 100644 index 0000000..963366d --- /dev/null +++ b/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.bash.policy @@ -0,0 +1,21 @@ + + + + gfdgd xi + https://gitee.com/gfdgd-xi/uengine-runner/ + + Authentication is required to Run Shell + 运行脚本需要输入密码 + preferences-system + + no + no + auth_admin_keep + + /usr/bin/bash + true + + + \ No newline at end of file diff --git a/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-bridge.policy b/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-bridge.policy index b5ff17a..7c0ca86 100644 --- a/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-bridge.policy +++ b/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-bridge.policy @@ -8,7 +8,7 @@ Authentication is required to Setting UEngine Internet Bridge 设置 UEngine 桥接需要输入密码 - uengine + kbox no no diff --git a/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-session-launch-helper.policy b/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-session-launch-helper.policy index 9f61433..70d8f15 100644 --- a/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-session-launch-helper.policy +++ b/new-deb-build/usr/share/polkit-1/actions/com.deepin.pkexec.uengine-session-launch-helper.policy @@ -8,7 +8,7 @@ Authentication is required to Change UEngine 设置 UEngine 需要输入密码 - uengine + kbox no no diff --git a/pkexec/com.deepin.pkexec.bash.policy b/pkexec/com.deepin.pkexec.bash.policy new file mode 100644 index 0000000..963366d --- /dev/null +++ b/pkexec/com.deepin.pkexec.bash.policy @@ -0,0 +1,21 @@ + + + + gfdgd xi + https://gitee.com/gfdgd-xi/uengine-runner/ + + Authentication is required to Run Shell + 运行脚本需要输入密码 + preferences-system + + no + no + auth_admin_keep + + /usr/bin/bash + true + + + \ No newline at end of file diff --git a/root-uengine.sh b/root-uengine.sh new file mode 100755 index 0000000..896b42d --- /dev/null +++ b/root-uengine.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +#sudo apt install squashfs-tools + +mkdir -p ~/temp +cd ~/temp +echo "正在下载supersu" +wget -P ~/temp http://supersuroot.org/downloads/SuperSU-v2.82-201705271822.zip +cd .. +mkdir -p ~/temp/work/dabao/extract/DEBIAN +echo "正在解压supersu" +unzip ~/temp/SuperSU-v2.82-201705271822.zip -d ~/temp/work/su +WORKDIR=~/temp/work +cd "$WORKDIR" +echo "正在下载uengine-android-image" +apt download uengine-android-image +echo "正在解压uengine-android-image" +cd dabao +dpkg-deb -x $WORKDIR/uengine-android-image*.deb extract/ +dpkg-deb -e $WORKDIR/uengine-android-image*.deb extract/DEBIAN +cd .. +cp dabao/extract/usr/share/uengine/android.img android.img + +echo "正在解压android镜像" +sudo unsquashfs android.img + +sudo mkdir -p ./squashfs-root/system/app/SuperSU +sudo mkdir -p ./squashfs-root/system/bin/.ext/ + +echo "正在将supersu安装到android镜像" +sudo cp ./su/common/Superuser.apk ./squashfs-root/system/app/SuperSU/SuperSU.apk +sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/etc/install-recovery.sh +sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/bin/install-recovery.sh +sudo cp ./su/x64/su ./squashfs-root/system/xbin/su +sudo cp ./su/x64/su ./squashfs-root/system/bin/.ext/.su +sudo cp ./su/x64/su ./squashfs-root/system/xbin/daemonsu +sudo cp ./su/x64/supolicy ./squashfs-root/system/xbin/supolicy +sudo cp ./su/x64/libsupol.so ./squashfs-root/system/lib64/libsupol.so +sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process_init +sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process64_original +sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process +sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process64 + +sudo chmod +x ./squashfs-root/system/app/SuperSU/SuperSU.apk +sudo chmod +x ./squashfs-root/system/etc/install-recovery.sh +sudo chmod +x ./squashfs-root/system/bin/install-recovery.sh +sudo chmod +x ./squashfs-root/system/xbin/su +sudo chmod +x ./squashfs-root/system/bin/.ext/.su +sudo chmod +x ./squashfs-root/system/xbin/daemonsu +sudo chmod +x ./squashfs-root/system/xbin/supolicy +sudo chmod +x ./squashfs-root/system/lib64/libsupol.so +sudo chmod +x ./squashfs-root/system/bin/app_process_init +sudo chmod +x ./squashfs-root/system/bin/app_process64_original +sudo chmod +x ./squashfs-root/system/bin/app_process +sudo chmod +x ./squashfs-root/system/bin/app_process64 + +echo "正在打包android镜像" +sudo rm android.img +sudo mksquashfs squashfs-root android.img -b 131072 -comp xz -Xbcj ia64 + + +cp android.img dabao/extract/usr/share/uengine/android.img + +echo "正在打包uengine-android-image" +cd dabao/extract +find usr -type f -print0 |xargs -0 md5sum >md5sums +cd .. +mkdir build +dpkg-deb -b extract/ build/ + +cp build/*.deb ~/ + +echo "正在清理垃圾" +sudo rm -rf ~/temp + +echo "已在用户主目录生成新的安装包,安装后重启即可生效" \ No newline at end of file diff --git a/spark-uengine-runner.deb b/spark-uengine-runner.deb index c12c3cf..954da31 100755 Binary files a/spark-uengine-runner.deb and b/spark-uengine-runner.deb differ diff --git a/uengine-runner-update-bug b/uengine-runner-update-bug index 9c6b1af..cf73314 100755 --- a/uengine-runner-update-bug +++ b/uengine-runner-update-bug @@ -28,7 +28,7 @@ def Update(name, stars, contact, things, version): "Version": version } try: - messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vZ2ZkZ2R4aS5xaWNwLnZpcC91ZW5naW5lL2J1Zy91cGxvYWQucGhw").decode("utf-8")), data=data).text) + messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vMTIwLjI1LjE1My4xNDQvdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text) except: traceback.print_exc() messagebox.showerror(title="错误", message="服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{}".format(traceback.format_exc()))