wxxsfxyzm 2a00ef96c2 UPSTREAM: manager: improve predictive back animations
This pull request introduces custom screen transition animations to
enhance the overall user experience during navigation.

The key change is the implementation of a custom slide/fade effect for
navigating from main screens (i.e., screens hosted in the bottom
navigation bar) to detail screens. Transitions between the bottom
navigation bar tabs themselves retain a simple, clean cross-fade effect
to ensure a fast and smooth user interaction.

This PR also addresses the root cause of an issue where custom
animations were being overridden by the navigation library's defaults.

During implementation, it was discovered that custom transition
animations defined in the `defaultTransitions` parameter of the
`DestinationsNavHost` in `MainActivity` were not being applied. Instead,
a default fade-in/fade-out animation was always present.

The root cause was traced to the `compose-destinations` KSP (Kotlin
Symbol Processing) code generator. By default, the generator creates a
`NavGraphSpec` (e.g., `RootNavGraph.kt`) that includes its own
`defaultTransitions` property. This property, defined at compile-time
within the generated graph object, has a higher precedence than the
`defaultTransitions` parameter supplied to the `DestinationsNavHost`
composable at runtime.

As a result, our intended custom animations were being ignored and
overridden by the generated default.

To resolve this precedence issue permanently, this PR adopts the
official configuration method recommended by the `compose-destinations`
library.

- The following KSP argument has been added to the
`app/build.gradle.kts` file:

```kotlin
ksp {
    arg("compose-destinations.defaultTransitions", "none")
}
```

- This argument instructs the code generator to omit the
`defaultTransitions` property from the generated `NavGraphSpec`.

- By removing the higher-priority, generated default, the
`defaultTransitions` parameter on `DestinationsNavHost` now functions as
the effective default, allowing our custom animation logic to execute as
intended.

The new animation logic is conditional and defined within
`MainActivity`. It distinguishes between two primary navigation types:

- Main Screen → Detail Screen:

   - Enter: The new detail screen slides in from the right.

   - Exit: The old main screen slides out to the left while fading out.

- Detail Screen → Main Screen (on Pop):

- Pop Enter: The main screen slides back in from the left while fading
in.

   - Pop Exit: The detail screen slides out to the right.

- Between Bottom Navigation Tabs:

- A simple cross-fade (`fadeIn`/`fadeOut`) is maintained for these
transitions to provide a quick and non-disruptive experience when
switching between primary sections of the app.
2025-07-15 09:02:06 +08:00
2024-03-08 10:31:41 +08:00
2024-02-29 20:35:03 +08:00
2022-12-09 22:03:55 +08:00
2023-10-09 22:53:21 +08:00

SukiSU Ultra

简体中文 | English | 日本語 | Türkçe

基于 KernelSU 的安卓设备 root 解决方案

实验性! 使用风险自负!

这是非官方分支,@tiann 有权保留所有权利

但是,我们将会在未来成为一个单独维护的 KSU 分支

如何添加

在内核源码的根目录下执行以下命令:

使用 main 分支 (不支持非 GKI 设备构建) (需要手动集成 susfs)

curl -LSs "https://raw.githubusercontent.com/SukiSU-Ultra/SukiSU-Ultra/main/kernel/setup.sh" | bash -s main

使用支持非 GKI 设备的分支 (需要手动集成 susfs)

curl -LSs "https://raw.githubusercontent.com/SukiSU-Ultra/SukiSU-Ultra/main/kernel/setup.sh" | bash -s nongki

如何集成 susfs

  1. 直接使用 susfs-main 或者其他 susfs-* 分支,不需要再集成 susfs (支持非 GKI 设备构建)

Note

  • 因 SuSFS 版本的变化和不可测问题
  • 本 susfs-main 分支只在完整更新后再合并最新新版本
  • 请随时留意 susfs 分支的变化情况以免导致构建失败以及各种版本导致的不兼容问题
curl -LSs "https://raw.githubusercontent.com/SukiSU-Ultra/SukiSU-Ultra/main/kernel/setup.sh" | bash -s susfs-main

