Skip to content

Conversation

ShirkNeko
Copy link
Contributor

@ShirkNeko ShirkNeko commented Sep 15, 2025

  • 获取活跃用户UserID列表
  • 通过 /data/user_de/{userid}/[package] 解析对应用户应用的UID
  • 弃用通过不稳定的 packages.list 获取

ShirkNeko and others added 9 commits September 12, 2025 04:14
…[app] directory

Prioritize retrieving the application UID from /data/user_de. If this fails, fall back to retrieving it from packages.list.

Fix unstable application UID acquisition

Signed-off-by: ShirkNeko <[email protected]>
Enhance scan support for active users in /data/user_de

Signed-off-by: ShirkNeko <[email protected]>
- Remove the deprecated USER_DATA_LEGACY_BASE_PATH path

-Increase the size of USER_DATA_PATH_LEN to 384
@ShirkNeko ShirkNeko changed the title 内核:通过解析 /data/user_de/ 中的 UID 来添加真实的 UID Kernel: Add the actual UID by parsing the UID in /data/user_de/ Sep 15, 2025
@ShirkNeko
Copy link
Contributor Author

ShirkNeko commented Sep 15, 2025

提交 efb0c44 以后,为多用户扫描添加可选开关

  • 默认始终只扫描主用户的应用UID
  • 在管理器设置中添加 扫描所有用户 开关(默认为关闭)
  • 打开 扫描所有用户开关 将扫描 /data/user_de 以获取所有用户并扫描所有多用户应用 UID

@aviraxp
Copy link
Collaborator

aviraxp commented Sep 15, 2025

建议不添加开关,刚看了下,全部扫一个用户的所有应用其实几十毫秒就能完成,没必要增加复杂性

@ShirkNeko
Copy link
Contributor Author

建议不添加开关,刚看了下,全部扫一个用户的所有应用其实几十毫秒就能完成,没必要增加复杂性

看术哥怎么说吧,对于内核来说确实越小的开销越好

@tiann
Copy link
Owner

tiann commented Sep 16, 2025

我也不建议加开关。之前 comment 里面的 Optional 指的是对开发者而言的,如果想做可以加上,不想做就不做;并非把这个选择权给用户,用户看到这个开关可能会很懵逼。

@ShirkNeko
Copy link
Contributor Author

我也不建议加开关。之前 comment 里面的 Optional 指的是对开发者而言的,如果想做可以加上,不想做就不做;并非把这个选择权给用户,用户看到这个开关可能会很懵逼。

好的

- Use a cached buffer as an array-based stack to avoid panics caused by overly deep traversal.

  INTCAM: no information
       TPU: no information
       TNR: no information
       MFC: no information
        BO: no information
[   4.715484] [I] [DSS] Last AVB: avb_ret=ERROR_VERIFICATION
[   4.715890] [I] [DSS] Last AVB: avb_veritymode=enforcing
[   4.716289] [I] [DSS] Last AVB: avb_error_parts=boot
[   4.717085] [I] [LNXDBG] build info set by kernel
RAMDUMP_MSG.txt:
  reset message: KP: kernel stack overflow
  UUID: e2faff80-83ea-c240-ac75-d7b8a528c892
  last kernel version: 6.1.134-android14-11-g23e556daebf3-ab13800907
  aosp kernel version: 6.1.145-android14-11-g8d713f9e8e7b-ab13202960
  build: google/shiba/shiba:16/BP3A.250905.014/13873947:user/release-keys
  RST_STAT: 0x1 - CLUSTER0_NONCPU_WDTRESET
  GSA_RESET_STATUS: 0x0 -
  Reboot reason: 0xbaba - Kernel PANIC
  Reboot mode: 0x0 - Normal Boot
[   4.719030] [I] [DSS] -------------------- DSS LOGS END --------------------

Reboot Info:
  RST_STAT: 0x180000 - PIN_RESET | PO_RESET
  GSA_RESET_STATUS: 0x0 -
  Reboot reason: 0xbaba - Kernel PANIC
  Reboot mode: 0x0 - Normal Boot

