KernelSU icon indicating copy to clipboard operation
KernelSU copied to clipboard

OnePlus: After a system update, root authorization for some apps may be revoked.

Open Marukon opened this issue 1 year ago • 23 comments

Please check before submitting an issue

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

Describe the bug

On the OnePlus 12, after installing KernelSU in GKI mode, a system update randomly revokes root permissions for some apps (e.g., out of 10 apps granted root access, only 2 or 3 may retain access after an OTA update and reboot). Additionally, the list of uninstalled modules may occasionally reset to default. According to feedback from the KernelSU community, this issue also occur on the OnePlus 13. 一加12手机,通过GKI模式安装了KernelSU,当系统更新后,一部分应用的ROOT权限会被随机撤销(例如,授权了10个app,OTA更新重启后就剩下两三个),有时卸载模块的名单也会随机恢复默认。一加13同样存在此问题。

To Reproduce

    1. After detecting a system update, download and install the update.
    1. Go to KernelSU and install it on the other slot.
    1. Return to the system update app and restart the phone.
    1. After the system restarts, check the KernelSU authorization list.-

Expected behavior

all authorized app settings and uninstalled module configurations are preserved.

Screenshots

No Screenshot.

Logs

KernelSU_bugreport_2025-01-09_08_15.tar.gz

Device info

  • Device: Oneplus 12
  • OS Version: Coloros 15(It also occurred with ColorOS 14.)
  • KernelSU Version: 12009(It has existed ever since GKI installation was supported.)
  • Kernel Version: 6.1.75-android14-11-o-g1132d864665d

Additional context

No response

Marukon avatar Jan 10 '25 04:01 Marukon

谁说一加13不存在此问题的,一加13也是这个问题

popokcn avatar Jan 15 '25 08:01 popokcn

谁说一加13不存在此问题的,一加13也是这个问题

不好意思,抓个日志吧,我也是在群里看见的。

Marukon avatar Jan 16 '25 00:01 Marukon

Oneplus 11R (Ace 2) ColorOS14 经实际使用长期存在这个问题,在下一次更新是我会尝试抓取日志

Sunakier avatar Jan 24 '25 02:01 Sunakier

一加ace3v同样存在这个问题,长期受此困扰,几乎每次都是如此,不仅 App的root授权会撤销恢复默认,APP profile也会恢复默认状态

顺带提一点,超级用户的授权应用列表做得很差,给某个应用授权然后返回无法记住原来的位置只能从头往下滑,授权过的应用也无法实时刷新状态,只能手动右上角刷新一下

以上2点配合 root授权会恢复默认,每次ota都有十几二十个需要授权的,简直是灾难级别的授权体验

wavetg avatar Feb 11 '25 03:02 wavetg

同样的问题,ota后只剩下一个授权,附上日志

KernelSU_bugreport_2025-02-18_16_00.tar.gz

naniccc avatar Feb 18 '25 08:02 naniccc

告诉各位一个解决办法,在data/adb/ksu目录下有一个.allowlist的文件,升级前备份这个文件,升级后复制覆盖这个文件,然后重启就能恢复了,不用再一个一个的勾选(体验真的无比糟糕)

OTA升级后随机丢失授权列表,估计这部分的逻辑有问题

wavetg avatar Feb 28 '25 02:02 wavetg

[   28.241407] KernelSU: Search manager finished
[   28.241420] KernelSU: prune uid: 10374, package: com.farplace.qingzhuo
[   28.241424] KernelSU: prune uid: 10380, package: bin.mt.plus
[   28.241428] KernelSU: prune uid: 10314, package: com.coolapk.market
[   28.241432] KernelSU: prune uid: 10553, package: com.luckyzyx.luckytool
[   28.241548] KernelSU: save allow list, name: com.android.shell uid :2000, allow: 1
[   28.241553] KernelSU: save allow list, name: $ uid :9999, allow: 0
[   28.241556] KernelSU: save allow list, name: io.github.vvb2060.keyattestation uid :10418, allow: 0

开机第一次获取allowlist没问题,在挂钩renameat时处理allowlist,结果如上,不知为何prune掉了几个明明存在的uid

