OShin | O神「自动构建 CI Build」
1.51K subscribers
2 photos
771 files
678 links
OPPO/OneOlus 系统辅助应用

Channel/频道
@OPatchA
Chat/聊天
@OPatchB
Download Telegram
🚀 OShin New CI Build!

feat(Hook): Add DexKitCacheManager for persistent method caching

This commit introduces , a new utility to persistently cache DexKit search results using MMKV, significantly speeding up hook initialization on subsequent app launches.

The manager implements a cache-then-search strategy. It stores method descriptors found by DexKit and invalidates this cache only when the host application's version code changes. This avoids costly and time-consuming dex rescans for every process start, greatly improving performance.

### Key Changes:

:
Introduced a new singleton object, , to handle the entire caching lifecycle.
Uses MMKV for persistent, multi-process storage of method descriptors.
Caches results on a per-app-version basis, automatically clearing outdated caches when an application is updated.
Hooks into the application's lifecycle to initialize MMKV and DexKit resources in a timely manner.
Employs a to ensure that hook execution waits for the cache manager to be fully initialized, preventing race conditions.

:
Added a call to in the 's method to ensure MMKV is initialized for the main app process.
🔗 查看本次提交
🚀 **OShin New CI Build!**

Chore(CI): Remove unused parameters from Telegram notification step

This commit cleans up the GitHub Actions workflow by removing two deprecated or unused parameters from the Telegram notification step.

The and parameters are no longer necessary for the and have been removed to simplify the workflow configuration.
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/3b8b5394b9299b03811e90cc96e879b3b767e9be)
🚀 **OShin New CI Build!**

Refactor(Hooks): Use float types for status bar Wi-Fi settings

This commit refactors the Wi-Fi status bar hook to use types for retrieving font size and speed threshold preferences, improving precision.

Previously, settings for font sizes (, , , ) and the slow speed threshold were fetched from preferences as values. This commit updates the logic to fetch them as s using and then casts them to for compatibility with their usage. The default sentinel value has also been updated from to to match the new type.

### Key Changes ():

- **Type Correction**:
- , , , , and preferences are now read using instead of .
- The default value for font sizes has been changed to .
- The default value for is now .
- The retrieved float values are cast to before being assigned to the data class properties.
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/869014aea6c3cac3574a1c546008e7661b741ff1)
🚀 **OShin New CI Build!**

Feat(SystemUI): Add View Controller for status bar customization

This commit introduces the View Controller, a powerful new feature that allows users to inspect and modify the visibility of individual views within the SystemUI status bar.

The feature presents a hierarchical tree of all views in the status bar, allowing users to select any view with an ID and set its visibility to Default, Force Show, Force Hide, or Force Invisible. This enables deep customization, such as hiding unwanted icons or system indicators.

Communication between the app and the SystemUI process is handled robustly via YukiHookAPI's . The app can request the view tree, and the hook dynamically parses and sends it back. User configurations are saved to SharedPreferences and immediately applied in the SystemUI process.

### Key Changes:

* ** (Hook):**
* A new hook that injects into .
* It hooks to get a reference to the status bar view.
* Recursively parses the status bar's view hierarchy into a serializable tree.
* Listens for commands from the app via to send the view tree, apply visibility configurations, and highlight selected views.
* Applies saved visibility rules (, , ) to target views.

* ** & (App UI):**
* A new screen and ViewModel to manage the feature's UI and logic.
* The screen displays the view hierarchy in a , with indentation to represent the tree structure.
* It allows nodes to be expanded or collapsed to navigate the tree.
* Clicking a view opens a dialog to change its visibility mode.
* The ViewModel handles state management, data channel communication, and saving configurations.

* ** & (Models):**
* New data models to represent a view's properties (ID, type, visibility, bounds) and its user-defined configuration.

* **Navigation & Integration:**
* A new entry for View Controller has been added to the main function screen.
* The feature is registered in the app's navigation graph.
* New string resources for UI text have been added.
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/22c55dbd8f2d54e71a5e013b243c493e584c4599)
🚀 **OShin New CI Build!**

Chore(Build): Update ProGuard rules to keep models

This commit updates the ProGuard configuration to prevent obfuscation of model classes.

The following rules have been added to :
- : This rule ensures that all classes within the package, along with their members, are preserved during the obfuscation process.
- : This preserves generic type signatures and information about inner classes, which is often necessary for serialization or reflection to work correctly.
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/f305216b65ddc251ac7ad45e788f90567882b7c2)
🚀 **OShin New CI Build!**

Chore(Build): Remove local Expressa AAR dependencies

This commit removes the locally included and dependencies.

These libraries, previously included as local files from the directory, are no longer required by the project.

### Key Changes:

* **:**
* Removed the declarations for and .
* **:**
* The and files have been deleted from the repository.
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/0df1b5696212ba6861f30f9c7041109ef6f635e3)
🚀 **OShin New CI Build!**

Refactor(ViewModel): Add backward compatibility for legacy Slider values

This commit enhances to ensure backward compatibility for preferences that were previously stored as values.

The logic for initializing component states has been updated to handle potential s when reading values. It now attempts to read the value as a first. If that fails, it catches the exception and gracefully falls back to reading the value as an , which is then converted to a .

