RikkaApps / Sui

Modern super user interface implementation on Android.
GNU General Public License v3.0
2.39k stars 129 forks source link

在其他终端中运行rish不起作用 #38

Closed DevilDisguise closed 1 year ago

DevilDisguise commented 1 year ago

已按照post-install.example.sh的说明,导出sui.dex/librish.so/rish三个文件到其他终端(例如Termux)的数据目录中,并移动到环境变量中,同时Sui给予授权,但此时运行"rish"仍然不起作用,返回"killed"。

RikkaW commented 1 year ago

看一下 log(直接在 Termux 里运行一下 logcat 应该就有了)

RikkaW commented 1 year ago

dlopen failed: library "librish.so" not found

已按照post-install.example.sh的说明

你这个说法听起来像是自己去复制文件的(

DevilDisguise commented 1 year ago

dlopen failed: library "librish.so" not found

已按照post-install.example.sh的说明

你这个说法听起来像是自己去复制文件的(

不是,执行的脚本,把注释掉的改了改,当然实际执行的操作也就是改rish中的包名、改权限、复制文件。

DevilDisguise commented 1 year ago

dlopen failed: library "librish.so" not found

已按照post-install.example.sh的说明

你这个说法听起来像是自己去复制文件的(

当然最后是手动转移到环境变量目录(/usr/bin,/usr/lib)中的,也试过不转移直接执行"rish",依然报错

RikkaW commented 1 year ago

https://github.com/RikkaApps/Sui/blob/352e70efc0c6d341aeec7b3e76b36a55f4cbacf2/template/magisk_module/rish#L11

DEX="$BASEDIR"/rish.dex ... -Djava.library.path="$BASEDIR" -Djava.class.path="$DEX"

假定了 rish.dex 和 librish.so 是和 rish 放一起的,所以 rish 本身也要连着改。

DevilDisguise commented 1 year ago

发现在国内定制系统(EMUI9.1,Android 9)上,Sui(12.6.3)的rish shell在Termux中不起作用,日志如下: 08-06 18:43:13.165 7085 7085 I appproc : Command=/system/bin/app_process -Djava.class.path=/data/data/com.termux/files/usr/bin/rish.dex -Djava.library.path=/data/data/com.termux/files/usr/bin /system/bin --nice-name=rish rikka.sui.shell.Shell

08-06 18:43:13.221 7085 7085 I rish : The ClassLoaderContext is a special shared library.

08-06 18:43:13.222 7085 7085 I rish : Reinit property: dalvik.vm.checkjni= false

08-06 18:43:13.244 7085 7085 E rish : No implementation found for long android.util.HwEtrace.etrace_get_tls_id_and_new_span_for_caller_native(int) (tried Java_android_util_HwEtrace_etrace_1get_1tls_1id_1and_1new_1span_1for_1caller_1native and Java_android_util_HwEtrace_etrace_1get_1tls_1id_1and_1new_1span_1for_1caller_1native__I)

同时,Shizuku(12.8.1)的rish shell经测试可以正常使用

DevilDisguise commented 1 year ago

@RikkaW

RikkaW commented 1 year ago

https://github.com/RikkaApps/Sui/runs/7721056102 尝试这个构建。