我认为应该彻底重写目前的uid获取方式,通过解析 /data/user_de/[app] 目录的uid获取真实uid,不再依赖不稳定的package.list

aviraxp avatar Mar 01 '25 16:03 aviraxp

普通重启没问题,安装需要重启但不切换槽位的sota也会触发此问题。

Marukon avatar Apr 09 '25 23:04 Marukon

我也遇到了这个问题,ace3pro,更新完后root掉了

Nekopazo avatar Jul 04 '25 20:07 Nekopazo

今日的测试结果:如果升级系统忘记保root更新,系统更新成功后重新进行root,那么root授权列表是不会丢失的。

Marukon avatar Aug 21 '25 00:08 Marukon

+10086

xueshiji avatar Aug 27 '25 08:08 xueshiji

感谢@ShirkNeko,问题已解决

Marukon avatar Sep 12 '25 10:09 Marukon

感谢@ShirkNeko,问题已解决

你已经测试过正确且可用了吗

ShirkNeko avatar Sep 12 '25 10:09 ShirkNeko

感谢@ShirkNeko,问题已解决

你已经测试过正确且可用了吗

报告大佬,一加12,刚才本地更新了全量包,用的13341,测试正常。

Marukon avatar Sep 12 '25 11:09 Marukon

感谢@ShirkNeko,问题已解决

你已经测试过正确且可用了吗

报告大佬,一加12,刚才本地更新了全量包,用的13341,测试正常。

好,能用就行,我只是怕只有我自己小米能用

ShirkNeko avatar Sep 12 '25 11:09 ShirkNeko

感谢@ShirkNeko,问题已解决

你已经测试过正确且可用了吗

报告大佬,一加12,刚才本地更新了全量包,用的13341,测试正常。

好,能用就行,我只是怕只有我自己小米能用

感谢大佬

Marukon avatar Sep 12 '25 11:09 Marukon

那我也试试,等下一个全量包更新看看效果,先谢谢了

popokcn avatar Sep 13 '25 01:09 popokcn

可以观察一下2.0.0是否还有这个问题,现在理论上监控了更多的fs事件

aviraxp avatar Nov 05 '25 06:11 aviraxp

可以观察一下2.0.0是否还有这个问题,现在理论上监控了更多的fs事件

感谢大佬的关注,经过测试最新的版本(我使用的是mksu分支的最新提交dd303545a318c1ca628b5ca0fe53ec740e4d097f)该问题仍然存在,并且复现概率很高,我目前是采用OTA前备份 /data/adb/ksu/.allowlist 文件来尝试恢复授权列表和 APP Profile 状态,经过测试,可以完全恢复,但此前采用此种方法也有过失败的情况,无论恢复.allowlist 文件然后重启多少次都无法复原授权列表

现上传OTA后安装到另一槽位然后重启的两份丢失授权列表日志以及恢复 .allowlist 文件后成功恢复授权列表的日志文件,希望对该问题有所帮助,另外看到此前针对该问题有过PR,但因为一些原因已经关闭,并且该 issue 已经关闭,还是希望之后不要忽视该问题,十分感谢大佬的维护🙏

KernelSU_bugreport_2025-11-06_07_14.tar.gz

KernelSU_bugreport_2025-11-06_07_16.tar.gz

KernelSU_bugreport_2025-11-06_07_19.tar.gz

wavetg avatar Nov 05 '25 23:11 wavetg

请测试https://github.com/tiann/KernelSU/pull/2922

aviraxp avatar Nov 12 '25 13:11 aviraxp

可以观察一下2.0.0是否还有这个问题,现在理论上监控了更多的fs事件

诶,最新构建版本v2.1.1-13-gc6102818还是有这问题,我刚才更新一加13T,更新完成后发现部分app的root权限被重置了,稍后我将上传日志。

callng avatar Nov 13 '25 22:11 callng

请测试#2922

ksu_bugreport.gz

这是我刚刚从ksu打包的日志,不知道有没有帮助?

callng avatar Nov 13 '25 22:11 callng

哦..,抱歉这个 #2922 还没有合并...

callng avatar Nov 13 '25 23:11 callng