This prevents crashes and ensures a smooth transition for users who have saved settings from older versions of the app where sliders used integer types.

### Key Changes ():

* **Type-Safe Reading**:
* A block now wraps the logic for reading preference values.
* It prioritizes reading the value as a using .
* If a occurs, it reads the legacy value as an with and converts it to a .
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/861a4a5a28cedd702dc7863fde2ba76635d052e4)
🚀 **OShin New CI Build!**

Refactor(SystemUI): Relocate and rename View Controller to Status Bar Layout

This commit refactors the View Controller feature into a more appropriately named and organized Status Bar Layout module. The core functionality of inspecting and modifying the visibility of status bar elements remains, but the underlying code has been restructured for better clarity and maintainability.

The feature has been moved from a general package to a more specific package. All related UI components, ViewModels, and data models have been similarly relocated and renamed, and the feature is now presented as Status Bar Layout in the UI.

### Key Changes:

* **File Relocation and Renaming:**
* has been deleted and recreated as , with updated package paths and class names.
* UI screens ( -> ), ViewModels ( -> ), and data models (, ) have been moved to a new package.

* **Hook & Preferences Update:**
* The hook class is now .
* SharedPreferences storage has been updated from to to follow the new modular convention.

* **UI & Navigation:**
* The feature title in the UI has been changed from View Controller to Status Bar Layout.
* Navigation routes have been updated from to .
* The entry point has been moved from the main function screen to the SystemUI feature category.

* **ViewModel Enhancement:**
* A 1-second timeout has been added to the function in . If the hook doesn't respond within this time, the loading state is cancelled to prevent the UI from getting stuck.
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/9779f47e696aa4caf7740e23409227598e06362e)
🚀 **OShin New CI Build!**

Refactor(SystemUI): Use hashCode to identify views in View Controller

This commit refactors the View Controller feature to use a view's instead of its resource ID for identification and communication between the app and the SystemUI hook. This change significantly improves the reliability of view targeting, especially for views that do not have a unique resource ID.

Previously, identifying views relied on their string-based resource ID, which was unreliable as many views lack one. This could lead to failures in highlighting or applying visibility changes. By switching to the integer , every view can be uniquely and reliably identified.

### Key Changes:

* **:**
* The data model now includes to store the view's hash code.

* ** (Hook):**
* The view tree parsing logic now captures and stores the of each view in the .
* A new recursive function, , has been implemented to locate views within the status bar hierarchy using their hash code.
* The method now accepts an integer hash code instead of a string ID to find and highlight the target view. A of is used as a signal to clear any active highlight.
* The listener () has been updated to expect an (hash code) instead of a .

* ** & (App UI):**
* The app now sends the view's to the hook when requesting to highlight a view.
* A new method was added to the ViewModel to explicitly send a hash code, providing a clearer way to cancel highlighting.

* **:**
* Updated ProGuard rules to keep classes in the package, ensuring the model is not obfuscated.
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/5dda3d79c6e7fe50ab1efdc0ec7676295c7fcf5d)
🚀 **OShin New CI Build!**

Feat(Settings): Add backup and restore functionality

This commit introduces a comprehensive settings management feature, allowing users to back up, restore, and clear all module configurations.

The new functionality is accessible via a Configuration Management card on the About screen. It enables users to export all current settings to a JSON file and import them from a backup, providing a convenient way to save and transfer setups. A Clear Configuration option is also included to reset all settings to their default values.

To support this, a has been created to handle the logic for exporting (serializing to JSON), importing (deserializing and applying to SharedPreferences), and clearing settings.

### Key Changes:

* ** (New):**
* Introduced a new Hilt to manage configuration logic.
* : Gathers all preferences from registered features, serializes them to a JSON string, and writes them to a user-selected file.
* : Reads a JSON file, deserializes the settings, and commits them to the appropriate SharedPreferences files.
* : Iterates through all known preference files and clears their contents.

* ** (UI):**
* Added a Configuration Management card to the About screen.
* Integrated to handle file creation () for exports and file selection () for imports.
* The UI now includes options for Export, Import, and Clear configurations, which are linked to the new .

* **:**
* Added new string resources for the titles and summaries of the configuration management options.
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/c723e98c047bc278d85723299e982ac40ac45351)
🚀 **OShin New CI Build!**

Refactor(Settings): Improve number type handling in SharedPreferences

This commit refactors the to more intelligently handle saving numerical values to .

Previously, different number types (, , , ) were handled in separate branches. This change unifies the logic by treating all of them as . The new implementation checks if a numerical value is a whole number that fits within an . If it is, the value is saved as an ; otherwise, it is saved as a . This approach simplifies the code and prevents floating-point numbers with no fractional part (e.g., ) from being unnecessarily stored as floats.

### Key Changes ():

- **Unified Number Handling**: Replaced separate cases for , , , and with a single case.
- **Intelligent Type-Casting**:
- Checks if a is a whole number ().
- If it is a whole number and within bounds, it is stored as an .
- Otherwise, the number is stored as a .
🔗 [查看本次提交](https://github.com/suqi8/OShin/commit/7057bdc99f2c34ea3927e2f719dc7d5fbac91cf2)