Signed-off-by: ShirkNeko <[email protected]>
`[   23.379244][ T5074] ufshcd-qcom 1d84000.ufshc: ............. ufs dump complete ..........
[   23.379263][ T5074] dump-reason-buffer-size: 256
[   23.379267][ T5074] dump-reason-pidbuffer:PID: 5074, Process Name: throne_tracker
[   23.379295][ T5074] qcom_q6v5_pas a3380000.remoteproc-soccp: waking SOCCP from panic path
[   23.379455][ T5074] CPU0 next event is 23368000000
[   23.379456][ T5074] CP.rkp_only' to 'true' in property file '/odm/build.prop': SELinux permission check failed
[    1.248057][    T1] init: Do not have permissions to set 'ro.oplus.nfc.support.tee' to 'true' in pro   23.379459][ T5074] CPU5 next event is 23368000000
[   23.3794   1.248059][    T1] init: Do not have permissions to set 'ro.oplus.eid.enable.state' to '1' in property file '/odm/build.prop':l-3d0: snapshot: device is powered off
[   23.589323][ T5074] Kernel Offset: 0x1738a00000 from 0xffffffc080000000
[   23.589325][ T5074] PHYS_OFFSET: 0x80000000
[   23.589326][ T5074] CPU features: 0x000000,00000000,70024f43,95fffea7
[   23.589328][ T5074] Memory Limit: none
[   23.589490][ T5074] mhi mhi_110e_00.01.00: [E][mhi_debug_reg_dump] host pm_state:M2 dev_state:M2 ee:MISSION MODE
[   23.589505][ T5074] mhi mhi_110e_00.01.00: [E][mhi_debug_reg_dump] device ee: MISSION MODE dev_state: M2`

Signed-off-by: ShirkNeko <[email protected]>
@ShirkNeko
Copy link
Contributor Author

我觉得直接在内核中直接遍历/data是否会导致部分机型在解析时如果遇到了加密或挂载状态有概率会导致内核死锁

@ShirkNeko
Copy link
Contributor Author

因为它是一个动态目录,而不是像packages.list一样是一个静态文件

backslashxx added a commit to ximi-mojito-test/mojito_krenol that referenced this pull request Sep 16, 2025
move to always kthreaded and mitigate sporadic deadlocks on

ref
tiann/KernelSU#2757
tiann/KernelSU#2759
@ShirkNeko
Copy link
Contributor Author

ShirkNeko commented Sep 16, 2025

@aviraxp
Copy link
Collaborator

aviraxp commented Sep 17, 2025

这些fs magic是怎么选的

@tiann
Copy link
Owner

tiann commented Sep 17, 2025

如果在 work queue 中处理会有一个问题:用户装完了管理器然后立即打开,如果此时 scan 还没结束,会显示“未安装”;因此之前都是阻塞处理的。

@tiann
Copy link
Owner

tiann commented Sep 17, 2025

我觉得直接在内核中直接遍历/data是否会导致部分机型在解析时如果遇到了加密或挂载状态有概率会导致内核死锁

我们在选定管理器的时候,已经扫描了 /data/app/xxx/xxx/*.apk,所以不用担心这个问题。目前我们只有在 packages.list 发生变化时出触发,此时文件系统的状态已经准备好了。

@ShirkNeko
Copy link
Contributor Author

ShirkNeko commented Sep 17, 2025

我觉得直接在内核中直接遍历/data是否会导致部分机型在解析时如果遇到了加密或挂载状态有概率会导致内核死锁

我们在选定管理器的时候,已经扫描了 /data/app/xxx/xxx/*.apk,所以不用担心这个问题。目前我们只有在 packages.list 发生变化时出触发,此时文件系统的状态已经准备好了。

有偶发性的概率,但是不高,会无缘无故突然在安装任意apk的过程中直接卡死

backslashxx added a commit to ximi-mojito-test/mojito_krenol that referenced this pull request Sep 18, 2025
tiann/KernelSU#2759
also remove the prune thing, we can afford that since we are kthreaded
backslashxx added a commit to ximi-mojito-test/mojito_krenol that referenced this pull request Sep 18, 2025
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

Successfully merging this pull request may close these issues.

3 participants