mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 17:55:24 +08:00
Added isEnableHookSharedPreferences in YukiHookAPI.Configs and add SharedPreferences hook in YukiHookBridge
This commit is contained in:
@@ -304,6 +304,26 @@ var isEnableHookModuleStatus: Boolean
|
||||
|
||||
!> 关闭后你将不能再在模块环境中使用 `YukiHookAPI.Status` 中的功能。
|
||||
|
||||
#### isEnableHookSharedPreferences *- field*
|
||||
|
||||
```kotlin
|
||||
var isEnableHookSharedPreferences: Boolean
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.93` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 是否启用 Hook `SharedPreferences`。
|
||||
|
||||
启用后将在模块启动时强制将 `SharedPreferences` 文件权限调整为 `Context.MODE_WORLD_READABLE` (0644)。
|
||||
|
||||
!> 这是一个可选的实验性功能,此功能默认不启用。
|
||||
|
||||
仅用于修复某些系统可能会出现在启用了 `New XSharedPreferences` 后依然出现文件权限错误问题,若你能正常使用 `YukiHookModulePrefs` 就不建议启用此功能。
|
||||
|
||||
#### isEnableDataChannel *- field*
|
||||
|
||||
```kotlin
|
||||
|
@@ -20,6 +20,8 @@ class YukiHookModulePrefs private constructor(private var context: Context?)
|
||||
|
||||
详见 [New XSharedPreferences](https://github.com/LSPosed/LSPosed/wiki/New-XSharedPreferences#for-the-module)。
|
||||
|
||||
若你在按照规定配置后依然无法使用或出现文件权限错误问题,可以参考 [isEnableHookSharedPreferences](api/document?id=isenablehooksharedpreferences-field)。
|
||||
|
||||
未使用 LSPosed 环境请将你的模块 `API` 降至 `26` 以下,`YukiHookAPI` 将会尝试使用 `makeWorldReadable` 但仍有可能不成功。
|
||||
|
||||
太极请参阅 [文件权限/配置/XSharedPreference](https://taichi.cool/zh/doc/for-xposed-dev.html#文件权限-配置-xsharedpreference)。
|
||||
|
Reference in New Issue
Block a user