钩子方法

  1. KPROBES 钩子:

    • 用于可加载内核模块 (LKM)
    • GKI 2.0 内核的默认钩子方法
    • 需要 CONFIG_KPROBES=y
  2. 手动钩子:

KPM 支持

  • 我们基于 KernelPatch 去掉了和 KSU 重复的功能,仅保留了 KPM 支持
  • 我们将会引入更多的兼容 APatch 的函数来确保 KPM 功能的完整性

开源地址: https://github.com/ShirkNeko/SukiSU_KernelPatch_patch

KPM 模板地址: https://github.com/udochina/KPM-Build-Anywhere

Note

  1. 需要 CONFIG_KPM=y
  2. 非 GKI 设备还需要 CONFIG_KALLSYMS=yCONFIG_KALLSYMS_ALL=y
  3. 部分内核 4.19 以下源码还需要从 4.19 向后移植头文件 set_memory.h

如何进行系统更新保留 ROOT

  • OTA 后先不要重启,进入管理器刷写/修补内核界面,找到 GKI/non_GKI安装 选择需要刷写的 Anykernel3 内核压缩文件,选择与现在系统运行槽位相反的槽位进行刷写并重启即可保留 GKI 模式更新(暂不支持所有非 GKI 设备使用这种方法,请自行尝试。非 GKI 设备使用 TWRP 刷写是最稳妥的)
  • 或者使用 LKM 模式的安装到未使用的槽位OTA 后)

兼容状态

  • KernelSUv1.0.0 之前版本)正式支持 Android GKI 2.0 设备(内核 5.10+

  • 旧内核4.4+)也兼容,但必须手动构建内核

  • 通过更多的反向移植KernelSU 可以支持 3.x 内核3.4-3.18

  • 目前支持 arm64-v8a armeabi-v7a (bare) 和部分 X86_64

更多链接

如果你需要为管理器提交翻译请前往 https://crowdin.com/project/SukiSU-Ultra

基于 SukiSU 和 susfs 编译的项目

  • 增强 GKI(包括 ZRAM 算法等补丁、KPM、susfs 等)
  • GKI(若增强 GKI boot 失败再尝试这份,这份没有 KPM 等修改,只有 susfs
  • 一加

使用方法

普适的 GKI

全部参考 https://kernelsu.org/zh_CN/guide/installation.html

Note

  1. 适用于如小米、红米、三星等的 GKI 2.0 的设备 (不包含魔改内核的厂商如魅族、一加、真我和 oppo)
  2. 找到更多链接里的 GKI 构建的项目。找到设备内核版本。然后下载下来,用 TWRP 或者内核刷写工具刷入带 AnyKernel3 后缀的压缩包即可。Pixel 请使用不是增强的 GKI。
  3. 一般不带后缀的 .zip 压缩包是未压缩的gz 后缀的为天玑机型所使用的压缩方式

一加

1.找到更多链接里的一加项目进行自行填写,然后云编译构建,最后刷入带 AnyKernel3 后缀的压缩包即可

Note

  • 内核版本只需要填写前两位即可,如 5.105.156.16.6
  • 处理器代号请自行搜索,一般为全英文不带数字的代号
  • 分支和配置文件请自行到一加内核开源地址进行填写

特点

  1. 基于内核的 su 和 root 访问管理
  2. 基于 5ec1cff 的 Magic Mount 的模块系统
  3. App Profile:将 root 权限锁在笼子里
  4. 恢复对非 GKI 2.0 内核的支持
  5. 更多自定义功能
  6. 对 KPM 内核模块的支持
  7. 引入 SuSFS 配置的管理器以及进阶功能

疑难解答

  1. 卸载 KernelSU 管理器设备卡死。→ 卸载包名为 com.sony.playmemories.mobile 的应用。

许可证

爱发电链接

赞助名单

贡献

Description
No description provided
Readme GPL-3.0 60 MiB
Languages
Kotlin 67.1%
C 20%
Rust 11.1%
Shell 0.9%
Makefile 0.4%
Other 0.4%