Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义manger 是否支持使用系统签名文件 #1304

Closed
2 of 3 tasks
bgaojin opened this issue Jan 20, 2024 · 9 comments
Closed
2 of 3 tasks

自定义manger 是否支持使用系统签名文件 #1304

bgaojin opened this issue Jan 20, 2024 · 9 comments

Comments

@bgaojin
Copy link

bgaojin commented Jan 20, 2024

Please check before submitting an issue

  • I have searched the issues and haven't found anything relevant
  • I will upload bugreport file in KernelSU Manager - Settings - Report log
  • I know how to reproduce the issue which may not be specific to my device

Describe the bug

1.修改KSU_EXPECTED_HASH KSU_EXPECTED_SIZE ,普通签名文件,自己编译manger可以使用
1.修改KSU_EXPECTED_HASH KSU_EXPECTED_SIZE 系统签名文件编译manger不可以使用,adb install 安装自定义manger后,app无法启动,系统崩溃卡死重启。 通过./keytool-importkeypair -k xxx.jks -p pwd123 -pk8 platform.pk8 -cert platform.x509.pem -alias xxx 生成的签名文件

请问是否支持系统签名的 manger

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

Logs

无法打开自定义manger 获取不到日志

Device info

  • Device: xiaomi6
  • OS Version: lineageos20
  • KernelSU Version: 0.7.0
  • Kernel Version:Linux localhost 4.4.302-perf+

Additional context

No response

@tiann
Copy link
Owner

tiann commented Jan 22, 2024

使用 ksud debug get-sign <你的 APK> 然后把结果发出来看下,可能是 sign size 太小了

@Bot-wxt1221
Copy link
Contributor

sign size 不能大于1024字节,更大的要去内核里改 @bgaojin

@bgaojin
Copy link
Author

bgaojin commented Jan 24, 2024

0x4ac, hash: c8a2e9bccf597c2fb6dc66bee293fc13f2fc47ec77bc6b2b0d52c11f51192ab8 大小转十进制以后是1196 我看看是不是最大1024限制问题 @wxt1221 @tiann

@Bot-wxt1221
Copy link
Contributor

0x4ac, hash: c8a2e9bccf597c2fb6dc66bee293fc13f2fc47ec77bc6b2b0d52c11f51192ab8 大小转十进制以后是1196 我看看是不是最大1024限制问题 @wxt1221 @tiann

Y

@bgaojin
Copy link
Author

bgaojin commented Jan 24, 2024

问题解决了,修改apk_sign.c 文件CERT_MAX_LENGTH 长度 @tiann @wxt1221
66843846-ecc6-4999-8414-e8a8325cd23f

@bgaojin
Copy link
Author

bgaojin commented Jan 25, 2024

遇到了个奇怪问题 ,突然不好用了 ,app 能正常打开,Natives.becomeManager 返回true, setAppProfile返回值也是true 但实际上app没有给到权限,getAppProfile 返回的allowSu 也是true, 打开manger 模块界面 提示 内核不支持 overlayfs,模块功能无法运 作!
类似这个问题, #502 。但是我使用默认的manger 可以使用,
KernelSU_bugreport_2024-01-24_23_57.tar.gz

@bgaojin
Copy link
Author

bgaojin commented Jan 25, 2024

dmesg.txt

@bgaojin
Copy link
Author

bgaojin commented Jan 25, 2024

KernelSU: renameat: packages.list.tmp -> packages.list, new path: /system/packages.list
logd: start watching /data/system/packages.list ...
logd: ReadPackageList, total packages: 170
KernelSU: set root profile, key: bin.mt.plus, uid: 10163, gid: 0, context: u:r:su:s0
KernelSU: save_allow_list create file failed: -2

发现了这个

@tiann
Copy link
Owner

tiann commented Jan 25, 2024

#943 (comment)

kernel 无法访问 /data/adb/,参考一下上面的链接修复。

@tiann tiann closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants